Revert "Use Trusted Profiles instead of Restricted Profiles"
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-device.c
index da19a75..8bb283d 100644 (file)
@@ -22,7 +22,7 @@
 #include "bt-request-sender.h"
 #include "bt-event-handler.h"
 
-#ifdef TIZEN_DPM_ENABLE
+#ifdef TIZEN_FEATURE_BT_DPM
 #include "bt-dpm.h"
 #endif
 
@@ -40,7 +40,7 @@ BT_EXPORT_API int bluetooth_bond_device(const bluetooth_device_address_t *device
                return BLUETOOTH_ERROR_PERMISSION_DEINED;
        }
 
-#ifdef TIZEN_DPM_ENABLE
+#ifdef TIZEN_FEATURE_BT_DPM
        if (_bt_check_dpm(BT_DPM_PAIRING, NULL) == BT_DPM_RESTRICTED) {
                        BT_ERR("Not allow to pair the device");
                        return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
@@ -317,7 +317,7 @@ BT_EXPORT_API int bluetooth_is_device_connected(const bluetooth_device_address_t
        BT_CHECK_PARAMETER(is_connected, return);
        BT_CHECK_ENABLED(return);
 
-#ifdef RFCOMM_DIRECT
+#ifdef TIZEN_FEATURE_BT_RFCOMM_DIRECT
        if (type & BLUETOOTH_RFCOMM_SERVICE) {
                result = bluetooth_rfcomm_client_is_connected(device_address, is_connected);
                if (*is_connected == FALSE)
@@ -336,9 +336,8 @@ BT_EXPORT_API int bluetooth_is_device_connected(const bluetooth_device_address_t
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_IS_DEVICE_CONNECTED,
                in_param1, in_param2, in_param3, in_param4, &out_param);
 
-       if (result == BLUETOOTH_ERROR_NONE) {
+       if (result == BLUETOOTH_ERROR_NONE)
                *is_connected = g_array_index(out_param, gboolean, 0);
-       }
 
        BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
 
@@ -501,9 +500,8 @@ BT_EXPORT_API int bluetooth_get_connected_link_type(
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_CONNECTED_LINK_TYPE,
                        in_param1, in_param2, in_param3, in_param4, &out_param);
 
-       if (result == BLUETOOTH_ERROR_NONE) {
+       if (result == BLUETOOTH_ERROR_NONE)
                *connected = g_array_index(out_param, guint, 0);
-       }
 
        BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
 
@@ -631,9 +629,8 @@ BT_EXPORT_API int bluetooth_get_att_mtu(const bluetooth_device_address_t *device
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_ATT_MTU,
                in_param1, in_param2, in_param3, in_param4, &out_param);
 
-       if (result == BLUETOOTH_ERROR_NONE) {
+       if (result == BLUETOOTH_ERROR_NONE)
                *mtu = g_array_index(out_param, unsigned int, 0);
-       }
 
        BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
 
@@ -705,9 +702,8 @@ BT_EXPORT_API int bluetooth_set_profile_trusted(
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_PROFILE_TRUSTED,
                        in_param1, in_param2, in_param3, in_param4, &out_param);
 
-       if (result == BLUETOOTH_ERROR_NONE) {
+       if (result == BLUETOOTH_ERROR_NONE)
                BT_DBG("SUCCESSFUL");
-       }
 
        BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
 
@@ -762,9 +758,8 @@ BT_EXPORT_API int bluetooth_set_profile_restricted(
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_PROFILE_RESTRICTED,
                        in_param1, in_param2, in_param3, in_param4, &out_param);
 
-       if (result == BLUETOOTH_ERROR_NONE) {
+       if (result == BLUETOOTH_ERROR_NONE)
                BT_DBG("SUCCESSFUL");
-       }
 
        BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);