From 992488963c459b030d806a2fd1839fd3cfc11751 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Dec 2012 17:15:35 +0100 Subject: [PATCH] client: Show the UUIDs with the controller info --- client/main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index 7389c1098..6026e09cd 100644 --- a/client/main.c +++ b/client/main.c @@ -176,7 +176,7 @@ static void cmd_list(const void *arg) static void cmd_info(const void *arg) { - DBusMessageIter iter; + DBusMessageIter iter, value; const char *address; if (default_ctrl == NULL) { @@ -195,6 +195,18 @@ static void cmd_info(const void *arg) print_property(default_ctrl, "Powered"); print_property(default_ctrl, "Discoverable"); print_property(default_ctrl, "Pairable"); + + if (g_dbus_proxy_get_property(default_ctrl, "UUIDs", &iter) == FALSE) + return; + + dbus_message_iter_recurse(&iter, &value); + + while (dbus_message_iter_get_arg_type(&value) == DBUS_TYPE_STRING) { + const char *str; + dbus_message_iter_get_basic(&value, &str); + printf("\tUUID: %s\n", str); + dbus_message_iter_next(&value); + } } static void cmd_quit(const void *arg) -- 2.47.3