From: Nagaraj D R Date: Fri, 21 Jul 2017 09:10:02 +0000 (+0530) Subject: Remove function __bt_device_remote_connected_properties() X-Git-Tag: accepted/tizen/3.0/common/20170803.140337~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d1ea5484c3312d34a4601c6465f73e312654778;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Remove function __bt_device_remote_connected_properties() Function __bt_device_remote_connected_properties is intended to send event HID connected/disconnected whenever a device is connected (not necessarily for HID)if remote device supports HID. Since we have different mechanism for recognizing HID connection/disconnection,this function is no longer required Change-Id: If5ba0fbcaad0182f44fd7da685474cc53146198a --- diff --git a/bt-service/bt-service-event-receiver.c b/bt-service/bt-service-event-receiver.c index 4a75398..2f43275 100644 --- a/bt-service/bt-service-event-receiver.c +++ b/bt-service/bt-service-event-receiver.c @@ -408,36 +408,6 @@ void __bt_update_remote_cache_devinfo(const char *address, gboolean paired_statu BT_DBG("-"); } -static void __bt_device_remote_connected_properties( - bt_remote_dev_info_t *remote_dev_info, - char *address, gboolean connected) -{ - int result = BLUETOOTH_ERROR_NONE; - int i; - GVariant *param = NULL; - BT_DBG("+"); - - if (remote_dev_info->uuid_count > 0) { - for (i = 0; i < remote_dev_info->uuid_count; i++) { - char *uuid = remote_dev_info->uuids[i]; - if (strcasecmp(uuid, HID_UUID) == 0) { - int event = BLUETOOTH_EVENT_NONE; - - event = (connected == TRUE) ? - BLUETOOTH_HID_CONNECTED : - BLUETOOTH_HID_DISCONNECTED; - param = g_variant_new("(is)", result, - address); - _bt_send_event(BT_HID_EVENT, event, - param); - break; - } - } - } - - BT_DBG("-"); -} - gboolean __bt_handle_is_flight_mode_enabled(void) { #ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED @@ -930,7 +900,6 @@ static void __bt_device_property_changed_event(GVariant *msg, const char *path) char *property = NULL; char *address; GVariant *param = NULL; - bt_remote_dev_info_t *remote_dev_info; g_variant_iter_init(&value_iter, msg); #ifdef TIZEN_FEATURE_BT_DPM int desktop_state = DPM_BT_ERROR; @@ -953,15 +922,6 @@ static void __bt_device_property_changed_event(GVariant *msg, const char *path) BT_DBG("connected: %d", connected); BT_DBG("address: %s", address); - remote_dev_info = _bt_get_remote_device_info_by_object_path(path); - - if (remote_dev_info != NULL) { - __bt_device_remote_connected_properties( - remote_dev_info, address, - connected != BLUETOOTH_CONNECTED_LINK_NONE ? - TRUE : FALSE); - _bt_free_device_info(remote_dev_info); - } param = g_variant_new("(is)", result, address); /* Send event to application */ _bt_send_event(BT_DEVICE_EVENT, @@ -1281,7 +1241,6 @@ static void __bt_media_control_changed_event(GVariant *msg, const char *path) char *address; GVariant *val = NULL; GVariant *child = NULL; - bt_remote_dev_info_t *remote_dev_info; GVariant *param = NULL; g_variant_iter_init(&value_iter, msg); while ((child = g_variant_iter_next_value(&value_iter))) { @@ -1302,13 +1261,6 @@ static void __bt_media_control_changed_event(GVariant *msg, const char *path) BT_DBG("connected: %d", connected); BT_DBG("address: %s", address); - remote_dev_info = _bt_get_remote_device_info(address); - - if (remote_dev_info != NULL) { - __bt_device_remote_connected_properties( - remote_dev_info, address, connected); - _bt_free_device_info(remote_dev_info); - } param = g_variant_new("(is)", result, address); /* Send event to application */ _bt_send_event(BT_AVRCP_EVENT,