#include <atk/atk.h>
#include <droute/droute.h>
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
#include "introspection.h"
static dbus_bool_t
}
static dbus_bool_t
-impl_set_currentValue (DBusMessageIter * iter, void *user_data)
+impl_set_CurrentValue (DBusMessageIter * iter, void *user_data)
{
AtkValue *value = (AtkValue *) user_data;
GValue src = { 0 };
}
}
+/* keeping this method around for backwards-compatibility for now; see
+ * * BGO#652596 */
+static DBusMessage *
+impl_SetCurrentValue (DBusConnection * bus, DBusMessage * message,
+ void *user_data)
+{
+ AtkValue *value = (AtkValue *) user_data;
+ dbus_bool_t rv;
+ DBusMessage *reply;
+ gdouble dub = 0;
+ GValue new_value = { 0 };
+
+ g_return_val_if_fail (ATK_IS_VALUE (value),
+ droute_not_yet_handled_error (message));
+
+ if (!dbus_message_get_args
+ (message, NULL, DBUS_TYPE_DOUBLE, &dub, DBUS_TYPE_INVALID))
+ {
+ return droute_invalid_arguments_error (message);
+ }
+
+ g_value_init (&new_value, G_TYPE_DOUBLE);
+ g_value_set_double (&new_value, dub);
+ rv = atk_value_set_current_value (value, &new_value);
+
+ reply = dbus_message_new_method_return (message);
+ if (reply)
+ {
+ dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &rv,
+ DBUS_TYPE_INVALID);
+ }
+ return reply;
+}
+
+static DRouteMethod methods[] = {
+ {impl_SetCurrentValue, "SetCurrentValue"},
+ {NULL, NULL}
+};
+
static DRouteProperty properties[] = {
{impl_get_MinimumValue, NULL, "MinimumValue"},
{impl_get_MaximumValue, NULL, "MaximumValue"},
{impl_get_MinimumIncrement, NULL, "MinimumIncrement"},
- {impl_get_CurrentValue, impl_set_currentValue, "CurrentValue"},
+ {impl_get_CurrentValue, impl_set_CurrentValue, "CurrentValue"},
{NULL, NULL, NULL}
};
spi_initialize_value (DRoutePath * path)
{
droute_path_add_interface (path,
- SPI_DBUS_INTERFACE_VALUE, spi_org_a11y_atspi_Value, NULL, properties);
+ ATSPI_DBUS_INTERFACE_VALUE, spi_org_a11y_atspi_Value, methods, properties);
};