else
is_audio_a2dp_initialized = true;
- if (TIZEN_PROFILE_WEARABLE_IVI) {
+ if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) {
error = bluetooth_hf_init(_bt_hf_event_proxy, NULL); /* LCOV_EXCL_LINE */
error = _bt_get_error_code(error); /* LCOV_EXCL_LINE */
if (BT_ERROR_NONE != error) /* LCOV_EXCL_LINE */
}
#ifndef TIZEN_FEATURE_HFP_DISABLE /* B2_3G */
- error = bluetooth_telephony_init((void *)_bt_telephony_event_proxy, NULL);
- error = _bt_convert_telephony_error_code(error);
- if (BT_ERROR_NONE != error)
- BT_ERR("[%s] (0x%08x)", _bt_convert_error_to_string(error), error); /* LCOV_EXCL_LINE */
- else
- is_audio_ag_initialized = true;
+ if (!TIZEN_FEATURE_FHUB_REFERENCE) {
+ error = bluetooth_telephony_init((void *)_bt_telephony_event_proxy, NULL);
+ error = _bt_convert_telephony_error_code(error);
+ if (BT_ERROR_NONE != error)
+ BT_ERR("[%s] (0x%08x)", _bt_convert_error_to_string(error), error); /* LCOV_EXCL_LINE */
+ else
+ is_audio_ag_initialized = true;
+ }
#endif
/* There is no success case for 3 profiles */
is_audio_a2dp_initialized = false;
- if (TIZEN_PROFILE_WEARABLE_IVI) { /* LCOV_EXCL_START */
+ if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) { /* LCOV_EXCL_START */
error = bluetooth_hf_deinit();
error = _bt_get_error_code(error);
if (BT_ERROR_NONE != error)
}
#ifndef TIZEN_FEATURE_HFP_DISABLE /* B2_3G */
- error = bluetooth_telephony_deinit();
- error = _bt_convert_telephony_error_code(error);
- if (BT_ERROR_NONE != error)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
+ if (!TIZEN_FEATURE_FHUB_REFERENCE) {
+ error = bluetooth_telephony_deinit();
+ error = _bt_convert_telephony_error_code(error);
+ if (BT_ERROR_NONE != error)
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
- is_audio_ag_initialized = false;
+ is_audio_ag_initialized = false;
+ }
#endif
return BT_ERROR_NONE;
error = bluetooth_av_source_connect(&addr_hex);
break;
case BT_AUDIO_PROFILE_TYPE_AG:
- if (TIZEN_PROFILE_WEARABLE_IVI) {
+ if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) {
BT_CHECK_HF_INIT_STATUS();
error = bluetooth_hf_connect(&addr_hex);
break;
error = bluetooth_av_source_disconnect(&addr_hex);
break;
case BT_AUDIO_PROFILE_TYPE_AG:
- if (TIZEN_PROFILE_WEARABLE_IVI) {
+ if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) {
BT_CHECK_HF_INIT_STATUS();
error = bluetooth_hf_disconnect(&addr_hex);
break;
case BT_HF_CALL_EVENT_ADD_TO_CONVERSATION:
error = bluetooth_hf_join_call();
break;
+ case BT_HF_CALL_EVENT_AUDIO_MUTE_ON:
+ error = bluetooth_hf_audio_mute_on();
+ break;
+ case BT_HF_CALL_EVENT_AUDIO_MUTE_OFF:
+ error = bluetooth_hf_audio_mute_off();
+ break;
default:
error = BLUETOOTH_ERROR_INVALID_PARAM;
break;
static char remote_addr[18] = "F6:FB:8F:D8:C8:7C";
static char ipsp_iface_name[17] = "";
static bool input_automated_test_delay = false;
+static char remote_phone_number[12] = "00000000000";
/* For HDP profile TEST */
static char *appid = "/org/bluez/health_app_2";
, BT_UNIT_TEST_FUNCTION_HF_SET_SCO_CHANGED_CB},
{"(SCO) bt_hf_unset_sco_state_changed_cb()"
, BT_UNIT_TEST_FUNCTION_HF_UNSET_SCO_CHANGED_CB},
+ {"[HF] bt_hf_set_remote_call_event_cb()"
+ , BT_UNIT_TEST_FUNCTION_HF_SET_REMOTE_CALL_EVENT_CB},
+ {"[HF] bt_hf_notify_call_event(BT_HF_CALL_EVENT_AUDIO_MUTE_ON)"
+ , BT_UNIT_TEST_FUNCTION_HF_AUDIO_MUTE_ON},
+ {"[HF] bt_hf_notify_call_event(BT_HF_CALL_EVENT_AUDIO_MUTE_OFF)"
+ , BT_UNIT_TEST_FUNCTION_HF_AUDIO_MUTE_OFF},
+ {"[HF] bt_hf_is_connected"
+ , BT_UNIT_TEST_FUNCTION_HF_IS_CONNECTED},
{"Select this menu to set parameters and then select the function again."
, BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS},
{NULL , 0x0000},
tc_table = tc_pxp;
break;
case BT_UNIT_TEST_TABLE_HF:
- if (!TIZEN_PROFILE_WEARABLE_IVI)
+ if (!TIZEN_PROFILE_WEARABLE_IVI && !TIZEN_FEATURE_FHUB_REFERENCE)
goto __default__;
tc_table = tc_hf;
break;
case BT_UNIT_TEST_TABLE_PBAP_CLIENT:
- if (!TIZEN_PROFILE_WEARABLE_IVI)
+ if (!TIZEN_PROFILE_WEARABLE_IVI && !TIZEN_FEATURE_FHUB_REFERENCE)
goto __default__;
tc_table = tc_pbap_client;
break;
bt_hf_free_call_status_info_list(call_info_list);
}
+void __bt_hf_set_remote_call_event_cb(bt_hf_remote_call_event_e event,
+ char *phone_number, void *user_data)
+{
+ switch (event) {
+ case BT_HF_REMOTE_CALL_EVENT_IDLE:
+ TC_PRT("[remote_call_event_cb] event [IDLE]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_INCOMING:
+ TC_PRT("[remote_call_event_cb] event [INCOMING]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_DIALING:
+ TC_PRT("[remote_call_event_cb] event [DIALING]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_ALERTING:
+ TC_PRT("[remote_call_event_cb] event [ALERTING]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_CALL_TERMINATED:
+ TC_PRT("[remote_call_event_cb] event [TERMINATED]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_CALL_STARTED:
+ TC_PRT("[remote_call_event_cb] event [STARTED]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_CALL_ENDED:
+ TC_PRT("[remote_call_event_cb] event [ENDED]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_UNHELD:
+ TC_PRT("[remote_call_event_cb] event [UNHELD]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_HELD:
+ TC_PRT("[remote_call_event_cb] event [HELD]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_RINGING:
+ strncpy(remote_phone_number, phone_number, strlen(remote_phone_number));
+ TC_PRT("[remote_call_event_cb] event [RINGING]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_WAITING:
+ TC_PRT("[remote_call_event_cb] event [WAITING]");
+ break;
+ case BT_HF_REMOTE_CALL_EVENT_FAILED_TO_DIALING:
+ TC_PRT("[remote_call_event_cb] event [FAILED_TO_DIALING]");
+ break;
+ default:
+ TC_PRT("[remote_call_event_cb] event [UNKNOWN]");
+ }
+
+ TC_PRT("[remote_call_event_cb] phone_number [%s]", phone_number);
+}
+
void __bt_hf_speaker_gain_changed_cb(int gain,
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));
- if (TIZEN_PROFILE_WEARABLE_IVI) {
+ if (TIZEN_PROFILE_WEARABLE_IVI || TIZEN_FEATURE_FHUB_REFERENCE) {
ret = bt_pbap_client_set_connection_state_changed_cb(__bt_pbap_connection_state_changed_cb,
NULL);
if (ret != BT_ERROR_NONE)
}
case BT_UNIT_TEST_TABLE_PBAP_CLIENT:
- if (!TIZEN_PROFILE_WEARABLE_IVI)
+ if (!TIZEN_PROFILE_WEARABLE_IVI && !TIZEN_FEATURE_FHUB_REFERENCE)
goto __default__;
{
switch (test_id) {
}
case BT_UNIT_TEST_TABLE_HF: {
- if (!TIZEN_PROFILE_WEARABLE_IVI)
+ if (!TIZEN_PROFILE_WEARABLE_IVI && !TIZEN_FEATURE_FHUB_REFERENCE)
break;
switch (test_id) {
case BT_UNIT_TEST_FUNCTION_HF_INITIALIZE:
TC_PRT("Success");
break;
case BT_UNIT_TEST_FUNCTION_HF_NOTIFY_CALL_ANSWER:
- ret = bt_hf_notify_call_event(
+ if (TIZEN_FEATURE_FHUB_REFERENCE)
+ ret = bt_hf_notify_call_event(
+ BT_HF_CALL_EVENT_ANSWER, remote_phone_number);
+ else
+ ret = bt_hf_notify_call_event(
BT_HF_CALL_EVENT_ANSWER,
"9663868998");
if (ret < BT_ERROR_NONE)
TC_PRT("Success");
break;
case BT_UNIT_TEST_FUNCTION_HF_NOTIFY_CALL_INIT:
- ret = bt_hf_notify_call_event(
- BT_HF_CALL_EVENT_DIAL,
- "9663868998");
+ if (TIZEN_FEATURE_FHUB_REFERENCE) {
+ if (g_test_param.param_count < 0) {
+ TC_PRT("Input parameters first");
+ break;
+ }
+ ret = bt_hf_notify_call_event(
+ BT_HF_CALL_EVENT_DIAL,
+ g_test_param.params[0]);
+ } else
+ ret = bt_hf_notify_call_event(
+ BT_HF_CALL_EVENT_DIAL,
+ "9663868998");
if (ret < BT_ERROR_NONE)
TC_PRT("failed with [0x%04x]", ret);
else if (ret == BT_ERROR_NONE)
else if (ret == BT_ERROR_NONE)
TC_PRT("Success");
break;
+ case BT_UNIT_TEST_FUNCTION_HF_SET_REMOTE_CALL_EVENT_CB:
+ ret = bt_hf_set_remote_call_event_cb(
+ __bt_hf_set_remote_call_event_cb,
+ NULL);
+ if (ret < BT_ERROR_NONE)
+ TC_PRT("failed with [0x%04x]", ret);
+ else if (ret == BT_ERROR_NONE)
+ TC_PRT("Success");
+ break;
+
+ case BT_UNIT_TEST_FUNCTION_HF_AUDIO_MUTE_ON:
+ ret = bt_hf_notify_call_event(BT_HF_CALL_EVENT_AUDIO_MUTE_ON, NULL);
+ if (ret < BT_ERROR_NONE)
+ TC_PRT("failed with [0x%04x]", ret);
+ else if (ret == BT_ERROR_NONE)
+ TC_PRT("Success");
+ break;
+
+ case BT_UNIT_TEST_FUNCTION_HF_AUDIO_MUTE_OFF:
+ ret = bt_hf_notify_call_event(BT_HF_CALL_EVENT_AUDIO_MUTE_OFF, NULL);
+ if (ret < BT_ERROR_NONE)
+ TC_PRT("failed with [0x%04x]", ret);
+ else if (ret == BT_ERROR_NONE)
+ TC_PRT("Success");
+ break;
+
+ case BT_UNIT_TEST_FUNCTION_HF_IS_CONNECTED: {
+ bool hf_connected = false;
+ ret = bt_hf_is_connected(&hf_connected);
+ if (ret < BT_ERROR_NONE)
+ TC_PRT("failed with [0x%04x]", ret);
+ else if (ret == BT_ERROR_NONE) {
+ TC_PRT("Success");
+ TC_PRT("is hf conencted ? [%s]", hf_connected ? "TRUE" : "FALSE");
+ }
+ break;
+ }
case BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS:
need_to_set_params = true;
TC_PRT("Select the function again");
break;
}
case BT_UNIT_TEST_TABLE_PBAP_CLIENT: {
- if (!TIZEN_PROFILE_WEARABLE_IVI)
+ if (!TIZEN_PROFILE_WEARABLE_IVI && !TIZEN_FEATURE_FHUB_REFERENCE)
break;
switch (test_id) {