path = atk_dbus_object_to_path (obj);
- if (unref)
+ if (obj && unref)
g_object_unref (obj);
+ if (!path)
+ path = g_strdup (SPI_DBUS_PATH_NULL);
+
reply = dbus_message_new_method_return (message);
if (reply)
{
- dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, path,
+ dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID);
}
+
+ g_free (path);
+
return reply;
}
return droute_invalid_arguments_error (message);
}
atk_editable_text_copy_text (editable, startPos, endPos);
- return NULL;
+ return dbus_message_new_method_return (message);
}
static DBusMessage *
dbus_int32_t startOffset, endOffset;
dbus_bool_t defined;
gint intstart_offset = 0, intend_offset = 0;
- char *rv;
+ char *rv = NULL;
DBusError error;
DBusMessage *reply;
AtkAttributeSet *set;
dbus_error_init (&error);
if (!dbus_message_get_args
(message, &error, DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y,
- DBUS_TYPE_INT32, &height, DBUS_TYPE_INT32, &width, DBUS_TYPE_INT32,
+ DBUS_TYPE_INT32, &height, DBUS_TYPE_INT32, &width, DBUS_TYPE_INT16,
&coordType, DBUS_TYPE_INT32, &xClipType, DBUS_TYPE_INT32, &yClipType,
DBUS_TYPE_INVALID))
{
* unilaterally muck with the spec and remove it, so I'll just
* throw in a dummy value */
if (dbus_message_iter_open_container
- (&array, DBUS_TYPE_VARIANT, "i", &variant))
+ (&struc, DBUS_TYPE_VARIANT, "i", &variant))
{
dbus_uint32_t dummy = 0;
dbus_message_iter_append_basic (&variant, DBUS_TYPE_INT32,
if (g_value_transform (&src, &dest))
{
dub = g_value_get_double (&dest);
- dbus_message_iter_append_basic (iter, DBUS_TYPE_DOUBLE, &dub);
- return TRUE;
+ return droute_return_v_double (iter, dub);
}
else
{
if (g_value_transform (&src, &dest))
{
dub = g_value_get_double (&dest);
- dbus_message_iter_append_basic (iter, DBUS_TYPE_DOUBLE, &dub);
- return TRUE;
+ return droute_return_v_double (iter, dub);
}
else
{
if (g_value_transform (&src, &dest))
{
dub = g_value_get_double (&dest);
- dbus_message_iter_append_basic (iter, DBUS_TYPE_DOUBLE, &dub);
- return TRUE;
+ return droute_return_v_double (iter, dub);
}
else
{
if (g_value_transform (&src, &dest))
{
dub = g_value_get_double (&dest);
- dbus_message_iter_append_basic (iter, DBUS_TYPE_DOUBLE, &dub);
- return TRUE;
+ return droute_return_v_double (iter, dub);
}
else
{
GValue src = {0};
GValue dest = {0};
gdouble dub;
+ DBusMessageIter iter_variant;
g_return_val_if_fail (ATK_IS_VALUE (user_data), FALSE);
- dbus_message_iter_get_basic (iter, &dub);
+ dbus_message_iter_recurse (iter, &iter_variant);
+ if (dbus_message_iter_get_arg_type (&iter_variant) != DBUS_TYPE_DOUBLE)
+ {
+ G_WARNING ("TODO: Support setting value from a non-double");
+ return FALSE;
+ }
+ dbus_message_iter_get_basic (&iter_variant, &dub);
g_value_init (&src, G_TYPE_DOUBLE);
g_value_set_double (&src, dub);
reply = dbus_message_new_method_return (message);
dbus_message_iter_init_append (reply, &iter);
- (prop_funcs->get) (&iter, datum);
+ if (!(prop_funcs->get) (&iter, datum))
+ {
+ dbus_message_unref (reply);
+ reply = dbus_message_new_error (message, DBUS_ERROR_FAILED, "Get failed");
+ }
}
else if (!get && prop_funcs->set)
{
_DROUTE_DEBUG ("DRoute (handle prop Get): %s|%s on %s\n", pair.one, pair.two, pathstr);
- dbus_message_iter_init_append (message, &iter);
+ dbus_message_iter_init (message, &iter);
/* Skip the interface and property name */
dbus_message_iter_next(&iter);
dbus_message_iter_next(&iter);
* method implementation
*/
static DBusMessage *
-impl_register_device_listener (DBusConnection *bus,
+impl_register_device_event_listener (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
* method implementation
*/
static DBusMessage *
-impl_deregister_device_listener (DBusConnection *bus,
+impl_deregister_device_event_listener (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
static DRouteMethod dev_methods[] =
{
{ impl_register_keystroke_listener, "registerKeystrokeListener" },
- { impl_register_device_listener, "registerDeviceListener" },
+ { impl_register_device_event_listener, "registerDeviceEventListener" },
{ impl_deregister_keystroke_listener, "deregisterKeystrokeListener" },
- { impl_deregister_device_listener, "deregisterDeviceListener" },
+ { impl_deregister_device_event_listener, "deregisterDeviceEventListener" },
{ impl_generate_keyboard_event, "generateKeyboardEvent" },
{ impl_generate_mouse_event, "generateMouseEvent" },
{ impl_notify_listeners_sync, "notifyListenersSync" },
#define SPI_DBUS_INTERFACE_VALUE "org.freedesktop.atspi.Value"
#define SPI_DBUS_NAME_REGISTRY "org.freedesktop.atspi.Registry"
#define SPI_DBUS_PATH_DESKTOP "/org/freedesktop/atspi/registry/desktop"
-#define SPI_DBUS_PATH_NULL "/"
+#define SPI_DBUS_PATH_NULL "/org/freedesktop/accessible/null"
#define SPI_DBUS_PATH_REGISTRY "/org/freedesktop/atspi/registry"
DBusMessage *spi_dbus_general_error(DBusMessage *message);