bluetooth player: check CT for searchable value
authorSebastian Chlad <sebastianx.chlad@intel.com>
Mon, 20 Jan 2014 11:18:18 +0000 (13:18 +0200)
committerSebastian Chlad <sebastian.chlad@tieto.com>
Tue, 27 May 2014 10:25:15 +0000 (12:25 +0200)
Temporary patch as this should be upstreamed. Simple check for searchable
value of the CT side (AVRCP profile)

Change-Id: Ida1ce01cec3c97e46cc7e6817a70b7fce5f6c3d6
Signed-off-by: Sebastian Chlad <sebastianx.chlad@intel.com>
tools/bluetooth-player.c

index f090e1b..564d5ea 100644 (file)
@@ -928,6 +928,7 @@ static void cmd_search(int argc, char *argv[])
 {
        GDBusProxy *proxy;
        char *string;
+       DBusMessageIter iter;
 
        if (argc < 2) {
                rl_printf("Missing string argument\n");
@@ -943,6 +944,11 @@ static void cmd_search(int argc, char *argv[])
                return;
        }
 
+       if (g_dbus_proxy_get_property(proxy, "Searchable", &iter) == FALSE) {
+                rl_printf("Search not supported on the client side\n");
+                return;
+        }
+
        string = g_strdup(argv[1]);
 
        if (g_dbus_proxy_method_call(proxy, "Search", search_setup,