static GSList *advertiser_list = NULL;
+//LCOV_EXCL_START
int bt_adapter_enable(void)
{
int error_code = BT_ERROR_NONE;
BT_CHECK_BT_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_enable_adapter());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_BT_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_disable_adapter());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_BT_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_recover_adapter());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_BT_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_reset_adapter());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
+//LCOV_EXCL_STOP
int bt_adapter_get_state(bt_adapter_state_e *adapter_state)
{
return BT_ERROR_NONE;
}
+//LCOV_EXCL_START
int bt_adapter_le_enable(void)
{
int error_code = BT_ERROR_NONE;
BT_CHECK_BT_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_enable_adapter_le());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_disable_adapter_le());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
*adapter_le_state = bluetooth_check_adapter_le();
return BT_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int bt_adapter_get_address(char **address)
{
BT_CHECK_INPUT_PARAMETER(address);
error_code = _bt_get_error_code(bluetooth_get_local_address(&loc_address));
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- return error_code;
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ return error_code; //LCOV_EXCL_LINE
}
error_code = _bt_convert_address_to_string(address, &loc_address);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- return error_code;
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ return error_code; //LCOV_EXCL_LINE
}
return BT_ERROR_NONE;
}
+//LCOV_EXCL_START
int bt_adapter_get_version(char **version)
{
int ret = BT_ERROR_NONE;
BT_CHECK_INPUT_PARAMETER(version);
ret = _bt_get_error_code(bluetooth_get_local_version(&loc_ver));
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- return ret;
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ return ret; //LCOV_EXCL_LINE
}
*version = strdup(loc_ver.version);
return BT_ERROR_NONE;
}
+//LCOV_EXCL_STOP
#define BT_ADAPTER_FIRMWARE_INFO_FILE_PATH "/var/lib/bluetooth/bcmtool_log"
#define BT_ADAPTER_STACK_INFO_FILE_PATH "/usr/etc/bluetooth/stack_info"
#define BT_ADAPTER_MAX_BUFFER_SIZE (32767 * 1000)
+//LCOV_EXCL_START
int bt_adapter_get_local_info(char **chipset, char **firmware, char **stack_version, char **profiles)
{
BT_CHECK_BT_SUPPORT();
fclose(fp);
return ret;
}
+//LCOV_EXCL_STOP
int bt_adapter_get_name(char **name)
{
BT_CHECK_INPUT_PARAMETER(name);
ret = _bt_get_error_code(bluetooth_get_local_name(&loc_name));
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- return ret;
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ return ret; //LCOV_EXCL_LINE
}
*name = strdup(loc_name.name);
loc_name.name[BLUETOOTH_DEVICE_NAME_LENGTH_MAX] = '\0';
ret = _bt_get_error_code(bluetooth_set_local_name(&loc_name));
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
+//LCOV_EXCL_START
int bt_adapter_get_visibility(bt_adapter_visibility_mode_e *mode, int *duration)
{
bluetooth_discoverable_mode_t discoverable_mode = BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE;
BT_CHECK_INPUT_PARAMETER(mode);
ret = _bt_get_error_code(bluetooth_get_discoverable_mode(&discoverable_mode));
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- return ret;
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ return ret; //LCOV_EXCL_LINE
}
*mode = _bt_get_bt_visibility_mode_e(discoverable_mode);
if (duration == NULL)
return BT_ERROR_NONE;
ret = bluetooth_get_timeout_value(duration);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
}
return BT_ERROR_NONE;
}
error_code = _bt_get_error_code(bluetooth_set_discoverable_mode(discoverable_mode, timeout_sec));
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_CONNECTABLE_CHANGED_EVENT, callback, user_data);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_set_connectable(connectable));
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
+//LCOV_EXCL_STOP
int bt_adapter_foreach_bonded_device(bt_adapter_bonded_device_cb foreach_cb, void *user_data)
{
*used = is_used ? true : false;
}
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x) : Failed to run function", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x) : Failed to run function", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_STATE_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_NAME_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_VISIBILITY_MODE_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_DEVICE_DISCOVERY_STATE_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_VISIBILITY_DURATION_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_BT_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_start_discovery(0, 0, BLUETOOTH_DEVICE_MAJOR_MASK_MISC));
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_BT_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_cancel_discovery());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_LE_SUPPORT();
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_start_le_discovery());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
}
ret = _bt_get_error_code(bluetooth_oob_add_remote_data(&addr_hex, &oob_data));
- if (BT_ERROR_NONE != ret) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (BT_ERROR_NONE != ret) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
_bt_convert_address_to_hex(&addr_hex, remote_address);
ret = _bt_get_error_code(bluetooth_oob_remove_remote_data(&addr_hex));
- if (BT_ERROR_NONE != ret) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (BT_ERROR_NONE != ret) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
+//LCOV_EXCL_START
int bt_adapter_set_manufacturer_data(char *data, int len)
{
memcpy(&m_data.data[2], data, len);
ret = _bt_get_error_code(bluetooth_set_manufacturer_data(&m_data));
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_MANUFACTURER_DATA_CHANGED,
callback, user_data);
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
_bt_convert_address_to_hex(&addr_hex, address);
error_code = _bt_get_error_code(bluetooth_add_white_list(&addr_hex, address_type));
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
_bt_convert_address_to_hex(&addr_hex, address);
error_code = _bt_get_error_code(bluetooth_remove_white_list(&addr_hex, address_type));
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_clear_white_list());
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
- }
+ if (error_code != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return error_code;
}
return BT_ERROR_INVALID_PARAMETER;
ret = _bt_get_error_code(bluetooth_set_scan_parameters(&scan_params));
- if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- }
+ if (ret != BT_ERROR_NONE) { //LCOV_EXCL_LINE
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
+ } //LCOV_EXCL_LINE
return ret;
}
-
+//LCOV_EXCL_STOP
int bt_adapter_le_create_advertiser(bt_advertiser_h *advertiser)
{
return BT_ERROR_NONE;
}
+//LCOV_EXCL_START
static int __bt_append_adv_type_data(bt_advertiser_h advertiser,
bt_adapter_le_packet_type_e pkt_type,
char *new_data, int new_data_len,
return BT_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int bt_adapter_le_add_advertising_service_uuid(bt_advertiser_h advertiser,
bt_adapter_le_packet_type_e pkt_type, const char *uuid)
error_code = bluetooth_set_advertising_data(__adv->handle, &adv, __adv->adv_data_len);
ret = _bt_get_error_code(error_code);
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
}
error_code = bluetooth_set_scan_response_data(__adv->handle, &resp, __adv->scan_rsp_data_len);
ret = _bt_get_error_code(error_code);
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
}
ret = _bt_get_error_code(error_code);
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
ret = _bt_get_error_code(bluetooth_set_advertising(__adv->handle, FALSE));
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
}
return ret;
error_code = bluetooth_set_advertising_data(__adv->handle, &adv, __adv->adv_data_len);
ret = _bt_get_error_code(error_code);
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
}
error_code = bluetooth_set_scan_response_data(__adv->handle, &resp, __adv->scan_rsp_data_len);
ret = _bt_get_error_code(error_code);
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
}
ret = _bt_get_error_code(error_code);
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
bt_advertiser_s *__adv = (bt_advertiser_s *)l->data;
if (__adv->handle == handle) {
if (__adv->cb == NULL) {
- BT_ERR("advertiser cb is NULL");
+ BT_ERR("advertiser cb is NULL"); //LCOV_EXCL_LINE
return;
}
}
}
- BT_ERR("No available advertiser");
+ BT_ERR("No available advertiser"); //LCOV_EXCL_LINE
}
int bt_adapter_le_set_advertising_mode(bt_advertiser_h advertiser,
error_code = _bt_get_error_code(bluetooth_check_privilege_advertising_parameter());
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
return BT_ERROR_PERMISSION_DENIED;
}
return error_code;
}
+//LCOV_EXCL_START
int bt_adapter_le_set_advertising_filter_policy(bt_advertiser_h advertiser,
bt_adapter_le_advertising_filter_policy_e filter_policy)
{
error_code = _bt_get_error_code(bluetooth_check_privilege_advertising_parameter());
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
return BT_ERROR_PERMISSION_DENIED;
}
return error_code;
}
+//LCOV_EXCL_STOP
int bt_adapter_le_set_advertising_connectable(bt_advertiser_h advertiser, bool connectable)
{
error_code = _bt_get_error_code(bluetooth_check_privilege_advertising_parameter());
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
return BT_ERROR_PERMISSION_DENIED;
}
return error_code;
}
+//LCOV_EXCL_START
int bt_adapter_le_enable_privacy(bool enable_privacy)
{
int error_code = BT_ERROR_NONE;
error_code = _bt_get_error_code(bluetooth_enable_le_privacy(enable_privacy));
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
}
return error_code;
}
}
}
}
+//LCOV_EXCL_STOP
int bt_adapter_le_start_scan(bt_adapter_le_scan_result_cb cb, void *user_data)
{
error_code = _bt_get_error_code(bluetooth_start_le_discovery());
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
}
return error_code;
}
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_stop_le_discovery());
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
}
return error_code;
}
return BT_ERROR_NO_DATA;
}
+//LCOV_EXCL_START
int bt_adapter_le_create_scan_filter(bt_scan_filter_h *scan_filter)
{
bt_le_scan_filter_s *__filter = NULL;
__filter = (bt_le_scan_filter_s*)g_malloc0(sizeof(bt_le_scan_filter_s));
if (__filter == NULL) {
- BT_ERR("OUT_OF_MEMORY(0x%08x)", BT_ERROR_OUT_OF_MEMORY);
+ BT_ERR("OUT_OF_MEMORY(0x%08x)", BT_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE
return BT_ERROR_OUT_OF_MEMORY;
}
BT_CHECK_INPUT_PARAMETER(name);
if (strlen(name) > 29) {
- BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
BT_CHECK_INPUT_PARAMETER(mask);
if (strlen(uuid) != strlen(mask)) {
- BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
BT_CHECK_INPUT_PARAMETER(mask);
if (strlen(uuid) != strlen(mask)) {
- BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
BT_CHECK_INPUT_PARAMETER(data);
if (data_len > 27) {
- BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
BT_CHECK_INPUT_PARAMETER(mask);
if (data_len != mask_len || data_len > 27) {
- BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
BT_CHECK_INPUT_PARAMETER(scan_filter);
if (manufacturer_id < 0 || manufacturer_id > 0xFFFF) {
- BT_ERR("manufacturer_id is %.8x(0x%08x)", manufacturer_id, BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("manufacturer_id is %.8x(0x%08x)", manufacturer_id, BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
if (data_len > 27) {
- BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
BT_CHECK_INPUT_PARAMETER(mask);
if (manufacturer_id < 0 || manufacturer_id > 0xFFFF) {
- BT_ERR("manufacturer_id is %.8x(0x%08x)", manufacturer_id, BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("manufacturer_id is %.8x(0x%08x)", manufacturer_id, BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
if (data_len != mask_len || data_len > 27) {
- BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
+ BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER); //LCOV_EXCL_LINE
return BT_ERROR_INVALID_PARAMETER;
}
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(scan_filter);
if (bluetooth_is_le_scanning() == TRUE) {
- BT_ERR("NOW_IN_PROGRESS(0x%08x)", BT_ERROR_NOW_IN_PROGRESS);
+ BT_ERR("NOW_IN_PROGRESS(0x%08x)", BT_ERROR_NOW_IN_PROGRESS); //LCOV_EXCL_LINE
return BT_ERROR_NOW_IN_PROGRESS;
}
error_code = _bt_get_error_code(bluetooth_register_scan_filter(&filter, &__filter->slot_id));
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
}
return error_code;
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(scan_filter);
if (bluetooth_is_le_scanning() == TRUE) {
- BT_ERR("NOW_IN_PROGRESS(0x%08x)", BT_ERROR_NOW_IN_PROGRESS);
+ BT_ERR("NOW_IN_PROGRESS(0x%08x)", BT_ERROR_NOW_IN_PROGRESS); //LCOV_EXCL_LINE
return BT_ERROR_NOW_IN_PROGRESS;
}
error_code = _bt_get_error_code(bluetooth_unregister_scan_filter(__filter->slot_id));
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
}
return BT_ERROR_NONE;
BT_CHECK_LE_SUPPORT();
BT_CHECK_INIT_STATUS();
if (bluetooth_is_le_scanning() == TRUE) {
- BT_ERR("NOW_IN_PROGRESS(0x%08x)", BT_ERROR_NOW_IN_PROGRESS);
+ BT_ERR("NOW_IN_PROGRESS(0x%08x)", BT_ERROR_NOW_IN_PROGRESS); //LCOV_EXCL_LINE
return BT_ERROR_NOW_IN_PROGRESS;
}
error_code = _bt_get_error_code(bluetooth_unregister_all_scan_filters());
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
}
return BT_ERROR_NONE;
bluetooth_le_read_maximum_data_length(&max_le_datalength));
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
def_tx_Octets, def_tx_Time));
if (ret != BT_ERROR_NONE)
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
bluetooth_le_read_suggested_default_data_length(&data_values));
if (ret != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); //LCOV_EXCL_LINE
return ret;
}
_bt_unset_cb(BT_EVENT_AUTHENTICATION_REQUEST);
return BT_ERROR_NONE;
}
+//LCOV_EXCL_STOP