2 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #include <syspopup_caller.h>
23 #include <bundle_internal.h>
25 #include "bluetooth-api.h"
26 #include "bt-internal-types.h"
28 #include "bt-service-common.h"
29 #include "bt-service-dpm.h"
31 static dpm_policy_t policy_table[DPM_POLICY_END] = {
32 /* policy-group : BLUETOOTH */
33 [DPM_POLICY_ALLOW_BLUETOOTH] = {DPM_BT_ERROR},
34 [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = {DPM_STATUS_ERROR},
35 [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = {DPM_STATUS_ERROR},
36 [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = {NULL},
37 [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = {NULL},
38 [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = {NULL},
39 [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = {NULL},
40 [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = {DPM_STATUS_ERROR},
41 [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = {DPM_STATUS_ERROR},
42 [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = {DPM_STATUS_ERROR},
43 [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = {DPM_STATUS_ERROR},
44 [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = {DPM_STATUS_ERROR},
45 [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = {DPM_STATUS_ERROR},
50 * @brief DPM profile state
53 static dpm_profile_state_t dpm_profile_state[DPM_PROFILE_NONE] = {
54 [DPM_POLICY_BLUETOOTH_A2DP_PROFILE_STATE] = {DPM_STATUS_ERROR},
55 [DPM_POLICY_BLUETOOTH_AVRCP_PROFILE_STATE] = {DPM_STATUS_ERROR},
56 [DPM_POLICY_BLUETOOTH_BPP_PROFILE_STATE] = {DPM_STATUS_ERROR},
57 [DPM_POLICY_BLUETOOTH_DUN_PROFILE_STATE] = {DPM_STATUS_ERROR},
58 [DPM_POLICY_BLUETOOTH_FTP_PROFILE_STATE] = {DPM_STATUS_ERROR},
59 [DPM_POLICY_BLUETOOTH_HFP_PROFILE_STATE] = {DPM_STATUS_ERROR},
60 [DPM_POLICY_BLUETOOTH_HSP_PROFILE_STATE] = {DPM_STATUS_ERROR},
61 [DPM_POLICY_BLUETOOTH_PBAP_PROFILE_STATE] = {DPM_STATUS_ERROR},
62 [DPM_POLICY_BLUETOOTH_SAP_PROFILE_STATE] = {DPM_STATUS_ERROR},
63 [DPM_POLICY_BLUETOOTH_SPP_PROFILE_STATE] = {DPM_STATUS_ERROR},
66 dpm_result_t _bt_dpm_set_allow_bluetooth_mode(dpm_bt_allow_t value)
68 BT_INFO("_bt_dpm_set_allow_bluetooth_mode");
69 policy_table[DPM_POLICY_ALLOW_BLUETOOTH].value = value;
71 return DPM_RESULT_SUCCESS;
74 dpm_bt_allow_t _bt_dpm_get_allow_bluetooth_mode(void)
76 BT_INFO("_bt_dpm_get_allow_bluetooth_mode");
77 return policy_table[DPM_POLICY_ALLOW_BLUETOOTH].value;
80 dpm_result_t _bt_dpm_activate_bluetooth_device_restriction(dpm_status_t value)
82 BT_INFO("_bt_dpm_activate_bluetooth_device_restriction");
83 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
84 return DPM_RESULT_ACCESS_DENIED;
86 policy_table[DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION].value = value;
88 return DPM_RESULT_SUCCESS;
91 dpm_status_t _bt_dpm_is_bluetooth_device_restriction_active(void)
93 BT_INFO("_bt_dpm_is_bluetooth_device_restriction_active");
95 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
96 return DPM_RESTRICTED;
98 return policy_table[DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION].value;
101 dpm_result_t _bt_dpm_activate_bluetoooth_uuid_restriction(dpm_status_t value)
103 BT_INFO("_bt_dpm_activate_bluetooth_device_restriction");
104 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
105 return DPM_RESULT_ACCESS_DENIED;
107 policy_table[DPM_POLICY_BLUETOOTH_UUID_RESTRICTION].value = value;
109 return DPM_RESULT_SUCCESS;
112 dpm_status_t _bt_dpm_is_bluetooth_uuid_restriction_active(void)
114 BT_INFO("_bt_dpm_is_bluetooth_uuid_restriction_active");
116 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
117 return DPM_RESTRICTED;
119 return policy_table[DPM_POLICY_BLUETOOTH_UUID_RESTRICTION].value;
122 dpm_result_t _bt_dpm_add_bluetooth_devices_to_blacklist(char *device_address)
125 BT_INFO("_bt_dpm_add_bluetooth_devices_to_blacklist");
127 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
128 return DPM_RESULT_ACCESS_DENIED;
130 dev_addr = g_strdup(device_address);
132 return DPM_RESULT_FAIL;
133 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, dev_addr);
134 return DPM_RESULT_SUCCESS;
137 GSList *_bt_dpm_get_bluetooth_devices_from_blacklist(void)
139 BT_INFO("_bt_dpm_get_bluetooth_devices_from_blacklist");
141 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
144 return policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list;
147 dpm_result_t _bt_dpm_add_bluetooth_devices_to_whitelist(char *device_address)
150 BT_INFO("_bt_dpm_add_bluetooth_devices_to_whitelist");
152 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
153 return DPM_RESULT_ACCESS_DENIED;
155 dev_addr = g_strdup(device_address);
157 return DPM_RESULT_FAIL;
158 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, dev_addr);
159 return DPM_RESULT_SUCCESS;
162 GSList *_bt_dpm_get_bluetooth_devices_from_whitelist(void)
164 BT_INFO("_bt_dpm_get_bluetooth_devices_from_whitelist");
166 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
169 return policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list;
172 dpm_result_t _bt_dpm_add_bluetooth_uuids_to_blacklist(char *uuid)
175 BT_INFO("_bt_dpm_add_bluetooth_uuids_to_blacklist");
177 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
178 return DPM_RESULT_ACCESS_DENIED;
180 l_uuid = g_strdup(uuid);
182 return DPM_RESULT_FAIL;
183 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
184 return DPM_RESULT_SUCCESS;
187 GSList *_bt_dpm_get_bluetooth_uuids_from_blacklist(void)
189 BT_INFO("_bt_dpm_get_bluetooth_uuids_from_blacklist");
191 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
194 return policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list;
197 dpm_result_t _bt_dpm_add_bluetooth_uuids_to_whitelist(char *uuid)
200 BT_INFO("_bt_dpm_add_bluetooth_uuids_to_blacklist");
202 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
203 return DPM_RESULT_ACCESS_DENIED;
205 l_uuid = g_strdup(uuid);
207 return DPM_RESULT_FAIL;
208 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, l_uuid);
209 return DPM_RESULT_SUCCESS;
213 GSList *_bt_dpm_get_bluetooth_uuids_from_whitelist(void)
215 BT_INFO("_bt_dpm_get_bluetooth_uuids_from_whitelist");
217 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
220 return policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list;
223 dpm_result_t _bt_dpm_set_allow_bluetooth_outgoing_call(dpm_status_t value)
225 BT_INFO("_bt_dpm_activate_bluetooth_device_restriction");
226 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
227 return DPM_RESULT_ACCESS_DENIED;
229 policy_table[DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL].value = value;
231 return DPM_RESULT_SUCCESS;
234 dpm_status_t _bt_dpm_get_allow_bluetooth_outgoing_call(void)
236 BT_INFO("_bt_dpm_get_allow_bluetooth_outgoing_call");
238 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
239 return DPM_RESTRICTED;
241 return policy_table[DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL].value;
244 dpm_result_t _bt_dpm_clear_bluetooth_devices_from_blacklist(void)
247 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
249 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
250 return DPM_RESULT_ACCESS_DENIED;
252 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list; l; l = g_slist_next(l)) {
253 char *address = l->data;
255 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, address);
259 return DPM_RESULT_SUCCESS;
262 dpm_result_t _bt_dpm_clear_bluetooth_devices_from_whitelist(void)
265 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
267 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
268 return DPM_RESULT_ACCESS_DENIED;
270 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list; l; l = g_slist_next(l)) {
271 char *address = l->data;
273 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, address);
277 return DPM_RESULT_SUCCESS;
280 dpm_result_t _bt_dpm_clear_bluetooth_uuids_from_blacklist(void)
283 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
285 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
286 return DPM_RESULT_ACCESS_DENIED;
288 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list; l; l = g_slist_next(l)) {
289 char *l_uuid = l->data;
291 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
294 return DPM_RESULT_SUCCESS;
297 dpm_result_t _bt_dpm_clear_bluetooth_uuids_from_whitelist(void)
300 BT_INFO("_bt_dpm_clear_bluetooth_uuids_from_whitelist");
302 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
303 return DPM_RESULT_ACCESS_DENIED;
305 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list; l; l = g_slist_next(l)) {
306 char *l_uuid = l->data;
308 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, l_uuid);
312 return DPM_RESULT_SUCCESS;
315 dpm_status_t _bt_dpm_set_bluetooth_pairing_state(dpm_status_t value)
317 BT_INFO("_bt_dpm_set_bluetooth_pairing_state");
319 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
320 return DPM_RESTRICTED;
322 policy_table[DPM_POLICY_BLUETOOTH_PAIRING_STATE].value = value;
324 return DPM_RESULT_SUCCESS;
327 dpm_status_t _bt_dpm_get_bluetooth_pairing_state(void)
329 BT_INFO("_bt_dpm_get_bluetooth_pairing_state");
331 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
332 return DPM_RESTRICTED;
334 return policy_table[DPM_POLICY_BLUETOOTH_PAIRING_STATE].value;
337 dpm_status_t _bt_dpm_set_bluetooth_profile_state(dpm_profile_t profile, dpm_status_t value)
339 BT_INFO("_bt_dpm_set_bluetooth_profile_state");
341 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
342 return DPM_RESTRICTED;
344 dpm_profile_state[profile].value = value;
346 return DPM_RESULT_SUCCESS;
349 dpm_status_t _bt_dpm_get_bluetooth_profile_state(dpm_profile_t profile)
351 BT_INFO("_bt_dpm_get_bluetooth_profile_state");
353 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
354 return DPM_RESTRICTED;
356 return dpm_profile_state[profile].value;
359 dpm_status_t _bt_dpm_set_bluetooth_desktop_connectivity_state(dpm_status_t value)
361 BT_INFO("_bt_dpm_set_bluetooth_desktop_connectivity_state");
363 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
364 return DPM_RESTRICTED;
366 policy_table[DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE].value = value;
368 return DPM_RESULT_SUCCESS;
371 dpm_status_t _bt_dpm_get_bluetooth_desktop_connectivity_state(void)
373 BT_INFO("_bt_dpm_get_bluetooth_desktop_connectivity_state");
375 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
376 return DPM_RESTRICTED;
378 return policy_table[DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE].value;
381 dpm_status_t _bt_dpm_set_bluetooth_discoverable_state(dpm_status_t value)
383 BT_INFO("_bt_dpm_set_bluetooth_discoverable_state");
385 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
386 return DPM_RESTRICTED;
388 policy_table[DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE].value = value;
390 return DPM_RESULT_SUCCESS;
393 dpm_status_t _bt_dpm_get_bluetooth_discoverable_state(void)
395 BT_INFO("_bt_dpm_get_bluetooth_discoverable_state");
397 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
398 return DPM_RESTRICTED;
400 return policy_table[DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE].value;
403 dpm_status_t _bt_dpm_set_bluetooth_limited_discoverable_state(dpm_status_t value)
405 BT_INFO("_bt_dpm_set_bluetooth_limited_discoverable_state");
407 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
408 return DPM_RESTRICTED;
410 policy_table[DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE].value = value;
412 return DPM_RESULT_SUCCESS;
415 dpm_status_t _bt_dpm_get_bluetooth_limited_discoverable_state(void)
417 BT_INFO("_bt_dpm_get_bluetooth_limited_discoverable_state");
419 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
420 return DPM_RESTRICTED;
422 return policy_table[DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE].value;
425 dpm_status_t _bt_dpm_set_bluetooth_data_transfer_state(dpm_status_t value)
427 BT_INFO("_bt_dpm_set_bluetooth_data_transfer_state");
429 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
430 return DPM_RESTRICTED;
432 return policy_table[DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE].value = value;
435 dpm_status_t _bt_dpm_get_allow_bluetooth_data_transfer_state(dpm_status_t value)
437 BT_INFO("_bt_dpm_get_allow_bluetooth_data_transfer_state");
439 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
440 return DPM_RESTRICTED;
442 return policy_table[DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE].value;
445 dpm_result_t _bt_dpm_remove_bluetooth_devices_from_whitelist(GSList *device_addresses)
448 GSList *device_list = NULL;
449 BT_INFO("_bt_dpm_remove_bluetooth_devices_from_whitelist");
451 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
452 return DPM_RESULT_ACCESS_DENIED;
454 for (device_list = device_addresses; device_list; device_list = g_slist_next(device_list)) {
455 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list; l; l = g_slist_next(l)) {
456 if (l->data == device_list->data) {
457 char *addr = device_list->data;
459 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list =
460 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, addr);
467 return DPM_RESULT_SUCCESS;
470 dpm_result_t _bt_dpm_remove_bluetooth_devices_from_blacklist(GSList *device_addresses)
473 GSList *device_list = NULL;
474 BT_INFO("_bt_dpm_remove_bluetooth_devices_from_blacklist");
476 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
477 return DPM_RESULT_ACCESS_DENIED;
479 for (device_list = device_addresses; device_list; device_list = g_slist_next(device_list)) {
480 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list; l; l = g_slist_next(l)) {
481 if (l->data == device_list->data) {
482 char *addr = device_list->data;
484 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list =
485 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, addr);
492 return DPM_RESULT_SUCCESS;
495 dpm_result_t _bt_dpm_remove_bluetooth_uuids_from_whitelist(GSList *uuids)
498 GSList *uuids_list = NULL;
499 BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_whitelist");
501 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
502 return DPM_RESULT_ACCESS_DENIED;
504 for (uuids_list = uuids; uuids_list; uuids_list = g_slist_next(uuids_list)) {
505 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list; l; l = g_slist_next(l)) {
506 if (l->data == uuids_list->data) {
507 char *uuid = uuids_list->data;
509 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list =
510 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, uuid);
517 return DPM_RESULT_SUCCESS;
520 dpm_result_t _bt_dpm_remove_bluetooth_uuids_from_blacklist(GSList *uuids)
523 GSList *uuids_list = NULL;
524 BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_blacklist");
526 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
527 return DPM_RESULT_ACCESS_DENIED;
529 for (uuids_list = uuids; uuids_list; uuids_list = g_slist_next(uuids_list)) {
530 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list; l; l = g_slist_next(l)) {
531 if (l->data == uuids_list->data) {
532 char *uuid = uuids_list->data;
534 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list =
535 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, uuid);
542 return DPM_RESULT_SUCCESS;
545 dpm_result_t _bt_dpm_clear_bluetooth_uuids_from_list(void)
547 BT_INFO("_bt_dpm_clear_bluetooth_uuids_from_list");
548 dpm_result_t err = DPM_RESULT_FAIL;
550 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
551 return DPM_RESULT_ACCESS_DENIED;
553 err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
555 err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
561 dpm_result_t _bt_dpm_clear_bluetooth_devices_from_list(void)
563 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_list");
564 dpm_result_t err = DPM_RESULT_FAIL;
566 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
567 return DPM_RESULT_ACCESS_DENIED;
569 err = _bt_dpm_clear_bluetooth_devices_from_blacklist();
571 err = _bt_dpm_clear_bluetooth_devices_from_blacklist();