Apply tizen 3.0 based product patchsets
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-audio.c
index 1cadaab..e611731 100644 (file)
@@ -728,8 +728,8 @@ int _bt_audio_connect(int request_id, int type,
        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);
 
@@ -747,11 +747,11 @@ int _bt_audio_connect(int request_id, int type,
        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");
 
@@ -769,7 +769,7 @@ int _bt_audio_connect(int request_id, int type,
                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;
@@ -782,11 +782,11 @@ int _bt_audio_connect(int request_id, int type,
                                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;
@@ -795,7 +795,7 @@ int _bt_audio_connect(int request_id, int type,
                                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;