Fix handling of MATCH_ANY for empty statesets in a collection match rule
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / adaptors / accessible-adaptor.c
index 2dd6cd7..b40c5f9 100644 (file)
@@ -28,6 +28,7 @@
 #include "common/spi-dbus.h"
 #include "common/spi-stateset.h"
 #include "object.h"
+#include "introspection.h"
 
 static dbus_bool_t
 impl_get_Name (DBusMessageIter * iter, void *user_data)
@@ -291,7 +292,9 @@ impl_GetRelationSet (DBusConnection * bus,
     {
       goto oom;
     }
-  count = atk_relation_set_get_n_relations (set);
+  count = 0;
+  if (set)
+    count = atk_relation_set_get_n_relations (set);
   for (i = 0; i < count; i++)
     {
       AtkRelation *r = atk_relation_set_get_relation (set, i);
@@ -493,27 +496,6 @@ impl_GetInterfaces (DBusConnection * bus,
   return reply;
 }
 
-static DBusMessage *
-impl_Embedded (DBusConnection *bus,
-                    DBusMessage *message,
-                    void *user_data)
-{
-  AtkObject *object = (AtkObject *) user_data;
-  char *path;
-  gchar *id;
-
-  if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID))
-    {
-      return droute_invalid_arguments_error (message);
-    }
-  id = g_object_get_data (G_OBJECT (object), "dbus-plug-parent");
-  if (id)
-    g_free (id);
-  id = g_strconcat (dbus_message_get_sender (message), ":", path, NULL);
-  g_object_set_data (G_OBJECT (object), "dbus-plug-parent", id);
-  return dbus_message_new_method_return (message);
-}
-
 static DRouteMethod methods[] = {
   {impl_GetChildAtIndex, "GetChildAtIndex"},
   {impl_GetChildren, "GetChildren"},
@@ -526,7 +508,6 @@ static DRouteMethod methods[] = {
   {impl_GetAttributes, "GetAttributes"},
   {impl_GetApplication, "GetApplication"},
   {impl_GetInterfaces, "GetInterfaces"},
-  {impl_Embedded, "Embedded"},
   {NULL, NULL}
 };
 
@@ -543,5 +524,6 @@ spi_initialize_accessible (DRoutePath * path)
 {
   droute_path_add_interface (path,
                              SPI_DBUS_INTERFACE_ACCESSIBLE,
+                             spi_org_a11y_atspi_Accessible,    
                              methods, properties);
 };