add hid connect status in connected profile 87/23187/2
authorGu Chaojie <chao.jie.gu@intel.com>
Thu, 19 Jun 2014 05:46:24 +0000 (13:46 +0800)
committerGu Chaojie <chao.jie.gu@intel.com>
Thu, 19 Jun 2014 07:36:46 +0000 (15:36 +0800)
Change-Id: Ife75ea9d55eb8807dbb721cb2eec8ffb07473a1c
Signed-off-by: Gu Chaojie <chao.jie.gu@intel.com>
capi/bluetooth.c
include/bluez.h

index 9ce8e0f..d4acac5 100644 (file)
@@ -5222,6 +5222,7 @@ int bt_device_foreach_connected_profiles(
        bt_device_info_s *device_info;
        gboolean rfcomm_connected;
        gboolean is_type;
+       gboolean hid_connected = false;
 
        DBG("");
 
@@ -5256,6 +5257,12 @@ int bt_device_foreach_connected_profiles(
        if (is_type)
                callback(BT_PROFILE_A2DP, user_data);
 
+       if (!(bluez_device_input_get_property_connected(device,
+                                       &hid_connected))) {
+               if (hid_connected)
+                       callback(BT_PROFILE_HID, user_data);
+       }
+
        free_device_info(device_info);
 
        return BT_SUCCESS;
index 679062a..164f0be 100644 (file)
@@ -478,6 +478,10 @@ int bluez_device_get_property_rssi(
 char *bluez_device_get_property_icon(
                                struct _bluez_device *device);
 
+int bluez_device_input_get_property_connected(
+                               struct _bluez_device *device,
+                               gboolean *connected);
+
 /* agent functions */
 bluez_agent_t *bluez_agent_get_agent(void);