bluetooth player: check CT for searchable value 87/15387/2 accepted/tizen/generic/20140212.175452 accepted/tizen/ivi/20140212.184814 submit/tizen/20140121.051444 submit/tizen/20140121.053359 submit/tizen/20140212.173310
authorSebastian Chlad <sebastianx.chlad@intel.com>
Mon, 20 Jan 2014 11:18:18 +0000 (13:18 +0200)
committerSebastian Chlad <sebastianx.chlad@intel.com>
Mon, 20 Jan 2014 12:37:06 +0000 (14:37 +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 83fb418..5c6166f 100644 (file)
@@ -923,6 +923,7 @@ static void cmd_search(int argc, char *argv[])
 {
        GDBusProxy *proxy;
        char *string;
+       DBusMessageIter iter;
 
        if (argc < 2) {
                rl_printf("Missing string argument\n");
@@ -938,6 +939,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,