Add the line coverage excluding comment 82/62582/1
authorHyuk Lee <hyuk0512.lee@samsung.com>
Thu, 17 Mar 2016 00:53:21 +0000 (09:53 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Thu, 17 Mar 2016 00:55:53 +0000 (09:55 +0900)
Change-Id: I1edc1be3d5741415027db8f3cc9fd64a324d5e22
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
src/bluetooth-adapter.c
src/bluetooth-audio.c
src/bluetooth-avrcp.c
src/bluetooth-common.c
src/bluetooth-device.c
src/bluetooth-gatt.c
src/bluetooth-hid.c
src/bluetooth-ipsp.c
src/bluetooth-opp-server.c
src/bluetooth-pan.c
src/bluetooth-socket.c

index 4f6d509..0e2673e 100755 (executable)
@@ -41,6 +41,7 @@
 
 static GSList *advertiser_list = NULL;
 
+//LCOV_EXCL_START
 int bt_adapter_enable(void)
 {
        int error_code = BT_ERROR_NONE;
@@ -48,9 +49,9 @@ int bt_adapter_enable(void)
        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;
 }
 
@@ -61,9 +62,9 @@ int bt_adapter_disable(void)
        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;
 }
 
@@ -74,9 +75,9 @@ int bt_adapter_recover(void)
        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;
 }
 
@@ -87,11 +88,12 @@ int bt_adapter_reset(void)
        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)
 {
@@ -103,6 +105,7 @@ 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;
@@ -110,9 +113,9 @@ int bt_adapter_le_enable(void)
        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;
 }
 
@@ -124,9 +127,9 @@ int bt_adapter_le_disable(void)
        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;
 }
 
@@ -139,6 +142,7 @@ int bt_adapter_le_get_state(bt_adapter_le_state_e *adapter_le_state)
        *adapter_le_state = bluetooth_check_adapter_le();
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 int bt_adapter_get_address(char **address)
 {
@@ -150,20 +154,21 @@ 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;
@@ -174,9 +179,9 @@ int bt_adapter_get_version(char **version)
        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);
@@ -187,11 +192,13 @@ int bt_adapter_get_version(char **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();
@@ -401,6 +408,7 @@ ERROR:
                fclose(fp);
        return ret;
 }
+//LCOV_EXCL_STOP
 
 int bt_adapter_get_name(char **name)
 {
@@ -412,9 +420,9 @@ 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);
@@ -439,13 +447,14 @@ int bt_adapter_set_name(const char *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;
@@ -456,9 +465,9 @@ int bt_adapter_get_visibility(bt_adapter_visibility_mode_e *mode, int *duration)
        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);
@@ -470,9 +479,9 @@ int bt_adapter_get_visibility(bt_adapter_visibility_mode_e *mode, int *duration)
                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;
@@ -503,9 +512,9 @@ int bt_adapter_set_visibility(bt_adapter_visibility_mode_e visibility_mode, int
        }
 
        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;
 }
@@ -518,9 +527,9 @@ int bt_adapter_set_connectable_changed_cb(bt_adapter_connectable_changed_cb call
        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;
 }
@@ -561,12 +570,13 @@ int bt_adapter_set_connectable(bool connectable)
        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)
 {
@@ -682,9 +692,9 @@ int bt_adapter_is_service_used(const char *service_uuid, bool *used)
                *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;
 }
@@ -698,9 +708,9 @@ int bt_adapter_set_state_changed_cb(bt_adapter_state_changed_cb callback, void *
        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;
 }
@@ -724,9 +734,9 @@ int bt_adapter_set_name_changed_cb(bt_adapter_name_changed_cb callback, void *us
        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;
 }
@@ -739,9 +749,9 @@ int bt_adapter_set_visibility_mode_changed_cb(bt_adapter_visibility_mode_changed
        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;
 }
@@ -754,9 +764,9 @@ int bt_adapter_set_device_discovery_state_changed_cb(bt_adapter_device_discovery
        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;
 }
@@ -815,9 +825,9 @@ int bt_adapter_set_visibility_duration_changed_cb(bt_adapter_visibility_duration
        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;
 }
@@ -856,9 +866,9 @@ int bt_adapter_start_device_discovery(void)
        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;
 }
 
@@ -869,9 +879,9 @@ int bt_adapter_stop_device_discovery(void)
        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;
 }
 
@@ -902,9 +912,9 @@ int bt_adapter_le_start_device_discovery(void)
        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;
 }
 
@@ -990,9 +1000,9 @@ int bt_adapter_set_remote_oob_data(const char *remote_address,
        }
 
        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;
 }
 
@@ -1008,12 +1018,13 @@ int bt_adapter_remove_remote_oob_data(const char *remote_address)
        _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)
 {
 
@@ -1034,9 +1045,9 @@ 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;
 }
@@ -1052,9 +1063,9 @@ int bt_adapter_set_manufacturer_data_changed_cb(
        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;
 }
@@ -1078,9 +1089,9 @@ int bt_adapter_le_add_white_list(const char *address, bt_device_address_type_e a
        _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;
 }
@@ -1096,9 +1107,9 @@ int bt_adapter_le_remove_white_list(const char *address, bt_device_address_type_
        _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;
 }
@@ -1111,9 +1122,9 @@ int bt_adapter_le_clear_white_list(void)
        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;
 }
@@ -1141,12 +1152,12 @@ int bt_adapter_le_set_scan_mode(bt_adapter_le_scan_mode_e scan_mode)
                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)
 {
@@ -1490,6 +1501,7 @@ static int __bt_find_adv_data_type(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,
@@ -1572,6 +1584,7 @@ static int __bt_append_adv_type_data(bt_advertiser_h advertiser,
 
        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)
@@ -1908,7 +1921,7 @@ int bt_adapter_le_start_advertising(bt_advertiser_h advertiser,
                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;
                }
        }
@@ -1918,7 +1931,7 @@ int bt_adapter_le_start_advertising(bt_advertiser_h advertiser,
                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;
                }
        }
@@ -1935,7 +1948,7 @@ int bt_adapter_le_start_advertising(bt_advertiser_h advertiser,
 
        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;
        }
 
@@ -1956,7 +1969,7 @@ int bt_adapter_le_stop_advertising(bt_advertiser_h advertiser)
 
        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;
@@ -1982,7 +1995,7 @@ int bt_adapter_le_start_advertising_new(bt_advertiser_h advertiser,
                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;
                }
        }
@@ -1992,7 +2005,7 @@ int bt_adapter_le_start_advertising_new(bt_advertiser_h advertiser,
                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;
                }
        }
@@ -2012,7 +2025,7 @@ int bt_adapter_le_start_advertising_new(bt_advertiser_h advertiser,
 
        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;
        }
 
@@ -2030,7 +2043,7 @@ void _bt_adapter_le_invoke_advertising_state_cb(int handle, int result, bt_adapt
                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;
                        }
 
@@ -2039,7 +2052,7 @@ void _bt_adapter_le_invoke_advertising_state_cb(int handle, int result, bt_adapt
                }
        }
 
-       BT_ERR("No available advertiser");
+       BT_ERR("No available advertiser"); //LCOV_EXCL_LINE
 }
 
 int bt_adapter_le_set_advertising_mode(bt_advertiser_h advertiser,
@@ -2058,7 +2071,7 @@ 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;
        }
 
@@ -2068,6 +2081,7 @@ int bt_adapter_le_set_advertising_mode(bt_advertiser_h advertiser,
        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)
 {
@@ -2084,7 +2098,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);
+               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); //LCOV_EXCL_LINE
                return BT_ERROR_PERMISSION_DENIED;
        }
 
@@ -2093,6 +2107,7 @@ int bt_adapter_le_set_advertising_filter_policy(bt_advertiser_h advertiser,
 
        return error_code;
 }
+//LCOV_EXCL_STOP
 
 int bt_adapter_le_set_advertising_connectable(bt_advertiser_h advertiser, bool connectable)
 {
@@ -2105,7 +2120,7 @@ int bt_adapter_le_set_advertising_connectable(bt_advertiser_h advertiser, bool c
 
        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;
        }
 
@@ -2119,6 +2134,7 @@ int bt_adapter_le_set_advertising_connectable(bt_advertiser_h advertiser, bool c
        return error_code;
 }
 
+//LCOV_EXCL_START
 int bt_adapter_le_enable_privacy(bool enable_privacy)
 {
        int error_code = BT_ERROR_NONE;
@@ -2129,7 +2145,7 @@ int bt_adapter_le_enable_privacy(bool enable_privacy)
        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;
 }
@@ -2235,6 +2251,7 @@ static void __bt_adapter_le_convert_scan_filter(bluetooth_le_scan_filter_t *dest
                }
        }
 }
+//LCOV_EXCL_STOP
 
 int bt_adapter_le_start_scan(bt_adapter_le_scan_result_cb cb, void *user_data)
 {
@@ -2249,7 +2266,7 @@ 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;
 }
@@ -2262,7 +2279,7 @@ int bt_adapter_le_stop_scan(void)
        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;
 }
@@ -2728,6 +2745,7 @@ int bt_adapter_le_get_scan_result_manufacturer_data(const bt_adapter_le_device_s
        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;
@@ -2738,7 +2756,7 @@ int bt_adapter_le_create_scan_filter(bt_scan_filter_h *scan_filter)
 
        __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;
        }
 
@@ -2798,7 +2816,7 @@ int bt_adapter_le_scan_filter_set_device_name(bt_scan_filter_h scan_filter, cons
        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;
        }
 
@@ -2839,7 +2857,7 @@ int bt_adapter_le_scan_filter_set_service_uuid_with_mask(bt_scan_filter_h scan_f
        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;
        }
 
@@ -2882,7 +2900,7 @@ int bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask(bt_scan_fi
        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;
        }
 
@@ -2907,7 +2925,7 @@ int bt_adapter_le_scan_filter_set_service_data(bt_scan_filter_h scan_filter,
        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;
        }
 
@@ -2936,7 +2954,7 @@ int bt_adapter_le_scan_filter_set_service_data_with_mask(bt_scan_filter_h scan_f
        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;
        }
 
@@ -2962,12 +2980,12 @@ int bt_adapter_le_scan_filter_set_manufacturer_data(bt_scan_filter_h scan_filter
        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;
        }
 
@@ -2999,12 +3017,12 @@ int bt_adapter_le_scan_filter_set_manufacturer_data_with_mask(bt_scan_filter_h s
        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;
        }
 
@@ -3029,7 +3047,7 @@ int bt_adapter_le_register_scan_filter(bt_scan_filter_h scan_filter)
        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;
        }
 
@@ -3037,7 +3055,7 @@ int bt_adapter_le_register_scan_filter(bt_scan_filter_h scan_filter)
 
        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;
@@ -3052,13 +3070,13 @@ int bt_adapter_le_unregister_scan_filter(bt_scan_filter_h scan_filter)
        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;
@@ -3071,13 +3089,13 @@ int bt_adapter_le_unregister_all_scan_filters(void)
        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;
@@ -3098,7 +3116,7 @@ int bt_adapter_le_read_maximum_data_length(
                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;
        }
 
@@ -3132,7 +3150,7 @@ int bt_adapter_le_write_host_suggested_default_data_length(
                                        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;
 }
@@ -3151,7 +3169,7 @@ int bt_adapter_le_read_suggested_default_data_length(
                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;
        }
 
@@ -3174,3 +3192,4 @@ int bt_adapter_unset_authentication_req_cb(void)
        _bt_unset_cb(BT_EVENT_AUTHENTICATION_REQUEST);
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index 214578c..e4a9da0 100644 (file)
@@ -358,6 +358,7 @@ int bt_audio_unset_connection_state_changed_cb(void)
        return BT_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 int bt_ag_notify_speaker_gain(int gain)
 {
        int error;
@@ -477,6 +478,7 @@ 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)
 {
@@ -542,6 +544,7 @@ int bt_ag_unset_sco_state_changed_cb(void)
        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;
@@ -606,6 +609,7 @@ int bt_ag_notify_call_list(bt_call_list_h list)
        }
        return error;
 }
+//LCOV_EXCL_STOP
 
 int bt_ag_notify_voice_recognition_state(bool state)
 {
@@ -625,6 +629,7 @@ int bt_ag_notify_voice_recognition_state(bool state)
        return error;
 }
 
+//LCOV_EXCL_START
 int bt_ag_set_call_handling_event_cb(bt_ag_call_handling_event_cb callback,
                                        void *user_data)
 {
@@ -814,6 +819,7 @@ int bt_a2dp_set_content_protection(bool status)
        }
        return error;
 }
+//LCOV_EXCL_STOP
 
 #ifdef TIZEN_WEARABLE
 int bt_hf_initialize(void)
index 1898050..63184ca 100644 (file)
@@ -251,6 +251,7 @@ int bt_avrcp_target_notify_track(const char *title, const char *artist, const ch
        return error;
 }
 
+//LCOV_EXCL_START
 int bt_avrcp_control_initialize(bt_avrcp_control_connection_state_changed_cb callback,
                                                                void *user_data)
 {
@@ -558,6 +559,7 @@ int bt_avrcp_control_free_track_info(bt_avrcp_metadata_attributes_info_s *track)
        g_free((gpointer)track);
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 int bt_avrcp_set_equalizer_state_changed_cb(bt_avrcp_equalizer_state_changed_cb callback, void *user_data)
 {
@@ -627,6 +629,7 @@ int bt_avrcp_unset_scan_mode_changed_cb(void)
        return BT_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 int bt_avrcp_set_song_position_changed_cb(bt_avrcp_song_position_changed_cb callback, void *user_data)
 {
        BT_CHECK_AVRCP_SUPPORT();
@@ -677,3 +680,4 @@ int bt_avrcp_unset_track_info_changed_cb(void)
        _bt_unset_cb(BT_EVENT_AVRCP_TRACK_INFO_CHANGED);
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index f9f5587..f53b828 100755 (executable)
@@ -217,6 +217,7 @@ int _bt_get_error_code(int origin_error)
 
 }
 
+//LCOV_EXCL_START
 int _bt_get_bt_device_info_s(bt_device_info_s **dest_dev, bluetooth_device_info_t *source_dev)
 {
        int i = 0;
@@ -298,6 +299,7 @@ void _bt_free_bt_device_info_s(bt_device_info_s *device_info)
        free(device_info);
        device_info = NULL;
 }
+//LCOV_EXCL_STOP
 
 int _bt_convert_address_to_string(char **addr_str, bluetooth_device_address_t *addr_hex)
 {
@@ -397,6 +399,7 @@ bt_adapter_visibility_mode_e _bt_get_bt_visibility_mode_e(bluetooth_discoverable
  *  Internal Functions
  */
 
+//LCOV_EXCL_START
 static int __bt_get_bt_device_sdp_info_s(bt_device_sdp_info_s **dest, bt_sdp_info_t *source)
 {
        int i = 0;
@@ -710,6 +713,7 @@ void _bt_hid_event_proxy(int event, hid_event_param_t *param, void *user_data)
        new_param.user_data = param->user_data;
        __bt_event_proxy(event, &new_param, user_data);
 }
+//LCOV_EXCL_STOP
 
 static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *user_data)
 {
@@ -791,6 +795,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                ((bt_adapter_state_changed_cb) bt_event_slot_container[event_index].callback)
                    (_bt_get_error_code(param->result), BT_ADAPTER_ENABLED, bt_event_slot_container[event_index].user_data);
                break;
+//LCOV_EXCL_START
        case BLUETOOTH_EVENT_DISABLED:
                BT_INFO("bt_adapter_state_changed_cb() will be called with BT_ADAPTER_DISABLED");
                ((bt_adapter_state_changed_cb) bt_event_slot_container[event_index].callback)
@@ -1768,6 +1773,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                }
                break;
        }
+//LCOV_EXCL_STOP
        case BLUETOOTH_EVENT_ADVERTISING_STARTED:
                BT_INFO("BLUETOOTH_EVENT_ADVERTISING_STARTED");
                adv_handle = (int *)(param->param_data);
@@ -2136,6 +2142,7 @@ static void __bt_le_event_proxy(int event, bluetooth_event_param_t *param, void
        }
 }
 
+//LCOV_EXCL_START
 static int __bt_get_bt_adapter_device_discovery_info_s(bt_adapter_device_discovery_info_s **discovery_info, bluetooth_device_info_t *source_info) {
        int i;
 
@@ -2217,7 +2224,7 @@ static void __bt_free_bt_adapter_device_discovery_info_s(bt_adapter_device_disco
        free(discovery_info);
        discovery_info = NULL;
 }
-
+//LCOV_EXCL_STOP
 static int __bt_get_bt_adapter_le_device_scan_info_s(
                        bt_adapter_le_device_scan_result_info_s **scan_info,
                        bluetooth_le_device_info_t *source_info)
@@ -2378,6 +2385,7 @@ static int __bt_get_cb_index(int event)
                return BT_EVENT_LE_DEVICE_DISCOVERY_STATE_CHANGED;
        case BLUETOOTH_EVENT_BONDING_FINISHED:
                return BT_EVENT_BOND_CREATED;
+               //LCOV_EXCL_START
        case BLUETOOTH_EVENT_BONDED_DEVICE_REMOVED:
                return BT_EVENT_BOND_DESTROYED;
        case BLUETOOTH_EVENT_KEYBOARD_PASSKEY_DISPLAY:
@@ -2524,6 +2532,7 @@ static int __bt_get_cb_index(int event)
                return BT_EVENT_GATT_CLIENT_READ_DESCRIPTOR;
        case BLUETOOTH_EVENT_GATT_WRITE_DESC:
                return BT_EVENT_GATT_CLIENT_WRITE_DESCRIPTOR;
+               //LCOV_EXCL_STOP
        case BLUETOOTH_EVENT_ADVERTISING_STARTED:
        case BLUETOOTH_EVENT_ADVERTISING_STOPPED:
                return BT_EVENT_ADVERTISING_STATE_CHANGED;
@@ -2579,7 +2588,7 @@ static int __bt_get_cb_index(int event)
                return -1;
        }
 }
-
+//LCOV_EXCL_START
 static void __bt_convert_lower_to_upper(char *origin)
 {
        int length = strlen(origin);
@@ -2816,3 +2825,4 @@ next:
        characteristic->descriptors = desc_list;
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index 3900930..178d65c 100755 (executable)
@@ -375,7 +375,7 @@ int bt_device_unset_connection_state_changed_cb(void)
        _bt_unset_cb(BT_EVENT_DEVICE_CONNECTION_STATUS);
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_device_le_conn_update(const char *device_address,
             const bt_le_conn_update_s *parameters)
 {
@@ -402,7 +402,7 @@ int bt_device_le_conn_update(const char *device_address,
 
        return ret;
 }
-
+//LCOV_EXCL_STOP
 int bt_device_get_service_mask_from_uuid_list(char **uuids,
                                      int no_of_service,
                                      bt_service_class_t *service_mask_list)
@@ -439,7 +439,7 @@ int bt_device_get_service_mask_from_uuid_list(char **uuids,
                case BLUETOOTH_LAP_PROFILE_UUID:
                        service_mask |= BT_SC_LAP_SERVICE_MASK;
                        break;
-
+//LCOV_EXCL_START
                case BLUETOOTH_DUN_PROFILE_UUID:
                        service_mask |= BT_SC_DUN_SERVICE_MASK;
                        break;
@@ -563,7 +563,7 @@ int bt_device_get_service_mask_from_uuid_list(char **uuids,
                case BLUETOOTH_OBEX_PRINTING_STATUS_UUID:
                        service_mask |= BT_SC_BPP_SERVICE_MASK;
                        break;
-
+//LCOV_EXCL_STOP
                case BLUETOOTH_HCR_PROFILE_UUID:
                        service_mask |= BT_SC_NONE;
                        break;
@@ -585,6 +585,7 @@ int bt_device_get_service_mask_from_uuid_list(char **uuids,
        return BT_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 int bt_passkey_reply(char *passkey, bool authentication_reply)
 {
        BT_CHECK_INIT_STATUS();
@@ -648,3 +649,4 @@ int bt_device_le_set_data_length_change_cb(
 
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index 1826b9c..f3ac75e 100644 (file)
@@ -48,7 +48,7 @@ static bool is_gatt_server_initialized = false;
                LOGE("[%s] NOT_INITIALIZED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_INITIALIZED); \
                return BT_ERROR_NOT_INITIALIZED; \
        }
-
+//LCOV_EXCL_START
 int __bt_check_gatt_server_init_status(void)
 {
        if (is_gatt_server_initialized != true) {
@@ -140,7 +140,7 @@ bool _bt_gatt_is_legacy_client_mode(void)
        BT_INFO("Legacy GATT Client APIs");
        return true;
 }
-
+//LCOV_EXCL_STOP
 int bt_gatt_foreach_primary_services(const char *remote_address,
                                bt_gatt_primary_service_cb callback,
                                void *user_data)
@@ -564,7 +564,7 @@ int bt_gatt_unset_connection_state_changed_cb(void)
        _bt_unset_cb(BT_EVENT_GATT_CONNECTION_STATUS);
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_gatt_get_uuid_specification_name(const char *uuid, char **name)
 {
        BT_CHECK_GATT_SUPPORT();
@@ -866,7 +866,7 @@ int bt_gatt_destroy(bt_gatt_h gatt_handle)
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_STOP
 int bt_gatt_get_value(bt_gatt_h gatt_handle, char **value, int *value_length)
 {
        bt_gatt_common_s *handle = (bt_gatt_common_s*)gatt_handle;
@@ -1254,7 +1254,7 @@ int bt_gatt_set_float_value(bt_gatt_h gatt_handle, bt_data_type_float_e type,
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_gatt_get_permissions(bt_gatt_h gatt_handle, int *permissions)
 {
        bt_gatt_common_s *handle = (bt_gatt_common_s*)gatt_handle;
@@ -1301,7 +1301,7 @@ int bt_gatt_set_permissions(bt_gatt_h gatt_handle, int permissions)
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_STOP
 int bt_gatt_get_uuid(bt_gatt_h gatt_handle, char **uuid)
 {
        bt_gatt_common_s *handle = (bt_gatt_common_s*)gatt_handle;
@@ -1331,7 +1331,7 @@ int bt_gatt_get_type(bt_gatt_h gatt_handle, bt_gatt_type_e *gatt_type)
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_gatt_service_create(const char *uuid, bt_gatt_service_type_e type,
                           bt_gatt_h *service)
 {
@@ -1432,7 +1432,7 @@ int bt_gatt_service_get_server(bt_gatt_h service, bt_gatt_server_h *server)
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_STOP
 int bt_gatt_service_get_client(bt_gatt_h service, bt_gatt_client_h *client)
 {
        bt_gatt_service_s *svc = (bt_gatt_service_s *)service;
@@ -1557,7 +1557,7 @@ int bt_gatt_service_foreach_included_services(bt_gatt_h service,
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_gatt_characteristic_create(const char *uuid, int permissions,
                                int properties, const char *value, int value_length,
                                bt_gatt_h *characteristic)
@@ -1641,7 +1641,7 @@ int bt_gatt_characteristic_add_descriptor(bt_gatt_h characteristic,
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_STOP
 int bt_gatt_characteristic_get_service(bt_gatt_h characteristic, bt_gatt_h *service)
 {
        bt_gatt_characteristic_s *chr = (bt_gatt_characteristic_s *)characteristic;
@@ -1790,7 +1790,7 @@ int bt_gatt_characteristic_foreach_descriptors(bt_gatt_h characteristic,
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_gatt_descriptor_create(const char *uuid, int permissions,
                                const char *value, int value_length,
                                bt_gatt_h *descriptor)
@@ -1843,7 +1843,7 @@ fail:
 
        return ret;
 }
-
+//LCOV_EXCL_STOP
 int bt_gatt_descriptor_get_characteristic(bt_gatt_h descriptor, bt_gatt_h *characteristic)
 {
        bt_gatt_descriptor_s *desc = (bt_gatt_descriptor_s *)descriptor;
@@ -1858,7 +1858,7 @@ int bt_gatt_descriptor_get_characteristic(bt_gatt_h descriptor, bt_gatt_h *chara
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_gatt_server_initialize(void)
 {
        BT_CHECK_INIT_STATUS();
@@ -2226,7 +2226,7 @@ int bt_gatt_server_foreach_services(bt_gatt_server_h server,
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_STOP
 int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client)
 {
        int ret = BT_ERROR_NONE;
index ec05d1c..1dd064c 100644 (file)
@@ -149,7 +149,7 @@ int bt_hid_host_disconnect(const char *remote_address)
        }
        return error;
 }
-
+//LCOV_EXCL_START
 int bt_hid_device_activate(bt_hid_device_connection_state_changed_cb callback, void * user_data)
 {
        int error;
@@ -338,3 +338,4 @@ int bt_hid_device_unset_data_received_cb(void)
        _bt_unset_cb(BT_EVENT_HID_DEVICE_DATA_RECEIVED);
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index 87a7913..b400b51 100644 (file)
@@ -43,7 +43,7 @@ static bool is_ipsp_initialized = false;
                LOGE("[%s] NOT_INITIALIZED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_INITIALIZED); \
                return BT_ERROR_NOT_INITIALIZED; \
        }
-
+//LCOV_EXCL_START
 int __bt_check_ipsp_init_status(void)
 {
        if (is_ipsp_initialized != true) {
@@ -162,3 +162,4 @@ int _bt_le_ipsp_unset_connection_state_changed_cb(void)
        _bt_unset_cb(BT_EVENT_IPSP_CONNECTION_STATUS);
        return BT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index 9830305..6e9e404 100644 (file)
@@ -52,7 +52,7 @@ int __bt_check_opp_server_init_status(void)
 
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_START
 int bt_opp_server_initialize(const char *destination,
                        bt_opp_server_push_requested_cb push_requested_cb,
                        void *user_data)
@@ -76,7 +76,7 @@ int bt_opp_server_initialize(const char *destination,
        is_opp_server_initialized = true;
        return BT_ERROR_NONE;
 }
-
+//LCOV_EXCL_STOP
 int bt_opp_server_initialize_by_connection_request(const char *destination,
                        bt_opp_server_connection_requested_cb connection_requested_cb,
                        void *user_data)
index 1312780..5e197d4 100644 (file)
@@ -34,7 +34,7 @@
 #else
 #define BT_CHECK_PAN_SUPPORT()
 #endif
-
+//LCOV_EXCL_START
 int bt_nap_activate(void)
 {
        int error = BT_ERROR_NONE;
@@ -177,4 +177,4 @@ int bt_panu_disconnect(const char *remote_address)
        }
        return error;
 }
-
+//LCOV_EXCL_STOP
index 7f4fcb3..15138f0 100644 (file)
@@ -84,7 +84,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)
 {
        int error_code = BT_ERROR_NONE;
@@ -187,7 +187,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)
 {
        bluetooth_device_address_t addr_hex = { {0,} };