Fix the build fail for TV profile 81/112681/1
authorLee Hyuk <hyuk0512.lee@samsung.com>
Thu, 2 Feb 2017 07:31:30 +0000 (16:31 +0900)
committerLee Hyuk <hyuk0512.lee@samsung.com>
Thu, 2 Feb 2017 07:32:09 +0000 (16:32 +0900)
Change-Id: I49c4203ef63d87672b90db55f1173f67791c63d6
Signed-off-by: Lee Hyuk <hyuk0512.lee@samsung.com>
packaging/capi-network-bluetooth.spec
src/bluetooth-common.c

index 038b8503427d7fbc296f25aac3706aa176296cb5..ffa87817c5d4677a835346acbc5dd9d939a9429b 100644 (file)
@@ -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"
index f17bb6a28008e067840082bddf3c95f54acc9541..23f8941e60fdee00a9d910d00e87b2272b804ccb 100644 (file)
@@ -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)