BT core spec 5.3 promotes the usage of inclusive languages.
This patch replaces non-inclusive words with inclusive ones.
Change-Id: I7946af9cab584f0f44baa208782b6930e6afcef1
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
return result;
}
-BT_EXPORT_API int bluetooth_add_white_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
+BT_EXPORT_API int bluetooth_add_allow_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
{
int result;
g_array_append_vals(in_param1, address, sizeof(bluetooth_device_address_t));
g_array_append_vals(in_param2, &address_type, sizeof(int));
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_ADD_WHITE_LIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_ADD_ALLOW_LIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
return result;
}
-BT_EXPORT_API int bluetooth_remove_white_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
+BT_EXPORT_API int bluetooth_remove_allow_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
{
int result;
g_array_append_vals(in_param1, address, sizeof(bluetooth_device_address_t));
g_array_append_vals(in_param2, &address_type, sizeof(int));
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_REMOVE_WHITE_LIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_REMOVE_ALLOW_LIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
return result;
}
-BT_EXPORT_API int bluetooth_clear_white_list(void)
+BT_EXPORT_API int bluetooth_clear_allow_list(void)
{
int result;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_CLEAR_WHITE_LIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_CLEAR_ALLOW_LIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)remote_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
}
if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)remote_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
}
if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)remote_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
}
if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)remote_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
}
if (_bt_check_dpm(BT_DPM_ADDRESS, remote_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
{BT_LE_WRITE_HOST_SUGGESTED_DATA_LENGTH, "BT_LE_WRITE_HOST_SUGGESTED_DATA_LENGTH"},
{BT_LE_READ_HOST_SUGGESTED_DATA_LENGTH, "BT_LE_READ_HOST_SUGGESTED_DATA_LENGTH"},
{BT_LE_SET_DATA_LENGTH, "BT_LE_SET_DATA_LENGTH"},
- {BT_ADD_WHITE_LIST, "BT_ADD_WHITE_LIST"},
- {BT_REMOVE_WHITE_LIST, "BT_REMOVE_WHITE_LIST"},
- {BT_CLEAR_WHITE_LIST, "BT_CLEAR_WHITE_LIST"},
+ {BT_ADD_ALLOW_LIST, "BT_ADD_ALLOW_LIST"},
+ {BT_REMOVE_ALLOW_LIST, "BT_REMOVE_ALLOW_LIST"},
+ {BT_CLEAR_ALLOW_LIST, "BT_CLEAR_ALLOW_LIST"},
{BT_REGISTER_SCAN_FILTER, "BT_REGISTER_SCAN_FILTER"},
{BT_IS_SCAN_FILTER_SUPPORTED, "BT_IS_SCAN_FILTER_SUPPORTED"},
{BT_GET_PROFILE_CONNECTED_DEVICES, "BT_GET_PROFILE_CONNECTED_DEVICES"},
{BT_DPM_GET_DEVICE_RESTRITION, "BT_DPM_GET_DEVICE_RESTRITION"},
{BT_DPM_SET_UUID_RESTRITION, "BT_DPM_SET_UUID_RESTRITION"},
{BT_DPM_GET_UUID_RESTRITION, "BT_DPM_GET_UUID_RESTRITION"},
- {BT_DPM_ADD_DEVICES_BLACKLIST, "BT_DPM_ADD_DEVICES_BLACKLIST"},
- {BT_DPM_ADD_DEVICES_WHITELIST, "BT_DPM_ADD_DEVICES_WHITELIST"},
- {BT_DPM_ADD_UUIDS_BLACKLIST, "BT_DPM_ADD_UUIDS_BLACKLIST"},
- {BT_DPM_ADD_UUIDS_WHITELIST, "BT_DPM_ADD_UUIDS_WHITELIST"},
- {BT_DPM_CLEAR_DEVICES_BLACKLIST, "BT_DPM_CLEAR_DEVICES_BLACKLIST"},
- {BT_DPM_CLEAR_DEVICES_WHITELIST, "BT_DPM_CLEAR_DEVICES_WHITELIST"},
- {BT_DPM_CLEAR_UUIDS_BLACKLIST, "BT_DPM_CLEAR_UUIDS_BLACKLIST"},
- {BT_DPM_CLEAR_UUIDS_WHITELIST, "BT_DPM_CLEAR_UUIDS_WHITELIST"},
- {BT_DPM_REMOVE_DEVICE_BLACKLIST, "BT_DPM_REMOVE_DEVICE_BLACKLIST"},
- {BT_DPM_REMOVE_DEVICE_WHITELIST, "BT_DPM_REMOVE_DEVICE_WHITELIST"},
- {BT_DPM_REMOVE_UUID_BLACKLIST, "BT_DPM_REMOVE_UUID_BLACKLIST"},
- {BT_DPM_REMOVE_UUID_WHITELIST, "BT_DPM_REMOVE_UUID_WHITELIST"},
- {BT_DPM_GET_DEVICES_BLACKLIST, "BT_DPM_GET_DEVICES_BLACKLIST"},
- {BT_DPM_GET_DEVICES_WHITELIST, "BT_DPM_GET_DEVICES_WHITELIST"},
- {BT_DPM_GET_UUIDS_BLACKLIST, "BT_DPM_GET_UUIDS_BLACKLIST"},
- {BT_DPM_GET_UUIDS_WHITELIST, "BT_DPM_GET_UUIDS_WHITELIST"},
+ {BT_DPM_ADD_DEVICES_BLOCKLIST, "BT_DPM_ADD_DEVICES_BLOCKLIST"},
+ {BT_DPM_ADD_DEVICES_ALLOWLIST, "BT_DPM_ADD_DEVICES_ALLOWLIST"},
+ {BT_DPM_ADD_UUIDS_BLOCKLIST, "BT_DPM_ADD_UUIDS_BLOCKLIST"},
+ {BT_DPM_ADD_UUIDS_ALLOWLIST, "BT_DPM_ADD_UUIDS_ALLOWLIST"},
+ {BT_DPM_CLEAR_DEVICES_BLOCKLIST, "BT_DPM_CLEAR_DEVICES_BLOCKLIST"},
+ {BT_DPM_CLEAR_DEVICES_ALLOWLIST, "BT_DPM_CLEAR_DEVICES_ALLOWLIST"},
+ {BT_DPM_CLEAR_UUIDS_BLOCKLIST, "BT_DPM_CLEAR_UUIDS_BLOCKLIST"},
+ {BT_DPM_CLEAR_UUIDS_ALLOWLIST, "BT_DPM_CLEAR_UUIDS_ALLOWLIST"},
+ {BT_DPM_REMOVE_DEVICE_BLOCKLIST, "BT_DPM_REMOVE_DEVICE_BLOCKLIST"},
+ {BT_DPM_REMOVE_DEVICE_ALLOWLIST, "BT_DPM_REMOVE_DEVICE_ALLOWLIST"},
+ {BT_DPM_REMOVE_UUID_BLOCKLIST, "BT_DPM_REMOVE_UUID_BLOCKLIST"},
+ {BT_DPM_REMOVE_UUID_ALLOWLIST, "BT_DPM_REMOVE_UUID_ALLOWLIST"},
+ {BT_DPM_GET_DEVICES_BLOCKLIST, "BT_DPM_GET_DEVICES_BLOCKLIST"},
+ {BT_DPM_GET_DEVICES_ALLOWLIST, "BT_DPM_GET_DEVICES_ALLOWLIST"},
+ {BT_DPM_GET_UUIDS_BLOCKLIST, "BT_DPM_GET_UUIDS_BLOCKLIST"},
+ {BT_DPM_GET_UUIDS_ALLOWLIST, "BT_DPM_GET_UUIDS_ALLOWLIST"},
{BT_DPM_SET_ALLOW_OUTGOING_CALL, "BT_DPM_SET_ALLOW_OUTGOING_CALL"},
{BT_DPM_GET_ALLOW_OUTGOING_CALL, "BT_DPM_GET_ALLOW_OUTGOING_CALL"},
{BT_DPM_SET_PAIRING_STATE, "BT_DPM_SET_PAIRING_STATE"},
}
if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)device_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
return (dpm_status == BLUETOOTH_DPM_RESTRICTED ? BT_DPM_RESTRICTED : BT_DPM_ALLOWED);
}
-static bt_dpm_status_e _bt_check_dpm_blacklist_device(bluetooth_device_address_t *address)
+static bt_dpm_status_e _bt_check_dpm_blocklist_device(bluetooth_device_address_t *address)
{
int ret = BLUETOOTH_DPM_RESULT_SUCCESS;
bt_dpm_device_list_t dev_list;
_bt_convert_addr_type_to_string(device_address,
(unsigned char *)address->addr);
- ret = bluetooth_dpm_get_devices_from_blacklist(&dev_list);
+ ret = bluetooth_dpm_get_devices_from_blocklist(&dev_list);
if (ret == BLUETOOTH_DPM_RESULT_SUCCESS) {
int i = 0;
for (i = 0; i < dev_list.count; i++) {
return BT_DPM_ALLOWED;
}
-static bt_dpm_status_e _bt_check_dpm_blacklist_uuid(char *uuid)
+static bt_dpm_status_e _bt_check_dpm_blocklist_uuid(char *uuid)
{
bt_dpm_status_e bt_dpm_status = BT_DPM_ALLOWED;
bt_dpm_status_t dpm_status = BLUETOOTH_DPM_ALLOWED;
int ret = BLUETOOTH_DPM_RESULT_SUCCESS;
retv_if(!uuid, bt_dpm_status);
- ret = bluetooth_dpm_get_uuids_from_blacklist(&uuid_list);
+ ret = bluetooth_dpm_get_uuids_from_blocklist(&uuid_list);
if (ret == BLUETOOTH_DPM_RESULT_SUCCESS) {
int i = 0;
for (i = 0; i < uuid_list.count; i++) {
bt_dpm_status_e dpm_status = BT_DPM_ALLOWED;
bt_dpm_status_t dpm_value = BLUETOOTH_DPM_ALLOWED;
- dpm_status = _bt_check_dpm_blacklist_uuid(BT_OPP_UUID);
+ dpm_status = _bt_check_dpm_blocklist_uuid(BT_OPP_UUID);
/* TODO: MAP? see above */
if (dpm_status == BT_DPM_NO_SERVICE || dpm_status == BT_DPM_RESTRICTED)
{
bt_dpm_status_e dpm_status = BT_DPM_ALLOWED;
- dpm_status = _bt_check_dpm_blacklist_uuid(BT_HFP_AUDIO_GATEWAY_UUID);
+ dpm_status = _bt_check_dpm_blocklist_uuid(BT_HFP_AUDIO_GATEWAY_UUID);
if (dpm_status == BT_DPM_NO_SERVICE || dpm_status == BT_DPM_RESTRICTED)
return dpm_status;
- dpm_status = _bt_check_dpm_blacklist_uuid(BT_HSP_AUDIO_GATEWAY_UUID);
+ dpm_status = _bt_check_dpm_blocklist_uuid(BT_HSP_AUDIO_GATEWAY_UUID);
if (dpm_status == BT_DPM_NO_SERVICE || dpm_status == BT_DPM_RESTRICTED)
return dpm_status;
{
bt_dpm_status_e dpm_status = BT_DPM_ALLOWED;
- dpm_status = _bt_check_dpm_blacklist_uuid(BT_A2DP_UUID);
+ dpm_status = _bt_check_dpm_blocklist_uuid(BT_A2DP_UUID);
if (dpm_status == BT_DPM_NO_SERVICE || dpm_status == BT_DPM_RESTRICTED)
return dpm_status;
{
bt_dpm_status_e dpm_status = BT_DPM_ALLOWED;
- dpm_status = _bt_check_dpm_blacklist_uuid(BT_AVRCP_TARGET_UUID);
+ dpm_status = _bt_check_dpm_blocklist_uuid(BT_AVRCP_TARGET_UUID);
if (dpm_status == BT_DPM_NO_SERVICE || dpm_status == BT_DPM_RESTRICTED)
return dpm_status;
{
bt_dpm_status_e dpm_status = BT_DPM_ALLOWED;
- dpm_status = _bt_check_dpm_blacklist_uuid(BT_SPP_UUID);
+ dpm_status = _bt_check_dpm_blocklist_uuid(BT_SPP_UUID);
if (dpm_status == BT_DPM_NO_SERVICE || dpm_status == BT_DPM_RESTRICTED)
return dpm_status;
status = _bt_check_dpm_desktop_connectivity_restriction();
break;
case BT_DPM_ADDRESS: {
- status = _bt_check_dpm_blacklist_device((bluetooth_device_address_t *)param);
+ status = _bt_check_dpm_blocklist_device((bluetooth_device_address_t *)param);
}
break;
case BT_DPM_UUID: {
char *uuid;
uuid = (char *)param;
- status = _bt_check_dpm_blacklist_uuid(uuid);
+ status = _bt_check_dpm_blocklist_uuid(uuid);
}
break;
case BT_DPM_OPP:
}
-BT_EXPORT_API int bluetooth_dpm_add_devices_to_blacklist(const bluetooth_device_address_t *device_address)
+BT_EXPORT_API int bluetooth_dpm_add_devices_to_blocklist(const bluetooth_device_address_t *device_address)
{
int result;
g_array_append_vals(in_param1, device_address, sizeof(bluetooth_device_address_t));
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_DEVICES_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_DEVICES_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
-BT_EXPORT_API int bluetooth_dpm_add_devices_to_whitelist(const bluetooth_device_address_t *device_address)
+BT_EXPORT_API int bluetooth_dpm_add_devices_to_allowlist(const bluetooth_device_address_t *device_address)
{
int result;
g_array_append_vals(in_param1, device_address, sizeof(bluetooth_device_address_t));
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_DEVICES_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_DEVICES_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
-BT_EXPORT_API int bluetooth_dpm_add_uuids_to_blacklist(const char *service_uuid)
+BT_EXPORT_API int bluetooth_dpm_add_uuids_to_blocklist(const char *service_uuid)
{
int result;
char uuid[BLUETOOTH_UUID_STRING_MAX];
g_strlcpy(uuid, service_uuid, sizeof(uuid));
g_array_append_vals(in_param1, uuid, BLUETOOTH_UUID_STRING_MAX);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_UUIDS_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_UUIDS_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
-BT_EXPORT_API int bluetooth_dpm_add_uuids_to_whitelist(const char *service_uuid)
+BT_EXPORT_API int bluetooth_dpm_add_uuids_to_allowlist(const char *service_uuid)
{
int result;
char uuid[BLUETOOTH_UUID_STRING_MAX];
g_strlcpy(uuid, service_uuid, sizeof(uuid));
g_array_append_vals(in_param1, uuid, BLUETOOTH_UUID_STRING_MAX);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_UUIDS_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_ADD_UUIDS_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
-BT_EXPORT_API int bluetooth_dpm_clear_devices_from_blacklist(void)
+BT_EXPORT_API int bluetooth_dpm_clear_devices_from_blocklist(void)
{
int result;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_DEVICES_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_DEVICES_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
-BT_EXPORT_API int bluetooth_dpm_clear_devices_from_whitelist(void)
+BT_EXPORT_API int bluetooth_dpm_clear_devices_from_allowlist(void)
{
int result;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_DEVICES_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_DEVICES_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
-BT_EXPORT_API int bluetooth_dpm_clear_uuids_from_blacklist(void)
+BT_EXPORT_API int bluetooth_dpm_clear_uuids_from_blocklist(void)
{
int result;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_UUIDS_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_UUIDS_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
-BT_EXPORT_API int bluetooth_dpm_clear_uuids_from_whitelist(void)
+BT_EXPORT_API int bluetooth_dpm_clear_uuids_from_allowlist(void)
{
int result;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_UUIDS_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_CLEAR_UUIDS_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
}
-BT_EXPORT_API int bluetooth_dpm_get_devices_from_blacklist(bt_dpm_device_list_t *device_list)
+BT_EXPORT_API int bluetooth_dpm_get_devices_from_blocklist(bt_dpm_device_list_t *device_list)
{
int result;
bt_dpm_device_list_t *devices = NULL;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_DEVICES_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_DEVICES_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
if (result == BLUETOOTH_ERROR_NONE) {
return result;
}
-BT_EXPORT_API int bluetooth_dpm_get_devices_from_whitelist(bt_dpm_device_list_t *device_list)
+BT_EXPORT_API int bluetooth_dpm_get_devices_from_allowlist(bt_dpm_device_list_t *device_list)
{
int result;
bt_dpm_device_list_t *devices = NULL;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_DEVICES_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_DEVICES_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
if (result == BLUETOOTH_ERROR_NONE) {
return result;
}
-BT_EXPORT_API int bluetooth_dpm_get_uuids_from_blacklist(bt_dpm_uuids_list_t *uuid_list)
+BT_EXPORT_API int bluetooth_dpm_get_uuids_from_blocklist(bt_dpm_uuids_list_t *uuid_list)
{
int result;
bt_dpm_uuids_list_t *uuids;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_UUIDS_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_UUIDS_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
if (result == BLUETOOTH_ERROR_NONE) {
return result;
}
-BT_EXPORT_API int bluetooth_dpm_get_uuids_from_whitelist(bt_dpm_uuids_list_t *uuid_list)
+BT_EXPORT_API int bluetooth_dpm_get_uuids_from_allowlist(bt_dpm_uuids_list_t *uuid_list)
{
int result;
bt_dpm_uuids_list_t *uuids;
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_UUIDS_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_GET_UUIDS_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
if (result == BLUETOOTH_ERROR_NONE) {
return result;
}
-BT_EXPORT_API int bluetooth_dpm_remove_device_from_whitelist(const bluetooth_device_address_t *device_address)
+BT_EXPORT_API int bluetooth_dpm_remove_device_from_allowlist(const bluetooth_device_address_t *device_address)
{
int result;
g_array_append_vals(in_param1, device_address, sizeof(bluetooth_device_address_t));
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_DEVICE_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_DEVICE_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
return result;
}
-BT_EXPORT_API int bluetooth_dpm_remove_device_from_blacklist(const bluetooth_device_address_t *device_address)
+BT_EXPORT_API int bluetooth_dpm_remove_device_from_blocklist(const bluetooth_device_address_t *device_address)
{
int result;
g_array_append_vals(in_param1, device_address, sizeof(bluetooth_device_address_t));
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_DEVICE_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_DEVICE_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
return result;
}
-BT_EXPORT_API int bluetooth_dpm_remove_uuid_from_whitelist(const char *service_uuid)
+BT_EXPORT_API int bluetooth_dpm_remove_uuid_from_allowlist(const char *service_uuid)
{
int result;
char uuid[BLUETOOTH_UUID_STRING_MAX];
g_strlcpy(uuid, service_uuid, sizeof(uuid));
g_array_append_vals(in_param1, uuid, BLUETOOTH_UUID_STRING_MAX);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_UUID_WHITELIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_UUID_ALLOWLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
return result;
}
-BT_EXPORT_API int bluetooth_dpm_remove_uuid_from_blacklist(const char *service_uuid)
+BT_EXPORT_API int bluetooth_dpm_remove_uuid_from_blocklist(const char *service_uuid)
+
{
int result;
char uuid[BLUETOOTH_UUID_STRING_MAX];
g_strlcpy(uuid, service_uuid, sizeof(uuid));
g_array_append_vals(in_param1, uuid, BLUETOOTH_UUID_STRING_MAX);
- result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_UUID_BLACKLIST,
+ result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DPM_REMOVE_UUID_BLOCKLIST,
in_param1, in_param2, in_param3, in_param4, &out_param);
BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
}
if (_bt_check_dpm(BT_DPM_ADDRESS, device_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
if (_bt_check_dpm(BT_DPM_UUID, BT_HID_UUID) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist uuid");
+ BT_ERR("Blocklist uuid");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
char *uuid = NULL;
if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)device_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
}
if (_bt_check_dpm(BT_DPM_UUID, uuid) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist uuid");
+ BT_ERR("Blocklist uuid");
g_free(uuid);
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
}
if (_bt_check_dpm(BT_DPM_ADDRESS, remote_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
BT_CHECK_ENABLED(return);
if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)remote_bt_address) == BT_DPM_RESTRICTED) {
- BT_ERR("Blacklist device");
+ BT_ERR("Blocklist device");
return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
}
-/*add/remove remote device address from white list*/
-int _bt_hal_adapter_le_set_white_list(bt_bdaddr_t *device_address, bt_dev_addr_type_t address_type, bool is_add)
+/*add/remove remote device address from allow list*/
+int _bt_hal_adapter_le_set_allow_list(bt_bdaddr_t *device_address, bt_dev_addr_type_t address_type, bool is_add)
{
GDBusProxy *proxy;
char address[BT_HAL_ADDRESS_STRING_SIZE] = { 0 };
if (proxy == NULL)
return BT_STATUS_FAIL;
if (is_add)
- ret = g_dbus_proxy_call_sync(proxy, "AddDeviceWhiteList",
+ ret = g_dbus_proxy_call_sync(proxy, "AddDeviceAllowList",
g_variant_new("(su)", address, address_type),
G_DBUS_CALL_FLAGS_NONE, -1,
NULL, &error);
else
- ret = g_dbus_proxy_call_sync(proxy, "RemoveDeviceWhiteList",
+ ret = g_dbus_proxy_call_sync(proxy, "RemoveDeviceAllowList",
g_variant_new("(su)", address, address_type),
G_DBUS_CALL_FLAGS_NONE, -1,
NULL, &error);
if (error) {
if (is_add)
- ERR("RemoveDeviceWhiteList Fail: %s", error->message);
+ ERR("RemoveDeviceAllowList Fail: %s", error->message);
else
- ERR("AddDeviceWhiteList Fail: %s", error->message);
+ ERR("AddDeviceAllowList Fail: %s", error->message);
g_clear_error(&error);
return BT_STATUS_FAIL;
}
if (ret)
g_variant_unref(ret);
if (is_add)
- INFO("Device Added to white list");
+ INFO("Device Added to allow list");
else
- INFO("Device Removed from white list");
+ INFO("Device Removed from allow list");
return BT_STATUS_SUCCESS;
}
int _bt_hal_adapter_le_set_privacy(uint8_t set_privacy);
-int _bt_hal_adapter_le_set_white_list(bt_bdaddr_t *device_address, bt_dev_addr_type_t address_type, bool is_add);
+int _bt_hal_adapter_le_set_allow_list(bt_bdaddr_t *device_address, bt_dev_addr_type_t address_type, bool is_add);
int _bt_hal_adapter_le_set_manufacturer_data(bt_manufacturer_data_t *m_data);
#ifdef __cplusplus
/* TODO_40 : 4.0 merge */
#include "bt-internal-types.h"
-#define BT_HAL_AGENT_AUTO_PAIR_BLACKLIST_FILE (APP_SYSCONFDIR"/auto-pair-blacklist")
+#define BT_HAL_AGENT_AUTO_PAIR_BLOCKLIST_FILE (APP_SYSCONFDIR"/auto-pair-blocklist")
#define BT_HAL_AGENT_NEW_LINE "\r\n"
#define BUF_SIZE 256
#define PAGE_SIZE (1 << 12)
static int __bt_hal_device_generate_passkey(char *passkey, int size);
static gboolean __bt_hal_device_is_auto_response(uint32_t dev_class,
const gchar *address, const gchar *name);
-static gboolean __bt_hal_device_is_device_blacklisted(const char *address, const char *name);
+static gboolean __bt_hal_device_is_device_blocklisted(const char *address, const char *name);
static gboolean __bt_hal_find_device_by_address_exactname(char *buffer,
const char *address);
static gboolean __bt_hal_find_device_by_partial_name(char *buffer,
return FALSE;
}
-static gboolean __bt_hal_device_is_device_blacklisted(const char *address,
+static gboolean __bt_hal_device_is_device_blocklisted(const char *address,
const char *name)
{
char *buffer;
DBG("+");
- fp = fopen(BT_HAL_AGENT_AUTO_PAIR_BLACKLIST_FILE, "r");
+ fp = fopen(BT_HAL_AGENT_AUTO_PAIR_BLOCKLIST_FILE, "r");
if (fp == NULL) {
- ERR("Unable to open blacklist file");
+ ERR("Unable to open blocklist file");
return FALSE;
}
}
for (i = 0; lines[i] != NULL; i++) {
- if (g_str_has_prefix(lines[i], "AddressBlacklist"))
+ if (g_str_has_prefix(lines[i], "AddressBlocklist"))
if (__bt_hal_find_device_by_address_exactname(
lines[i], address))
goto done;
- if (g_str_has_prefix(lines[i], "ExactNameBlacklist"))
+ if (g_str_has_prefix(lines[i], "ExactNameBlocklist"))
if (__bt_hal_find_device_by_address_exactname(
lines[i], name))
goto done;
- if (g_str_has_prefix(lines[i], "PartialNameBlacklist"))
+ if (g_str_has_prefix(lines[i], "PartialNameBlocklist"))
if (__bt_hal_find_device_by_partial_name(lines[i],
name))
goto done;
/* Get the LAP(Lower Address part) */
g_strlcpy(lap_address, address, sizeof(lap_address));
- /* Need to Auto pair the blacklisted Keyboard */
- if (__bt_hal_device_is_device_blacklisted(lap_address, name) != TRUE) {
- DBG("Device is not black listed\n");
+ /* Need to Auto pair the blocklisted Keyboard */
+ if (__bt_hal_device_is_device_blocklisted(lap_address, name) != TRUE) {
+ DBG("Device is not block listed\n");
return FALSE;
} else {
- ERR("Device is black listed\n");
+ ERR("Device is block listed\n");
return TRUE;
}
}
DBG("Device address = %s\n", address);
DBG("Address 3 byte = %s\n", lap_address);
- if (__bt_hal_device_is_device_blacklisted(lap_address, name)) {
- ERR("Device is black listed\n");
+ if (__bt_hal_device_is_device_blocklisted(lap_address, name)) {
+ ERR("Device is block listed\n");
return FALSE;
}
.set_hal_adapter_request_state = set_hal_adapter_request_state,
.set_hal_le_request_state = set_hal_le_request_state,
.adapter_le_set_manufacturer_data = _bt_hal_adapter_le_set_manufacturer_data,
- .adapter_le_set_white_list = _bt_hal_adapter_le_set_white_list,
+ .adapter_le_set_allow_list = _bt_hal_adapter_le_set_allow_list,
.adapter_le_set_privacy = _bt_hal_adapter_le_set_privacy,
.device_disconnect = dev_disconnect,
#endif
int (*set_hal_le_request_state)(int enable);
/*
- * adds/removes the remote device address to/from the white list
+ * adds/removes the remote device address to/from the allow list
*/
- int (*adapter_le_set_white_list)(bt_bdaddr_t *device_address, bt_dev_addr_type_t address_type, bool is_add);
+ int (*adapter_le_set_allow_list)(bt_bdaddr_t *device_address, bt_dev_addr_type_t address_type, bool is_add);
/*
* Sets the privacy functionality of the adapter
BTHF_CLIENT_CMD_COMPLETE_ERROR_BUSY,
BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_ANSWER,
BTHF_CLIENT_CMD_COMPLETE_ERROR_DELAYED,
- BTHF_CLIENT_CMD_COMPLETE_ERROR_BLACKLISTED,
+ BTHF_CLIENT_CMD_COMPLETE_ERROR_BLOCKLISTED,
BTHF_CLIENT_CMD_COMPLETE_ERROR_CME
} bthf_client_cmd_complete_t;
oal_status_t is_advertising(void);
/**
- * @brief Add/removes device to/from whitelist
+ * @brief Add/removes device to/from allowlist
*
* @param remote device address
* @param remote device address type
- * @param whether to add/remove from white list
+ * @param whether to add/remove from allow list
*
- * @details adds/removes device to/from controller's white list.
+ * @details adds/removes device to/from controller's allow list.
*
* @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
* @retval #OAL_STATUS_SUCCESS Successful
*
* @pre Adapter must be enabled with adapter_enable() followed by OAL_EVENT_ADAPTER_ENABLED
*/
-oal_status_t adapter_set_white_list(bt_address_t* device_address, int address_type, bool is_add);
+oal_status_t adapter_set_allow_list(bt_address_t* device_address, int address_type, bool is_add);
/**
* @brief Set the privacy functionality of the adapter
return ret;
}
-oal_status_t adapter_set_white_list(bt_address_t *device_address, int address_type, bool is_add)
+oal_status_t adapter_set_allow_list(bt_address_t *device_address, int address_type, bool is_add)
{
int ret;
bdstr_t bdstr;
BT_INFO("BT remote device Address: %s", bdt_bd2str(device_address, &bdstr) + 12);
- ret = blued_api->adapter_le_set_white_list((bt_bdaddr_t*)device_address, address_type, is_add);
+ ret = blued_api->adapter_le_set_allow_list((bt_bdaddr_t*)device_address, address_type, is_add);
if (ret != BT_STATUS_SUCCESS) {
if(is_add)
- BT_ERR("Add to White List Failed: [%s]",status2string(ret));
+ BT_ERR("Add to allow List Failed: [%s]",status2string(ret));
else
- BT_ERR("Remove from White List Failed: [%s]",status2string(ret));
+ BT_ERR("Remove from allow List Failed: [%s]",status2string(ret));
}
ret = convert_to_oal_status(ret);
return ret;
}
-int _bt_set_white_list(bluetooth_device_address_t *device_address, int address_type, bool is_add)
+int _bt_set_allow_list(bluetooth_device_address_t *device_address, int address_type, bool is_add)
{
int result = BLUETOOTH_ERROR_NONE;
if (__bt_is_factory_test_mode()) {
if(is_add)
- BT_ERR("Unable to add to white list in factory binary !!");
+ BT_ERR("Unable to add to allow list in factory binary !!");
else
- BT_ERR("Unable to remove white list in factory binary !!");
+ BT_ERR("Unable to remove allow list in factory binary !!");
return BLUETOOTH_ERROR_NOT_SUPPORT;
}
return BLUETOOTH_ERROR_DEVICE_NOT_ENABLED;
}
- result = adapter_set_white_list((bt_address_t*)device_address, address_type, is_add);
+ result = adapter_set_allow_list((bt_address_t*)device_address, address_type, is_add);
if (result != OAL_STATUS_SUCCESS) {
if (is_add)
- BT_ERR("Add to White List Failed %d", result);
+ BT_ERR("Add to Allow List Failed %d", result);
else
- BT_ERR("Remove from white list Failed %d", result);
+ BT_ERR("Remove from allow list Failed %d", result);
return _bt_convert_oal_status_to_bt_error(result);
}
result = _bt_set_le_privacy(set_privacy);
break;
}
- case BT_ADD_WHITE_LIST: {
+ case BT_ADD_ALLOW_LIST: {
bluetooth_device_address_t address = { {0} };
int address_type = 0;
bool is_add = true;
&address, sizeof(bluetooth_device_address_t));
__bt_service_get_parameters(in_param2,
&address_type, sizeof(int));
- result = _bt_set_white_list(&address, address_type, is_add);
+ result = _bt_set_allow_list(&address, address_type, is_add);
break;
}
- case BT_REMOVE_WHITE_LIST: {
+ case BT_REMOVE_ALLOW_LIST: {
bluetooth_device_address_t address = { {0} };
int address_type = 0;
bool is_add = false;
&address, sizeof(bluetooth_device_address_t));
__bt_service_get_parameters(in_param2,
&address_type, sizeof(int));
- result = _bt_set_white_list(&address, address_type, is_add);
+ result = _bt_set_allow_list(&address, address_type, is_add);
break;
}
case BT_UPDATE_LE_CONNECTION_MODE: {
g_array_append_vals(*out_param1, &value, sizeof(int));
break;
}
- case BT_DPM_ADD_DEVICES_BLACKLIST: {
+ case BT_DPM_ADD_DEVICES_BLOCKLIST: {
bluetooth_device_address_t address = { {0} };
__bt_service_get_parameters(in_param1, &address,
sizeof(bluetooth_device_address_t));
- result = _bt_dpm_add_bluetooth_devices_to_blacklist(&address);
+ result = _bt_dpm_add_bluetooth_devices_to_blocklist(&address);
break;
}
- case BT_DPM_ADD_DEVICES_WHITELIST: {
+ case BT_DPM_ADD_DEVICES_ALLOWLIST: {
bluetooth_device_address_t address = { {0} };
__bt_service_get_parameters(in_param1, &address,
sizeof(bluetooth_device_address_t));
- result = _bt_dpm_add_bluetooth_devices_to_whitelist(&address);
+ result = _bt_dpm_add_bluetooth_devices_to_allowlist(&address);
break;
}
- case BT_DPM_ADD_UUIDS_BLACKLIST: {
+ case BT_DPM_ADD_UUIDS_BLOCKLIST: {
const char *uuid = NULL;
uuid = g_variant_get_data(in_param1);
- result = _bt_dpm_add_bluetooth_uuids_to_blacklist(uuid);
+ result = _bt_dpm_add_bluetooth_uuids_to_blocklist(uuid);
break;
}
- case BT_DPM_ADD_UUIDS_WHITELIST: {
+ case BT_DPM_ADD_UUIDS_ALLOWLIST: {
const char *uuid = NULL;
uuid = g_variant_get_data(in_param1);
- result = _bt_dpm_add_bluetooth_uuids_to_whitelist(uuid);
+ result = _bt_dpm_add_bluetooth_uuids_to_allowlist(uuid);
break;
}
- case BT_DPM_CLEAR_DEVICES_BLACKLIST: {
- result = _bt_dpm_clear_bluetooth_devices_from_blacklist();
+ case BT_DPM_CLEAR_DEVICES_BLOCKLIST: {
+ result = _bt_dpm_clear_bluetooth_devices_from_blocklist();
break;
}
- case BT_DPM_CLEAR_DEVICES_WHITELIST: {
- result = _bt_dpm_clear_bluetooth_devices_from_whitelist();
+ case BT_DPM_CLEAR_DEVICES_ALLOWLIST: {
+ result = _bt_dpm_clear_bluetooth_devices_from_allowlist();
break;
}
- case BT_DPM_CLEAR_UUIDS_BLACKLIST: {
- result = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
+ case BT_DPM_CLEAR_UUIDS_BLOCKLIST: {
+ result = _bt_dpm_clear_bluetooth_uuids_from_blocklist();
break;
}
- case BT_DPM_CLEAR_UUIDS_WHITELIST: {
- result = _bt_dpm_clear_bluetooth_uuids_from_whitelist();
+ case BT_DPM_CLEAR_UUIDS_ALLOWLIST: {
+ result = _bt_dpm_clear_bluetooth_uuids_from_allowlist();
break;
}
- case BT_DPM_REMOVE_DEVICE_BLACKLIST: {
+ case BT_DPM_REMOVE_DEVICE_BLOCKLIST: {
bluetooth_device_address_t address = { {0} };
__bt_service_get_parameters(in_param1, &address,
sizeof(bluetooth_device_address_t));
- result = _bt_dpm_remove_bluetooth_devices_from_blacklist(&address);
+ result = _bt_dpm_remove_bluetooth_devices_from_blocklist(&address);
break;
}
- case BT_DPM_REMOVE_DEVICE_WHITELIST: {
+ case BT_DPM_REMOVE_DEVICE_ALLOWLIST: {
bluetooth_device_address_t address = { {0} };
__bt_service_get_parameters(in_param1, &address,
sizeof(bluetooth_device_address_t));
- result = _bt_dpm_remove_bluetooth_devices_from_whitelist(&address);
+ result = _bt_dpm_remove_bluetooth_devices_from_allowlist(&address);
break;
}
- case BT_DPM_REMOVE_UUID_BLACKLIST: {
+ case BT_DPM_REMOVE_UUID_BLOCKLIST: {
const char *uuid = NULL;
uuid = g_variant_get_data(in_param1);
- result = _bt_dpm_remove_bluetooth_uuids_from_blacklist(uuid);
+ result = _bt_dpm_remove_bluetooth_uuids_from_blocklist(uuid);
break;
}
- case BT_DPM_REMOVE_UUID_WHITELIST: {
+ case BT_DPM_REMOVE_UUID_ALLOWLIST: {
const char *uuid = NULL;
uuid = g_variant_get_data(in_param1);
- result = _bt_dpm_remove_bluetooth_uuids_from_whitelist(uuid);
+ result = _bt_dpm_remove_bluetooth_uuids_from_allowlist(uuid);
break;
}
- case BT_DPM_GET_DEVICES_BLACKLIST: {
- result = _bt_dpm_get_bluetooth_devices_from_blacklist(out_param1);
+ case BT_DPM_GET_DEVICES_BLOCKLIST: {
+ result = _bt_dpm_get_bluetooth_devices_from_blocklist(out_param1);
break;
}
- case BT_DPM_GET_DEVICES_WHITELIST: {
- result = _bt_dpm_get_bluetooth_devices_from_whitelist(out_param1);
+ case BT_DPM_GET_DEVICES_ALLOWLIST: {
+ result = _bt_dpm_get_bluetooth_devices_from_allowlist(out_param1);
+
break;
}
- case BT_DPM_GET_UUIDS_BLACKLIST: {
- result = _bt_dpm_get_bluetooth_uuids_from_blacklist(out_param1);
+ case BT_DPM_GET_UUIDS_BLOCKLIST: {
+ result = _bt_dpm_get_bluetooth_uuids_from_blocklist(out_param1);
break;
}
- case BT_DPM_GET_UUIDS_WHITELIST: {
- result = _bt_dpm_get_bluetooth_uuids_from_whitelist(out_param1);
+ case BT_DPM_GET_UUIDS_ALLOWLIST: {
+ result = _bt_dpm_get_bluetooth_uuids_from_allowlist(out_param1);
break;
}
case BT_DPM_SET_ALLOW_OUTGOING_CALL: {
case BT_DPM_GET_DEVICE_RESTRITION:
case BT_DPM_SET_UUID_RESTRITION:
case BT_DPM_GET_UUID_RESTRITION:
- case BT_DPM_ADD_DEVICES_BLACKLIST:
- case BT_DPM_ADD_DEVICES_WHITELIST:
- case BT_DPM_ADD_UUIDS_BLACKLIST:
- case BT_DPM_ADD_UUIDS_WHITELIST:
- case BT_DPM_CLEAR_DEVICES_BLACKLIST:
- case BT_DPM_CLEAR_DEVICES_WHITELIST:
- case BT_DPM_CLEAR_UUIDS_BLACKLIST:
- case BT_DPM_CLEAR_UUIDS_WHITELIST:
- case BT_DPM_REMOVE_DEVICE_BLACKLIST:
- case BT_DPM_REMOVE_DEVICE_WHITELIST:
- case BT_DPM_REMOVE_UUID_BLACKLIST:
- case BT_DPM_REMOVE_UUID_WHITELIST:
- case BT_DPM_GET_DEVICES_BLACKLIST:
- case BT_DPM_GET_DEVICES_WHITELIST:
- case BT_DPM_GET_UUIDS_BLACKLIST:
- case BT_DPM_GET_UUIDS_WHITELIST:
+ case BT_DPM_ADD_DEVICES_BLOCKLIST:
+ case BT_DPM_ADD_DEVICES_ALLOWLIST:
+ case BT_DPM_ADD_UUIDS_BLOCKLIST:
+ case BT_DPM_ADD_UUIDS_ALLOWLIST:
+ case BT_DPM_CLEAR_DEVICES_BLOCKLIST:
+ case BT_DPM_CLEAR_DEVICES_ALLOWLIST:
+ case BT_DPM_CLEAR_UUIDS_BLOCKLIST:
+ case BT_DPM_CLEAR_UUIDS_ALLOWLIST:
+ case BT_DPM_REMOVE_DEVICE_BLOCKLIST:
+ case BT_DPM_REMOVE_DEVICE_ALLOWLIST:
+ case BT_DPM_REMOVE_UUID_BLOCKLIST:
+ case BT_DPM_REMOVE_UUID_ALLOWLIST:
+ case BT_DPM_GET_DEVICES_BLOCKLIST:
+ case BT_DPM_GET_DEVICES_ALLOWLIST:
+ case BT_DPM_GET_UUIDS_BLOCKLIST:
+ case BT_DPM_GET_UUIDS_ALLOWLIST:
case BT_DPM_SET_ALLOW_OUTGOING_CALL:
case BT_DPM_GET_ALLOW_OUTGOING_CALL:
case BT_DPM_SET_PAIRING_STATE:
case BT_DISABLE_ADAPTER_LE:
case BT_SET_CONNECTABLE:
case BT_SET_DISCOVERABLE_MODE:
- case BT_ADD_WHITE_LIST:
- case BT_REMOVE_WHITE_LIST:
- case BT_CLEAR_WHITE_LIST:
+ case BT_ADD_ALLOW_LIST:
+ case BT_REMOVE_ALLOW_LIST:
+ case BT_CLEAR_ALLOW_LIST:
case BT_SET_MANUFACTURER_DATA:
case BT_CANCEL_SEARCH_SERVICE:
return FALSE;
}
-gboolean _bt_agent_is_device_blacklist(const char *address,
+gboolean _bt_agent_is_device_blocklist(const char *address,
const char *name)
{
char *buffer;
BT_DBG("+");
- fp = fopen(BT_AGENT_AUTO_PAIR_BLACKLIST_FILE, "r");
+ fp = fopen(BT_AGENT_AUTO_PAIR_BLOCKLIST_FILE, "r");
if (fp == NULL) {
- BT_ERR("Unable to open blacklist file");
+ BT_ERR("Unable to open blocklist file");
return FALSE;
}
}
for (i = 0; lines[i] != NULL; i++) {
- if (g_str_has_prefix(lines[i], "AddressBlacklist"))
+ if (g_str_has_prefix(lines[i], "AddressBlocklist"))
if (__bt_agent_find_device_by_address_exactname(
lines[i], address))
goto done;
- if (g_str_has_prefix(lines[i], "ExactNameBlacklist"))
+ if (g_str_has_prefix(lines[i], "ExactNameBlocklist"))
if (__bt_agent_find_device_by_address_exactname(
lines[i], name))
goto done;
- if (g_str_has_prefix(lines[i], "PartialNameBlacklist"))
+ if (g_str_has_prefix(lines[i], "PartialNameBlocklist"))
if (__bt_agent_find_device_by_partial_name(lines[i],
name))
goto done;
/* Get the LAP(Lower Address part) */
g_strlcpy(lap_address, address, sizeof(lap_address));
- /* Need to Auto pair the blacklisted Keyboard */
- if (_bt_agent_is_device_blacklist(lap_address, name) != TRUE) {
- BT_DBG("Device is not black listed\n");
+ /* Need to Auto pair the blocklisted Keyboard */
+ if (_bt_agent_is_device_blocklist(lap_address, name) != TRUE) {
+ BT_DBG("Device is not block listed\n");
return FALSE;
} else {
- BT_ERR("Device is black listed\n");
+ BT_ERR("Device is block listed\n");
return TRUE;
}
break;
BT_DBG("Device address = %s\n", address);
BT_DBG("Address 3 byte = %s\n", lap_address);
- if (_bt_agent_is_device_blacklist(lap_address, name)) {
- BT_ERR("Device is black listed\n");
+ if (_bt_agent_is_device_blocklist(lap_address, name)) {
+ BT_ERR("Device is block listed\n");
return FALSE;
}
return TRUE;
[DPM_POLICY_ALLOW_BLUETOOTH] = { {DPM_BT_ERROR} },
[DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = { {DPM_STATUS_ERROR} },
[DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = { {DPM_STATUS_ERROR} },
- [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = { { } },
- [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = { { } },
- [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = { { } },
- [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = { { } },
+ [DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST] = { { } },
+ [DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST] = { { } },
+ [DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST] = { { } },
+ [DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST] = { { } },
[DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = { {DPM_STATUS_ERROR} },
[DPM_POLICY_BLUETOOTH_PAIRING_STATE] = { {DPM_STATUS_ERROR} },
[DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = { {DPM_STATUS_ERROR} },
return BLUETOOTH_ERROR_NONE;
}
-dpm_result_t _bt_dpm_add_bluetooth_devices_to_blacklist(bluetooth_device_address_t *bd_addr)
+dpm_result_t _bt_dpm_add_bluetooth_devices_to_blocklist(bluetooth_device_address_t *bd_addr)
{
char device_address[BT_ADDRESS_STRING_SIZE] = { 0 };
char *dev_addr = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_add_bluetooth_devices_to_blacklist");
+ BT_INFO("_bt_dpm_add_bluetooth_devices_to_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
if (!dev_addr)
return BLUETOOTH_ERROR_MEMORY_ALLOCATION;
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, dev_addr);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list, dev_addr);
- /* Disconnect if connected blacklist device is existing */
+ /* Disconnect if connected blocklist device is existing */
// TODO: need to implement disconnect logic
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_get_bluetooth_devices_from_blacklist(GArray **out_param1)
+int _bt_dpm_get_bluetooth_devices_from_blocklist(GArray **out_param1)
{
int ret = BLUETOOTH_ERROR_INTERNAL;
int allow_bt = DPM_BT_ERROR;
bt_dpm_device_list_t device_list = { 0, };
- GSList *list = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list;
+ GSList *list = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list;
int i = 0;
- BT_INFO("_bt_dpm_get_bluetooth_devices_from_blacklist");
+ BT_INFO("_bt_dpm_get_bluetooth_devices_from_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
memset(device_list.addresses[i].addr, 0, BLUETOOTH_ADDRESS_LENGTH);
_bt_convert_addr_string_to_type(device_list.addresses[i].addr, list->data);
}
- device_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list);
+ device_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list);
g_array_append_vals(*out_param1, &device_list, sizeof(bt_dpm_device_list_t));
} else {
ret = BLUETOOTH_ERROR_NONE;
return ret;
}
-int _bt_dpm_add_bluetooth_devices_to_whitelist(bluetooth_device_address_t *bd_addr)
+int _bt_dpm_add_bluetooth_devices_to_allowlist(bluetooth_device_address_t *bd_addr)
{
char device_address[BT_ADDRESS_STRING_SIZE] = { 0 };
char *dev_addr = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_add_bluetooth_devices_to_whitelist");
+ BT_INFO("_bt_dpm_add_bluetooth_devices_to_allowlist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
dev_addr = g_strdup(device_address);
if (!dev_addr)
return BLUETOOTH_ERROR_MEMORY_ALLOCATION;
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, dev_addr);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list, dev_addr);
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_get_bluetooth_devices_from_whitelist(GArray **out_param1)
+int _bt_dpm_get_bluetooth_devices_from_allowlist(GArray **out_param1)
{
dpm_result_t ret = BLUETOOTH_ERROR_INTERNAL;
int allow_bt = DPM_BT_ERROR;
bt_dpm_device_list_t device_list = { 0, };
- GSList *list = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list;
+ GSList *list = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list;
int i = 0;
- BT_INFO("_bt_dpm_get_bluetooth_devices_from_whitelist");
+ BT_INFO("_bt_dpm_get_bluetooth_devices_from_allowlist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
_bt_convert_addr_string_to_type(device_list.addresses[i].addr, list->data);
}
- device_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list);
+ device_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list);
g_array_append_vals(*out_param1, &device_list, sizeof(bt_dpm_device_list_t));
} else {
ret = BLUETOOTH_ERROR_NONE;
return ret;
}
-int _bt_dpm_add_bluetooth_uuids_to_blacklist(const char *uuid)
+int _bt_dpm_add_bluetooth_uuids_to_blocklist(const char *uuid)
{
char *l_uuid;
int allow_bt = DPM_BT_ERROR;
//GArray *addr_list = NULL;
//int i = 0;
- BT_INFO("_bt_dpm_add_bluetooth_uuids_to_blacklist");
+ BT_INFO("_bt_dpm_add_bluetooth_uuids_to_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
if (!l_uuid)
return BLUETOOTH_ERROR_MEMORY_ALLOCATION;
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
+
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list, l_uuid);
/* Use device functions if this logic required in later */
- /* Disconnect if connected blacklist uuid is existing */
+ /* Disconnect if connected blocklist uuid is existing */
/*
addr_list = g_array_new(FALSE, FALSE, sizeof(gchar));
_bt_get_profile_connected_devices((char *)uuid, &addr_list);
bluetooth_device_address_t *addr = &g_array_index(addr_list, bluetooth_device_address_t, i);
_bt_convert_addr_type_to_string(address, addr->addr);
- BT_INFO("device[%s] is in blacklist uuid, will be disconnected", address);
+ BT_INFO("device[%s] is in blocklist uuid, will be disconnected", address);
// TODO: need to implement disconnect logic
}
g_array_free(addr_list, TRUE);
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_get_bluetooth_uuids_from_blacklist(GArray **out_param1)
+int _bt_dpm_get_bluetooth_uuids_from_blocklist(GArray **out_param1)
{
int ret = BLUETOOTH_ERROR_INTERNAL;
int allow_bt = DPM_BT_ERROR;
bt_dpm_uuids_list_t uuids_list = {0, { {0}, } };
- GSList *list = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list;
+ GSList *list = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list;
int i = 0;
- BT_INFO("_bt_dpm_get_bluetooth_uuids_from_blacklist");
+ BT_INFO("_bt_dpm_get_bluetooth_uuids_from_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
if (list) {
ret = BLUETOOTH_ERROR_NONE;
- uuids_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list);
+ uuids_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list);
for (; list; list = list->next, i++) {
memset(uuids_list.uuids[i], 0, BLUETOOTH_UUID_STRING_MAX);
g_strlcpy(uuids_list.uuids[i], list->data,
return ret;
}
-int _bt_dpm_add_bluetooth_uuids_to_whitelist(const char *uuid)
+int _bt_dpm_add_bluetooth_uuids_to_allowlist(const char *uuid)
{
char *l_uuid;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_add_bluetooth_uuids_to_whitelist");
+ BT_INFO("_bt_dpm_add_bluetooth_uuids_to_allowlist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
if (!l_uuid)
return BLUETOOTH_ERROR_MEMORY_ALLOCATION;
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, l_uuid);
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list, l_uuid);
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_get_bluetooth_uuids_from_whitelist(GArray **out_param1)
+int _bt_dpm_get_bluetooth_uuids_from_allowlist(GArray **out_param1)
{
int ret = BLUETOOTH_ERROR_INTERNAL;
int allow_bt = DPM_BT_ERROR;
bt_dpm_uuids_list_t uuids_list = {0, { {0}, } };
- GSList *list = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list;
+ GSList *list = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list;
int i = 0;
- BT_INFO("_bt_dpm_get_bluetooth_uuids_from_whitelist");
+ BT_INFO("_bt_dpm_get_bluetooth_uuids_from_allowlist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
if (list) {
ret = BLUETOOTH_ERROR_NONE;
- uuids_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list);
+ uuids_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list);
for (; list; list = list->next, i++) {
memset(uuids_list.uuids[i], 0, BLUETOOTH_UUID_STRING_MAX);
g_strlcpy(uuids_list.uuids[i], list->data,
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_clear_bluetooth_devices_from_blacklist(void)
+int _bt_dpm_clear_bluetooth_devices_from_blocklist(void)
{
GSList *l = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
+ BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list; l; l = g_slist_next(l)) {
char *address = l->data;
if (address) {
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, address);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list, address);
g_free(address);
}
}
- g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list);
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = NULL;
+ g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list = NULL;
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_clear_bluetooth_devices_from_whitelist(void)
+int _bt_dpm_clear_bluetooth_devices_from_allowlist(void)
{
GSList *l = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
+ BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list; l; l = g_slist_next(l)) {
char *address = l->data;
if (address) {
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, address);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list, address);
g_free(address);
}
}
- g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list);
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = NULL;
+ g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list = NULL;
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_clear_bluetooth_uuids_from_blacklist(void)
+int _bt_dpm_clear_bluetooth_uuids_from_blocklist(void)
{
GSList *l = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
+ BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list; l; l = g_slist_next(l)) {
char *l_uuid = l->data;
if (l_uuid) {
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list, l_uuid);
g_free(l_uuid);
}
}
- g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list);
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = NULL;
+ g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list);
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list = NULL;
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_clear_bluetooth_uuids_from_whitelist(void)
+int _bt_dpm_clear_bluetooth_uuids_from_allowlist(void)
{
GSList *l = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_clear_bluetooth_uuids_from_whitelist");
+ BT_INFO("_bt_dpm_clear_bluetooth_uuids_from_allowlist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list; l; l = g_slist_next(l)) {
char *l_uuid = l->data;
if (l_uuid) {
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, l_uuid);
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list, l_uuid);
g_free(l_uuid);
}
}
- g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list);
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = NULL;
+ g_slist_free(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list);
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list = NULL;
return BLUETOOTH_ERROR_NONE;
}
bluetooth_device_address_t *addr = &g_array_index(addr_list, bluetooth_device_address_t, i);
_bt_convert_addr_type_to_string(address, addr->addr);
- BT_INFO("device[%s] is in blacklist uuid, will be disconnected", address);
+ BT_INFO("device[%s] is in blocklist uuid, will be disconnected", address);
// TODO: need to implement disconnect logic
}
g_array_free(addr_list, TRUE);
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_remove_bluetooth_devices_from_whitelist(bluetooth_device_address_t *device_address)
+int _bt_dpm_remove_bluetooth_devices_from_allowlist(bluetooth_device_address_t *device_address)
{
GSList *l = NULL;
char bd_addr[BT_ADDRESS_STRING_SIZE] = { 0 };
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_remove_bluetooth_devices_from_whitelist");
+ BT_INFO("_bt_dpm_remove_bluetooth_devices_from_allowlist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
_bt_convert_addr_type_to_string(bd_addr,
(unsigned char *)device_address->addr);
- for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list; l; l = g_slist_next(l)) {
char *l_device = l->data;
if (l_device && g_strcmp0(l_device, bd_addr)) {
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, l_device);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list, l_device);
g_free(l_device);
}
}
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_remove_bluetooth_devices_from_blacklist(bluetooth_device_address_t *device_address)
+int _bt_dpm_remove_bluetooth_devices_from_blocklist(bluetooth_device_address_t *device_address)
{
GSList *l = NULL;
char bd_addr[BT_ADDRESS_STRING_SIZE] = { 0 };
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_remove_bluetooth_devices_from_blacklist");
+ BT_INFO("_bt_dpm_remove_bluetooth_devices_from_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
_bt_convert_addr_type_to_string(bd_addr,
(unsigned char *)device_address->addr);
- for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST].list; l; l = g_slist_next(l)) {
char *l_device = l->data;
if (l_device && g_strcmp0(l_device, bd_addr)) {
- policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, l_device);
+ policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST].list, l_device);
g_free(l_device);
}
}
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_remove_bluetooth_uuids_from_whitelist(const char *uuids)
+int _bt_dpm_remove_bluetooth_uuids_from_allowlist(const char *uuids)
{
GSList *l = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_whitelist");
+ BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_allowlist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list; l; l = g_slist_next(l)) {
char *l_uuid = l->data;
if (l_uuid && g_strcmp0(l_uuid, uuids)) {
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, l_uuid);
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST].list, l_uuid);
g_free(l_uuid);
}
}
return BLUETOOTH_ERROR_NONE;
}
-int _bt_dpm_remove_bluetooth_uuids_from_blacklist(const char *uuids)
+int _bt_dpm_remove_bluetooth_uuids_from_blocklist(const char *uuids)
{
GSList *l = NULL;
int allow_bt = DPM_BT_ERROR;
- BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_blacklist");
+ BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_blocklist");
_bt_dpm_get_allow_bluetooth_mode(&allow_bt);
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list; l; l = g_slist_next(l)) {
+ for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list; l; l = g_slist_next(l)) {
char *l_uuid = l->data;
if (l_uuid && g_strcmp0(l_uuid, uuids)) {
- policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
+ policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST].list, l_uuid);
g_free(l_uuid);
}
}
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
+ err = _bt_dpm_clear_bluetooth_uuids_from_blocklist();
if (!err)
- err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
+ err = _bt_dpm_clear_bluetooth_uuids_from_blocklist();
return err;
}
if (allow_bt == DPM_BT_RESTRICTED)
return BLUETOOTH_ERROR_PERMISSION_DEINED;
- err = _bt_dpm_clear_bluetooth_devices_from_blacklist();
+ err = _bt_dpm_clear_bluetooth_devices_from_blocklist();
if (!err)
- err = _bt_dpm_clear_bluetooth_devices_from_blacklist();
+ err = _bt_dpm_clear_bluetooth_devices_from_blocklist();
return err;
}
int result = BLUETOOTH_ERROR_INTERNAL;
BT_INFO("BT_OPERATION_STATUS_AUTH_FAILED");
- BT_INFO("add device in pairing black list");
+ BT_INFO("add device in pairing block list");
_bt_set_autopair_status_in_bonding_info(FALSE);
if (trigger_bond_info) {
a "," */
snprintf(lap_address, sizeof(lap_address), ",%s", address);
- fp = fopen(BT_AGENT_AUTO_PAIR_BLACKLIST_FILE, "r");
+ fp = fopen(BT_AGENT_AUTO_PAIR_BLOCKLIST_FILE, "r");
if (fp == NULL) {
BT_ERR("fopen failed \n");
/* Write the data and insert new device data */
for (i = 0; lines[i] != NULL; i++) {
- if (g_str_has_prefix(lines[i], "AddressBlacklist")) {
+ if (g_str_has_prefix(lines[i], "AddressBlocklist")) {
temp_buffer = g_strconcat(lines[i], lap_address, NULL);
g_free(lines[i]);
lines[i] = temp_buffer;
/* Fix : NULL_RETURNS */
retv_if(buffer == NULL, FALSE);
- fp = fopen(BT_AGENT_AUTO_PAIR_BLACKLIST_FILE, "w");
+ fp = fopen(BT_AGENT_AUTO_PAIR_BLOCKLIST_FILE, "w");
if (fp == NULL) {
BT_ERR("fopen failed \n");
int _bt_agent_generate_passkey(char *passkey, int size);
-gboolean _bt_agent_is_device_blacklist(const char *address,
+gboolean _bt_agent_is_device_blocklist(const char *address,
const char *name);
void _bt_agent_release_memory(void);
#define BT_LOWER_ADDRESS_LENGTH 9
#define BT_UUID_LEN 16
-#define BT_AGENT_AUTO_PAIR_BLACKLIST_FILE (APP_SYSCONFDIR"/auto-pair-blacklist")
+#define BT_AGENT_AUTO_PAIR_BLOCKLIST_FILE (APP_SYSCONFDIR"/auto-pair-blocklist")
#define BT_AGENT_NEW_LINE "\r\n"
#define BT_MAX_DBUS_TIMEOUT 45000
int _bt_set_le_privacy(gboolean set_privacy);
-int _bt_set_white_list(bluetooth_device_address_t *device_address, int address_type, bool is_add);
+int _bt_set_allow_list(bluetooth_device_address_t *device_address, int address_type, bool is_add);
int _bt_set_manufacturer_data(bluetooth_manufacturer_data_t *m_data);
DPM_POLICY_ALLOW_BLUETOOTH,
DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION,
DPM_POLICY_BLUETOOTH_UUID_RESTRICTION,
- DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST,
- DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST,
- DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST,
- DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST,
+ DPM_POLICY_BLUETOOTH_DEVICES_ALLOWLIST,
+ DPM_POLICY_BLUETOOTH_DEVICES_BLOCKLIST,
+ DPM_POLICY_BLUETOOTH_UUIDS_ALLOWLIST,
+ DPM_POLICY_BLUETOOTH_UUIDS_BLOCKLIST,
DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL,
DPM_POLICY_BLUETOOTH_PAIRING_STATE,
DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE,
int _bt_dpm_is_bluetooth_device_restriction_active(int *value);
int _bt_dpm_activate_bluetoooth_uuid_restriction(dpm_status_t value);
int _bt_dpm_is_bluetooth_uuid_restriction_active(int *value);
-int _bt_dpm_add_bluetooth_devices_to_blacklist(bluetooth_device_address_t *bd_addr);
-int _bt_dpm_add_bluetooth_devices_to_whitelist(bluetooth_device_address_t *bd_addr);
-int _bt_dpm_add_bluetooth_uuids_to_blacklist(const char *uuid);
-int _bt_dpm_add_bluetooth_uuids_to_whitelist(const char *uuid);
+int _bt_dpm_add_bluetooth_devices_to_blocklist(bluetooth_device_address_t *bd_addr);
+int _bt_dpm_add_bluetooth_devices_to_allowlist(bluetooth_device_address_t *bd_addr);
+int _bt_dpm_add_bluetooth_uuids_to_blocklist(const char *uuid);
+int _bt_dpm_add_bluetooth_uuids_to_allowlist(const char *uuid);
int _bt_dpm_set_allow_bluetooth_outgoing_call(dpm_status_t value);
int _bt_dpm_get_allow_bluetooth_outgoing_call(int *value);
-int _bt_dpm_clear_bluetooth_devices_from_blacklist(void);
-int _bt_dpm_clear_bluetooth_devices_from_whitelist(void);
-int _bt_dpm_clear_bluetooth_uuids_from_blacklist(void);
-int _bt_dpm_clear_bluetooth_uuids_from_whitelist(void);
-int _bt_dpm_get_bluetooth_devices_from_blacklist(GArray **out_param1);
-int _bt_dpm_get_bluetooth_devices_from_whitelist(GArray **out_param1);
-int _bt_dpm_get_bluetooth_uuids_from_blacklist(GArray **out_param1);
-int _bt_dpm_get_bluetooth_uuids_from_whitelist(GArray **out_param1);
+int _bt_dpm_clear_bluetooth_devices_from_blocklist(void);
+int _bt_dpm_clear_bluetooth_devices_from_allowlist(void);
+int _bt_dpm_clear_bluetooth_uuids_from_blocklist(void);
+int _bt_dpm_clear_bluetooth_uuids_from_allowlist(void);
+int _bt_dpm_get_bluetooth_devices_from_blocklist(GArray **out_param1);
+int _bt_dpm_get_bluetooth_devices_from_allowlist(GArray **out_param1);
+int _bt_dpm_get_bluetooth_uuids_from_blocklist(GArray **out_param1);
+int _bt_dpm_get_bluetooth_uuids_from_allowlist(GArray **out_param1);
int _bt_dpm_is_bluetooth_device_restriction_active(int *value);
int _bt_dpm_is_bluetooth_uuid_restriction_active(int *value);
int _bt_dpm_set_bluetooth_pairing_state(dpm_status_t value);
int _bt_dpm_get_bluetooth_limited_discoverable_state(int *value);
int _bt_dpm_set_bluetooth_data_transfer_state(dpm_status_t value);
int _bt_dpm_get_allow_bluetooth_data_transfer_state(int *value);
-int _bt_dpm_remove_bluetooth_devices_from_whitelist(bluetooth_device_address_t *bd_addr);
-int _bt_dpm_remove_bluetooth_devices_from_blacklist(bluetooth_device_address_t *bd_addr);
-int _bt_dpm_remove_bluetooth_uuids_from_whitelist(const char *uuids);
-int _bt_dpm_remove_bluetooth_uuids_from_blacklist(const char *uuids);
+int _bt_dpm_remove_bluetooth_devices_from_allowlist(bluetooth_device_address_t *bd_addr);
+int _bt_dpm_remove_bluetooth_devices_from_blocklist(bluetooth_device_address_t *bd_addr);
+int _bt_dpm_remove_bluetooth_uuids_from_allowlist(const char *uuids);
+int _bt_dpm_remove_bluetooth_uuids_from_blocklist(const char *uuids);
#ifdef __cplusplus
}
*/
typedef enum {
BLUETOOTH_ALLOW_SCAN_CONN_ALL = 0x00,
- BLUETOOTH_ALLOW_CONN_ALL_SCAN_WHITE_LIST = 0x01,
- BLUETOOTH_ALLOW_SCAN_ALL_CONN_WHITE_LIST = 0x02,
- BLUETOOTH_ALLOW_SCAN_CONN_WHITE_LIST = 0x03,
+ BLUETOOTH_ALLOW_CONN_ALL_SCAN_ALLOW_LIST = 0x01,
+ BLUETOOTH_ALLOW_SCAN_ALL_CONN_ALLOW_LIST = 0x02,
+ BLUETOOTH_ALLOW_SCAN_CONN_ALLOW_LIST = 0x03,
} bluetooth_advertising_filter_policy_t;
/**
BLUETOOTH_DPM_POLICY_ALLOW,
BLUETOOTH_DPM_POLICY_DEVICE_RESTRICTION,
BLUETOOTH_DPM_POLICY_UUID_RESTRICTION,
- BLUETOOTH_DPM_POLICY_DEVICES_WHITELIST,
- BLUETOOTH_DPM_POLICY_DEVICES_BLACKLIST,
- BLUETOOTH_DPM_POLICY_UUIDS_WHITELIST,
- BLUETOOTH_DPM_POLICY_UUIDS_BLACKLIST,
+ BLUETOOTH_DPM_POLICY_DEVICES_ALLOWLIST,
+ BLUETOOTH_DPM_POLICY_DEVICES_BLOCKLIST,
+ BLUETOOTH_DPM_POLICY_UUIDS_ALLOWLIST,
+ BLUETOOTH_DPM_POLICY_UUIDS_BLOCKLIST,
BLUETOOTH_DPM_POLICY_ALLOW_OUTGOING_CALL,
BLUETOOTH_DPM_POLICY_PAIRING_STATE,
BLUETOOTH_DPM_POLICY_DESKTOP_CONNECTIVITY_STATE,
int bluetooth_is_advertising(gboolean *is_advertising);
/**
- * @fn int bluetooth_add_white_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
- * @brief Add LE device to white list
+ * @fn int bluetooth_add_allow_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
+ * @brief Add LE device to allow list
*
- * This API is used to add LE device to white list
+ * This API is used to add LE device to allow list
* Before calling this API, make sure that the adapter is enabled. There is no callback event for
* this API.
*
* @remark None
* @see bluetooth_set_custom_advertising
*/
-int bluetooth_add_white_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type);
+int bluetooth_add_allow_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type);
/**
- * @fn int bluetooth_remove_white_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
- * @brief Remove LE device from white list
+ * @fn int bluetooth_remove_allow_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type)
+ * @brief Remove LE device from allow list
*
- * This API is used to remove LE device from white list
+ * This API is used to remove LE device from allow list
* Before calling this API, make sure that the adapter is enabled. There is no callback event for
* this API.
*
* @remark None
* @see bluetooth_set_custom_advertising
*/
-int bluetooth_remove_white_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type);
+int bluetooth_remove_allow_list(bluetooth_device_address_t *address, bluetooth_device_address_type_t address_type);
/**
- * @fn int bluetooth_clear_white_list(void)
- * @brief Clear white list
+ * @fn int bluetooth_clear_allow_list(void)
+ * @brief Clear allow list
*
- * This API is used to clear white list
+ * This API is used to clear allow list
* Before calling this API, make sure that the adapter is enabled. There is no callback event for
* this API.
*
* @remark None
* @see bluetooth_set_custom_advertising
*/
-int bluetooth_clear_white_list(void);
+int bluetooth_clear_allow_list(void);
/**
* @fn int bluetooth_le_conn_update(bluetooth_device_address_t *address,
int bluetooth_dpm_is_uuid_restriction_active(bt_dpm_status_t *value);
/**
- * @fn int bluetooth_dpm_add_devices_to_blacklist(const bluetooth_device_address_t *device_address);
+ * @fn int bluetooth_dpm_add_devices_to_blocklist(const bluetooth_device_address_t *device_address);
*
- * @brief Adds the device to blacklist.
+ * @brief Adds the device to blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_add_devices_to_blacklist(const bluetooth_device_address_t *device_address);
+int bluetooth_dpm_add_devices_to_blocklist(const bluetooth_device_address_t *device_address);
/**
- * @fn int bluetooth_dpm_add_devices_to_whitelist(const bluetooth_device_address_t *device_address);
+ * @fn int bluetooth_dpm_add_devices_to_allowlist(const bluetooth_device_address_t *device_address);
*
- * @brief Adds the device to whitelist.
+ * @brief Adds the device to allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_add_devices_to_whitelist(const bluetooth_device_address_t *device_address);
+int bluetooth_dpm_add_devices_to_allowlist(const bluetooth_device_address_t *device_address);
/**
- * @fn int bluetooth_dpm_add_uuids_to_blacklist(const char *service_uuid);
+ * @fn int bluetooth_dpm_add_uuids_to_blocklist(const char *service_uuid);
*
- * @brief Adds the Service UUIDS to blacklist.
+ * @brief Adds the Service UUIDS to blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_add_uuids_to_blacklist(const char *service_uuid);
+int bluetooth_dpm_add_uuids_to_blocklist(const char *service_uuid);
/**
- * @fn int bluetooth_dpm_add_uuids_to_whitelist(const char *service_uuid);
+ * @fn int bluetooth_dpm_add_uuids_to_allowlist(const char *service_uuid);
*
- * @brief Adds the Service UUIDS to whitelist.
+ * @brief Adds the Service UUIDS to allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_add_uuids_to_whitelist(const char *service_uuid);
+int bluetooth_dpm_add_uuids_to_allowlist(const char *service_uuid);
/**
- * @fn int bluetooth_dpm_clear_devices_from_blacklist();
+ * @fn int bluetooth_dpm_clear_devices_from_blocklist();
*
- * @brief Clears the devices from blacklist.
+ * @brief Clears the devices from blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_clear_devices_from_blacklist(void);
+int bluetooth_dpm_clear_devices_from_blocklist(void);
/**
- * @fn int bluetooth_dpm_clear_devices_from_whitelist();
+ * @fn int bluetooth_dpm_clear_devices_from_allowlist();
*
- * @brief Clears the devices from whitelist.
+ * @brief Clears the devices from allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_clear_devices_from_whitelist(void);
+int bluetooth_dpm_clear_devices_from_allowlist(void);
/**
- * @fn int bluetooth_dpm_clear_uuids_from_blacklist();
+ * @fn int bluetooth_dpm_clear_uuids_from_blocklist();
*
- * @brief Clears the uuids from blacklist.
+ * @brief Clears the uuids from blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_clear_uuids_from_blacklist(void);
+int bluetooth_dpm_clear_uuids_from_blocklist(void);
/**
- * @fn int bluetooth_dpm_clear_uuids_from_whitelist();
+ * @fn int bluetooth_dpm_clear_uuids_from_allowlist();
*
- * @brief Clears the uuids from whitelist.
+ * @brief Clears the uuids from allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_clear_uuids_from_whitelist(void);
+int bluetooth_dpm_clear_uuids_from_allowlist(void);
/**
- * @fn int bluetooth_dpm_get_devices_from_blacklist(bt_dpm_device_list_t *device_list);
+ * @fn int bluetooth_dpm_get_devices_from_blocklist(bt_dpm_device_list_t *device_list);
*
- * @brief reads the devices from blacklist.
+ * @brief reads the devices from blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_get_devices_from_blacklist(bt_dpm_device_list_t *device_list);
+int bluetooth_dpm_get_devices_from_blocklist(bt_dpm_device_list_t *device_list);
/**
- * @fn int bluetooth_dpm_get_devices_from_whitelist(bt_dpm_device_list_t *device_list);
+ * @fn int bluetooth_dpm_get_devices_from_allowlist(bt_dpm_device_list_t *device_list);
*
- * @brief reads the devices from whitelist.
+ * @brief reads the devices from allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_get_devices_from_whitelist(bt_dpm_device_list_t *device_list);
+int bluetooth_dpm_get_devices_from_allowlist(bt_dpm_device_list_t *device_list);
/**
- * @fn int bluetooth_dpm_get_uuids_from_blacklist(bt_dpm_uuids_list_t *uuid_list);
+ * @fn int bluetooth_dpm_get_uuids_from_blocklist(bt_dpm_uuids_list_t *uuid_list);
*
- * @brief reads the uuids from blacklist.
+ * @brief reads the uuids from blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_get_uuids_from_blacklist(bt_dpm_uuids_list_t *uuid_list);
+int bluetooth_dpm_get_uuids_from_blocklist(bt_dpm_uuids_list_t *uuid_list);
/**
- * @fn int bluetooth_dpm_get_uuids_from_whitelist(bt_dpm_uuids_list_t *uuid_list);
+ * @fn int bluetooth_dpm_get_uuids_from_allowlist(bt_dpm_uuids_list_t *uuid_list);
*
- * @brief reads the uuids from whitelist.
+ * @brief reads the uuids from allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_get_uuids_from_whitelist(bt_dpm_uuids_list_t *uuid_list);
+int bluetooth_dpm_get_uuids_from_allowlist(bt_dpm_uuids_list_t *uuid_list);
/**
- * @fn int bluetooth_dpm_remove_device_from_whitelist(const bluetooth_device_address_t *device_address);
+ * @fn int bluetooth_dpm_remove_device_from_allowlist(const bluetooth_device_address_t *device_address);
*
- * @brief Removes the device from whitelist.
+ * @brief Removes the device from allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_remove_device_from_whitelist(const bluetooth_device_address_t *device_address);
+int bluetooth_dpm_remove_device_from_allowlist(const bluetooth_device_address_t *device_address);
/**
- * @fn int bluetooth_dpm_remove_device_from_blacklist(const bluetooth_device_address_t *device_address);
+ * @fn int bluetooth_dpm_remove_device_from_blocklist(const bluetooth_device_address_t *device_address);
*
- * @brief Removes the device from blacklist.
+ * @brief Removes the device from blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_remove_device_from_blacklist(const bluetooth_device_address_t *device_address);
+int bluetooth_dpm_remove_device_from_blocklist(const bluetooth_device_address_t *device_address);
/**
- * @fn int bluetooth_dpm_remove_uuid_from_whitelist(const char *service_uuid);
+ * @fn int bluetooth_dpm_remove_uuid_from_allowlist(const char *service_uuid);
*
- * @brief Removes the Service UUIDS from whitelist.
+ * @brief Removes the Service UUIDS from allowlist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_remove_uuid_from_whitelist(const char *service_uuid);
+int bluetooth_dpm_remove_uuid_from_allowlist(const char *service_uuid);
/**
- * @fn int bluetooth_dpm_remove_uuid_from_blacklist(const char *service_uuid);
+ * @fn int bluetooth_dpm_remove_uuid_from_blocklist(const char *service_uuid);
*
- * @brief Removes the Service UUIDS from blacklist.
+ *
+ * @brief Removes the Service UUIDS from blocklist.
*
* This function is a synchronous call.
*
*
* @remark None
*/
-int bluetooth_dpm_remove_uuid_from_blacklist(const char *service_uuid);
+int bluetooth_dpm_remove_uuid_from_blocklist(const char *service_uuid);
/**
* @fn int bluetooth_dpm_set_allow_outgoing_call(bt_dpm_status_t value);
BT_LE_WRITE_HOST_SUGGESTED_DATA_LENGTH,
BT_LE_READ_HOST_SUGGESTED_DATA_LENGTH,
BT_LE_SET_DATA_LENGTH,
- BT_ADD_WHITE_LIST,
- BT_REMOVE_WHITE_LIST,
- BT_CLEAR_WHITE_LIST,
+ BT_ADD_ALLOW_LIST,
+ BT_REMOVE_ALLOW_LIST,
+ BT_CLEAR_ALLOW_LIST,
BT_REGISTER_SCAN_FILTER,
BT_IS_SCAN_FILTER_SUPPORTED,
BT_GET_PROFILE_CONNECTED_DEVICES,
BT_DPM_GET_DEVICE_RESTRITION,
BT_DPM_SET_UUID_RESTRITION,
BT_DPM_GET_UUID_RESTRITION,
- BT_DPM_ADD_DEVICES_BLACKLIST,
- BT_DPM_ADD_DEVICES_WHITELIST,
- BT_DPM_ADD_UUIDS_BLACKLIST,
- BT_DPM_ADD_UUIDS_WHITELIST,
- BT_DPM_CLEAR_DEVICES_BLACKLIST,
- BT_DPM_CLEAR_DEVICES_WHITELIST,
- BT_DPM_CLEAR_UUIDS_BLACKLIST,
- BT_DPM_CLEAR_UUIDS_WHITELIST,
- BT_DPM_REMOVE_DEVICE_BLACKLIST,
- BT_DPM_REMOVE_DEVICE_WHITELIST,
- BT_DPM_REMOVE_UUID_BLACKLIST,
- BT_DPM_REMOVE_UUID_WHITELIST,
- BT_DPM_GET_DEVICES_BLACKLIST,
- BT_DPM_GET_DEVICES_WHITELIST,
- BT_DPM_GET_UUIDS_BLACKLIST,
- BT_DPM_GET_UUIDS_WHITELIST,
+ BT_DPM_ADD_DEVICES_BLOCKLIST,
+ BT_DPM_ADD_DEVICES_ALLOWLIST,
+ BT_DPM_ADD_UUIDS_BLOCKLIST,
+ BT_DPM_ADD_UUIDS_ALLOWLIST,
+ BT_DPM_CLEAR_DEVICES_BLOCKLIST,
+ BT_DPM_CLEAR_DEVICES_ALLOWLIST,
+ BT_DPM_CLEAR_UUIDS_BLOCKLIST,
+ BT_DPM_CLEAR_UUIDS_ALLOWLIST,
+ BT_DPM_REMOVE_DEVICE_BLOCKLIST,
+ BT_DPM_REMOVE_DEVICE_ALLOWLIST,
+ BT_DPM_REMOVE_UUID_BLOCKLIST,
+ BT_DPM_REMOVE_UUID_ALLOWLIST,
+ BT_DPM_GET_DEVICES_BLOCKLIST,
+ BT_DPM_GET_DEVICES_ALLOWLIST,
+ BT_DPM_GET_UUIDS_BLOCKLIST,
+ BT_DPM_GET_UUIDS_ALLOWLIST,
BT_DPM_SET_ALLOW_OUTGOING_CALL,
BT_DPM_GET_ALLOW_OUTGOING_CALL,
BT_DPM_SET_PAIRING_STATE,
{"Start LE Scan" , 8},
{"Stop LE Scan" , 9},
{"IsAdvertising" , 10},
- {"Add White List" , 11},
- {"Remove White List" , 12},
- {"Clear White List" , 13},
+ {"Add Allow List" , 11},
+ {"Remove Allow List" , 12},
+ {"Clear Allow List" , 13},
{"Set Connectable ON" , 14},
{"Set Connectable OFF" , 15},
case 11: {
bluetooth_device_address_t device_address = { {0x00, 0x19, 0x0E, 0x11, 0x56, 0x06} };
- TC_PRT("Add White List");
+ TC_PRT("Add Allow List");
- ret = bluetooth_add_white_list(&device_address, BLUETOOTH_DEVICE_PUBLIC_ADDRESS);
+ ret = bluetooth_add_allow_list(&device_address, BLUETOOTH_DEVICE_PUBLIC_ADDRESS);
if (ret != BLUETOOTH_ERROR_NONE)
- TC_PRT("bluetooth_add_white_list failed with [%d]", ret);
+ TC_PRT("bluetooth_add_allow_list failed with [%d]", ret);
break;
}
case 12: {
bluetooth_device_address_t device_address = { {0x00, 0x19, 0x0E, 0x11, 0x56, 0x06} };
- TC_PRT("Remove White List");
+ TC_PRT("Remove Allow List");
- ret = bluetooth_remove_white_list(&device_address, BLUETOOTH_DEVICE_PUBLIC_ADDRESS);
+ ret = bluetooth_remove_allow_list(&device_address, BLUETOOTH_DEVICE_PUBLIC_ADDRESS);
if (ret != BLUETOOTH_ERROR_NONE)
- TC_PRT("bluetooth_remove_white_list failed with [%d]", ret);
+ TC_PRT("bluetooth_remove_allow_list failed with [%d]", ret);
break;
}
case 13: {
- TC_PRT("Clear White List");
+ TC_PRT("Clear Allow List");
- ret = bluetooth_clear_white_list();
+ ret = bluetooth_clear_allow_list();
if (ret != BLUETOOTH_ERROR_NONE)
- TC_PRT("bluetooth_clear_white_list failed with [%d]", ret);
+ TC_PRT("bluetooth_clear_allow_list failed with [%d]", ret);
break;
}