SPI_DBUS_INTERFACE_ACCESSIBLE,
SPI_DBUS_INTERFACE_ACTION,
SPI_DBUS_INTERFACE_APPLICATION,
+ SPI_DBUS_INTERFACE_COLLECTION,
SPI_DBUS_INTERFACE_COMPONENT,
SPI_DBUS_INTERFACE_DOCUMENT,
SPI_DBUS_INTERFACE_EDITABLE_TEXT,
{
g_free (accessible->v.path);
}
- spi_state_set_cache_unref (accessible->states);
+ if (accessible->states)
+ spi_state_set_cache_unref (accessible->states);
g_free (accessible->description);
g_free (accessible->name);
g_free(accessible);
a->states = spi_state_set_cache_new (ca->state_bitflags);
g_array_free (ca->interfaces, TRUE);
g_array_free (ca->children, TRUE);
- g_array_free (ca->state_bitflags, TRUE);
+ /* spi_state_set_cache_new frees state_bitflags */
/* This is a bit of a hack since ref_accessible sets ref_count to 2
* for a new object, one of the refs being for the cache */
cspi_object_unref (a);
GArray *removals;
} CacheSignalData;
-static const char *cacheSignalType = "a(ooaoassus)ao";
+static const char *cacheSignalType = "a(ooaoassusau)ao";
static DBusHandlerResult
cspi_dbus_handle_update_tree (DBusConnection *bus, DBusMessage *message, void *user_data)
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 cspi_dbus_handle_update_tree (bus, message, data);
}
- if (dbus_message_is_signal (message, spi_interface_tree, "registerApplication"))
+ if (dbus_message_is_method_call (message, spi_interface_registry, "registerApplication"))
{
return cspi_dbus_handle_register_application (bus, message, data);
}
- if (dbus_message_is_signal (message, spi_interface_registry, "deregisterApplication"))
+ if (dbus_message_is_method_call (message, spi_interface_registry, "deregisterApplication"))
{
return cspi_dbus_handle_deregister_application (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)
{
dbus_error_init (&error);
dbus_bus_add_match (bus, match, &error);
g_free (match);
- match = g_strdup_printf ("type='signal',interface='%s'", spi_interface_tree);
+ 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;
}