char *uuid = NULL;
int value = BLUETOOTH_ERROR_NONE;
bt_audio_function_data_t *func_data;
- guint hfp_hs_restricted = 0x0; /* set default "allowed" */
- guint a2dp_restricted = 0x0;
+ guint hfp_hs_trusted = TRUE; /* set default "allowed" */
+ guint a2dp_trusted = TRUE;
BT_CHECK_PARAMETER(device_address, return);
func_data->type = type;
func_data->pending = BT_PENDING_NONE;
- result = _bt_get_restrict_profile(device_address, RESTRICTED_PROFILE_HFP_HS, &hfp_hs_restricted);
+ result = _bt_get_trust_profile(device_address, TRUSTED_PROFILE_HFP_HF, &hfp_hs_trusted);
if (result != BLUETOOTH_ERROR_NONE)
BT_ERR("Can't get hfp_hs restriction info");
- result = _bt_get_restrict_profile(device_address, RESTRICTED_PROFILE_A2DP, &a2dp_restricted);
+ result = _bt_get_trust_profile(device_address, TRUSTED_PROFILE_A2DP, &a2dp_trusted);
if (result != BLUETOOTH_ERROR_NONE)
BT_ERR("Can't get a2dp restriction info");
uuid = A2DP_SOURCE_UUID;
break;
case BT_AUDIO_ALL:
- if ((hfp_hs_restricted == 0x0) && (a2dp_restricted == 0x0)) { /* in case of both profiles are not restricted */
+ if ((hfp_hs_trusted == TRUE) && (a2dp_trusted == TRUE)) { /* in case of both profiles are not restricted */
if (__bt_device_support_uuid(address, BT_AUDIO_HSP)) {
uuid = HFP_HS_UUID;
func_data->pending = BT_PENDING_CONNECT;
result = BLUETOOTH_ERROR_SERVICE_NOT_FOUND;
goto fail;
}
- } else if ((hfp_hs_restricted == 0x1) && (a2dp_restricted == 0x1)) { /* in case of both profiles are restricted */
+ } else if ((hfp_hs_trusted == FALSE) && (a2dp_trusted == FALSE)) { /* in case of both profiles are restricted */
BT_ERR("All profiles are restricted");
result = BLUETOOTH_ERROR_INTERNAL;
goto fail;
- } else if (a2dp_restricted == 0x01) { /* in case of a2dp is restricted, only connection for hfp_hs */
+ } else if (a2dp_trusted == FALSE) { /* in case of a2dp is restricted, only connection for hfp_hs */
if (__bt_device_support_uuid(address, BT_AUDIO_HSP)) {
uuid = HFP_HS_UUID;
type = BT_AUDIO_HSP;
result = BLUETOOTH_ERROR_SERVICE_NOT_FOUND;
goto fail;
}
- } else if (hfp_hs_restricted == 0x01) { /* in case of hfp_hs is restricted, only connection for a2dp */
+ } else if (hfp_hs_trusted == FALSE) { /* in case of hfp_hs is restricted, only connection for a2dp */
if (__bt_device_support_uuid(address, BT_AUDIO_A2DP)) {
uuid = A2DP_SINK_UUID;
type = BT_AUDIO_A2DP;