Exclude coverage for internal APIs 88/199588/1
authorWootak Jung <wootak.jung@samsung.com>
Wed, 13 Feb 2019 06:48:25 +0000 (15:48 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 13 Feb 2019 06:48:25 +0000 (15:48 +0900)
Change-Id: I365d83a0a761e0694004016e47fc14f0ac3e3ab2

src/bluetooth-adapter.c
src/bluetooth-audio.c
src/bluetooth-avrcp.c
src/bluetooth-device.c
src/bluetooth-gatt.c
src/bluetooth-otp.c
src/bluetooth-proximity.c
src/bluetooth-socket.c

index 875a8553fcbfc1d4b2970e7d066719c01cc853a9..0eee5e7665b6a90d6f4be4c45f0a6913c336a932 100644 (file)
@@ -688,13 +688,13 @@ int bt_adapter_get_bonded_device_info(const char *remote_address,
        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);
                }
        }
 
@@ -806,7 +806,8 @@ int bt_adapter_foreach_profile_connected_devices(const char *profile_uuid,
        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)
@@ -1063,12 +1064,12 @@ int bt_adapter_set_remote_oob_data(const char *remote_address,
 
        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,
@@ -1173,9 +1174,10 @@ int bt_adapter_set_remote_oob_ext_data(const char *remote_address,
        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,
@@ -1218,7 +1220,7 @@ int bt_adapter_le_set_remote_oob_ext_data(const char *remote_address,
 
        return ret;
 }
-/* LCOV_EXCL_START */
+/* LCOV_EXCL_STOP */
 
 int bt_adapter_remove_remote_oob_data(const char *remote_address)
 {
@@ -1262,10 +1264,10 @@ 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) { /* 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;
 }
@@ -1463,6 +1465,7 @@ int bt_adapter_le_remove_white_list(const char *address, bt_device_address_type_
 
        return error_code;
 }
+/* LCOV_EXCL_STOP */
 
 int bt_adapter_le_set_scan_mode(bt_adapter_le_scan_mode_e scan_mode)
 {
@@ -1494,6 +1497,7 @@ 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;
@@ -1510,7 +1514,8 @@ int bt_adapter_le_set_customized_scan_mode(float scan_interval, float scan_windo
                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)
 {
@@ -1589,11 +1594,11 @@ static int __bt_remove_ad_data_by_type(char *in_data, unsigned int in_len,
        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];
@@ -1603,13 +1608,13 @@ static int __bt_remove_ad_data_by_type(char *in_data, unsigned int in_len,
                        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;
@@ -1723,15 +1728,15 @@ static int bt_adapter_le_remove_advertising_data(bt_advertiser_h advertiser,
                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);
@@ -1744,7 +1749,7 @@ static int bt_adapter_le_remove_advertising_data(bt_advertiser_h advertiser,
 
        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;
 }
@@ -1767,8 +1772,8 @@ static int __bt_convert_string_to_uuid(const char *string,
        } 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 };
@@ -1825,8 +1830,8 @@ static int __bt_convert_string_to_uuid(const char *string,
                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 */
@@ -1924,13 +1929,13 @@ static int __bt_append_adv_type_data(bt_advertiser_h advertiser,
        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);
@@ -2449,7 +2454,7 @@ int bt_adapter_le_set_advertising_filter_policy(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); /* LCOV_EXCL_LINE */
+                                       error_code);
                return BT_ERROR_PERMISSION_DENIED;
        }
 
@@ -2501,7 +2506,7 @@ int bt_adapter_le_enable_privacy(bool enable_privacy)
 
        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;
 }
@@ -3229,11 +3234,9 @@ int bt_adapter_le_get_scan_result_ibeacon_report(const bt_adapter_le_device_scan
 
        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;
@@ -3302,7 +3305,7 @@ int bt_adapter_le_scan_filter_set_device_name(bt_scan_filter_h scan_filter, cons
 
        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;
        }
 
@@ -3626,7 +3629,7 @@ int bt_adapter_le_scan_filter_unregister_all(void)
        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)
@@ -3896,6 +3899,7 @@ int bt_adapter_le_scan_filter_set_type(bt_scan_filter_h scan_filter,
                return BT_ERROR_INVALID_PARAMETER;
 }
 
+/* LCOV_EXCL_START */
 int bt_adapter_passkey_reply(char *passkey, bool authentication_reply)
 {
        BT_CHECK_INIT_STATUS();
@@ -3919,6 +3923,7 @@ int bt_adapter_passkey_confirmation_reply(bool confirmation_reply)
 
        return error_code;
 }
+/* LCOV_EXCL_STOP */
 
 int bt_adapter_le_is_2m_phy_supported(bool *is_supported)
 {
index a76c7ecbc31b91fb5b44104f59195c4b8f6b8b0f..9c305d2a9bc2fea45cfdcf75841cdc575f2e71aa 100644 (file)
@@ -475,7 +475,6 @@ int bt_ag_unset_speaker_gain_changed_cb(void)
                _bt_unset_cb(BT_EVENT_AG_SPEAKER_GAIN_CHANGE);
        return BT_ERROR_NONE;
 }
-/* LCOV_EXCL_STOP */
 
 int bt_ag_open_sco(void)
 {
@@ -483,13 +482,13 @@ 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)
@@ -498,25 +497,25 @@ 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;
 }
 
@@ -525,23 +524,22 @@ int bt_ag_set_sco_state_changed_cb(bt_ag_sco_state_changed_cb callback,
 {
        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;
@@ -628,7 +626,7 @@ int bt_ag_notify_vendor_cmd(const char *command)
        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)
 {
@@ -636,7 +634,7 @@ 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
@@ -645,10 +643,9 @@ int bt_ag_notify_voice_recognition_state(bool state)
        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)
 {
index 607dad631e875b71ba07655641f0ef57047e0fc7..fd8ce898716408a55626c7664259bc1791e59be3 100644 (file)
@@ -147,7 +147,8 @@ int bt_avrcp_target_disconnect(const char *remote_address)
                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)
 {
@@ -390,7 +391,6 @@ int bt_avrcp_control_send_player_command(bt_avrcp_player_command_e cmd)
        return error;
 }
 
-/* LCOV_EXCL_START */
 int bt_avrcp_control_send_player_command_to(bt_avrcp_player_command_e cmd, char *remote_address)
 {
        int error;
@@ -410,7 +410,6 @@ int bt_avrcp_control_send_player_command_to(bt_avrcp_player_command_e cmd, char
 
        return error;
 }
-/* LCOV_EXCL_STOP */
 
 int bt_avrcp_control_set_absolute_volume(unsigned int value)
 {
index 18f5392178ac7420f66a153b6f294b33bad10d7b..408b733c7b81876b4a9a48ba894b7507c5d263fb 100644 (file)
@@ -68,7 +68,7 @@ static bt_uuid2svc_table_t uuid2svc_mask[] = {
        { 0, BT_SC_NONE }
 };
 
-
+/* LCOV_EXCL_START */
 int bt_device_disconnect(const char *remote_address)
 {
        bluetooth_device_address_t addr_hex = { {0,} };
@@ -78,13 +78,14 @@ int bt_device_disconnect(const char *remote_address)
        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)
 {
@@ -95,7 +96,7 @@ 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);
@@ -103,6 +104,7 @@ int bt_device_create_bond(const char *device_address)
        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)
 {
@@ -119,7 +121,8 @@ int bt_device_create_bond_by_type(const char *device_address,
                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)
 {
@@ -201,7 +204,7 @@ int bt_device_start_service_search(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 */
        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. */
@@ -214,6 +217,7 @@ int bt_device_start_service_search(const char *device_address)
        return ret;
 }
 
+/* LCOV_EXCL_START */
 int bt_device_cancel_service_search(void)
 {
        int ret = 0;
@@ -224,8 +228,9 @@ int bt_device_cancel_service_search(void)
        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)
 {
@@ -334,6 +339,7 @@ int bt_device_set_service_searched_cb(bt_device_service_searched_cb callback, vo
 
        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)
@@ -384,6 +390,7 @@ int bt_device_get_connection_state(const char *remote_address,
 
        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)
 {
@@ -461,9 +468,7 @@ int bt_device_unset_rssi_alert_cb(void)
        _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);
@@ -471,9 +476,7 @@ int bt_device_unset_att_mtu_changed_cb(void)
        _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,
index 115a750b0022f05b82b2690c496bebe57148a2a1..8cadcd5686e286ecd71f5d2e463dd004b61a6208 100644 (file)
@@ -2320,6 +2320,7 @@ int bt_gatt_characteristic_get_properties(bt_gatt_h characteristic, int *propert
        return BT_ERROR_NONE; /* LCOV_EXCL_STOP */
 }
 
+/* LCOV_EXCL_START */
 int bt_gatt_characteristic_set_properties(bt_gatt_h characteristic,
                                                int properties)
 {
@@ -2332,14 +2333,15 @@ int bt_gatt_characteristic_set_properties(bt_gatt_h 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 */
+                               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)
@@ -2817,7 +2819,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)) {
+       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;
 
@@ -2860,7 +2862,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;
@@ -3163,7 +3165,7 @@ int bt_gatt_server_notify_characteristic_changed_value(bt_gatt_h characteristic,
        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 */
@@ -3195,7 +3197,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);
@@ -3964,6 +3966,7 @@ int bt_gatt_client_write_value(bt_gatt_h gatt_handle,
 }
 #endif
 
+/* LCOV_EXCL_START */
 static bt_gatt_client_h __find_gatt_client(const char *remote_address)
 {
        GSList *l = NULL;
@@ -3977,6 +3980,7 @@ static bt_gatt_client_h __find_gatt_client(const char *remote_address)
 
        return NULL;
 }
+/* LCOV_EXCL_STOP */
 
 #ifndef TIZEN_GATT_CLIENT
 static gboolean __get_bdaddr_from_path(const char *path, char *addr)
@@ -4008,6 +4012,7 @@ 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;
@@ -4027,7 +4032,6 @@ void __uuid_hex_to_string(unsigned char *uuid, char *str)
        return;
 }
 
-/* LCOV_EXCL_START */
 static bt_gatt_characteristic_s* __gatt_get_characteristic_handle(
                                unsigned char *svc_uuid,
                                int svc_inst,
index 29358973f6e52ac2807c059820eee8c7d4acbea5..82ff057e7b8acd4cc326cb28fe7d53f4c5a7e543 100644 (file)
@@ -273,6 +273,7 @@ static void _bt_otp_client_send_delete_object_callback(int result,
 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) {
@@ -283,7 +284,6 @@ int __bt_check_otp_server_init_status(void)
        return BT_ERROR_NONE;
 }
 
-/* LCOV_EXCL_START */
 int bt_otp_server_initialize(const char *directory)
 {
        int error_code = BT_ERROR_NONE;
@@ -316,9 +316,9 @@ int bt_otp_server_deinitialize()
        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;
index 6ca39901c4c0c5136e0251bc0ecdecb395c219b6..ffb8803c782ec7467fde55793c3468c0b765b33e 100644 (file)
@@ -67,6 +67,7 @@ static bt_proximity_reporter_s *reporter_s = NULL;
        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;
@@ -123,7 +124,7 @@ int bt_proximity_reporter_destroy(bt_proximity_reporter_h reporter)
                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
@@ -152,7 +153,7 @@ int _bt_check_proximity_is_initialized(bool *is_initialized)
 
        return BT_ERROR_NONE;
 }
-/* LCOV_EXCL_STOP */
+
 static bt_proximity_monitor_s *_bt_proximity_monitor_find(const char *remote_address)
 {
        GSList *l;
@@ -169,7 +170,7 @@ static bt_proximity_monitor_s *_bt_proximity_monitor_find(const char *remote_add
        }
        return NULL;
 }
-/* LCOV_EXCL_START */
+
 int _bt_proximity_connection_set_state_changed(int result, const char *remote_address, bool connected)
 {
        int service_type = 0;
@@ -206,7 +207,7 @@ int _bt_proximity_connection_set_state_changed(int result, const char *remote_ad
        }
        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;
@@ -218,8 +219,8 @@ int bt_proximity_monitor_create(const char *remote_address, bt_proximity_monitor
 
        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;
@@ -277,7 +278,7 @@ int bt_proximity_monitor_destroy(bt_proximity_monitor_h monitor)
 
        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;
@@ -292,7 +293,7 @@ int bt_proximity_monitor_destroy(bt_proximity_monitor_h monitor)
        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)
@@ -302,7 +303,7 @@ 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;
@@ -314,7 +315,7 @@ int bt_proximity_monitor_connect(bt_proximity_monitor_h monitor)
 
        return error_code;
 }
-/* LCOV_EXCL_STOP */
+
 int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor)
 {
        int error_code;
@@ -323,7 +324,7 @@ int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor)
        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;
 
@@ -334,7 +335,7 @@ int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor)
 
        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)
 {
@@ -443,8 +444,8 @@ int bt_proximity_monitor_set_linkloss_alert(bt_proximity_monitor_h monitor, int
 
        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;
 
@@ -460,7 +461,7 @@ int bt_proximity_monitor_set_linkloss_alert(bt_proximity_monitor_h monitor, int
 
        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;
@@ -469,8 +470,8 @@ int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int
 
        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;
 
@@ -486,7 +487,7 @@ int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int
 
        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;
@@ -495,21 +496,21 @@ int bt_proximity_monitor_get_linkloss_alert(bt_proximity_monitor_h monitor, int
 
        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;
 }
@@ -522,21 +523,21 @@ int bt_proximity_monitor_get_immediate_alert(bt_proximity_monitor_h monitor, int
 
        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;
 }
@@ -549,21 +550,21 @@ int bt_proximity_monitor_get_signal_level(bt_proximity_monitor_h monitor, int *v
 
        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;
 }
@@ -575,7 +576,7 @@ int bt_proximity_reporter_get_linkloss_alert(const char *remote_address, int *va
 
        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;
@@ -583,13 +584,13 @@ int bt_proximity_reporter_get_linkloss_alert(const char *remote_address, int *va
        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;
@@ -602,7 +603,7 @@ int bt_proximity_reporter_get_immediate_alert(const char *remote_address, int *v
 
        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;
@@ -610,7 +611,7 @@ int bt_proximity_reporter_get_immediate_alert(const char *remote_address, int *v
        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));
@@ -620,3 +621,4 @@ int bt_proximity_reporter_get_immediate_alert(const char *remote_address, int *v
 
        return error_code;
 }
+/* LCOV_EXCL_STOP */
index 9ead77deac68fb268d53ad1bee80f53ce63f21b7..3973b7f6e5ecacfa557f0b1d09b9cd591e0f8116 100644 (file)
@@ -57,6 +57,7 @@ int bt_socket_destroy_rfcomm(int socket_fd)
 
        return error_code;
 }
+
 /* LCOV_EXCL_START */
 int bt_socket_is_service_used(const char *service_uuid, bool *used)
 {
@@ -67,8 +68,9 @@ 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)
 {
@@ -84,6 +86,7 @@ int bt_socket_listen_and_accept_rfcomm(int socket_fd, int max_pending_connection
 
        return error_code;
 }
+
 /* LCOV_EXCL_START */
 int bt_socket_listen(int socket_fd, int max_pending_connections)
 {
@@ -187,6 +190,7 @@ int bt_socket_listen_and_accept_rfcomm_ex(const char *uuid, int max_pending_conn
 
        return error_code;
 }
+
 /* LCOV_EXCL_STOP */
 int bt_socket_connect_rfcomm(const char *remote_address, const char *remote_port_uuid)
 {