Support hf and pbap_client functionality for IVI 94/87894/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 12 Sep 2016 05:17:38 +0000 (14:17 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 12 Sep 2016 05:17:38 +0000 (14:17 +0900)
Change-Id: I5a7dc86504f3ebbaa21ce59fa1b6b0bb887d8670
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
CMakeLists.txt
include/bluetooth_private.h
packaging/capi-network-bluetooth.spec
src/bluetooth-adapter.c
src/bluetooth-audio.c
src/bluetooth-common.c
test/bt_unit_test.c
test/bt_unit_test.h

index dc34512..d06fc7a 100644 (file)
@@ -12,11 +12,11 @@ IF (TIZEN_PROFILE_TV)
     INCLUDE_DIRECTORIES(${INC_DIR}/tv)
 ELSE ()
        INCLUDE_DIRECTORIES(${INC_DIR})
-       IF (TIZEN_PROFILE_WEARABLE)
+       IF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
                INCLUDE_DIRECTORIES(${INC_DIR}/wearable)
        ELSE ()
                INCLUDE_DIRECTORIES(${INC_DIR}/mobile)
-       ENDIF (TIZEN_PROFILE_WEARABLE)
+       ENDIF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
 ENDIF (TIZEN_PROFILE_TV)
 
 IF (TIZEN_PROFILE_TV)
@@ -78,9 +78,9 @@ src/bluetooth-gatt.c
 src/bluetooth-ipsp.c
 src/bluetooth-dpm.c
 )
-IF (TIZEN_PROFILE_WEARABLE)
+IF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
 LIST(APPEND SOURCES src/bluetooth-pbap.c)
-ENDIF (TIZEN_PROFILE_WEARABLE)
+ENDIF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
 ENDIF (TIZEN_PROFILE_TV)
 
 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
@@ -110,7 +110,7 @@ INSTALL(
         )
 
 ELSE ()
-       IF (TIZEN_PROFILE_WEARABLE)
+       IF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
        INSTALL(
                DIRECTORY ${INC_DIR}/wearable/ DESTINATION include/network
                FILES_MATCHING
@@ -122,7 +122,7 @@ ELSE ()
                FILES_MATCHING
                PATTERN "${INC_DIR}/mobile/*.h"
                )
-       ENDIF (TIZEN_PROFILE_WEARABLE)
+       ENDIF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
 ENDIF (TIZEN_PROFILE_TV)
 
 SET(PC_NAME ${fw_name})
index 9ba7fa3..c774406 100644 (file)
@@ -127,7 +127,7 @@ typedef enum {
        BT_EVENT_GET_RSSI_EVENT, /**< Get RSSI Strength callback */
        BT_EVENT_LE_READ_MAXIMUM_DATA_LENGTH, /**< Read maximun LE data length callback */
        BT_EVENT_SUPPORTED_TRUSTED_PROFILE_EVENT, /**< Trusted Profile callback */
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        BT_EVENT_PBAP_CONNECTION_STATUS, /**< PBAP connection status callback */
        BT_EVENT_PBAP_PHONEBOOK_SIZE, /**< PBAP Phonebook Size status callback */
        BT_EVENT_PBAP_PHONEBOOK_PULL, /**< PBAP Phonebook Pull status callback */
@@ -151,7 +151,7 @@ typedef enum {
        BT_GATT_ROLE_CLIENT = 0x02,
 } bt_gatt_role_e;
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
 /**
  * @internal
  */
@@ -762,7 +762,7 @@ bt_adapter_visibility_mode_e _bt_get_bt_visibility_mode_e(bluetooth_discoverable
  */
 void _bt_audio_event_proxy(int event, bt_audio_event_param_t *param, void *user_data);
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
  * @brief  Enumerations for the device state event from Audio-Gateway device
index b31bfa1..962d3fd 100644 (file)
@@ -63,6 +63,12 @@ export CXXFLAGS="$CXXFLAGS -DTIZEN_FEATURE_ENABLE_LEGACY_GATT_CLIENT"
 export FFLAGS="$FFLAGS -DTIZEN_FEATURE_ENABLE_LEGACY_GATT_CLIENT"
 %endif
 
+%if "%{?profile}" == "ivi"
+export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_PROFILE_IVI"
+export FFLAGS="$FFLAGS -DTIZEN_PROFILE_IVI"
+%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"
@@ -91,6 +97,11 @@ export FFLAGS+=" -DARCH64"
 %if "%{?profile}" == "mobile"
        -DTIZEN_PROFILE_WEARABLE=NO \
        -DTIZEN_PROFILE_MOBILE=YES \
+%else
+%if "%{?profile}" == "ivi"
+       -DTIZEN_PROFILE_WEARABLE=NO \
+       -DTIZEN_PROFILE_IVI=YES \
+%endif
 %endif
 %endif
 %endif
index 3f7ba35..fe9a817 100644 (file)
@@ -885,7 +885,7 @@ int bt_adapter_set_device_discovery_state_changed_cb(bt_adapter_device_discovery
        return ret;
 }
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
 int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback,
                                                        void *user_data)
 {
@@ -970,7 +970,7 @@ int bt_adapter_unset_device_discovery_state_changed_cb(void)
        return BT_ERROR_NONE;
 }
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
 int bt_adapter_le_unset_device_discovery_state_changed_cb(void)
 {
        BT_INFO("DEPRECATION WARNING: bt_adapter_le_unset_device_discovery_state_changed_cb() is deprecated and will be removed from next release.");
@@ -1032,7 +1032,7 @@ int bt_adapter_is_discovering(bool *is_discovering)
        }
 }
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
 int bt_adapter_le_start_device_discovery(void)
 {
        int error_code = BT_ERROR_NONE;
@@ -2340,7 +2340,7 @@ int bt_adapter_le_clear_advertising_data(bt_advertiser_h advertiser,
        return ret;
 }
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
 int bt_adapter_le_start_advertising(bt_advertiser_h advertiser,
                bt_adapter_le_advertising_params_s *adv_params,
                bt_adapter_le_advertising_state_changed_cb cb,
index 387b797..6ba0ed0 100644 (file)
@@ -31,7 +31,7 @@ typedef struct _call_list_s {
 } call_list_s;
 
 static bool is_audio_a2dp_initialized = false;
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
 static bool is_audio_hf_initialized = false;
 #endif
 static bool is_audio_ag_initialized = false;
@@ -54,16 +54,10 @@ static bool is_audio_ag_initialized = false;
        BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_AUDIO_MEDIA); \
 }
 
-#ifdef TIZEN_FEATURE_AUDIO_HF_DISABLE
 #define BT_CHECK_HF_SUPPORT() \
-               { \
-                       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON); \
-                       LOGE("[%s] NOT_SUPPORTED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_SUPPORTED); \
-                       return BT_ERROR_NOT_SUPPORTED; \
-               }
-#else
-#define BT_CHECK_HF_SUPPORT()
-#endif
+{ \
+       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON); \
+}
 
 #define BT_CHECK_AUDIO_INIT_STATUS() \
        if (is_audio_a2dp_initialized != true && is_audio_ag_initialized != true) { \
@@ -140,7 +134,7 @@ int bt_audio_initialize(void)
        else
                is_audio_a2dp_initialized = true;
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        error = bluetooth_hf_init(_bt_hf_event_proxy, NULL);
        error = _bt_get_error_code(error);
        if (BT_ERROR_NONE != error)
@@ -160,7 +154,7 @@ int bt_audio_initialize(void)
 
        /* There is no success case for 3 profiles */
        if (!is_audio_a2dp_initialized &&
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
                !is_audio_hf_initialized &&
 #endif
                 !is_audio_ag_initialized) {
@@ -184,7 +178,7 @@ int bt_audio_deinitialize(void)
 
        is_audio_a2dp_initialized = false;
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        error = bluetooth_hf_deinit();
        error = _bt_get_error_code(error);
        if (BT_ERROR_NONE != error)
@@ -248,7 +242,7 @@ int bt_audio_connect(const char *remote_address, bt_audio_profile_type_e type)
        case BT_AUDIO_PROFILE_TYPE_A2DP:
                error = bluetooth_av_connect(&addr_hex);
                break;
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        case BT_AUDIO_PROFILE_TYPE_AG:
                error = bluetooth_hf_connect(&addr_hex);
                break;
@@ -306,7 +300,7 @@ int bt_audio_disconnect(const char *remote_address, bt_audio_profile_type_e type
        case BT_AUDIO_PROFILE_TYPE_A2DP:
                error = bluetooth_av_disconnect(&addr_hex);
                break;
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        case BT_AUDIO_PROFILE_TYPE_AG:
                error = bluetooth_hf_disconnect(&addr_hex);
                break;
@@ -836,7 +830,7 @@ int bt_a2dp_set_content_protection(bool status)
 }
 /* LCOV_EXCL_STOP */
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
 int bt_hf_initialize(void)
 {
        BT_CHECK_INIT_STATUS();
@@ -1264,4 +1258,4 @@ int bt_hf_unset_remote_device_state_changed_cb(void)
                _bt_unset_cb(BT_EVENT_HF_CIEV_DEVICE_STATUS_CHANGED);
        return BT_ERROR_NONE;
 }
-#endif
\ No newline at end of file
+#endif
index 6666966..034000f 100644 (file)
@@ -50,7 +50,7 @@ static int __bt_get_bt_adapter_device_discovery_info_s(bt_adapter_device_discove
 static void __bt_free_bt_adapter_device_discovery_info_s(bt_adapter_device_discovery_info_s *discovery_info);
 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);
-#ifndef TIZEN_PROFILE_WEARABLE
+#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);
 static void __bt_free_bt_adapter_le_device_discovery_info_s(bt_adapter_le_device_discovery_info_s *discovery_info);
 #endif
@@ -932,7 +932,7 @@ void _bt_audio_event_proxy(int event, bt_audio_event_param_t *param, void *user_
        __bt_event_proxy(event, &new_param, user_data);
 }
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
 void _bt_hf_event_proxy(int event, bt_hf_event_param_t *param, void *user_data)
 {
        bluetooth_event_param_t new_param;
@@ -1021,7 +1021,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        bluetooth_device_address_t *bd_addr = NULL;
        telephony_event_callid_t *call_data = NULL;
        char *device_addr = NULL;
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        char *phone_number = NULL;
 #endif
        int error_code = BT_ERROR_NONE;
@@ -2230,7 +2230,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                if (device_addr != NULL)
                        free(device_addr); /* LCOV_EXCL_STOP */
                break;
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        case BLUETOOTH_PBAP_CONNECTED: {
                bt_pbap_connection_state_changed_cb cb = bt_event_slot_container[event_index].callback;
                void *user_data = bt_event_slot_container[event_index].user_data;
@@ -2545,7 +2545,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
 static void __bt_le_event_proxy(int event, bluetooth_event_param_t *param, void *user_data)
 {
        bt_adapter_le_device_scan_result_info_s *scan_info = NULL;
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
        bt_adapter_le_device_discovery_info_s *discovery_info = NULL;
 #endif
        int event_index = -1;
@@ -2568,7 +2568,7 @@ static void __bt_le_event_proxy(int event, bluetooth_event_param_t *param, void
                    (_bt_get_error_code(param->result), BT_ADAPTER_LE_DISABLED, bt_event_slot_container[event_index].user_data);
                break;
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
        case BLUETOOTH_EVENT_LE_DISCOVERY_STARTED:
                BT_INFO("BLUETOOTH_EVENT_LE_DISCOVERY_STARTED"); /* LCOV_EXCL_LINE */
                ((bt_adapter_le_device_discovery_state_changed_cb) bt_event_slot_container[event_index].callback) /* LCOV_EXCL_LINE */
@@ -2594,7 +2594,7 @@ static void __bt_le_event_proxy(int event, bluetooth_event_param_t *param, void
                                        (_bt_get_error_code(param->result), NULL, bt_event_slot_container[event_index].user_data);
                        }
                }
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
                event_index = BT_EVENT_LE_DEVICE_DISCOVERY_STATE_CHANGED;
                if (bt_event_slot_container[event_index].callback != NULL) {
                        if (__bt_get_bt_adapter_le_device_discovery_info_s(&discovery_info, (bluetooth_le_device_info_t *)(param->param_data)) == BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
@@ -2749,7 +2749,7 @@ static void __bt_free_bt_adapter_le_device_scan_info_s(bt_adapter_le_device_scan
        scan_info = NULL;
 }
 /* LCOV_EXCL_START */
-#ifndef TIZEN_PROFILE_WEARABLE
+#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)
@@ -3019,7 +3019,7 @@ static int __bt_get_cb_index(int event)
                return BT_EVENT_SUPPORTED_TRUSTED_PROFILE_EVENT;
        case BLUETOOTH_EVENT_LE_DATA_LENGTH_CHANGED:
                return BT_EVENT_LE_DATA_LENGTH_CHANGED; /* LCOV_EXCL_LINE */
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        case BLUETOOTH_PBAP_CONNECTED:
        case BLUETOOTH_PBAP_DISCONNECTED:
                return BT_EVENT_PBAP_CONNECTION_STATUS;
index 9acbb44..72f4104 100644 (file)
@@ -169,7 +169,7 @@ tc_table_t tc_main[] = {
                , BT_UNIT_TEST_TABLE_HDP},
        {"DPM"
                , BT_UNIT_TEST_TABLE_DPM},
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        {"HF Role"
                , BT_UNIT_TEST_TABLE_HF},
        {"PBAP Client"
@@ -279,7 +279,7 @@ tc_table_t tc_adapter_le[] = {
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_START_SCAN},
        {"bt_adapter_le_stop_scan"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_STOP_SCAN},
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
        {"bt_adapter_le_start_device_discovery"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_START_DEVICE_DISCOVERY},
        {"bt_adapter_le_stop_device_discovery"
@@ -295,7 +295,7 @@ tc_table_t tc_adapter_le[] = {
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SET_ADVERTISING_CONNECTABLE},
        {"bt_adapter_le_start_advertising_new"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_START_ADVERTISING_NEW},
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
        {"bt_adapter_le_start_advertising"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_START_ADVERTISING},
 #endif
@@ -305,7 +305,7 @@ tc_table_t tc_adapter_le[] = {
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_ADD_WHITE_LIST},
        {"bt_adapter_le_remove_white_list"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REMOVE_WHITE_LIST},
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
        {"bt_adapter_le_clear_white_list"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_CLEAR_WHITE_LIST},
 #endif
@@ -319,7 +319,7 @@ tc_table_t tc_adapter_le[] = {
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_SERVICE_SOLICITATION_UUID},
        {"Unregister all scan filters"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_UNREGISTER_ALL_SCAN_FILTERS},
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
        {"bt_adapter_le_set_device_discovery_state_changed_cb"
                , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SET_DEVICE_DISCOVERY_STATE_CHANGED_CB},
        {"bt_adapter_le_unset_device_discovery_state_changed_cb"
@@ -935,7 +935,7 @@ tc_table_t tc_DPM[] = {
        {NULL                                   , 0x0000},
 };
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
 tc_table_t tc_hf[] = {
        /* Handsfree role functions */
        {"BACK"
@@ -1088,7 +1088,7 @@ void tc_usage_print(void)
        case BT_UNIT_TEST_TABLE_DPM:
                tc_table = tc_DPM;
                break;
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        case BT_UNIT_TEST_TABLE_HF:
                tc_table = tc_hf;
                break;
@@ -1553,7 +1553,7 @@ void __bt_gatt_server_notification_state_change_cb(bool notify,
 }
 
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
 static void __bt_adapter_le_device_discovery_state_changed_cb(int result,
                bt_adapter_le_device_discovery_state_e discovery_state,
                bt_adapter_le_device_discovery_info_s *discovery_info,
@@ -2707,7 +2707,7 @@ void __bt_ipsp_connection_state_changed_cb(int result,
        memcpy(ipsp_iface_name, iface_name, strlen(iface_name));
 }
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
 void __bt_hf_sco_state_changed_cb(int result,
        bool opened, void *user_data)
 {
@@ -2898,7 +2898,7 @@ static void __bt_initialize_all(void)
                        __bt_adapter_device_discovery_state_changed_cb, NULL);
        if (ret != BT_ERROR_NONE)
                TC_PRT("returns %s\n", __bt_get_error_message(ret));
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
        ret = bt_adapter_le_set_device_discovery_state_changed_cb(
                __bt_adapter_le_device_discovery_state_changed_cb, NULL);
        if (ret != BT_ERROR_NONE)
@@ -4134,7 +4134,7 @@ int test_set_params(int test_id, char *param)
                break;
        }
 
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        case BT_UNIT_TEST_TABLE_HF: {
                switch (test_id) {
                default:
@@ -4567,7 +4567,7 @@ int test_input_callback(void *data)
                        TC_PRT("returns %s\n", __bt_get_error_message(ret));
                        break;
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
                case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_START_DEVICE_DISCOVERY:
                        ret = bt_adapter_le_start_device_discovery();
                        TC_PRT("returns %s\n", __bt_get_error_message(ret));
@@ -4824,7 +4824,7 @@ int test_input_callback(void *data)
                                TC_PRT("failed with [0x%04x]", ret);
                        break;
                }
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
                case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_START_ADVERTISING: {
                        bt_adapter_le_advertising_state_changed_cb cb;
                        bt_adapter_le_advertising_params_s adv_params = { 0, };
@@ -4892,7 +4892,7 @@ int test_input_callback(void *data)
                        break;
                }
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
                case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_CLEAR_WHITE_LIST: {
                        ret = bt_adapter_le_clear_white_list();
                        TC_PRT("returns %s\n", __bt_get_error_message(ret));
@@ -4996,7 +4996,7 @@ int test_input_callback(void *data)
                        break;
                }
 
-#ifndef TIZEN_PROFILE_WEARABLE
+#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
                case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SET_DEVICE_DISCOVERY_STATE_CHANGED_CB:
                        ret = bt_adapter_le_set_device_discovery_state_changed_cb(
                                __bt_adapter_le_device_discovery_state_changed_cb, NULL);
@@ -8503,7 +8503,7 @@ int test_input_callback(void *data)
                }
                break;
        }
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        case BT_UNIT_TEST_TABLE_HF: {
                switch (test_id) {
                case BT_UNIT_TEST_FUNCTION_HF_INITIALIZE:
index 70a60e3..9c6069b 100644 (file)
@@ -46,7 +46,7 @@ typedef enum {
        BT_UNIT_TEST_TABLE_IPSP,
        BT_UNIT_TEST_TABLE_HDP,
        BT_UNIT_TEST_TABLE_DPM,
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        BT_UNIT_TEST_TABLE_HF,
        BT_UNIT_TEST_TABLE_PBAP_CLIENT,
 #endif
@@ -386,7 +386,7 @@ typedef enum {
        BT_UNIT_TEST_FUNCTION_DPM_GET_LIMITED_DISCOVERABLE_STATE,
        BT_UNIT_TEST_FUNCTION_DPM_SET_DATA_TRANSFER_STATE,
        BT_UNIT_TEST_FUNCTION_DPM_GET_DATA_TRANSFER_STATE,
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
        BT_UNIT_TEST_FUNCTION_HF_INITIALIZE = 1,
        BT_UNIT_TEST_FUNCTION_HF_DEINITIALIZE,
        BT_UNIT_TEST_FUNCTION_HF_NOTIFY_CALL_ANSWER,