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);
char *bus_name;
if (type == DBUS_MESSAGE_TYPE_SIGNAL &&
- !strcmp (interface, SPI_DBUS_INTERFACE_ACCESSIBLE))
+ !strncmp (interface, "org.freedesktop.atspi.Event.", 28))
{
return cspi_dbus_handle_event (bus, message, data);
}
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
+static const char *signal_interfaces[] =
+{
+ "org.freedesktop.atspi.Event.Object",
+ "org.freedesktop.atspi.Event.Window",
+ "org.freedesktop.atspi.Event.Mouse",
+ "org.freedesktop.atspi.Event.Terminal",
+ "org.freedesktop.atspi.Event.Document",
+ "org.freedesktop.atspi.Event.Focus",
+ NULL
+};
+
/**
* SPI_init:
*
{
DBusError error;
char *match;
+ int i;
if (SPI_inited)
{
match = g_strdup_printf ("type='method_call',interface='%s'", spi_interface_registry);
dbus_bus_add_match (bus, match, &error);
g_free (match);
+ for (i = 0; signal_interfaces[i]; i++)
+ {
+ match = g_strdup_printf ("type='signal',interface='%s'", signal_interfaces[i]);
+ dbus_bus_add_match (bus, match, &error);
+ g_free (match);
+ }
return 0;
}
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))