Removed the extra boolean parameter added to know when to unref the
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / adaptors / table-adaptor.c
index 212004a..59d45e8 100644 (file)
@@ -25,8 +25,9 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "accessible-marshaller.h"
 #include "common/spi-dbus.h"
+#include "object.h"
+#include "introspection.h"
 
 static dbus_bool_t
 impl_get_NRows (DBusMessageIter * iter, void *user_data)
@@ -49,8 +50,8 @@ impl_get_Caption (DBusMessageIter * iter, void *user_data)
 {
   AtkTable *table = (AtkTable *) user_data;
   g_return_val_if_fail (ATK_IS_TABLE (user_data), FALSE);
-  return spi_dbus_return_v_object (iter, atk_table_get_caption (table),
-                                   FALSE);
+  spi_object_append_v_reference (iter, atk_table_get_caption (table));
+  return TRUE;
 }
 
 static dbus_bool_t
@@ -58,8 +59,8 @@ impl_get_Summary (DBusMessageIter * iter, void *user_data)
 {
   AtkTable *table = (AtkTable *) user_data;
   g_return_val_if_fail (ATK_IS_TABLE (user_data), FALSE);
-  return spi_dbus_return_v_object (iter, atk_table_get_summary (table),
-                                   FALSE);
+  spi_object_append_v_reference (iter, atk_table_get_summary (table));
+  return TRUE;
 }
 
 static dbus_bool_t
@@ -94,6 +95,7 @@ impl_GetAccessibleAt (DBusConnection * bus, DBusMessage * message,
 {
   AtkTable *table = (AtkTable *) user_data;
   dbus_int32_t row, column;
+  DBusMessage *reply;
   DBusError error;
   AtkObject *obj;
 
@@ -107,7 +109,10 @@ impl_GetAccessibleAt (DBusConnection * bus, DBusMessage * message,
       return droute_invalid_arguments_error (message);
     }
   obj = atk_table_ref_at (table, row, column);
-  return spi_dbus_return_object (message, obj, TRUE, TRUE);
+  reply = spi_object_return_reference (message, obj);
+  g_object_unref (obj);
+
+  return reply;
 }
 
 static DBusMessage *
@@ -319,7 +324,7 @@ impl_GetRowHeader (DBusConnection * bus, DBusMessage * message,
   AtkTable *table = (AtkTable *) user_data;
   dbus_int32_t row;
   DBusError error;
-  AtkObject *obj;
+  AtkObject *obj = NULL;
 
   g_return_val_if_fail (ATK_IS_TABLE (user_data),
                         droute_not_yet_handled_error (message));
@@ -330,8 +335,7 @@ impl_GetRowHeader (DBusConnection * bus, DBusMessage * message,
       return droute_invalid_arguments_error (message);
     }
   obj = atk_table_get_row_header (table, row);
-  obj = atk_table_get_row_header (table, row);
-  return spi_dbus_return_object (message, obj, TRUE, FALSE);
+  return spi_object_return_reference (message, obj);
 }
 
 static DBusMessage *
@@ -352,8 +356,7 @@ impl_GetColumnHeader (DBusConnection * bus, DBusMessage * message,
       return droute_invalid_arguments_error (message);
     }
   obj = atk_table_get_column_header (table, column);
-  obj = atk_table_get_column_header (table, column);
-  return spi_dbus_return_object (message, obj, TRUE, FALSE);
+  return spi_object_return_reference (message, obj);
 }
 
 static DBusMessage *
@@ -678,8 +681,8 @@ static DRouteProperty properties[] = {
   {impl_get_NColumns, NULL, "NColumns"},
   {impl_get_Caption, NULL, "Caption"},
   {impl_get_Summary, NULL, "Summary"},
-  {impl_get_NSelectedRows, NULL, "nSelectedRows"},
-  {impl_get_NSelectedColumns, NULL, "nSelectedColumns"},
+  {impl_get_NSelectedRows, NULL, "NSelectedRows"},
+  {impl_get_NSelectedColumns, NULL, "NSelectedColumns"},
   {NULL, NULL, NULL}
 };
 
@@ -687,5 +690,5 @@ void
 spi_initialize_table (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_TABLE, methods, properties);
+                             SPI_DBUS_INTERFACE_TABLE, spi_org_a11y_atspi_Table, methods, properties);
 };