#include <atk/atk.h>
#include <droute/droute.h>
-#include "spi-common/spi-dbus.h"
+#include "common/spi-dbus.h"
+#include "common/spi-stateset.h"
#include "accessible-marshaller.h"
#include "accessible-register.h"
static dbus_bool_t
-impl_get_name (DBusMessageIter *iter, void *user_data)
+impl_get_Name (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static dbus_bool_t
-impl_set_name (DBusMessageIter *iter, void *user_data)
+impl_set_Name (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
const char *name = droute_get_v_string (iter);
}
static dbus_bool_t
-impl_get_description (DBusMessageIter *iter, void *user_data)
+impl_get_Description (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static dbus_bool_t
-impl_set_description (DBusMessageIter *iter, void *user_data)
+impl_set_Description (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
const char *description = droute_get_v_string (iter);
}
static dbus_bool_t
-impl_get_parent (DBusMessageIter *iter, void *user_data)
+impl_get_Parent (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static dbus_bool_t
-impl_get_childCount (DBusMessageIter *iter, void *user_data)
+impl_get_ChildCount (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static DBusMessage *
-impl_getChildAtIndex (DBusConnection *bus,
+impl_GetChildAtIndex (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
if (!dbus_message_get_args (message, &error, DBUS_TYPE_INT32, &i, DBUS_TYPE_INVALID))
return spi_dbus_general_error (message);
child = atk_object_ref_accessible_child (object, i);
- return spi_dbus_return_object (message, child, FALSE);
+ return spi_dbus_return_object (message, child, FALSE, FALSE);
}
static DBusMessage *
-impl_getChildren (DBusConnection *bus,
+impl_GetChildren (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
for (i = 0; i < count; i++)
{
AtkObject *child = atk_object_ref_accessible_child (object, i);
- char *path = atk_dbus_object_to_path (child);
+ char *path = atk_dbus_object_to_path (child, FALSE);
if (path)
{
dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_OBJECT_PATH,
}
static DBusMessage *
-impl_getIndexInParent (DBusConnection *bus,
+impl_GetIndexInParent (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getRelationSet (DBusConnection *bus,
+impl_GetRelationSet (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
if (!reply) return NULL;
set = atk_object_ref_relation_set (object);
dbus_message_iter_init_append (reply, &iter);
- if (!dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(uao)", &iter_array))
+ if (!dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(ua(so))", &iter_array))
{
goto oom;
}
goto oom;
}
dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_UINT32, &type);
- if (!dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "o", &iter_targets))
+ if (!dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "(so)", &iter_targets))
{
goto oom;
}
AtkObject *obj = target->pdata[j];
char *path;
if (!obj) continue;
- path = atk_dbus_object_to_path (obj);
- dbus_message_iter_append_basic (&iter_targets, DBUS_TYPE_OBJECT_PATH, &path);
+ path = atk_dbus_object_to_path (obj, FALSE);
+ if (!path)
+ {
+ g_warning ("Unknown object in relation type %d\n", type);
+ continue;
+ }
+ spi_dbus_append_name_and_path_inner (&iter_targets, NULL, path);
}
dbus_message_iter_close_container (&iter_struct, &iter_targets);
dbus_message_iter_close_container (&iter_array, &iter_struct);
}
static DBusMessage *
-impl_getRole (DBusConnection *bus, DBusMessage *message, void *user_data)
+impl_GetRole (DBusConnection *bus, DBusMessage *message, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
gint role;
}
static DBusMessage *
-impl_getRoleName (DBusConnection *bus,
+impl_GetRoleName (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getLocalizedRoleName (DBusConnection *bus,
+impl_GetLocalizedRoleName (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getState (DBusConnection *bus,
+impl_GetState (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getAttributes (DBusConnection *bus,
+impl_GetAttributes (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getApplication (DBusConnection *bus,
+impl_GetApplication (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
AtkObject *root = atk_get_root ();
- return spi_dbus_return_object (message, root, FALSE);
+ return spi_dbus_return_object (message, root, FALSE, FALSE);
+}
+
+static DBusMessage *
+impl_GetInterfaces (DBusConnection *bus,
+ DBusMessage *message,
+ void *user_data)
+{
+ AtkObject *object = (AtkObject *) user_data;
+ gint role;
+ const char *role_name;
+ DBusMessage *reply;
+ DBusMessageIter iter, iter_array;
+
+ g_return_val_if_fail (ATK_IS_OBJECT (user_data),
+ droute_not_yet_handled_error (message));
+ reply = dbus_message_new_method_return (message);
+ if (reply)
+ {
+ dbus_message_iter_init_append (reply, &iter);
+ dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "s", &iter_array);
+ append_atk_object_interfaces (object, &iter_array);
+ dbus_message_iter_close_container (&iter, &iter_array);
+ }
+ return reply;
}
static DRouteMethod methods[] = {
- {impl_getChildAtIndex, "getChildAtIndex"},
- {impl_getChildren, "getChildren"},
- {impl_getIndexInParent, "getIndexInParent"},
- {impl_getRelationSet, "getRelationSet"},
- {impl_getRole, "getRole"},
- {impl_getRoleName, "getRoleName"},
- {impl_getLocalizedRoleName, "getLocalizedRoleName"},
- {impl_getState, "getState"},
- {impl_getAttributes, "getAttributes"},
- {impl_getApplication, "getApplication"},
+ {impl_GetChildAtIndex, "GetChildAtIndex"},
+ {impl_GetChildren, "GetChildren"},
+ {impl_GetIndexInParent, "GetIndexInParent"},
+ {impl_GetRelationSet, "GetRelationSet"},
+ {impl_GetRole, "GetRole"},
+ {impl_GetRoleName, "GetRoleName"},
+ {impl_GetLocalizedRoleName, "GetLocalizedRoleName"},
+ {impl_GetState, "GetState"},
+ {impl_GetAttributes, "GetAttributes"},
+ {impl_GetApplication, "GetApplication"},
+ {impl_GetInterfaces, "GetInterfaces"},
{NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_name, impl_set_name, "name"},
- {impl_get_description, impl_set_description, "description"},
- {impl_get_parent, NULL, "parent"},
- {impl_get_childCount, NULL, "childCount"},
+ {impl_get_Name, impl_set_Name, "Name"},
+ {impl_get_Description, impl_set_Description, "Description"},
+ {impl_get_Parent, NULL, "Parent"},
+ {impl_get_ChildCount, NULL, "ChildCount"},
{NULL, NULL, NULL}
};