Reduce the predefined logic (PredefinedPreprocessor)
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / services / bt-service-dpm.c
index a0c354d..64a5ce1 100644 (file)
@@ -14,8 +14,6 @@
  * limitations under the License.
  *
  */
-#ifdef TIZEN_FEATURE_BT_DPM
-
 #include <glib.h>
 #include <gio/gio.h>
 #include <dlog.h>
@@ -68,19 +66,6 @@ int _bt_dpm_set_allow_bluetooth_mode(dpm_bt_allow_t value)
 {
        BT_INFO("_bt_dpm_set_allow_bluetooth_mode");
 
-#if 0
-       if (value == DPM_BT_ALLOWED && value == DPM_BT_HANDSFREE_ONLY) {
-               /* Update Bluetooth DPM Status to notify other modules */
-               if (vconf_set_int(VCONFKEY_BT_DPM_STATUS, value) != 0)
-                       BT_ERR("Set vconf failed\n");
-                       return DPM_RESULT_FAIL;
-       } else {
-               /* Update Bluetooth DPM Status to notify other modules */
-               if (vconf_set_int(VCONFKEY_BT_DPM_STATUS, VCONFKEY_BT_DPM_STATUS_RESTRICTED) != 0)
-                       BT_ERR("Set vconf failed\n");
-                       return DPM_RESULT_FAIL;
-       }
-#endif
        policy_table[DPM_POLICY_ALLOW_BLUETOOTH].value  = value;
 
        return BLUETOOTH_ERROR_NONE;
@@ -287,8 +272,9 @@ int _bt_dpm_add_bluetooth_uuids_to_blacklist(const char *uuid)
 
        policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list  = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
 
-#if 0 /* Use device functions if this logic required in later */
+       /* Use device functions if this logic required in later */
        /* Disconnect if connected blacklist uuid is existing */
+       /*
        addr_list = g_array_new(FALSE, FALSE, sizeof(gchar));
        _bt_get_profile_connected_devices((char *)uuid, &addr_list);
        for (i = 0; i < (addr_list->len / sizeof(bluetooth_device_address_t)); i++) {
@@ -300,7 +286,7 @@ int _bt_dpm_add_bluetooth_uuids_to_blacklist(const char *uuid)
                // TODO: need to implement disconnect logic
        }
        g_array_free(addr_list, TRUE);
-#endif
+       */
 
        return BLUETOOTH_ERROR_NONE;
 }
@@ -562,8 +548,9 @@ int _bt_dpm_set_bluetooth_profile_state(dpm_profile_t profile, dpm_status_t valu
        dpm_profile_state[profile].value = value;
 
 
-#if 0 /* Use other functions if this logic required in later */
+       /* Use other functions if this logic required in later */
        /* In case of restriction, disconnect if connected profile is existing */
+       /*
        if (value == DPM_RESTRICTED) {
                char *uuid = NULL;
                GArray *addr_list = NULL;
@@ -617,7 +604,7 @@ int _bt_dpm_set_bluetooth_profile_state(dpm_profile_t profile, dpm_status_t valu
                }
                g_array_free(addr_list, TRUE);
        }
-#endif
+       */
 
        return BLUETOOTH_ERROR_NONE;
 }
@@ -897,4 +884,3 @@ int _bt_dpm_clear_bluetooth_devices_from_list(void)
 
        return err;
 }
-#endif /* #ifdef TIZEN_FEATURE_BT_DPM */