-SUBDIRS=xml tools droute spi-common atk-adaptor registryd dbind cspi pyatspi login-helper tests
+SUBDIRS=xml tools dbind droute spi-common atk-adaptor registryd cspi pyatspi login-helper tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libspi-1.0.pc cspi-1.0.pc libloginhelper-1.0.pc
goto done;
}
dbus_message_iter_init (message, &iter);
- dbind_any_demarshal (iter, &deviceEvent_type, &p);
+ dbind_any_demarshal (&iter, (char **) &deviceEvent_type, &p);
klass = CSPI_DEVICE_LISTENER_GET_CLASS (listener);
if (klass->device_event)
{
char *root_path;
dbus_error_init (&error);
- if (dbind_connection_method_call (bus, bus_name, "/org/freedesktop/atspi/tree", spi_interface_tree, "getRoot", &error, "=>o", &root_path))
+ if (dbind_method_call_reentrant (bus, bus_name, "/org/freedesktop/atspi/tree", spi_interface_tree, "getRoot", &error, "=>o", &root_path))
{
Accessible *obj = cspi_ref_accessible (bus_name, root_path);
if (obj)
desktop->ref_count = 2; /* one for the caller, one for the hash */
desktop->name = g_strdup ("");
dbus_error_init (&error);
- if (!dbind_connection_method_call (bus, spi_bus_registry, spi_path_registry, spi_interface_registry, "getApplications", &error, "=>as", &apps))
+ if (!dbind_method_call_reentrant (bus, spi_bus_registry, spi_path_registry, spi_interface_registry, "getApplications", &error, "=>as", &apps))
{
g_error ("Couldn't get application list: %s", error.message);
}
CSpiApplication *app = cspi_get_application (app_name);
additions = NULL;
dbus_error_init (&error);
- dbind_connection_method_call (bus, app_name, "/org/freedesktop/atspi/tree", spi_interface_tree, "getTree", &error, "=>a(ooaoassusau)", &additions);
+ dbind_method_call_reentrant (bus, app_name, "/org/freedesktop/atspi/tree", spi_interface_tree, "getTree", &error, "=>a(ooaoassusau)", &additions);
if (error.message)
{
g_warning ("getTree (%s): %s", app_name, error.message);
if (!error) error = &err;
dbus_error_init (error);
va_start (args, type);
- retval = dbind_connection_method_call_va (SPI_bus(), obj->app->bus_name, path, interface, method, error, type, args);
+ retval = dbind_method_call_reentrant_va (SPI_bus(), obj->app->bus_name, path, interface, method, error, type, args);
va_end (args);
g_free (path);
if (dbus_error_is_set (error))
(dbus_bool_t) ((sync_type & SPI_KEYLISTENER_ALL_WINDOWS)!=0);
dbus_error_init (&error);
- dbind_connection_method_call (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "registerKeystrokeListener", &error, "oa(iisi)uu(bbb)=>b", path, key_set, controller_event_mask, key_set, &listener_mode, &retval);
+ dbind_method_call_reentrant (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "registerKeystrokeListener", &error, "oa(iisi)uu(bbb)=>b", path, key_set, controller_event_mask, key_set, &listener_mode, &retval);
g_array_free (key_set, TRUE);
g_free (path);
controller_event_mask = (dbus_uint32_t) modmask;
key_set = g_array_sized_new (FALSE, TRUE, sizeof (Accessibility_KeyDefinition), 0);
- dbind_connection_method_call (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "deregisterKeystrokeListener", &error, "oa(iisi)uu", path, &key_set, key_events, controller_event_mask);
+ dbind_method_call_reentrant (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "deregisterKeystrokeListener", &error, "oa(iisi)uu", path, &key_set, key_events, controller_event_mask);
g_free (path);
return TRUE;
}
}
dbus_error_init (&error);
- dbind_connection_method_call (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "registerDeviceEventListener", &error, "ou=>b", path, event_types, &retval);
+ dbind_method_call_reentrant (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "registerDeviceEventListener", &error, "ou=>b", path, event_types, &retval);
g_free (path);
return retval;
}
event_types |= (1 << Accessibility_BUTTON_RELEASED_EVENT);
dbus_error_init (&error);
- dbind_connection_method_call (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "deregisterDeviceEventListener", &error, "ou", path, event_types);
+ dbind_method_call_reentrant (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "deregisterDeviceEventListener", &error, "ou", path, event_types);
g_free (path);
return TRUE;
}
if (!keystring) keystring = "";
dbus_error_init (&error);
- dbind_connection_method_call (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "generateKeyboardEvent", &error, "isu", keycode, keystring, keysynth_type);
+ dbind_method_call_reentrant (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "generateKeyboardEvent", &error, "isu", keycode, keystring, keysynth_type);
return TRUE;
}
DBusError error;
dbus_error_init (&error);
- dbind_connection_method_call (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "generateMouseEvent", &error, "iis", x, y, name);
+ dbind_method_call_reentrant (SPI_bus(), spi_bus_registry, spi_path_dec, spi_interface_dec, "generateMouseEvent", &error, "iis", x, y, name);
return TRUE;
}
return reply;
}
-/**
- * dbind_method_call_reentrant:
- *
- * @cnx: A D-Bus Connection used to make the method call.
- * @bus_name: The D-Bus bus name of the program where the method call should
- * be made.
- * @path: The D-Bus object path that should handle the method.
- * @interface: The D-Bus interface used to scope the method name.
- * @method: Method to be invoked.
- * @opt_error: D-Bus error.
- * @arg_types: Variable length arguments interleaving D-Bus argument types
- * and pointers to argument data.
- *
- * Makes a D-Bus method call using the supplied location data, method name and
- * argument data.This function is re-entrant. It continuously reads from the D-Bus
- * bus and dispatches messages until a reply has been recieved.
- **/
dbus_bool_t
-dbind_method_call_reentrant (DBusConnection *cnx,
- const char *bus_name,
- const char *path,
- const char *interface,
- const char *method,
- DBusError *opt_error,
- const char *arg_types,
- ...)
+dbind_method_call_reentrant_va (DBusConnection *cnx,
+ const char *bus_name,
+ const char *path,
+ const char *interface,
+ const char *method,
+ DBusError *opt_error,
+ const char *arg_types,
+ va_list args)
{
dbus_bool_t success = FALSE;
DBusMessage *msg = NULL, *reply = NULL;
DBusMessageIter iter;
DBusError *err, real_err;
char *p;
- va_list args;
-
- va_start (args, arg_types);
if (opt_error)
err = opt_error;
success = TRUE;
out:
- va_end (args);
-
if (msg)
dbus_message_unref (msg);
return success;
}
+/**
+ * dbind_method_call_reentrant:
+ *
+ * @cnx: A D-Bus Connection used to make the method call.
+ * @bus_name: The D-Bus bus name of the program where the method call should
+ * be made.
+ * @path: The D-Bus object path that should handle the method.
+ * @interface: The D-Bus interface used to scope the method name.
+ * @method: Method to be invoked.
+ * @opt_error: D-Bus error.
+ * @arg_types: Variable length arguments interleaving D-Bus argument types
+ * and pointers to argument data.
+ *
+ * Makes a D-Bus method call using the supplied location data, method name and
+ * argument data.This function is re-entrant. It continuously reads from the D-Bus
+ * bus and dispatches messages until a reply has been recieved.
+ **/
+dbus_bool_t
+dbind_method_call_reentrant (DBusConnection *cnx,
+ const char *bus_name,
+ const char *path,
+ const char *interface,
+ const char *method,
+ DBusError *opt_error,
+ const char *arg_types,
+ ...)
+{
+ dbus_bool_t success = FALSE;
+ va_list args;
+
+ va_start (args, arg_types);
+ success = dbind_method_call_reentrant_va (cnx,
+ bus_name,
+ path,
+ interface,
+ method,
+ opt_error,
+ arg_types,
+ args);
+ va_end (args);
+
+ return success;
+}
+
/*---------------------------------------------------------------------------*/
/**
#include <dbind/dbind-any.h>
dbus_bool_t
+dbind_method_call_reentrant_va (DBusConnection *cnx,
+ const char *bus_name,
+ const char *path,
+ const char *interface,
+ const char *method,
+ DBusError *opt_error,
+ const char *arg_types,
+ va_list args);
+
+dbus_bool_t
dbind_method_call_reentrant (DBusConnection *cnx,
const char *bus_name,
const char *path,