From: DoHyun Pyun Date: Wed, 25 Mar 2020 01:30:12 +0000 (+0900) Subject: Add the coverage exception code X-Git-Tag: submit/tizen_5.5/20200330.044545^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eec9e84a4fdb5bf2065865be9bc8bbe44053a565;p=platform%2Fcore%2Fapi%2Fbluetooth.git Add the coverage exception code We can't cover the code working with the remote device by auto TCT, so except the lines Change-Id: I026e2f38d1a91cffc09004894550203fdb2e80e7 Signed-off-by: DoHyun Pyun --- diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index bce274c..346189f 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -4242,6 +4242,7 @@ int bt_adapter_le_is_coded_phy_supported(bool *is_supported) return BT_ERROR_NONE; } +/* LCOV_EXCL_START */ int bt_adapter_le_is_scan_filter_supported(bool *is_supported) { int ret = BT_ERROR_NONE; @@ -4262,3 +4263,4 @@ int bt_adapter_le_is_scan_filter_supported(bool *is_supported) return BT_ERROR_NONE; } +/* LCOV_EXCL_STOP */ diff --git a/src/bluetooth-audio.c b/src/bluetooth-audio.c index 2e9b116..50921d8 100644 --- a/src/bluetooth-audio.c +++ b/src/bluetooth-audio.c @@ -408,7 +408,6 @@ int bt_audio_unset_avc_status_changed_cb(void) _bt_unset_cb(BT_EVENT_AUDIO_AVC_STATUS_CHANGED); return BT_ERROR_NONE; } -/* LCOV_EXCL_STOP */ int bt_audio_select_role(bt_audio_role_e role) { diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index af3cd82..4dbdb20 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -611,12 +611,12 @@ int _bt_get_ad_data_by_type(char *in_data, int in_len, return BLUETOOTH_ERROR_NONE; } -/* LCOV_EXCL_STOP */ int _bt_get_link_loss_rssi(void) { return dbfw_rssi; } +/* LCOV_EXCL_STOP */ int _bt_convert_address_to_string(char **addr_str, bluetooth_device_address_t *addr_hex) { @@ -660,6 +660,7 @@ char *_bt_convert_error_to_string(int error) return "UNKNOWN"; /* LCOV_EXCL_LINE */ } +/* LCOV_EXCL_START */ char *_bt_convert_uuid_to_uuid128(const char *uuid) { int len; @@ -686,6 +687,7 @@ char *_bt_convert_uuid_to_uuid128(const char *uuid) return uuid128; } +/* LCOV_EXCL_STOP */ bt_adapter_visibility_mode_e _bt_get_bt_visibility_mode_e(bluetooth_discoverable_mode_t mode) { diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index 2f7f3ae..7099add 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -788,7 +788,6 @@ next: #endif #ifdef TIZEN_GATT_CLIENT -/* LCOV_EXCL_STOP */ int bt_gatt_connect(const char *address, bool auto_connect) { int ret; @@ -880,6 +879,7 @@ int bt_gatt_disconnect(const char *address) return ret; } +/* LCOV_EXCL_STOP */ int bt_gatt_set_connection_state_changed_cb(bt_gatt_connection_state_changed_cb callback, void *user_data) @@ -900,6 +900,7 @@ int bt_gatt_unset_connection_state_changed_cb(void) return BT_ERROR_NONE; } +/* LCOV_EXCL_START */ static void __bt_gatt_free_descriptor(bt_gatt_h gatt_handle) { bt_gatt_descriptor_s *desc = (bt_gatt_descriptor_s *)gatt_handle; @@ -1089,7 +1090,6 @@ static void __bt_gatt_destroy_service(bt_gatt_h gatt_handle) __bt_gatt_free_service(gatt_handle); } -/* LCOV_EXCL_START */ static unsigned int __convert_int_to_signed_bits(int i, int size) { unsigned int signed_bits; @@ -1870,6 +1870,7 @@ int bt_gatt_get_type(bt_gatt_h gatt_handle, bt_gatt_type_e *gatt_type) return BT_ERROR_NONE; /* LCOV_EXCL_LINE */ } +/* LCOV_EXCL_START */ static bt_gatt_service_s* __bt_gatt_service_create(const char *uuid, bt_gatt_service_type_e type) { @@ -1900,7 +1901,6 @@ static bt_gatt_service_s* __bt_gatt_service_create(const char *uuid, return svc; } -/* LCOV_EXCL_START */ int bt_gatt_service_create(const char *uuid, bt_gatt_service_type_e type, bt_gatt_h *service) { @@ -2384,9 +2384,9 @@ int bt_gatt_characteristic_set_write_type(bt_gatt_h characteristic, BT_CHECK_INPUT_PARAMETER(characteristic); - 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 */ + if (chr->type != BT_GATT_TYPE_CHARACTERISTIC) { /* LCOV_EXCL_START */ + BT_ERR("Wrong type of GATT handle : %d", chr->type); + return BT_ERROR_INVALID_PARAMETER; } ret = __get_write_prop(write_type, &property); @@ -2398,7 +2398,7 @@ int bt_gatt_characteristic_set_write_type(bt_gatt_h characteristic, chr->write_type = write_type; return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_characteristic_get_descriptor(bt_gatt_h characteristic, const char *uuid, bt_gatt_h *descriptor) @@ -2571,7 +2571,7 @@ int bt_gatt_server_initialize(void) BT_CHECK_GATT_SERVER_SUPPORT(); BT_CHECK_INIT_STATUS(); - int ret = BT_ERROR_NONE; + int ret = BT_ERROR_NONE; /* LCOV_EXCL_START */ BT_INFO("gatt_server_initialized [%d] gatt_server_started[%d] instance_id [%d]", is_gatt_server_initialized, is_gatt_server_started, instance_id); @@ -2601,14 +2601,14 @@ int bt_gatt_server_initialize(void) BT_INFO("Gatt-service already initialized"); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_deinitialize(void) { BT_CHECK_GATT_SERVER_SUPPORT(); BT_CHECK_INIT_STATUS(); - int ret = BT_ERROR_NONE; + int ret = BT_ERROR_NONE; /* LCOV_EXCL_START */ BT_INFO("gatt_server_initialized [%d] gatt_server_started[%d] instance_id [%d]", is_gatt_server_initialized, is_gatt_server_started, instance_id); @@ -2654,7 +2654,7 @@ int bt_gatt_server_deinitialize(void) BT_INFO("Gatt-service is not initialized"); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_create(bt_gatt_server_h *server) { @@ -2664,7 +2664,7 @@ int bt_gatt_server_create(bt_gatt_server_h *server) BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(server); - if (is_gatt_server_started) { + if (is_gatt_server_started) { /* LCOV_EXCL_START */ BT_ERR("Already Server started"); return BT_ERROR_OPERATION_FAILED; } @@ -2682,7 +2682,7 @@ int bt_gatt_server_create(bt_gatt_server_h *server) gatt_handle_list = g_slist_append(gatt_handle_list, (gpointer)serv); return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_destroy(bt_gatt_server_h server) { @@ -2692,7 +2692,7 @@ int bt_gatt_server_destroy(bt_gatt_server_h server) BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(server); BT_VALIDATE_GATT_HANDLE(server); - BT_INFO("Destroy GATT Server"); + BT_INFO("Destroy GATT Server"); /* LCOV_EXCL_START */ /* Remove Server from list of GATT handles */ if (gatt_handle_list) @@ -2703,7 +2703,7 @@ int bt_gatt_server_destroy(bt_gatt_server_h server) g_free(serv); return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_set_read_value_requested_cb(bt_gatt_h gatt_handle, bt_gatt_server_read_value_requested_cb callback, @@ -2721,7 +2721,7 @@ int bt_gatt_server_set_read_value_requested_cb(bt_gatt_h gatt_handle, BT_VALIDATE_GATT_HANDLE(gatt_handle); - if (handle->type == BT_GATT_TYPE_CHARACTERISTIC) { + if (handle->type == BT_GATT_TYPE_CHARACTERISTIC) { /* LCOV_EXCL_START */ chr->read_requested_cb = callback; chr->read_requested_user_data = user_data; } else if (handle->type == BT_GATT_TYPE_DESCRIPTOR) { @@ -2735,7 +2735,7 @@ int bt_gatt_server_set_read_value_requested_cb(bt_gatt_h gatt_handle, _bt_set_cb(BT_EVENT_GATT_SERVER_READ_REQUESTED, callback, user_data); return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_set_characteristic_notification_state_change_cb(bt_gatt_h gatt_handle, bt_gatt_server_characteristic_notification_state_changed_cb callback, @@ -2751,13 +2751,14 @@ int bt_gatt_server_set_characteristic_notification_state_change_cb(bt_gatt_h gat BT_VALIDATE_GATT_HANDLE(gatt_handle); - chr->notification_changed_cb = callback; + chr->notification_changed_cb = callback; /* LCOV_EXCL_START */ chr->notification_changed_user_data = user_data; return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ #ifdef TIZEN_FEATURE_GATT_RELAY +/* LCOV_EXCL_START */ static int __gatt_service_add_num_handle(bt_gatt_service_s *service) { int handles_count = 0; @@ -2787,6 +2788,7 @@ static int __gatt_service_add_num_handle(bt_gatt_service_s *service) return BT_ERROR_NONE; } +/* LCOV_EXCL_STOP */ int bt_gatt_server_register_service(bt_gatt_server_h server, bt_gatt_h service) { @@ -2803,7 +2805,7 @@ int bt_gatt_server_register_service(bt_gatt_server_h server, bt_gatt_h service) BT_CHECK_INPUT_PARAMETER(service); BT_VALIDATE_GATT_HANDLE(server); - if (g_slist_find(serv->services, svc)) { + if (g_slist_find(serv->services, svc)) { /* LCOV_EXCL_START */ BT_ERR("Already added service."); return BT_ERROR_ALREADY_DONE; } @@ -2826,7 +2828,7 @@ int bt_gatt_server_register_service(bt_gatt_server_h server, bt_gatt_h service) return ret; } - for (char_l = svc->characteristics; char_l; char_l = g_slist_next(char_l)) { /* LCOV_EXCL_START */ + for (char_l = svc->characteristics; char_l; char_l = g_slist_next(char_l)) { GSList *desc_l; bt_gatt_characteristic_s *chr = char_l->data; @@ -2869,7 +2871,7 @@ int bt_gatt_server_register_service(bt_gatt_server_h server, bt_gatt_h service) } } - } /* LCOV_EXCL_STOP */ + } serv->services = g_slist_append(serv->services, svc); svc->parent = (void *)server; @@ -2880,7 +2882,7 @@ fail: bluetooth_gatt_unregister_service(svc->path); return ret; -} +} /* LCOV_EXCL_STOP */ #else int bt_gatt_server_register_service(bt_gatt_server_h server, bt_gatt_h service) { @@ -2996,7 +2998,7 @@ int bt_gatt_server_unregister_service(bt_gatt_server_h server, BT_CHECK_INPUT_PARAMETER(server); BT_CHECK_INPUT_PARAMETER(service); - if (!g_slist_find(serv->services, svc)) { + if (!g_slist_find(serv->services, svc)) { /* LCOV_EXCL_START */ BT_ERR("Service is NOT found."); return BT_ERROR_SERVICE_NOT_FOUND; } @@ -3004,7 +3006,7 @@ int bt_gatt_server_unregister_service(bt_gatt_server_h server, bt_gatt_service_destroy(svc); return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_unregister_all_services(bt_gatt_server_h server) { @@ -3018,7 +3020,7 @@ int bt_gatt_server_unregister_all_services(bt_gatt_server_h server) BT_CHECK_GATT_SERVER_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(server); - g_slist_free_full(serv->services, __bt_gatt_free_service); + g_slist_free_full(serv->services, __bt_gatt_free_service); /* LCOV_EXCL_START */ serv->services = NULL; #ifndef TIZEN_FEATURE_GATT_RELAY @@ -3027,7 +3029,7 @@ int bt_gatt_server_unregister_all_services(bt_gatt_server_h server) is_gatt_server_started = false; return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_start(void) { @@ -3037,7 +3039,7 @@ int bt_gatt_server_start(void) BT_CHECK_INIT_STATUS(); BT_CHECK_GATT_SERVER_INIT_STATUS(); - if (!is_gatt_server_started) { + if (!is_gatt_server_started) { /* LCOV_EXCL_START */ #ifdef TIZEN_FEATURE_GATT_RELAY { GSList *l; @@ -3076,7 +3078,7 @@ int bt_gatt_server_start(void) BT_DBG("Gatt-service already Running"); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_send_response(int request_id, bt_gatt_att_request_type_e request_type, int offset, int resp_status, char *value, int value_length) @@ -3084,11 +3086,10 @@ int bt_gatt_server_send_response(int request_id, bt_gatt_att_request_type_e requ int ret = BT_ERROR_NONE; BT_CHECK_GATT_SERVER_SUPPORT(); BT_CHECK_INIT_STATUS(); + BT_CHECK_INPUT_PARAMETER(value); - if (request_type == BT_GATT_REQUEST_TYPE_READ && + if (request_type == BT_GATT_REQUEST_TYPE_READ && /* LCOV_EXCL_START */ resp_status == BT_ATT_ERROR_NONE) { - BT_CHECK_INPUT_PARAMETER(value); - if (value_length < 0) return BT_ERROR_INVALID_PARAMETER; } @@ -3125,7 +3126,7 @@ int bt_gatt_server_send_response(int request_id, bt_gatt_att_request_type_e requ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_notify_characteristic_changed_value(bt_gatt_h characteristic, bt_gatt_server_notification_sent_cb callback, @@ -3144,7 +3145,7 @@ int bt_gatt_server_notify_characteristic_changed_value(bt_gatt_h characteristic, BT_VALIDATE_GATT_HANDLE(characteristic); - _bt_convert_address_to_hex(&addr_hex, device_address); + _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_START */ #ifdef TIZEN_FEATURE_GATT_RELAY { @@ -3204,7 +3205,7 @@ int bt_gatt_server_notify_characteristic_changed_value(bt_gatt_h characteristic, 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); @@ -3235,7 +3236,7 @@ int bt_gatt_server_notify_characteristic_changed_value(bt_gatt_h characteristic, chr->notified_user_data = user_data; return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_set_write_value_requested_cb(bt_gatt_h gatt_handle, bt_gatt_server_write_value_requested_cb callback, @@ -3253,7 +3254,7 @@ int bt_gatt_server_set_write_value_requested_cb(bt_gatt_h gatt_handle, BT_VALIDATE_GATT_HANDLE(gatt_handle); - if (handle->type == BT_GATT_TYPE_CHARACTERISTIC) { + if (handle->type == BT_GATT_TYPE_CHARACTERISTIC) { /* LCOV_EXCL_START */ chr->write_value_requested_cb = callback; chr->write_value_requested_user_data = user_data; } else if (handle->type == BT_GATT_TYPE_DESCRIPTOR) { @@ -3265,7 +3266,7 @@ int bt_gatt_server_set_write_value_requested_cb(bt_gatt_h gatt_handle, } return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_get_service(bt_gatt_server_h server, const char *uuid, bt_gatt_h *service) @@ -3282,7 +3283,7 @@ int bt_gatt_server_get_service(bt_gatt_server_h server, const char *uuid, BT_CHECK_INPUT_PARAMETER(uuid); BT_CHECK_INPUT_PARAMETER(service); - ret = __get_gatt_handle_by_uuid(server_s->services, + ret = __get_gatt_handle_by_uuid(server_s->services, /* LCOV_EXCL_START */ uuid, &gatt_handle); if (ret == BT_ERROR_NONE && gatt_handle != NULL) { *service = gatt_handle; @@ -3291,7 +3292,7 @@ int bt_gatt_server_get_service(bt_gatt_server_h server, const char *uuid, BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_get_device_mtu(const char *remote_address, unsigned int *mtu) { @@ -3303,7 +3304,7 @@ int bt_gatt_server_get_device_mtu(const char *remote_address, unsigned int *mtu) BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(remote_address); - _bt_convert_address_to_hex(&addr_hex, remote_address); + _bt_convert_address_to_hex(&addr_hex, remote_address); /* LCOV_EXCL_START */ ret = _bt_get_error_code(bluetooth_get_att_mtu(&addr_hex, &mtu_value)); @@ -3315,8 +3316,7 @@ int bt_gatt_server_get_device_mtu(const char *remote_address, unsigned int *mtu) *mtu = mtu_value; return ret; - -} +} /* LCOV_EXCL_STOP */ int bt_gatt_server_foreach_services(bt_gatt_server_h server, bt_gatt_foreach_cb callback, void *user_data) @@ -3333,7 +3333,7 @@ int bt_gatt_server_foreach_services(bt_gatt_server_h server, BT_CHECK_INPUT_PARAMETER(server); BT_CHECK_INPUT_PARAMETER(callback); - total = g_slist_length(server_s->services); + total = g_slist_length(server_s->services); /* LCOV_EXCL_START */ for (l = server_s->services; l; l = g_slist_next(l)) { if (!callback(total, index++, (bt_gatt_h)l->data, user_data)) @@ -3341,7 +3341,7 @@ int bt_gatt_server_foreach_services(bt_gatt_server_h server, } return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ int bt_gatt_server_set_att_mtu_changed_cb(bt_gatt_server_h server, bt_gatt_server_att_mtu_changed_cb callback, void *user_data) @@ -3458,8 +3458,8 @@ int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client) *client = (bt_gatt_client_h)client_s; gatt_client_list = g_slist_append(gatt_client_list, client_s); - return ret; /* LCOV_EXCL_STOP */ -} + return ret; +} /* LCOV_EXCL_STOP */ #else int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client) { @@ -4316,7 +4316,7 @@ int bt_gatt_client_set_characteristic_value_changed_cb(bt_gatt_h characteristic, BT_CHECK_INPUT_PARAMETER(characteristic); BT_CHECK_INPUT_PARAMETER(callback); - chr->value_changed_cb = callback; + chr->value_changed_cb = callback; /* LCOV_EXCL_START */ chr->value_changed_user_data = user_data; #ifdef TIZEN_GATT_CLIENT @@ -4375,7 +4375,7 @@ int bt_gatt_client_set_characteristic_value_changed_cb(bt_gatt_h characteristic, } return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_client_unset_characteristic_value_changed_cb(bt_gatt_h characteristic) { @@ -4452,7 +4452,7 @@ int bt_gatt_client_get_service(bt_gatt_client_h client, const char *uuid, BT_CHECK_INPUT_PARAMETER(uuid); BT_CHECK_INPUT_PARAMETER(service); - BT_INFO("Get Service from UUID [%s]", uuid); + BT_INFO("Get Service from UUID [%s]", uuid); /* LCOV_EXCL_START */ ret = __get_gatt_handle_by_uuid(client_s->services, uuid, &gatt_handle); if (ret == BT_ERROR_NONE && gatt_handle != NULL) { *service = gatt_handle; @@ -4461,7 +4461,7 @@ int bt_gatt_client_get_service(bt_gatt_client_h client, const char *uuid, BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_client_foreach_services(bt_gatt_client_h client, bt_gatt_foreach_cb callback, @@ -4475,19 +4475,19 @@ int bt_gatt_client_foreach_services(bt_gatt_client_h client, BT_CHECK_GATT_CLIENT_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(client); - BT_CHECK_INPUT_PARAMETER(callback); /* LCOV_EXCL_LINE */ + BT_CHECK_INPUT_PARAMETER(callback); - total = g_slist_length(client_s->services); /* LCOV_EXCL_LINE */ + total = g_slist_length(client_s->services); /* LCOV_EXCL_START */ - for (l = client_s->services; l; l = g_slist_next(l)) { /* LCOV_EXCL_LINE */ + for (l = client_s->services; l; l = g_slist_next(l)) { BT_INFO("Call one service callback"); if (!callback(total, index++, - (bt_gatt_h)l->data, user_data)) /* LCOV_EXCL_LINE */ + (bt_gatt_h)l->data, user_data)) break; } return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_client_set_service_changed_cb(bt_gatt_client_h client, bt_gatt_client_service_changed_cb callback, void *user_data) @@ -4501,7 +4501,7 @@ int bt_gatt_client_set_service_changed_cb(bt_gatt_client_h client, BT_CHECK_INPUT_PARAMETER(client); BT_CHECK_INPUT_PARAMETER(callback); - if (client_s->service_changed_cb) { + if (client_s->service_changed_cb) { /* LCOV_EXCL_START */ BT_INFO("Already registered"); client_s->service_changed_cb = callback; client_s->service_changed_user_data = user_data; @@ -4524,7 +4524,7 @@ int bt_gatt_client_set_service_changed_cb(bt_gatt_client_h client, } return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client) { @@ -4536,7 +4536,7 @@ int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client) BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(client); - _bt_convert_address_to_hex(&bd_addr, client_s->remote_address); + _bt_convert_address_to_hex(&bd_addr, client_s->remote_address); /* LCOV_EXCL_START */ #ifdef TIZEN_GATT_CLIENT ret = _bt_get_error_code(bluetooth_gatt_client_set_service_change_watcher(&bd_addr, FALSE)); #else @@ -4551,7 +4551,7 @@ int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client) } return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ #ifdef TIZEN_GATT_CLIENT /* LCOV_EXCL_START */ @@ -4973,14 +4973,14 @@ int bt_gatt_client_request_att_mtu_change(bt_gatt_client_h client, unsigned int BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(client); - _bt_convert_address_to_hex(&addr_hex, client_s->remote_address); + _bt_convert_address_to_hex(&addr_hex, client_s->remote_address); /* LCOV_EXCL_START */ ret = _bt_get_error_code(bluetooth_request_att_mtu(&addr_hex, mtu)); if (BT_ERROR_NONE != ret) BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_client_get_att_mtu(bt_gatt_client_h client, unsigned int *mtu) { @@ -4993,7 +4993,7 @@ int bt_gatt_client_get_att_mtu(bt_gatt_client_h client, unsigned int *mtu) BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(client); - _bt_convert_address_to_hex(&addr_hex, client_s->remote_address); + _bt_convert_address_to_hex(&addr_hex, client_s->remote_address); /* LCOV_EXCL_START */ ret = _bt_get_error_code(bluetooth_get_att_mtu(&addr_hex, &mtu_value)); @@ -5005,8 +5005,7 @@ int bt_gatt_client_get_att_mtu(bt_gatt_client_h client, unsigned int *mtu) *mtu = mtu_value; return ret; - -} +} /* LCOV_EXCL_STOP */ int bt_gatt_client_set_att_mtu_changed_cb(bt_gatt_client_h client, bt_gatt_client_att_mtu_changed_cb callback, void *user_data) { @@ -5017,7 +5016,7 @@ int bt_gatt_client_set_att_mtu_changed_cb(bt_gatt_client_h client, bt_gatt_clien BT_CHECK_INPUT_PARAMETER(callback); BT_CHECK_INPUT_PARAMETER(client); - if (client_s->att_mtu_changed_cb) { + if (client_s->att_mtu_changed_cb) { /* LCOV_EXCL_START */ BT_INFO("Already registered"); client_s->att_mtu_changed_cb = callback; client_s->att_mtu_changed_user_data = user_data; @@ -5029,7 +5028,7 @@ int bt_gatt_client_set_att_mtu_changed_cb(bt_gatt_client_h client, bt_gatt_clien client_s->att_mtu_changed_user_data = user_data; return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_gatt_client_unset_att_mtu_changed_cb(bt_gatt_client_h client) { @@ -5039,12 +5038,12 @@ int bt_gatt_client_unset_att_mtu_changed_cb(bt_gatt_client_h client) BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(client); - BT_INFO("MTU Changed callback unregistered [%s]", client_s->remote_address); + BT_INFO("MTU Changed callback unregistered [%s]", client_s->remote_address); /* LCOV_EXCL_START */ client_s->service_changed_cb = NULL; client_s->service_changed_user_data = NULL; return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ int bt_gatt_get_uuid_specification_name(const char *uuid, char **name) diff --git a/src/bluetooth-hdp.c b/src/bluetooth-hdp.c index efc9c38..cefefa3 100644 --- a/src/bluetooth-hdp.c +++ b/src/bluetooth-hdp.c @@ -37,7 +37,7 @@ int bt_hdp_register_sink_app(unsigned short data_type, char **app_id) BT_CHECK_HDP_SUPPORT(); BT_CHECK_INIT_STATUS(); - BT_CHECK_INPUT_PARAMETER(app_id); + BT_CHECK_INPUT_PARAMETER(app_id); /* LCOV_EXCL_START */ error = bluetooth_hdp_activate(data_type, HDP_ROLE_SINK, HDP_QOS_ANY, &app_handle); error = _bt_get_error_code(error); if (BT_ERROR_NONE != error) { @@ -49,7 +49,7 @@ int bt_hdp_register_sink_app(unsigned short data_type, char **app_id) if (*app_id == NULL) return BT_ERROR_OUT_OF_MEMORY; - return BT_ERROR_NONE; + return BT_ERROR_NONE; /* LCOV_EXCL_STOP */ } int bt_hdp_unregister_sink_app(const char *app_id) @@ -59,12 +59,12 @@ int bt_hdp_unregister_sink_app(const char *app_id) BT_CHECK_HDP_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(app_id); - error = bluetooth_hdp_deactivate(app_id); + error = bluetooth_hdp_deactivate(app_id); /* LCOV_EXCL_START */ error = _bt_get_error_code(error); if (BT_ERROR_NONE != error) BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error); /* LCOV_EXCL_LINE */ - return error; + return error; /* LCOV_EXCL_STOP */ } int bt_hdp_send_data(unsigned int channel, const char *data, unsigned int size) @@ -127,9 +127,9 @@ int bt_hdp_set_connection_state_changed_cb(bt_hdp_connected_cb connected_cb, BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(connected_cb); BT_CHECK_INPUT_PARAMETER(disconnected_cb); - _bt_set_cb(BT_EVENT_HDP_CONNECTED, connected_cb, user_data); + _bt_set_cb(BT_EVENT_HDP_CONNECTED, connected_cb, user_data); /* LCOV_EXCL_START */ _bt_set_cb(BT_EVENT_HDP_DISCONNECTED, disconnected_cb, user_data); - return BT_ERROR_NONE; + return BT_ERROR_NONE; /* LCOV_EXCL_STOP */ } @@ -137,12 +137,12 @@ int bt_hdp_unset_connection_state_changed_cb(void) { BT_CHECK_HDP_SUPPORT(); BT_CHECK_INIT_STATUS(); - if (_bt_check_cb(BT_EVENT_HDP_CONNECTED) == true) + if (_bt_check_cb(BT_EVENT_HDP_CONNECTED) == true) /* LCOV_EXCL_START */ _bt_unset_cb(BT_EVENT_HDP_CONNECTED); if (_bt_check_cb(BT_EVENT_HDP_DISCONNECTED) == true) _bt_unset_cb(BT_EVENT_HDP_DISCONNECTED); - return BT_ERROR_NONE; + return BT_ERROR_NONE; /* LCOV_EXCL_STOP */ } int bt_hdp_set_data_received_cb(bt_hdp_data_received_cb callback, @@ -151,15 +151,15 @@ int bt_hdp_set_data_received_cb(bt_hdp_data_received_cb callback, BT_CHECK_HDP_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(callback); - _bt_set_cb(BT_EVENT_HDP_DATA_RECEIVED, callback, user_data); - return BT_ERROR_NONE; + _bt_set_cb(BT_EVENT_HDP_DATA_RECEIVED, callback, user_data); /* LCOV_EXCL_START */ + return BT_ERROR_NONE; /* LCOV_EXCL_STOP */ } int bt_hdp_unset_data_received_cb(void) { BT_CHECK_HDP_SUPPORT(); BT_CHECK_INIT_STATUS(); - if (_bt_check_cb(BT_EVENT_HDP_DATA_RECEIVED) == true) + if (_bt_check_cb(BT_EVENT_HDP_DATA_RECEIVED) == true) /* LCOV_EXCL_START */ _bt_unset_cb(BT_EVENT_HDP_DATA_RECEIVED); - return BT_ERROR_NONE; + return BT_ERROR_NONE; /* LCOV_EXCL_STOP */ }