* limitations under the License.
*/
-#include <glib.h>
-#include <dlog.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <string.h>
-#include <bluetooth-api.h>
-
#include "bluetooth.h"
#include "bluetooth_internal.h"
#include "bluetooth_private.h"
-/* LCOV_EXCL_START */
int bt_dpm_set_allow_bluetooth_mode(bt_dpm_allow_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_allow_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_allow_mode(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_allow_bluetooth_mode(bt_dpm_allow_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_allow_t dpm_value = BLUETOOTH_DPM_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_allow_mode(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_activate_device_restriction(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_activate_device_restriction(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_is_device_restriction_active(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_is_device_restriction_active(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_activate_uuid_restriction(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_activate_uuid_restriction(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_is_uuid_restriction_active(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_is_uuid_restriction_active(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_add_devices_to_blacklist(const char *device_address)
{
- bluetooth_device_address_t addr_hex = { {0,} };
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(device_address);
-
- _bt_convert_address_to_hex(&addr_hex, device_address);
- error_code = _bt_get_error_code(bluetooth_dpm_add_devices_to_blacklist(&addr_hex));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_add_devices_to_whitelist(const char *device_address)
{
- bluetooth_device_address_t addr_hex = { {0,} };
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(device_address);
-
- _bt_convert_address_to_hex(&addr_hex, device_address);
- error_code = _bt_get_error_code(bluetooth_dpm_add_devices_to_whitelist(&addr_hex));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_add_uuids_to_blacklist(const char *service_uuid)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_add_uuids_to_blacklist(service_uuid));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_add_uuids_to_whitelist(const char *service_uuid)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_add_uuids_to_whitelist(service_uuid));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_clear_devices_from_blacklist(void)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_clear_devices_from_blacklist());
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_clear_devices_from_whitelist(void)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_clear_devices_from_whitelist());
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_clear_uuids_from_blacklist(void)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_clear_uuids_from_blacklist());
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_clear_uuids_from_whitelist(void)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_clear_uuids_from_whitelist());
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
-}
-
-static int __bt_get_bt_dpm_device_list_info_s(bt_dpm_device_list_s **device_info, bt_dpm_device_list_t *source_info)
-{
- int i;
-
- BT_CHECK_INPUT_PARAMETER(source_info);
-
- *device_info = (bt_dpm_device_list_s *)malloc(sizeof(bt_dpm_device_list_s));
- if (*device_info == NULL)
- return BT_ERROR_OUT_OF_MEMORY;
-
- (*device_info)->count = source_info->count;
- if (source_info->count > 0) {
- (*device_info)->devices = (char **)malloc(sizeof(char *) *source_info->count);
- if ((*device_info)->devices)
- for (i = 0; i < (*device_info)->count; i++) {
- _bt_convert_address_to_string(&((*device_info)->devices[i]), &(source_info->addresses[i]));
- BT_INFO("Devices: %s", (*device_info)->devices[i]);
- }
- } else {
- (*device_info)->count = 0;
- (*device_info)->devices = NULL;
- }
- return BT_ERROR_NONE;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_devices_from_blacklist(bt_dpm_device_list_s **device_list)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_device_list_t dev_list;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_devices_from_blacklist(&dev_list));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- error_code = __bt_get_bt_dpm_device_list_info_s(device_list, &dev_list);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_devices_from_whitelist(bt_dpm_device_list_s **device_list)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_device_list_t dev_list;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_devices_from_whitelist(&dev_list));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- error_code = __bt_get_bt_dpm_device_list_info_s(device_list, &dev_list);
-
- return error_code;
-}
-
-static int __bt_get_bt_dpm_uuid_list_info_s(bt_dpm_uuids_list_s **uuid_list, bt_dpm_uuids_list_t *source_info)
-{
- int i;
-
- BT_CHECK_INPUT_PARAMETER(source_info);
-
- *uuid_list = (bt_dpm_uuids_list_s *)malloc(sizeof(bt_dpm_uuids_list_s));
- if (*uuid_list == NULL)
- return BT_ERROR_OUT_OF_MEMORY;
-
- (*uuid_list)->count = source_info->count;
-
- if (source_info->count > 0) {
- (*uuid_list)->uuids = (char **)malloc(sizeof(char *) *source_info->count);
- if ((*uuid_list)->uuids != NULL) {
- for (i = 0; i < (*uuid_list)->count; i++) {
- (*uuid_list)->uuids[i] = strdup(source_info->uuids[i]);
- if ((*uuid_list)->uuids[i] != NULL)
- BT_INFO("UUID: %s", (*uuid_list)->uuids[i]);
- }
- }
- } else {
- (*uuid_list)->count = 0;
- (*uuid_list)->uuids = NULL;
- }
-
- return BT_ERROR_NONE;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_uuids_from_blacklist(bt_dpm_uuids_list_s **uuid_list)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_uuids_list_t uuids;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_uuids_from_blacklist(&uuids));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- error_code = __bt_get_bt_dpm_uuid_list_info_s(uuid_list, &uuids);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_uuids_from_whitelist(bt_dpm_uuids_list_s **uuid_list)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_uuids_list_t uuids;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_uuids_from_whitelist(&uuids));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- error_code = __bt_get_bt_dpm_uuid_list_info_s(uuid_list, &uuids);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_remove_device_from_whitelist(const char *device_address)
{
- bluetooth_device_address_t addr_hex = { {0,} };
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(device_address);
-
- _bt_convert_address_to_hex(&addr_hex, device_address);
- error_code = _bt_get_error_code(bluetooth_dpm_remove_device_from_whitelist(&addr_hex));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_remove_device_from_blacklist(const char *device_address)
{
- bluetooth_device_address_t addr_hex = { {0,} };
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(device_address);
-
- _bt_convert_address_to_hex(&addr_hex, device_address);
- error_code = _bt_get_error_code(bluetooth_dpm_remove_device_from_blacklist(&addr_hex));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_remove_uuid_from_whitelist(const char *service_uuid)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_remove_uuid_from_whitelist(service_uuid));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_remove_uuid_from_blacklist(const char *service_uuid)
{
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_remove_uuid_from_blacklist(service_uuid));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_set_allow_outgoing_call(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_allow_outgoing_call(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_allow_outgoing_call(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_allow_outgoing_call(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_set_pairing_state(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_pairing_state(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_pairing_state(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_pairing_state(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_set_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
- bt_dpm_profile_t dpm_profile = profile;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_profile_state(dpm_profile, dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_profile_state(profile, &dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_set_desktop_connectivity_state(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_desktop_connectivity_state(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_desktop_connectivity_state(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_desktop_connectivity_state(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_set_discoverable_state(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_discoverable_state(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_discoverable_state(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_discoverable_state(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_set_limited_discoverable_state(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_limited_discoverable_state(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_limited_discoverable_state(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_limited_discoverable_state(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_set_data_transfer_state(bt_dpm_status_e value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = value;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_set_data_transfer_state(dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value)
{
- int error_code = BT_ERROR_NONE;
- bt_dpm_status_t dpm_value = BLUETOOTH_DPM_STATUS_ERROR;
-
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_dpm_get_data_transfer_state(&dpm_value));
- if (error_code != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- *value = dpm_value;
-
- return error_code;
+ return BT_ERROR_NOT_SUPPORTED;
}
-/* LCOV_EXCL_STOP */