summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-manager.c
diff options
context:
space:
mode:
authorUlisses Furquim <ulissesf@gmail.com>2006-10-26 13:09:55 +0000
committerUlisses Furquim <ulissesf@gmail.com>2006-10-26 13:09:55 +0000
commitc68ca971b1158a0f4783fb87663b25c464bbaf45 (patch)
tree8be4d96f4607e17a72600b009060bfe903c8a62f /hcid/dbus-manager.c
parent1ea14f37c8eb76a1e9420d884a36c1fd293b5472 (diff)
Make Manager.ListServices() return an array of object paths
Diffstat (limited to 'hcid/dbus-manager.c')
-rw-r--r--hcid/dbus-manager.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hcid/dbus-manager.c b/hcid/dbus-manager.c
index d8c34348..3f6a0a4e 100644
--- a/hcid/dbus-manager.c
+++ b/hcid/dbus-manager.c
@@ -195,6 +195,7 @@ static DBusHandlerResult list_services(DBusConnection *conn,
{
DBusMessage *reply;
DBusMessageIter iter;
+ DBusMessageIter array_iter;
if (!dbus_message_has_signature(msg, DBUS_TYPE_INVALID_AS_STRING))
return error_invalid_arguments(conn, msg);
@@ -204,7 +205,12 @@ static DBusHandlerResult list_services(DBusConnection *conn,
return DBUS_HANDLER_RESULT_NEED_MEMORY;
dbus_message_iter_init_append(reply, &iter);
- append_available_services(&iter);
+ dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
+ DBUS_TYPE_STRING_AS_STRING, &array_iter);
+
+ append_available_services(&array_iter);
+
+ dbus_message_iter_close_container(&iter, &array_iter);
return send_message_and_unref(conn, reply);
}