2008-05-20 Mark Doffman <mark.doffman@codethink.co.uk>
authorMark Doffman <mdoff@silver-wind.(none)>
Tue, 20 May 2008 21:03:09 +0000 (22:03 +0100)
committerMark Doffman <mdoff@silver-wind.(none)>
Tue, 20 May 2008 21:03:09 +0000 (22:03 +0100)
* atk-adaptor/bridge.c
  Fix registration path for droute.
* atk-adaptor/introspectable.c
  Fix lack of Accessible interface in introspection.
* atk-adaptor/tree.c
  Fix case where methods called witout interface
* tests/accessible_cache.py
  Add interface constants.

atk-adaptor/bridge.c
atk-adaptor/introspectable.c
atk-adaptor/tree.c
tests/accessible_cache.py

index a579bca..106fb71 100644 (file)
@@ -200,7 +200,7 @@ spi_app_init (AtkObject *root)
   /* Below line for testing -- it should be removed once at-spi-registryd is working */
   if (dbus_bus_request_name(ad->droute.bus, "test.atspi.tree", 0, &error)) printf("Got test name.\n");
   spi_register_tree_object(ad->droute.bus, &ad->droute, "/org/freedesktop/atspi/tree");
-  if (!dbus_connection_try_register_fallback (ad->droute.bus, "/org/freedesktop/atspi/accessible/", &droute_vtable, &ad->droute, &error))
+  if (!dbus_connection_try_register_fallback (ad->droute.bus, "/org/freedesktop/atspi/accessible", &droute_vtable, &ad->droute, &error))
   {
     g_warning("Couldn't register droute.\n");
   }
index 44d5eef..780ea7f 100644 (file)
@@ -53,6 +53,8 @@ impl_introspect (DBusConnection *bus, DBusMessage *message,
   
   g_string_append_printf(output, spi_introspection_node_element, path);
 
+  spi_append_interface(output, "org.freedesktop.atspi.Accessible");
+
   if (ATK_IS_ACTION (object))
       spi_append_interface(output, "org.freedesktop.atspi.Action");
 
@@ -114,7 +116,7 @@ static DRouteMethod methods[] = {
 void
 spi_initialize_introspectable (DRouteData *data, DRouteGetDatumFunction verify_object)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Introspectable",
+  droute_add_interface (data, "org.freedesktop.DBus.Introspectable",
                        methods, NULL,
                        verify_object, NULL);
 };
index 752d011..5c12747 100644 (file)
@@ -204,6 +204,8 @@ message_handler (DBusConnection *bus, DBusMessage *message, void *user_data)
   const char *member = dbus_message_get_member (message);
 
   DBusMessage *reply = NULL;
+
+  g_return_val_if_fail(iface != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
   
   if (!strcmp(iface, "org.freedesktop.atspi.Tree"))
     {
index ebcf9fe..a8a7c61 100644 (file)
@@ -19,7 +19,27 @@ from weakref import ref
 from dbus.proxies import Interface, ProxyObject
 
 ATSPI_ACCESSIBLE = 'org.freedesktop.atspi.Accessible'
-ATSPI_ACCESSIBLE_TREE = 'org.freedesktop.atspi.Tree'
+ATSPI_ACTION = 'org.freedesktop.atspi.Action'
+ATSPI_APPLICATION = 'org.freedesktop.atspi.Application'
+ATSPI_COMPONENT = 'org.freedesktop.atspi.Component'
+ATSPI_DEVICE_EVENT_CONTROLLER = 'org.freedesktop.atspi.DeviceEventController'
+ATSPI_DEVICE_EVENT_LISTENER = 'org.freedesktop.atspi.DeviceEventListener'
+ATSPI_DOCUMENT = 'org.freedesktop.atspi.Document'
+ATSPI_EDITABLE_TEXT = 'org.freedesktop.atspi.EditableText'
+ATSPI_HYPERLINK = 'org.freedesktop.atspi.Hyperlink'
+ATSPI_HYPERTEXT = 'org.freedesktop.atspi.Hypertext'
+ATSPI_IMAGE = 'org.freedesktop.atspi.Image'
+ATSPI_LOGIN_HELPER = 'org.freedesktop.atspi.LoginHelper'
+ATSPI_REGISTRY = 'org.freedesktop.atspi.Registry'
+ATSPI_SELECTION = 'org.freedesktop.atspi.Selection'
+ATSPI_SELECTOR = 'org.freedesktop.atspi.Selector'
+ATSPI_STREAMABLE_CONTENT = 'org.freedesktop.atspi.Content'
+ATSPI_TABLE = 'org.freedesktop.atspi.Table'
+ATSPI_TEXT = 'org.freedesktop.atspi.Text'
+ATSPI_TREE = 'org.freedesktop.atspi.Tree'
+ATSPI_VALUE = 'org.freedesktop.atspi.Value'
+
+DBUS_INTROSPECTABLE = 'org.freedesktop.DBus.Introspectable'
 
 class AccessibleObjectDoesNotExist(Exception):
        pass
@@ -76,7 +96,7 @@ class AccessibleCache(object):
 
                self._connection = connection
                self._busName = busName
-               self._accessibleStore = dbus.Interface(storeObject, ATSPI_ACCESSIBLE_TREE)
+               self._accessibleStore = dbus.Interface(storeObject, ATSPI_TREE)
                self._objects = {}
                #TODO are we caching the root accessible or not?
                #Do we need a roundtrip to access this?