2009-07-06 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / hypertext-adaptor.c
index a1c2298..af3334e 100644 (file)
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "spi-common/spi-dbus.h"
+#include "common/spi-dbus.h"
 
 static DBusMessage *
 impl_getNLinks (DBusConnection * bus, DBusMessage * message, void *user_data)
@@ -41,7 +41,7 @@ impl_getNLinks (DBusConnection * bus, DBusMessage * message, void *user_data)
   if (reply)
     {
       dbus_message_append_args (reply, DBUS_TYPE_INT32, &rv,
-                               DBUS_TYPE_INVALID);
+                                DBUS_TYPE_INVALID);
     }
   return reply;
 }
@@ -60,15 +60,16 @@ impl_getLink (DBusConnection * bus, DBusMessage * message, void *user_data)
   if (!dbus_message_get_args
       (message, &error, DBUS_TYPE_INT32, &linkIndex, DBUS_TYPE_INVALID))
     {
-      return SPI_DBUS_RETURN_ERROR (message, &error);
+      return droute_invalid_arguments_error (message);
     }
   link = atk_hypertext_get_link (hypertext, linkIndex);
-  return spi_dbus_return_object (message, ATK_OBJECT (link), FALSE);
+  return NULL; // TODO
+  //return spi_dbus_return_object (message, ATK_OBJECT (link), FALSE);
 }
 
 static DBusMessage *
 impl_getLinkIndex (DBusConnection * bus, DBusMessage * message,
-                  void *user_data)
+                   void *user_data)
 {
   AtkHypertext *hypertext = (AtkHypertext *) user_data;
   DBusError error;
@@ -82,14 +83,14 @@ impl_getLinkIndex (DBusConnection * bus, DBusMessage * message,
   if (!dbus_message_get_args
       (message, &error, DBUS_TYPE_INT32, &characterIndex, DBUS_TYPE_INVALID))
     {
-      return SPI_DBUS_RETURN_ERROR (message, &error);
+      return droute_invalid_arguments_error (message);
     }
   rv = atk_hypertext_get_link_index (hypertext, characterIndex);
   reply = dbus_message_new_method_return (message);
   if (reply)
     {
       dbus_message_append_args (reply, DBUS_TYPE_INT32, &rv,
-                               DBUS_TYPE_INVALID);
+                                DBUS_TYPE_INVALID);
     }
   return reply;
 }