NOT TESTED. Partial work to update DRoute.
[platform/core/uifw/at-spi2-atk.git] / libspi / document.c
index a0ba41e..f4fd592 100644 (file)
@@ -37,7 +37,7 @@ static AtkDocument *
 get_document_from_path (const char *path, void *user_data)
 {
   AtkObject *obj = spi_dbus_get_object (path);
-  if (!obj)
+  if (!obj || !ATK_IS_DOCUMENT(obj))
     return NULL;
   return ATK_DOCUMENT (obj);
 }
@@ -134,17 +134,16 @@ impl_getAttributes (DBusConnection * bus, DBusMessage * message,
 }
 
 static DRouteMethod methods[] = {
-  {DROUTE_METHOD, impl_getLocale, "getLocale", "s,,o"},
-  {DROUTE_METHOD, impl_getAttributeValue, "getAttributeValue",
-   "s,attributename,i:s,,o"},
-  {DROUTE_METHOD, impl_getAttributes, "getAttributes", "as,,o"},
-  {0, NULL, NULL, NULL}
+  {impl_getLocale, "getLocale"},
+  {impl_getAttributeValue, "getAttributeValue"},
+  {impl_getAttributes, "getAttributes"},
+  {NULL, NULL}
 };
 
 void
 spi_initialize_document (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.accessibility.Document",
+  droute_add_interface (data, "org.freedesktop.atspi.Document",
                        methods, NULL,
                        (DRouteGetDatumFunction) get_document_from_path,
                        NULL);