static void property_object_path(DBusMessageIter *iter, void *value);
static void property_uint32(DBusMessageIter *iter, void *value);
static void property_bool(DBusMessageIter *iter, void *value);
+static void property_uchar(DBusMessageIter *iter, void *value);
static void property_string_list(DBusMessageIter *iter, void *value);
static void property_object_path_list(DBusMessageIter *iter, void *value);
+static void property_uchar_list(DBusMessageIter *iter, void *value);
typedef void (*Property_Cb)(DBusMessageIter *iter, void *value);
{ .sig = "o", property_object_path },
{ .sig = "u", property_uint32 },
{ .sig = "b", property_bool },
+ { .sig = "y", property_uchar },
{ .sig = "as", property_string_list },
{ .sig = "ao", property_object_path_list },
+ { .sig = "ay", property_uchar_list },
{ .sig = NULL }
};
}
static void
+property_uchar(DBusMessageIter *iter, void *value)
+{
+ if (!check_arg_type(iter, 'y')) return;
+
+ dbus_message_iter_get_basic(iter, value);
+}
+
+static void
property_string_list(DBusMessageIter *iter, void *value)
{
DBusMessageIter a_iter;
}
}
+static void
+property_uchar_list(DBusMessageIter *iter, void *value)
+{
+ DBusMessageIter a_iter;
+ Ecore_List **list;
+
+ if (!check_arg_type(iter, 'a')) return;
+ dbus_message_iter_recurse(iter, &a_iter);
+ if (!check_arg_type(&a_iter, 'y')) return;
+
+ list = (Ecore_List **)value;
+ *list = ecore_list_new();
+ ecore_list_free_cb_set(*list, free);
+ while (dbus_message_iter_get_arg_type(&a_iter) != DBUS_TYPE_INVALID)
+ {
+ unsigned char *c;
+
+ c = malloc(sizeof(unsigned char));
+ dbus_message_iter_get_basic(&a_iter, c);
+ if (c) ecore_list_append(*list, c);
+ dbus_message_iter_next(&a_iter);
+ }
+}
+
void
property(void *data, DBusMessage *msg, DBusError *err)
{