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)
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})
)
ELSE ()
- IF (TIZEN_PROFILE_WEARABLE)
+ IF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
INSTALL(
DIRECTORY ${INC_DIR}/wearable/ DESTINATION include/network
FILES_MATCHING
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})
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 */
BT_GATT_ROLE_CLIENT = 0x02,
} bt_gatt_role_e;
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
/**
* @internal
*/
*/
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
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"
%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
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)
{
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.");
}
}
-#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;
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,
} 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;
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) { \
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)
/* 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) {
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)
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;
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;
}
/* 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();
_bt_unset_cb(BT_EVENT_HF_CIEV_DEVICE_STATUS_CHANGED);
return BT_ERROR_NONE;
}
-#endif
\ No newline at end of file
+#endif
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
__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;
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;
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;
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;
(_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 */
(_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 */
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)
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;
, 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"
, 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"
, 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
, 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
, 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"
{NULL , 0x0000},
};
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
tc_table_t tc_hf[] = {
/* Handsfree role functions */
{"BACK"
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;
}
-#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,
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)
{
__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)
break;
}
-#ifdef TIZEN_PROFILE_WEARABLE
+#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI)
case BT_UNIT_TEST_TABLE_HF: {
switch (test_id) {
default:
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));
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, };
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));
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);
}
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:
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
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,