Exclude functions from coverage measurement 76/75276/1 accepted/tizen/common/20160703.125714 accepted/tizen/ivi/20160629.015648 accepted/tizen/mobile/20160629.015607 accepted/tizen/tv/20160629.015719 accepted/tizen/wearable/20160629.015521 submit/tizen/20160627.042541 submit/tizen_common/20160701.180000
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 17 Jun 2016 08:13:41 +0000 (17:13 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 17 Jun 2016 08:13:41 +0000 (17:13 +0900)
Change-Id: I487c898dd695b8cb2b7fbac675ff30ef117f1223
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/minicontrol-internal.c
src/minicontrol-monitor.c
src/minicontrol-provider.c
src/minicontrol-viewer.c

index 1c318401e5f05dd5a04c60dfe0c27d3c5e01c90a..e6ac2dc1b20548fe8e11b698fc049cb6ad9b7580 100755 (executable)
@@ -50,18 +50,22 @@ static int __send_signal(const char *object_path, const char *interface_name,
 
        conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
        if (conn == NULL) {
+               /* LCOV_EXCL_START */
                ERR("g_bus_get_sync() failed. %s", err->message);
                g_error_free(err);
                return MINICONTROL_ERROR_IPC_FAILURE;
+               /* LCOV_EXCL_STOP */
        }
 
        ret = g_dbus_connection_emit_signal(conn, NULL, object_path,
                        interface_name, signal_name, parameters, &err);
        if (!ret) {
+               /* LCOV_EXCL_START */
                ERR("g_dbus_connection_emit_signal() failed. %s", err->message);
                g_error_free(err);
                g_object_unref(conn);
                return MINICONTROL_ERROR_IPC_FAILURE;
+               /* LCOV_EXCL_STOP */
        }
 
        g_dbus_connection_flush_sync(conn, NULL, &err);
@@ -95,8 +99,10 @@ int _minictrl_provider_proc_send(int type)
 
        param = g_variant_new("(si)", type_str, pid);
        if (param == NULL) {
+               /* LCOV_EXCL_START */
                ERR("out of memory");
                return MINICONTROL_ERROR_OUT_OF_MEMORY;
+               /* LCOV_EXCL_STOP */
        }
 
        ret = __send_signal(PROC_DBUS_OBJECT, PROC_DBUS_INTERFACE,
@@ -122,14 +128,18 @@ int _minictrl_send_event(const char *signal_name, const char *minicontrol_name,
                ret = bundle_encode(signal_arg, &serialized_arg,
                                (int *)&serialized_arg_length);
                if (ret != BUNDLE_ERROR_NONE) {
+                       /* LCOV_EXCL_START */
                        ERR("Failed to serialize bundle argument");
                        return MINICONTROL_ERROR_OUT_OF_MEMORY;
+                       /* LCOV_EXCL_STOP */
                }
        } else {
                serialized_arg = (bundle_raw *)strdup("");
                if (serialized_arg == NULL) {
+                       /* LCOV_EXCL_START */
                        ERR("out of memory");
                        return MINICONTROL_ERROR_OUT_OF_MEMORY;
+                       /* LCOV_EXCL_STOP */
                }
                serialized_arg_length = 0;
        }
@@ -137,9 +147,11 @@ int _minictrl_send_event(const char *signal_name, const char *minicontrol_name,
        param = g_variant_new("(sisu)", minicontrol_name, event,
                        serialized_arg, serialized_arg_length);
        if (param == NULL) {
+               /* LCOV_EXCL_START */
                ERR("out of memory");
                free(serialized_arg);
                return MINICONTROL_ERROR_OUT_OF_MEMORY;
+               /* LCOV_EXCL_STOP */
        }
 
        ret = __send_signal(MINICTRL_DBUS_PATH, MINICTRL_DBUS_INTERFACE,
@@ -160,8 +172,10 @@ int _minictrl_provider_message_send(int event, const char *minicontrol_name,
 
        event_arg_bundle = bundle_create();
        if (event_arg_bundle == NULL) {
+               /* LCOV_EXCL_START */
                ERR("Fail to create a bundle instance");
                return MINICONTROL_ERROR_OUT_OF_MEMORY;
+               /* LCOV_EXCL_STOP */
        }
 
        snprintf(bundle_value_buffer, sizeof(bundle_value_buffer),
@@ -210,16 +224,20 @@ minictrl_sig_handle *_minictrl_dbus_sig_handle_attach(const char *signal,
 
        handle = (minictrl_sig_handle *)malloc(sizeof(minictrl_sig_handle));
        if (handle == NULL) {
+               /* LCOV_EXCL_START */
                ERR("out of memory");
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        handle->conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
        if (handle->conn == NULL) {
+               /* LCOV_EXCL_START */
                ERR("g_bus_get_sync() failed. %s", err->message);
                g_error_free(err);
                free(handle);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        handle->s_id = g_dbus_connection_signal_subscribe(handle->conn,
@@ -227,10 +245,12 @@ minictrl_sig_handle *_minictrl_dbus_sig_handle_attach(const char *signal,
                        MINICTRL_DBUS_PATH, NULL, G_DBUS_SIGNAL_FLAGS_NONE,
                        __minictrl_signal_filter, handle, NULL);
        if (handle->s_id == 0) {
+               /* LCOV_EXCL_START */
                ERR("g_dbus_connection_signal_subscribe() failed.");
                g_object_unref(handle->conn);
                free(handle);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        handle->callback = callback;
@@ -246,8 +266,10 @@ minictrl_sig_handle *_minictrl_dbus_sig_handle_attach(const char *signal,
 void _minictrl_dbus_sig_handle_dettach(minictrl_sig_handle *handle)
 {
        if (!handle) {
+               /* LCOV_EXCL_START */
                ERR("handle is NULL");
                return;
+               /* LCOV_EXCL_STOP */
        }
 
        g_dbus_connection_signal_unsubscribe(handle->conn, handle->s_id);
index 67df8850ba287e02cd8f61d0e5ea841223c9a4ba..0767508d2ef8a2230b1a2e9a91c4b2f79847fd4f 100755 (executable)
@@ -30,6 +30,7 @@ struct _minicontrol_monitor {
 
 static struct _minicontrol_monitor *g_monitor_h;
 
+/* LCOV_EXCL_START */
 static minicontrol_priority_e _int_to_priority(unsigned int value)
 {
        minicontrol_priority_e priority;
@@ -48,7 +49,9 @@ static minicontrol_priority_e _int_to_priority(unsigned int value)
 
        return priority;
 }
+/* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 static void _sig_to_viewer_handler_cb(minicontrol_event_e event,
                const char *minicontrol_name, bundle *event_arg, void *data)
 {
@@ -94,7 +97,9 @@ static void _sig_to_viewer_handler_cb(minicontrol_event_e event,
        g_monitor_h->callback(action, minicontrol_name, width, height,
                        priority, g_monitor_h->user_data);
 }
+/* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 EXPORT_API minicontrol_error_e minicontrol_monitor_start(
                minicontrol_monitor_cb callback, void *data)
 {
@@ -121,7 +126,9 @@ EXPORT_API minicontrol_error_e minicontrol_monitor_start(
 
        return _minictrl_viewer_req_message_send();
 }
+/* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 EXPORT_API minicontrol_error_e minicontrol_monitor_stop(void)
 {
        if (!g_monitor_h)
@@ -134,4 +141,5 @@ EXPORT_API minicontrol_error_e minicontrol_monitor_stop(void)
 
        return MINICONTROL_ERROR_NONE;
 }
+/* LCOV_EXCL_STOP */
 
index 886e38c7a7948f7fee3249e51f7db00142bbc325..fdc7a4a1e52444b463c0d45d2bfe53d6c398535b 100755 (executable)
@@ -137,8 +137,10 @@ static char *_minictrl_create_name(const char *name)
        size = strlen(name) + 3;
        minictrl_name = malloc(sizeof(char) * size);
        if (minictrl_name == NULL) {
+               /* LCOV_EXCL_START */
                ERR("out of memory");
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        snprintf(minictrl_name, size, "[%s]", name);
@@ -163,35 +165,43 @@ EXPORT_API Evas_Object *minicontrol_create_window(const char *name,
 
        win = elm_win_add(NULL, "minicontrol", ELM_WIN_SOCKET_IMAGE);
        if (!win) {
+               /* LCOV_EXCL_START */
                ERR("elm_win_add failed");
                set_last_result(MINICONTROL_ERROR_ELM_FAILURE);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        name_inter = _minictrl_create_name(name);
        if (!name_inter) {
+               /* LCOV_EXCL_START */
                ERR("Fail to create name_inter for : %s", name);
                set_last_result(MINICONTROL_ERROR_OUT_OF_MEMORY);
                evas_object_del(win);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        err_from_elm = elm_win_socket_listen(win, name_inter, 0, EINA_TRUE);
        if (!err_from_elm) {
+               /* LCOV_EXCL_START */
                ERR("Fail to elm win socket listen [%d]", err_from_elm);
                set_last_result(MINICONTROL_ERROR_ELM_FAILURE);
                evas_object_del(win);
                free(name_inter);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        pd = malloc(sizeof(struct _minicontrol_provider));
        if (!pd) {
+               /* LCOV_EXCL_START */
                ERR("Fail to alloc memory");
                set_last_result(MINICONTROL_ERROR_OUT_OF_MEMORY);
                evas_object_del(win);
                free(name_inter);
                return NULL;
+               /* LCOV_EXCL_STOP */
 
        }
        memset(pd, 0x00, sizeof(struct _minicontrol_provider));
@@ -236,13 +246,17 @@ EXPORT_API int minicontrol_send_event(Evas_Object *mincontrol,
 
        pd = evas_object_data_get(mincontrol, MINICTRL_DATA_KEY);
        if (!pd) {
+               /* LCOV_EXCL_START */
                ERR("pd is NULL, invaild parameter");
                return MINICONTROL_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        if (!pd->name) {
+               /* LCOV_EXCL_START */
                ERR("pd name is NULL, invaild parameter");
                return MINICONTROL_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        if (pd->state == MINICTRL_STATE_RUNNING) {
@@ -267,13 +281,17 @@ static int minicontrol_win_start(Evas_Object *mincontrol)
 
        pd = evas_object_data_get(mincontrol, MINICTRL_DATA_KEY);
        if (!pd) {
+               /* LCOV_EXCL_START */
                ERR("pd is NULL, invaild parameter");
                return MINICONTROL_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        if (!pd->name) {
+               /* LCOV_EXCL_START */
                ERR("pd name is NULL, invaild parameter");
                return MINICONTROL_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        if (pd->state != MINICTRL_STATE_RUNNING) {
@@ -293,19 +311,25 @@ static int minicontrol_win_stop(Evas_Object *mincontrol)
        int ret = MINICONTROL_ERROR_NONE;
 
        if (!mincontrol) {
+               /* LCOV_EXCL_START */
                ERR("mincontrol is NULL, invaild parameter");
                return MINICONTROL_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        pd = evas_object_data_get(mincontrol, MINICTRL_DATA_KEY);
        if (!pd) {
+               /* LCOV_EXCL_START */
                ERR("pd is NULL, invaild parameter");
                return MINICONTROL_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        if (!pd->name) {
+               /* LCOV_EXCL_START */
                ERR("pd name is NULL, invaild parameter");
                return MINICONTROL_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        if (pd->state != MINICTRL_STATE_READY) {
@@ -362,6 +386,7 @@ static void _minictrl_win_resize_cb(void *data, Evas *e,
        }
 }
 
+/* LCOV_EXCL_START */
 EXPORT_API Evas_Object *minicontrol_win_add(const char *name)
 {
        Evas_Object *win = NULL;
@@ -429,7 +454,9 @@ EXPORT_API Evas_Object *minicontrol_win_add(const char *name)
 
        return win;
 }
+/* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 EXPORT_API int minicontrol_request(Evas_Object *mincontrol,
                minicontrol_request_e request)
 {
@@ -477,4 +504,5 @@ EXPORT_API int minicontrol_request(Evas_Object *mincontrol,
 
        return MINICONTROL_ERROR_NONE;
 }
+/* LCOV_EXCL_STOP */
 
index 47200c30caa7f7cba28a262627989ebd5d3b33b6..a3a5ed7de01e2755afad0a9c66bba2fc7c757016 100755 (executable)
@@ -64,8 +64,10 @@ static void _sig_to_viewer_handler_cb(void *data, GVariant *parameters)
                event_arg_bundle = bundle_decode(serialized_arg,
                                serialized_arg_length);
                if (event_arg_bundle == NULL) {
+                       /* LCOV_EXCL_START */
                        ERR("fail to deserialize arguments");
                        return;
+                       /* LCOV_EXCL_STOP */
                }
        }
 
@@ -97,17 +99,21 @@ EXPORT_API int minicontrol_viewer_set_event_cb(
                                MINICTRL_DBUS_SIG_TO_VIEWER,
                                _sig_to_viewer_handler_cb, NULL);
                if (!event_sh) {
+                       /* LCOV_EXCL_START */
                        ERR("fail to _minictrl_dbus_sig_handle_attach - %s",
                                        MINICTRL_DBUS_SIG_TO_VIEWER);
                        return MINICONTROL_ERROR_IPC_FAILURE;
+                       /* LCOV_EXCL_STOP */
                }
 
                minicontrol_viewer_h =
                        malloc(sizeof(struct _minicontrol_viewer));
                if (!minicontrol_viewer_h) {
+                       /* LCOV_EXCL_START */
                        ERR("fail to alloc minicontrol_viewer_h");
                        _minictrl_dbus_sig_handle_dettach(event_sh);
                        return MINICONTROL_ERROR_OUT_OF_MEMORY;
+                       /* LCOV_EXCL_STOP */
                }
 
                minicontrol_viewer_h->event_sh = event_sh;
@@ -137,6 +143,7 @@ EXPORT_API int minicontrol_viewer_unset_event_cb(void)
        return MINICONTROL_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 static void _minictrl_plug_server_del(Ecore_Evas *ee)
 {
        char *minicontrol_name = NULL;
@@ -161,6 +168,7 @@ static void _minictrl_plug_server_del(Ecore_Evas *ee)
        _minictrl_provider_proc_send(MINICONTROL_DBUS_PROC_INCLUDE);
        free(minicontrol_name);
 }
+/* LCOV_EXCL_STOP */
 
 static void _minictrl_plug_del(void *data, Evas *e, Evas_Object *obj,
                void *event_info)
@@ -197,16 +205,20 @@ EXPORT_API Evas_Object *minicontrol_viewer_add(Evas_Object *parent,
 
        plug = elm_plug_add(parent);
        if (!plug) {
+               /* LCOV_EXCL_START */
                ERR("fail to create plug");
                set_last_result(MINICONTROL_ERROR_ELM_FAILURE);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        if (!elm_plug_connect(plug, minicontrol_name, 0, EINA_TRUE)) {
+               /* LCOV_EXCL_START */
                ERR("Cannot connect plug[%s]", minicontrol_name);
                set_last_result(MINICONTROL_ERROR_ELM_FAILURE);
                evas_object_del(plug);
                return NULL;
+               /* LCOV_EXCL_STOP */
        }
 
        plug_img = elm_plug_image_object_get(plug);
@@ -222,12 +234,15 @@ EXPORT_API Evas_Object *minicontrol_viewer_add(Evas_Object *parent,
        return plug;
 }
 
+/* LCOV_EXCL_START */
 EXPORT_API Evas_Object *minicontrol_viewer_image_object_get(
                const Evas_Object *obj)
 {
        return elm_plug_image_object_get(obj);
 }
+/* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 EXPORT_API int minicontrol_viewer_request(const char *minicontrol_name,
                minicontrol_request_e request, int value)
 {
@@ -257,4 +272,5 @@ EXPORT_API int minicontrol_viewer_request(const char *minicontrol_name,
 
        return MINICONTROL_ERROR_NONE;
 }
+/* LCOV_EXCL_STOP */