Add more LCOV_EXCL_START/STOP macros to sound_manager_private.c #2 48/190848/1
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 8 Oct 2018 02:34:46 +0000 (11:34 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 8 Oct 2018 02:36:08 +0000 (11:36 +0900)
Change-Id: I15a5a0a64ba60d0e9cb1643aa4f6f1dd6637fb03
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
src/sound_manager_private.c

index 9bd3424..3289f0b 100644 (file)
@@ -53,6 +53,7 @@
 
 #define DBUS_ERR_MSG_MAX                                        24
 
+//LCOV_EXCL_START
 int _convert_dbus_error(const char *error_msg)
 {
        int ret = MM_ERROR_NONE;
@@ -85,6 +86,7 @@ int _convert_dbus_error(const char *error_msg)
 
        return ret;
 }
+//LCOV_EXCL_STOP
 
 int _convert_sound_manager_error_code(const char *func, int code)
 {
@@ -205,6 +207,7 @@ int _convert_stream_type(sound_stream_type_e stream_type_enum, char **stream_typ
        return ret;
 }
 
+//LCOV_EXCL_START
 int _convert_stream_type_for_internal(sound_stream_type_internal_e stream_type_enum, char **stream_type)
 {
        int ret = MM_ERROR_NONE;
@@ -256,10 +259,8 @@ int _convert_stream_type_for_internal(sound_stream_type_internal_e stream_type_e
 void _set_focus_availability(sound_stream_info_s *stream_info)
 {
        if (stream_info == NULL || stream_info->stream_type == NULL) {
-               //LCOV_EXCL_START
                LOGE("invalid argument");
                return;
-               //LCOV_EXCL_STOP
        }
        if (!strncmp(stream_info->stream_type, "solo", SOUND_STREAM_TYPE_LEN) ||
                !strncmp(stream_info->stream_type, "radio", SOUND_STREAM_TYPE_LEN) ||
@@ -270,6 +271,7 @@ void _set_focus_availability(sound_stream_info_s *stream_info)
 
        return;
 }
+//LCOV_EXCL_STOP
 
 int _convert_stream_type_to_change_reason(const char *stream_type, sound_stream_focus_change_reason_e *change_reason)
 {
@@ -579,6 +581,7 @@ const char* _convert_api_name(native_api_e api_name)
        return name;
 }
 
+//LCOV_EXCL_START
 int _convert_sample_format_enum_to_str(sound_sample_format_e format, char **format_str)
 {
        SM_NULL_ARG_CHECK_FOR_PRIV(format_str);
@@ -698,6 +701,7 @@ int _convert_sample_rate_to_enum(unsigned int rate, sound_sample_rate_e *rate_e)
 
        return MM_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 int _return_val_if_not_usb_device(sound_device_h device, int ret_val)
 {
@@ -827,6 +831,7 @@ void _pa_context_state_cb(pa_context *c, void *userdata)
        return;
 }
 
+//LCOV_EXCL_START
 void _pa_stream_state_cb(pa_stream *s, void * userdata)
 {
        pa_stream_state_t state;
@@ -850,6 +855,7 @@ void _pa_stream_state_cb(pa_stream *s, void * userdata)
 
        return;
 }
+//LCOV_EXCL_STOP
 
 int _get_stream_conf_info(const char *stream_type, stream_conf_info_s *info)
 {
@@ -1062,6 +1068,7 @@ LEAVE:
        return ret;
 }
 
+//LCOV_EXCL_START
 int _set_route_option(unsigned int index, const char *name, int value)
 {
        int ret = MM_ERROR_NONE;
@@ -1108,6 +1115,7 @@ LEAVE:
 
        return ret;
 }
+//LCOV_EXCL_STOP
 
 int _get_volume_max_level(const char *direction, const char *volume_type, unsigned int *max_level)
 {
@@ -1154,6 +1162,7 @@ LEAVE:
        return ret;
 }
 
+//LCOV_EXCL_START
 int _get_volume_level(const char *direction, const char *volume_type, unsigned int *level)
 {
        int ret = MM_ERROR_NONE;
@@ -1250,6 +1259,7 @@ LEAVE:
 
        return ret;
 }
+//LCOV_EXCL_STOP
 
 int _get_current_volume_type(const char *direction, char **volume_type)
 {
@@ -1393,6 +1403,7 @@ LEAVE:
        return;
 }
 
+//LCOV_EXCL_START
 int _is_device_running_by_id(int device_id, bool *is_running)
 {
        int ret = MM_ERROR_NONE;
@@ -1434,7 +1445,7 @@ LEAVE:
 
        return ret;
 }
-//LCOV_EXCL_START
+
 #define SM_SAMPLE_FORMAT_NUM    4 /* check declaration of sound_sample_format_e */
 int _get_supported_sample_formats(int device_id, sound_sample_format_e **formats, unsigned int *num)
 {
@@ -1903,6 +1914,7 @@ LEAVE:
        return ret;
 }
 //LCOV_EXCL_STOP
+
 int _make_pa_connection_and_register_focus(sound_stream_info_s *stream_h, sound_stream_focus_state_changed_cb callback, void *user_data)
 {
        int ret = MM_ERROR_NONE;
@@ -2352,6 +2364,7 @@ int _apply_stream_routing(sound_stream_info_s *stream_info)
        return MM_ERROR_SOUND_INVALID_STATE;
 }
 
+//LCOV_EXCL_START
 int _create_virtual_stream(sound_stream_info_s *stream_info, virtual_sound_stream_info_s **virtual_stream)
 {
        int ret = MM_ERROR_NONE;
@@ -2501,7 +2514,7 @@ int _start_virtual_stream(virtual_sound_stream_info_s *virtual_stream)
        pa_threaded_mainloop_unlock(virtual_stream->pa_mainloop);
 
        return ret;
-//LCOV_EXCL_START
+
 ERROR_WITH_UNLOCK:
        /* UNLOCK the pa_threaded_mainloop */
        pa_threaded_mainloop_unlock(virtual_stream->pa_mainloop);
@@ -2513,7 +2526,7 @@ ERROR_WITH_UNLOCK:
                }
        }
        LOGE("pa_ret(%d)", pa_ret);
-//LCOV_EXCL_STOP
+
 ERROR:
        return ret;
 }
@@ -2554,3 +2567,4 @@ int _stop_virtual_stream(virtual_sound_stream_info_s *virtual_stream)
 
        return ret;
 }
+//LCOV_EXCL_STOP