From: Lee Hyuk Date: Thu, 2 Feb 2017 07:31:30 +0000 (+0900) Subject: Fix the build fail for TV profile X-Git-Tag: submit/tizen_3.0/20170206.000717~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8c42ecd75f8097cb0bbed9a3112a4d8a8efcca2;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fix the build fail for TV profile Change-Id: I49c4203ef63d87672b90db55f1173f67791c63d6 Signed-off-by: Lee Hyuk --- diff --git a/packaging/capi-network-bluetooth.spec b/packaging/capi-network-bluetooth.spec index 038b850..ffa8781 100644 --- a/packaging/capi-network-bluetooth.spec +++ b/packaging/capi-network-bluetooth.spec @@ -68,6 +68,12 @@ export CXXFLAGS="$CXXFLAGS -DTIZEN_PROFILE_IVI" export FFLAGS="$FFLAGS -DTIZEN_PROFILE_IVI" %endif +%if "%{?profile}" == "tv" +export CFLAGS="$CFLAGS -DTIZEN_PROFILE_TV" +export CXXFLAGS="$CXXFLAGS -DTIZEN_PROFILE_TV" +export FFLAGS="$FFLAGS -DTIZEN_PROFILE_TV" +%endif + export CFLAGS="$CFLAGS -DTIZEN_FEATURE_AUDIO_HF_DISABLE -DTIZEN_FEATURE_IPSP_SUPPORT" export CXXFLAGS="$CXXFLAGS -DTIZEN_FEATURE_AUDIO_HF_DISABLE -DTIZEN_FEATURE_IPSP_SUPPORT" export FFLAGS="$FFLAGS -DTIZEN_FEATURE_AUDIO_HF_DISABLE -DTIZEN_FEATURE_IPSP_SUPPORT" diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index f17bb6a..23f8941 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -51,8 +51,10 @@ static void __bt_free_bt_adapter_device_discovery_info_s(bt_adapter_device_disco static int __bt_get_bt_adapter_le_device_scan_info_s(bt_adapter_le_device_scan_result_info_s **scan_info, bluetooth_le_device_info_t *source_info); static void __bt_free_bt_adapter_le_device_scan_info_s(bt_adapter_le_device_scan_result_info_s *scan_info); +#if !defined(TIZEN_PROFILE_TV) /* TDS Forward declarations */ static void __bt_free_tds_scan_result_info_s(bt_tds_transport_block_list_s *discovery_info); +#endif #if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI) static int __bt_get_bt_adapter_le_device_discovery_info_s(bt_adapter_le_device_discovery_info_s **le_discovery_info, bluetooth_le_device_info_t *source_info); @@ -1107,7 +1109,9 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us bt_le_data_length_params_t *data_length_info = NULL; bt_ipsp_connection_info_t *bt_ipsp_iface_info = NULL; bt_pxp_property_changed_params_t *bt_pxp_property_info = NULL; +#if !defined(TIZEN_PROFILE_TV) bluetooth_tds_activation_req_t *tds_act_req_info = NULL; +#endif if (!__bt_need_to_handle(event)) return; @@ -1993,9 +1997,10 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us if (is_pxp_initialized) _bt_proximity_connection_set_state_changed(param->result, device_addr, TRUE); +#if !defined(TIZEN_PROFILE_TV) /* TDS Seeker */ _bt_tds_update_seeker_connection_state_changed(param->result, device_addr, TRUE); - +#endif g_free(device_addr); device_addr = NULL; break; @@ -2020,8 +2025,10 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us if (is_pxp_initialized) _bt_proximity_connection_set_state_changed(param->result, device_addr, FALSE); +#if !defined(TIZEN_PROFILE_TV) /* TDS Seeker */ _bt_tds_update_seeker_connection_state_changed(param->result, device_addr, FALSE); +#endif g_free(device_addr); device_addr = NULL; @@ -2317,9 +2324,10 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us _bt_convert_address_to_string(&device_addr, &service_change->device_addr); +#if !defined(TIZEN_PROFILE_TV) /* Check if TDS Service removed */ _bt_tds_check_service_changed(device_addr, service_change); - +#endif client = _bt_gatt_get_client(device_addr); g_free(device_addr); device_addr = NULL; @@ -2798,6 +2806,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us free(device_addr); /* LCOV_EXCL_STOP */ break; } +#if !defined(TIZEN_PROFILE_TV) case BLUETOOTH_EVENT_TDS_ACTIVATION_REQUESTED: { BT_DBG("BLUETOOTH_EVENT_TDS_ACTIVATION_REQUESTED"); /* LCOV_EXCL_LINE */ tds_act_req_info = (bluetooth_tds_activation_req_t *)(param->param_data); @@ -2868,6 +2877,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us free(device_addr); /* LCOV_EXCL_STOP */ break; } +#endif default: BT_INFO("Unknown function"); break; @@ -2938,6 +2948,8 @@ static void __bt_le_event_proxy(int event, bluetooth_event_param_t *param, void } } #endif + +#if !defined(TIZEN_PROFILE_TV) /* TDS Provider Search: Uses Scan Info */ if (bt_event_slot_container[BT_EVENT_TDS_PROVIDER_FOUND_RESULT].callback != NULL) { char *data = NULL; @@ -2971,7 +2983,7 @@ static void __bt_le_event_proxy(int event, bluetooth_event_param_t *param, void } } } - +#endif if (scan_info) __bt_free_bt_adapter_le_device_scan_info_s(scan_info); break; @@ -3116,6 +3128,7 @@ static void __bt_free_bt_adapter_le_device_scan_info_s(bt_adapter_le_device_scan scan_info = NULL; } /* LCOV_EXCL_STOP */ +#if !defined(TIZEN_PROFILE_TV) static void __bt_free_tds_scan_result_info_s(bt_tds_transport_block_list_s *discovery_info) { int k; @@ -3132,6 +3145,7 @@ static void __bt_free_tds_scan_result_info_s(bt_tds_transport_block_list_s *disc discovery_info = NULL; } +#endif /* LCOV_EXCL_START */ #if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)