if (ret != BT_ERROR_NONE) {
BT_ERR("%s(0x%08x) : Failed to run function",
_bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
+ ret);
} else {
ret = _bt_get_bt_device_info_s(device_info, info);
if (ret != BT_ERROR_NONE) {
BT_ERR("%s(0x%08x) : Failed to get device info",
_bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
+ ret);
}
}
g_ptr_array_free(addr_list, TRUE);
return ret;
-} /* LCOV_EXCL_STOP */
+}
+/* LCOV_EXCL_STOP */
int bt_adapter_set_state_changed_cb(bt_adapter_state_changed_cb callback,
void *user_data)
ret = _bt_get_error_code(bluetooth_oob_add_remote_data(&addr_hex,
BLUETOOTH_BDADDR_BREDR,
- &oob_data)); /* LCOV_EXCL_STOP */
- if (BT_ERROR_NONE != ret) { /* LCOV_EXCL_LINE */
+ &oob_data));
+ if (BT_ERROR_NONE != ret) {
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
- return ret;
+ ret);
+ }
+ return ret; /* LCOV_EXCL_STOP */
}
int bt_adapter_get_local_oob_ext_data(unsigned char **hash192, unsigned char **randomizer192,
if (BT_ERROR_NONE != ret)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- return ret;
+ return ret; /* LCOV_EXCL_STOP */
}
+/* LCOV_EXCL_START */
int bt_adapter_le_set_remote_oob_ext_data(const char *remote_address,
bt_device_address_type_e address_type,
const unsigned char *hash256, const unsigned char *randomizer256,
return ret;
}
-/* LCOV_EXCL_START */
+/* LCOV_EXCL_STOP */
int bt_adapter_remove_remote_oob_data(const char *remote_address)
{
memcpy(&m_data.data[2], data, len);
ret = _bt_get_error_code(bluetooth_set_manufacturer_data(&m_data));
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
+ if (ret != BT_ERROR_NONE) {
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
+ ret);
+ }
return ret;
}
return error_code;
}
+/* LCOV_EXCL_STOP */
int bt_adapter_le_set_scan_mode(bt_adapter_le_scan_mode_e scan_mode)
{
return ret;
}
+/* LCOV_EXCL_START */
int bt_adapter_le_set_customized_scan_mode(float scan_interval, float scan_window)
{
int ret = BT_ERROR_NONE;
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
return ret;
-} /* LCOV_EXCL_STOP */
+}
+/* LCOV_EXCL_STOP */
int bt_adapter_le_create_advertiser(bt_advertiser_h *advertiser)
{
int type = 0;
char *p;
- for (i = 0; i < in_len; i++) { /* LCOV_EXCL_LINE */
+ for (i = 0; i < in_len; i++) {
len = in_data[i];
if (len <= 0 || i + 1 >= in_len) {
- BT_ERR("Invalid advertising data"); /* LCOV_EXCL_LINE */
- return BT_ERROR_OPERATION_FAILED; /* LCOV_EXCL_LINE */
+ BT_ERR("Invalid advertising data");
+ return BT_ERROR_OPERATION_FAILED;
}
type = in_data[i + 1];
break;
}
- i += len; /* LCOV_EXCL_LINE */
- len = 0; /* LCOV_EXCL_LINE */
+ i += len;
+ len = 0;
}
if (i + len > in_len) {
- BT_ERR("Invalid advertising data"); /* LCOV_EXCL_LINE */
- return BT_ERROR_OPERATION_FAILED; /* LCOV_EXCL_LINE */
+ BT_ERR("Invalid advertising data");
+ return BT_ERROR_OPERATION_FAILED;
} else if (len == 0) {
BT_INFO("AD Type 0x%02x data is not set", in_type);
return BT_ERROR_OPERATION_FAILED;
break;
case BT_ADAPTER_LE_PACKET_SCAN_RESPONSE:
- p = &__adv->scan_rsp_data; /* LCOV_EXCL_LINE */
- len = &__adv->scan_rsp_data_len; /* LCOV_EXCL_LINE */
- system_data_len = &__adv->scan_rsp_system_data_len; /* LCOV_EXCL_LINE */
- break; /* LCOV_EXCL_LINE */
+ p = &__adv->scan_rsp_data;
+ len = &__adv->scan_rsp_data_len;
+ system_data_len = &__adv->scan_rsp_system_data_len;
+ break;
default:
BT_ERR("Unknown LE packet type : %d",
- pkt_type); /* LCOV_EXCL_LINE */
- return BT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+ pkt_type);
+ return BT_ERROR_INVALID_PARAMETER;
}
ret = __bt_remove_ad_data_by_type(*p, *len, data_type, &new_p, &new_len);
if (data_type == BT_ADAPTER_LE_ADVERTISING_DATA_LOCAL_NAME ||
data_type == BT_ADAPTER_LE_ADVERTISING_DATA_TX_POWER_LEVEL)
- *system_data_len -= 1; /* LCOV_EXCL_LINE */
+ *system_data_len -= 1;
return ret;
}
} else if (strlen(string) == 36) { /* 128 bit uuid */
if (string[8] != '-' || string[13] != '-' ||
string[18] != '-' || string[23] != '-') {
- BT_ERR("Invalid UUID"); /* LCOV_EXCL_LINE */
- return BT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+ BT_ERR("Invalid UUID");
+ return BT_ERROR_INVALID_PARAMETER;
}
char str_ptr[37] = { 0 };
g_free(ptr[5]);
g_free(ptr[6]);
} else {
- BT_ERR("Invalid UUID"); /* LCOV_EXCL_LINE */
- return BT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+ BT_ERR("Invalid UUID");
+ return BT_ERROR_INVALID_PARAMETER;
}
return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
dest_type = data_ptr[1];
if (data_type != dest_type) {
- BT_ERR("Invalid data type"); /* LCOV_EXCL_LINE */
- return BT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+ BT_ERR("Invalid data type");
+ return BT_ERROR_INVALID_PARAMETER;
}
if (adv_flag_len + adv_len + system_data_len + new_data_len > 31) {
- BT_ERR("Quota exceeded"); /* LCOV_EXCL_LINE */
- return BT_ERROR_QUOTA_EXCEEDED; /* LCOV_EXCL_LINE */
+ BT_ERR("Quota exceeded");
+ return BT_ERROR_QUOTA_EXCEEDED;
}
new_adv = g_malloc0(adv_len + new_data_len);
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); /* LCOV_EXCL_LINE */
+ error_code);
return BT_ERROR_PERMISSION_DENIED;
}
if (error_code != BT_ERROR_NONE) {
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code),
- error_code); /* LCOV_EXCL_LINE */
+ error_code);
}
return error_code;
}
g_free(manufacturer_data);
- return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
+ return BT_ERROR_NONE;
}
-
-/* LCOV_EXCL_START */
int bt_adapter_le_scan_filter_create(bt_scan_filter_h *scan_filter)
{
bt_le_scan_filter_s *__filter = NULL;
if (strlen(name) > 29) {
BT_ERR("INVALID_PARAMETER(0x%08x)",
- BT_ERROR_INVALID_PARAMETER); /* LCOV_EXCL_LINE */
+ BT_ERROR_INVALID_PARAMETER);
return BT_ERROR_INVALID_PARAMETER;
}
return error_code;
}
-
+/* LCOV_EXCL_START */
int bt_adapter_le_read_maximum_data_length(
int *max_tx_octets, int *max_tx_time,
int *max_rx_octets, int *max_rx_time)
return BT_ERROR_INVALID_PARAMETER;
}
+/* LCOV_EXCL_START */
int bt_adapter_passkey_reply(char *passkey, bool authentication_reply)
{
BT_CHECK_INIT_STATUS();
return error_code;
}
+/* LCOV_EXCL_STOP */
int bt_adapter_le_is_2m_phy_supported(bool *is_supported)
{
_bt_unset_cb(BT_EVENT_AG_SPEAKER_GAIN_CHANGE);
return BT_ERROR_NONE;
}
-/* LCOV_EXCL_STOP */
int bt_ag_open_sco(void)
{
BT_CHECK_HFP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_AG_INIT_STATUS(); /* LCOV_EXCL_START */
+ BT_CHECK_AG_INIT_STATUS();
error = bluetooth_telephony_audio_open();
error = _bt_convert_telephony_error_code(error);
if (error != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
- return error; /* LCOV_EXCL_STOP */
+ return error;
}
int bt_ag_close_sco(void)
BT_CHECK_HFP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_AG_INIT_STATUS(); /* LCOV_EXCL_START */
+ BT_CHECK_AG_INIT_STATUS();
error = bluetooth_telephony_audio_close();
error = _bt_convert_telephony_error_code(error);
if (error != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
- return error; /* LCOV_EXCL_STOP */
+ return error;
}
int bt_ag_is_sco_opened(bool *opened)
{
BT_CHECK_HFP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_AG_INIT_STATUS(); /* LCOV_EXCL_START */
+ BT_CHECK_AG_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(opened);
if (bluetooth_telephony_is_sco_connected())
*opened = true;
else
- *opened = false; /* LCOV_EXCL_STOP */
+ *opened = false;
return BT_ERROR_NONE;
}
{
BT_CHECK_HFP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_AG_INIT_STATUS(); /* LCOV_EXCL_START */
+ BT_CHECK_AG_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_AG_SCO_CONNECTION_STATUS, callback, user_data);
- return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
+ return BT_ERROR_NONE;
}
int bt_ag_unset_sco_state_changed_cb(void)
{
BT_CHECK_HFP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_AG_INIT_STATUS(); /* LCOV_EXCL_START */
+ BT_CHECK_AG_INIT_STATUS();
if (_bt_check_cb(BT_EVENT_AG_SCO_CONNECTION_STATUS) == true)
_bt_unset_cb(BT_EVENT_AG_SCO_CONNECTION_STATUS);
- return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
+ return BT_ERROR_NONE;
}
-/* LCOV_EXCL_START */
int bt_ag_notify_call_event(bt_ag_call_event_e event, unsigned int call_id, const char *phone_number)
{
int error;
if (error != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
return error;
-} /* LCOV_EXCL_STOP */
+}
int bt_ag_notify_voice_recognition_state(bool state)
{
BT_CHECK_HFP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_AG_INIT_STATUS(); /* LCOV_EXCL_START */
+ BT_CHECK_AG_INIT_STATUS();
if (state)
error = bluetooth_telephony_start_voice_recognition();
else
if (error != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
- return error; /* LCOV_EXCL_STOP */
+ return error;
}
-/* LCOV_EXCL_START */
int bt_ag_set_call_handling_event_cb(bt_ag_call_handling_event_cb callback,
void *user_data)
{
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
return error;
-} /* LCOV_EXCL_STOP */
+}
+/* LCOV_EXCL_STOP */
int bt_avrcp_target_deinitialize(void)
{
return error;
}
-/* LCOV_EXCL_START */
int bt_avrcp_control_send_player_command_to(bt_avrcp_player_command_e cmd, char *remote_address)
{
int error;
return error;
}
-/* LCOV_EXCL_STOP */
int bt_avrcp_control_set_absolute_volume(unsigned int value)
{
{ 0, BT_SC_NONE }
};
-
+/* LCOV_EXCL_START */
int bt_device_disconnect(const char *remote_address)
{
bluetooth_device_address_t addr_hex = { {0,} };
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address);
- _bt_convert_address_to_hex(&addr_hex, remote_address); /* LCOV_EXCL_START */
+ _bt_convert_address_to_hex(&addr_hex, remote_address);
error_code = _bt_get_error_code(bluetooth_disconnect_device(&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;
}
+/* LCOV_EXCL_STOP */
int bt_device_create_bond(const char *device_address)
{
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(device_address);
- _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_START */
+ _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_LINE */
error_code = _bt_get_error_code(bluetooth_bond_device(&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;
}
+/* LCOV_EXCL_START */
int bt_device_create_bond_by_type(const char *device_address,
bt_device_connection_link_type_e conn_type)
{
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
return error_code;
-} /* LCOV_EXCL_STOP */
+}
+/* LCOV_EXCL_STOP */
int bt_device_cancel_bonding(void)
{
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(device_address);
- _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_START */
+ _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_LINE */
ret = _bt_get_error_code(bluetooth_search_service(&addr_hex));
/* In service search, BT_ERROR_SERVICE_SEARCH_FAILED is returned instead of BT_ERROR_OPERATION_FAILED. */
return ret;
}
+/* LCOV_EXCL_START */
int bt_device_cancel_service_search(void)
{
int ret = 0;
if (ret != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- return ret; /* LCOV_EXCL_STOP */
+ return ret;
}
+/* LCOV_EXCL_STOP */
int bt_device_foreach_connected_profiles(const char *remote_address, bt_device_connected_profile callback, void *user_data)
{
return BT_ERROR_NONE;
}
+
/* LCOV_EXCL_START */
int bt_device_get_connection_state(const char *remote_address,
bt_device_connection_link_type_e link_type, bool *connected)
return BT_ERROR_NONE;
}
+
/* LCOV_EXCL_STOP */
int bt_device_set_connection_state_changed_cb(bt_device_connection_state_changed_cb callback, void *user_data)
{
_bt_unset_cb(BT_EVENT_RSSI_ALERT_EVENT);
return BT_ERROR_NONE;
}
-/* LCOV_EXCL_STOP */
-/* LCOV_EXCL_START */
int bt_device_unset_att_mtu_changed_cb(void)
{
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
_bt_unset_cb(BT_EVENT_GATT_ATT_MTU_CHANGE_STATUS);
return BT_ERROR_NONE;
}
-/* LCOV_EXCL_STOP */
-/* LCOV_EXCL_START */
int bt_device_enable_rssi_monitor(const char *remote_address,
bt_device_connection_link_type_e link_type,
int low_threshold, int in_range_threshold,
return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
}
+/* LCOV_EXCL_START */
int bt_gatt_characteristic_set_properties(bt_gatt_h characteristic,
int properties)
{
if (chr->type != BT_GATT_TYPE_CHARACTERISTIC) {
BT_ERR("Wrong type of GATT handle : %d",
- chr->type); /* LCOV_EXCL_LINE */
- return BT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+ chr->type);
+ return BT_ERROR_INVALID_PARAMETER;
}
- chr->properties = properties; /* LCOV_EXCL_LINE */
+ chr->properties = properties;
- return BT_ERROR_NONE; /* LCOV_EXCL_LINE */
+ return BT_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
int bt_gatt_characteristic_get_write_type(bt_gatt_h characteristic,
bt_gatt_write_type_e *write_type)
return ret;
}
- for (char_l = svc->characteristics; char_l; char_l = g_slist_next(char_l)) {
+ for (char_l = svc->characteristics; char_l; char_l = g_slist_next(char_l)) { /* LCOV_EXCL_START */
GSList *desc_l;
bt_gatt_characteristic_s *chr = char_l->data;
}
}
- }
+ } /* LCOV_EXCL_STOP */
serv->services = g_slist_append(serv->services, svc);
svc->parent = (void *)server;
else
BT_INFO("Indication to be Unicasted.. [%s]", device_address);
- if (chr->value_length > 0 && chr->value) {
+ if (chr->value_length > 0 && chr->value) { /* LCOV_EXCL_START */
if (handle->role == BT_GATT_ROLE_SERVER) {
/* DEBUG */
return BT_ERROR_OPERATION_FAILED;
}
}
- }
+ } /* LCOV_EXCL_STOP */
/* Save the Remote GATT client address to be used for notification later on */
memcpy(&chr->address.addr, &addr_hex.addr, BLUETOOTH_ADDRESS_LENGTH);
}
#endif
+/* LCOV_EXCL_START */
static bt_gatt_client_h __find_gatt_client(const char *remote_address)
{
GSList *l = NULL;
return NULL;
}
+/* LCOV_EXCL_STOP */
#ifndef TIZEN_GATT_CLIENT
static gboolean __get_bdaddr_from_path(const char *path, char *addr)
#endif
#ifdef TIZEN_GATT_CLIENT
+/* LCOV_EXCL_START */
void __uuid_hex_to_string(unsigned char *uuid, char *str)
{
uint32_t uuid0, uuid4;
return;
}
-/* LCOV_EXCL_START */
static bt_gatt_characteristic_s* __gatt_get_characteristic_handle(
unsigned char *svc_uuid,
int svc_inst,
static void _bt_otp_send_callback(int result, char *file_path, uint64_t id,
unsigned int length, bt_otp_client_s *otp_client_s);
+/* LCOV_EXCL_START */
int __bt_check_otp_server_init_status(void)
{
if (is_otp_server_initialized != true) {
return BT_ERROR_NONE;
}
-/* LCOV_EXCL_START */
int bt_otp_server_initialize(const char *directory)
{
int error_code = BT_ERROR_NONE;
error_code = _bt_get_error_code(bluetooth_otp_server_deinit());
if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), /* LCOV_EXCL_LINE */
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code),
error_code);
- return error_code; /* LCOV_EXCL_LINE */
+ return error_code;
}
is_otp_server_initialized = false;
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_LE); \
}
+/* LCOV_EXCL_START */
int bt_proximity_reporter_create(bt_proximity_reporter_h *reporter)
{
int error_code = BT_ERROR_NONE;
return BT_ERROR_NOT_INITIALIZED;
/* Unregister Reporter Role Here */
- error_code = _bt_get_error_code(bluetooth_proximity_reporter_unregister()); /* LCOV_EXCL_START */
+ error_code = _bt_get_error_code(bluetooth_proximity_reporter_unregister());
if (error_code != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
else
return BT_ERROR_NONE;
}
-/* LCOV_EXCL_STOP */
+
static bt_proximity_monitor_s *_bt_proximity_monitor_find(const char *remote_address)
{
GSList *l;
}
return NULL;
}
-/* LCOV_EXCL_START */
+
int _bt_proximity_connection_set_state_changed(int result, const char *remote_address, bool connected)
{
int service_type = 0;
}
return error_code;
}
-/* LCOV_EXCL_STOP */
+
int bt_proximity_monitor_create(const char *remote_address, bt_proximity_monitor_h *monitor)
{
int error_code = BT_ERROR_NONE;
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(remote_address); /* LCOV_EXCL_START */
- BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_START */
+ BT_CHECK_INPUT_PARAMETER(remote_address);
+ BT_CHECK_INPUT_PARAMETER(monitor);
for (l = proximity_monitor_list; l; l = g_slist_next(l)) {
bt_proximity_monitor_s *c = (bt_proximity_monitor_s *)l->data;
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_START */
+ BT_CHECK_INPUT_PARAMETER(monitor);
if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
proximity_monitor_list = g_slist_remove(proximity_monitor_list, monitor_s);
g_free(monitor_s);
- return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
+ return BT_ERROR_NONE;
}
int bt_proximity_monitor_connect(bt_proximity_monitor_h monitor)
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(monitor_s);/* LCOV_EXCL_START */
+ BT_CHECK_INPUT_PARAMETER(monitor_s);
if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_NOT_INITIALIZED;
return error_code;
}
-/* LCOV_EXCL_STOP */
+
int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor)
{
int error_code;
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(monitor_s);
-/* LCOV_EXCL_START */
+
if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
return error_code;
}
-/* LCOV_EXCL_STOP */
+
int bt_proximity_monitor_set_connection_state_changed_cb(bt_proximity_monitor_h monitor,
bt_proximity_monitor_connection_state_changed_cb callback, void *user_data)
{
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */
-/* LCOV_EXCL_START */
+ BT_CHECK_INPUT_PARAMETER(monitor);
+
if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
return error_code;
}
-/* LCOV_EXCL_STOP */
+
int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int value)
{
int error_code = BT_ERROR_NONE;
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */
-/* LCOV_EXCL_START */
+ BT_CHECK_INPUT_PARAMETER(monitor);
+
if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
return error_code;
}
-/* LCOV_EXCL_STOP */
+
int bt_proximity_monitor_get_linkloss_alert(bt_proximity_monitor_h monitor, int *value)
{
int error_code = BT_ERROR_NONE;
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */
+ BT_CHECK_INPUT_PARAMETER(monitor);
- if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL) /* LCOV_EXCL_LINE */
+ if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
- if (!(pxp_monitor_supported_services & BT_PROXIMITY_LINKLOSS_ALERT)) /* LCOV_EXCL_LINE */
+ if (!(pxp_monitor_supported_services & BT_PROXIMITY_LINKLOSS_ALERT))
return BT_ERROR_NOT_SUPPORTED;
- _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); /* LCOV_EXCL_LINE */
+ _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address);
- error_code = _bt_get_error_code(bluetooth_proximity_monitor_get_property(&addr_hex, /* LCOV_EXCL_LINE */
+ error_code = _bt_get_error_code(bluetooth_proximity_monitor_get_property(&addr_hex,
BT_PROXIMITY_LINKLOSS_ALERT, value));
- 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 */
+ if (error_code != BT_ERROR_NONE)
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
return error_code;
}
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */
+ BT_CHECK_INPUT_PARAMETER(monitor);
- if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL) /* LCOV_EXCL_LINE */
+ if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
- if (!(pxp_monitor_supported_services & BT_PROXIMITY_IMMEDIATE_ALERT)) /* LCOV_EXCL_LINE */
+ if (!(pxp_monitor_supported_services & BT_PROXIMITY_IMMEDIATE_ALERT))
return BT_ERROR_NOT_SUPPORTED;
- _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); /* LCOV_EXCL_LINE */
+ _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address);
- error_code = _bt_get_error_code(bluetooth_proximity_monitor_get_property(&addr_hex, /* LCOV_EXCL_LINE */
+ error_code = _bt_get_error_code(bluetooth_proximity_monitor_get_property(&addr_hex,
BT_PROXIMITY_IMMEDIATE_ALERT, value));
- 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 */
+ if (error_code != BT_ERROR_NONE)
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
return error_code;
}
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */
+ BT_CHECK_INPUT_PARAMETER(monitor);
- if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL) /* LCOV_EXCL_LINE */
+ if (_bt_proximity_monitor_find(monitor_s->remote_address) == NULL)
return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
- if (!(pxp_monitor_supported_services & BT_PROXIMITY_TX_POWER)) /* LCOV_EXCL_LINE */
+ if (!(pxp_monitor_supported_services & BT_PROXIMITY_TX_POWER))
return BT_ERROR_NOT_SUPPORTED;
- _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); /* LCOV_EXCL_LINE */
+ _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address);
error_code = _bt_get_error_code(bluetooth_proximity_monitor_get_property(&addr_hex,
BT_PROXIMITY_TX_POWER, value));
- 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 */
+ if (error_code != BT_ERROR_NONE)
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
return error_code;
}
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(remote_address); /* LCOV_EXCL_LINE */
+ BT_CHECK_INPUT_PARAMETER(remote_address);
if (reporter_s == NULL)
return BT_ERROR_NOT_INITIALIZED;
if (!(reporter_s->services_supported & BT_PROXIMITY_LINKLOSS_ALERT))
return BT_ERROR_NOT_SUPPORTED;
- _bt_convert_address_to_hex(&addr_hex, remote_address); /* LCOV_EXCL_LINE */
+ _bt_convert_address_to_hex(&addr_hex, remote_address);
error_code = _bt_get_error_code(bluetooth_proximity_reporter_get_property(&addr_hex,
BT_PROXIMITY_LINKLOSS_ALERT, value));
- 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 */
+ if (error_code != BT_ERROR_NONE)
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
return error_code;
BT_CHECK_GATT_PXP_SUPPORT();
BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(remote_address); /* LCOV_EXCL_LINE */
+ BT_CHECK_INPUT_PARAMETER(remote_address);
if (reporter_s == NULL)
return BT_ERROR_NOT_INITIALIZED;
if (!(reporter_s->services_supported & BT_PROXIMITY_IMMEDIATE_ALERT))
return BT_ERROR_NOT_SUPPORTED;
- _bt_convert_address_to_hex(&addr_hex, remote_address); /* LCOV_EXCL_LINE */
+ _bt_convert_address_to_hex(&addr_hex, remote_address);
error_code = _bt_get_error_code(bluetooth_proximity_reporter_get_property(&addr_hex,
BT_PROXIMITY_IMMEDIATE_ALERT, value));
return error_code;
}
+/* LCOV_EXCL_STOP */
return error_code;
}
+
/* LCOV_EXCL_START */
int bt_socket_is_service_used(const char *service_uuid, bool *used)
{
*used = bluetooth_rfcomm_is_server_uuid_available(service_uuid);
- return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
+ return BT_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
int bt_socket_listen_and_accept_rfcomm(int socket_fd, int max_pending_connections)
{
return error_code;
}
+
/* LCOV_EXCL_START */
int bt_socket_listen(int socket_fd, int max_pending_connections)
{
return error_code;
}
+
/* LCOV_EXCL_STOP */
int bt_socket_connect_rfcomm(const char *remote_address, const char *remote_port_uuid)
{