Add coverage comment 48/62448/8 accepted/tizen/common/20160317.160911 accepted/tizen/ivi/20160317.120150 accepted/tizen/mobile/20160317.120052 accepted/tizen/tv/20160317.120116 accepted/tizen/wearable/20160317.120128 submit/tizen/20160317.052726
authorJiwan Kim <ji-wan.kim@samsung.com>
Wed, 16 Mar 2016 07:28:16 +0000 (16:28 +0900)
committerJiwan Kim <ji-wan.kim@samsung.com>
Thu, 17 Mar 2016 04:34:07 +0000 (13:34 +0900)
Change-Id: I252e9ddfb7ba3cf638b29c5c2e2790e24a8ee6c5

packaging/capi-telephony.spec
src/telephony_call.c
src/telephony_common.c
src/telephony_modem.c
src/telephony_network.c
src/telephony_sim.c
test/test_all_api.c

index 44300419526f75f65c35d23b1f56eb1968f11ab1..a98e4f11a4bcddd35b5d2c17a7be93e93ea4d3db 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-telephony
 Summary:    Telephony Core API
-Version:    0.1.59
+Version:    0.1.60
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0
index 1d01bba9e9d3e0b286d1a631c0544345ff106ec2..8a98a69d4441cb5e4c0f1f1a16a1e979bf99c3d7 100644 (file)
@@ -27,6 +27,7 @@
 #include "telephony_call.h"
 #include "telephony_private.h"
 
+/* LCOV_EXCL_START */
 static void _mapping_call_state(TelCallStates_t tapi_call_state, telephony_call_state_e *call_state)
 {
        switch (tapi_call_state) {
@@ -127,6 +128,7 @@ static void _get_call_status_cb(TelCallStatus_t *status, void *user_data)
                call_info->conference_status ? "TRUE" : "FALSE");
        *list = g_slist_append(*list, call_info);
 }
+/* LCOV_EXCL_STOP */
 
 int telephony_call_get_voice_call_state(telephony_h handle, telephony_call_state_e *call_state)
 {
@@ -142,6 +144,7 @@ int telephony_call_get_voice_call_state(telephony_h handle, telephony_call_state
        *call_state = TELEPHONY_CALL_STATE_IDLE;
 
        ret = tel_get_call_status_all(tapi_h, _voice_call_get_state_cb, call_state);
+       /* LCOV_EXCL_START */
        if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                return TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -149,6 +152,7 @@ int telephony_call_get_voice_call_state(telephony_h handle, telephony_call_state
                LOGE("OPERATION_FAILED");
                return TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        LOGI("call_state: [%d]", *call_state);
 
@@ -169,6 +173,7 @@ int telephony_call_get_video_call_state(telephony_h handle, telephony_call_state
        *call_state = TELEPHONY_CALL_STATE_IDLE;
 
        ret = tel_get_call_status_all(tapi_h, _video_call_get_state_cb, call_state);
+       /* LCOV_EXCL_START */
        if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                return TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -176,6 +181,7 @@ int telephony_call_get_video_call_state(telephony_h handle, telephony_call_state
                LOGE("OPERATION_FAILED");
                return TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        LOGI("call_state: [%d]", *call_state);
 
@@ -195,12 +201,14 @@ int telephony_call_get_preferred_voice_subscription(telephony_h handle, telephon
        CHECK_INPUT_PARAMETER(call_sub);
 
        ret = tel_get_call_preferred_voice_subscription(tapi_h, &preferred_sub);
+       /* LCOV_EXCL_START */
        if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                return TELEPHONY_ERROR_PERMISSION_DENIED;
        } else if (ret != TAPI_API_SUCCESS) {
                LOGE("OPERATION_FAILED");
                return TELEPHONY_ERROR_OPERATION_FAILED;
+       /* LCOV_EXCL_STOP */
        } else {
                switch (preferred_sub) {
                case TAPI_CALL_PREFERRED_VOICE_SUBS_CURRENT_NETWORK:
@@ -240,6 +248,7 @@ int telephony_call_get_call_list(telephony_h handle,
        CHECK_INPUT_PARAMETER(count);
 
        ret = tel_get_call_status_all(tapi_h, _get_call_status_cb, &list);
+       /* LCOV_EXCL_START */
        if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                return TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -247,8 +256,10 @@ int telephony_call_get_call_list(telephony_h handle,
                LOGE("OPERATION_FAILED");
                return TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        if (g_slist_length(list)) {
+               /* LCOV_EXCL_START */
                *count = g_slist_length(list);
                *call_list = g_malloc0(*count * sizeof(telephony_call_h));
 
@@ -261,6 +272,7 @@ int telephony_call_get_call_list(telephony_h handle,
                        call_index++;
                }
                g_slist_free(list);
+               /* LCOV_EXCL_STOP */
        } else {
                *count = 0;
                *call_list = NULL;
@@ -271,6 +283,7 @@ int telephony_call_get_call_list(telephony_h handle,
 
 int telephony_call_release_call_list(unsigned int count, telephony_call_h **call_list)
 {
+       /* LCOV_EXCL_START */
        int i;
        CHECK_TELEPHONY_SUPPORTED(TELEPHONY_FEATURE);
        CHECK_INPUT_PARAMETER(call_list);
@@ -282,67 +295,80 @@ int telephony_call_release_call_list(unsigned int count, telephony_call_h **call
        }
 
        return TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_STOP */
 }
 
 int telephony_call_get_handle_id(telephony_call_h call_handle, unsigned int *handle_id)
 {
+       /* LCOV_EXCL_START */
        CHECK_TELEPHONY_SUPPORTED(TELEPHONY_FEATURE);
        CHECK_INPUT_PARAMETER(call_handle);
        CHECK_INPUT_PARAMETER(handle_id);
 
        *handle_id = ((telephony_call_info_s *)call_handle)->id;
        return TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_STOP */
 }
 
 int telephony_call_get_number(telephony_call_h call_handle, char **number)
 {
+       /* LCOV_EXCL_START */
        CHECK_TELEPHONY_SUPPORTED(TELEPHONY_FEATURE);
        CHECK_INPUT_PARAMETER(call_handle);
        CHECK_INPUT_PARAMETER(number);
 
        *number = strdup(((telephony_call_info_s *)call_handle)->number);
        return TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_STOP */
 }
 
 int telephony_call_get_type(telephony_call_h call_handle,
        telephony_call_type_e *type)
 {
+       /* LCOV_EXCL_START */
        CHECK_TELEPHONY_SUPPORTED(TELEPHONY_FEATURE);
        CHECK_INPUT_PARAMETER(call_handle);
        CHECK_INPUT_PARAMETER(type);
 
        *type = ((telephony_call_info_s *)call_handle)->type;
        return TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_STOP */
 }
 
 int telephony_call_get_status(telephony_call_h call_handle,
        telephony_call_status_e *status)
 {
+       /* LCOV_EXCL_START */
        CHECK_TELEPHONY_SUPPORTED(TELEPHONY_FEATURE);
        CHECK_INPUT_PARAMETER(call_handle);
        CHECK_INPUT_PARAMETER(status);
 
        *status = ((telephony_call_info_s *)call_handle)->status;
        return TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_STOP */
 }
 
 int telephony_call_get_direction(telephony_call_h call_handle,
        telephony_call_direction_e *direction)
 {
+       /* LCOV_EXCL_START */
        CHECK_TELEPHONY_SUPPORTED(TELEPHONY_FEATURE);
        CHECK_INPUT_PARAMETER(call_handle);
        CHECK_INPUT_PARAMETER(direction);
 
        *direction = ((telephony_call_info_s *)call_handle)->direction;
        return TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_STOP */
 }
 
 int telephony_call_get_conference_status(telephony_call_h call_handle, bool *conference_status)
 {
+       /* LCOV_EXCL_START */
        CHECK_TELEPHONY_SUPPORTED(TELEPHONY_FEATURE);
        CHECK_INPUT_PARAMETER(call_handle);
        CHECK_INPUT_PARAMETER(conference_status);
 
        *conference_status = ((telephony_call_info_s *)call_handle)->conference_status;
        return TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_STOP */
 }
index b80d6b773b6cc0491639d1d1625c50574d6fe57a..4a53dfaad6553c78ee82f1aa539ea4dfff2aaa1a 100644 (file)
@@ -137,7 +137,7 @@ static const char *_mapping_noti_id(telephony_noti_e noti_id)
                return NULL;
        }
 }
-
+/* LCOV_EXCL_START */
 static int _mapping_sim_status(TelSimCardStatus_t tapi_sim_status)
 {
        int sim_status;
@@ -192,6 +192,7 @@ static int _mapping_service_state(int tapi_service_type)
 
        return service_state;
 }
+/* LCOV_EXCL_STOP */
 
 static telephony_error_e __deregister_all_noti(telephony_h handle, telephony_noti_e noti_id)
 {
@@ -250,6 +251,7 @@ static void _deregister_noti(gpointer data)
        }
 }
 
+/* LCOV_EXCL_START */
 static void on_signal_callback(TapiHandle *tapi_h, const char *evt_id,
        void *data, void *user_data)
 {
@@ -353,6 +355,7 @@ static void on_signal_callback(TapiHandle *tapi_h, const char *evt_id,
                LOGE("Unhandled noti: [%s]", evt_id);
        }
 }
+/* LCOV_EXCL_STOP */
 
 int telephony_set_noti_cb(telephony_h handle,
        telephony_noti_e noti_id, telephony_noti_cb cb, void *user_data)
@@ -485,6 +488,7 @@ int telephony_init(telephony_handle_list_s *list)
                tmp->evt_list = NULL;
                tmp->tapi_h = tel_init(cp_list[i]);
                if (tmp->tapi_h == NULL) {
+                       /* LCOV_EXCL_START */
                        int j = 0;
                        LOGE("handle is NULL");
                        for (; j < i; j++) {
@@ -500,6 +504,7 @@ int telephony_init(telephony_handle_list_s *list)
                        list->count = 0;
                        g_strfreev(cp_list);
                        return TELEPHONY_ERROR_OPERATION_FAILED;
+                       /* LCOV_EXCL_STOP */
                }
                list->handle[i] = (telephony_h)tmp;
        }
index 73bfb90145c5fe013f4657823f099c73cb8c140f..d396447f9b069acfd902a554ddbd89e6186dfef5 100644 (file)
@@ -61,6 +61,7 @@ int telephony_modem_get_imei(telephony_h handle, char **imei)
                }
                g_variant_unref(gv);
        } else {
+               /* LCOV_EXCL_START */
                LOGE("g_dbus_conn failed. error (%s)", gerr->message);
                if (strstr(gerr->message, "AccessDenied")) {
                        LOGE("PERMISSION_DENIED");
@@ -70,6 +71,7 @@ int telephony_modem_get_imei(telephony_h handle, char **imei)
                        error = TELEPHONY_ERROR_OPERATION_FAILED;
                }
                g_error_free(gerr);
+               /* LCOV_EXCL_STOP */
        }
 
        return error;
@@ -89,12 +91,14 @@ int telephony_modem_get_power_status(telephony_h handle,
        CHECK_INPUT_PARAMETER(status);
 
        ret = tel_check_modem_power_status(tapi_h, &modem_status);
+       /* LCOV_EXCL_START */
        if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                return TELEPHONY_ERROR_PERMISSION_DENIED;
        } else if (ret != TAPI_API_SUCCESS) {
                LOGE("OPERATION_FAILED");
                return TELEPHONY_ERROR_OPERATION_FAILED;
+       /* LCOV_EXCL_STOP */
        } else {
                switch (modem_status) {
                case TAPI_PHONE_POWER_STATUS_ON:
@@ -123,6 +127,7 @@ int telephony_modem_get_power_status(telephony_h handle,
 
 }
 
+/* LCOV_EXCL_START */
 int telephony_modem_get_meid(telephony_h handle, char **meid)
 {
        int ret = TELEPHONY_ERROR_NONE;
@@ -174,3 +179,4 @@ int telephony_modem_get_meid(telephony_h handle, char **meid)
 
        return ret;
 }
+/* LCOV_EXCL_STOP */
index eeb0803e4c271f7c00dd7d626681835810c4549d..8f1c662ed46e62ce984d9f539a58d951d1114a03 100644 (file)
@@ -49,6 +49,7 @@ int telephony_network_get_lac(telephony_h handle, int *lac)
        if (dbus_result) {
                g_variant_get(dbus_result, "(i)", lac);
                g_variant_unref(dbus_result);
+       /* LCOV_EXCL_START */
        } else {
                LOGE("g_dbus_connection_call_sync() failed. (%s)", error->message);
                if (strstr(error->message, "AccessDenied")) {
@@ -60,6 +61,7 @@ int telephony_network_get_lac(telephony_h handle, int *lac)
                }
                g_error_free(error);
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -85,6 +87,7 @@ int telephony_network_get_cell_id(telephony_h handle, int *cell_id)
                g_variant_get(dbus_result, "(i)", cell_id);
                g_variant_unref(dbus_result);
        } else {
+               /* LCOV_EXCL_START */
                LOGE("g_dbus_connection_call_sync() failed. (%s)", error->message);
                if (strstr(error->message, "AccessDenied")) {
                        LOGE("PERMISSION_DENIED");
@@ -94,6 +97,7 @@ int telephony_network_get_cell_id(telephony_h handle, int *cell_id)
                        ret = TELEPHONY_ERROR_OPERATION_FAILED;
                }
                g_error_free(error);
+               /* LCOV_EXCL_STOP */
        }
 
        return ret;
@@ -114,6 +118,7 @@ int telephony_network_get_rssi(telephony_h handle, telephony_network_rssi_e *rss
        if (ret == TAPI_API_SUCCESS) {
                LOGI("rssi:[%d]", *rssi);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -121,6 +126,7 @@ int telephony_network_get_rssi(telephony_h handle, telephony_network_rssi_e *rss
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -145,6 +151,7 @@ int telephony_network_get_roaming_status(telephony_h handle, bool *status)
                        *status = false;
                LOGI("status:[%d]", *status);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -152,6 +159,7 @@ int telephony_network_get_roaming_status(telephony_h handle, bool *status)
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -183,6 +191,7 @@ int telephony_network_get_mcc(telephony_h handle, char **mcc)
                        *mcc = strdup("");
                }
                LOGI("MCC: [%s]", *mcc);
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -190,6 +199,7 @@ int telephony_network_get_mcc(telephony_h handle, char **mcc)
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -224,6 +234,7 @@ int telephony_network_get_mnc(telephony_h handle, char **mnc)
                        *mnc = strdup("");
                }
                LOGI("MNC: [%s]", *mnc);
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -231,6 +242,7 @@ int telephony_network_get_mnc(telephony_h handle, char **mnc)
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -250,6 +262,7 @@ int telephony_network_get_network_name(telephony_h handle, char **network_name)
        if (ret == TAPI_API_SUCCESS) {
                LOGI("network_name:[%s]", *network_name);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -257,6 +270,7 @@ int telephony_network_get_network_name(telephony_h handle, char **network_name)
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -292,6 +306,7 @@ int telephony_network_get_network_name_option(telephony_h handle, telephony_netw
 
                LOGI("network_name_option:[%d]", *network_name_option);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -299,6 +314,7 @@ int telephony_network_get_network_name_option(telephony_h handle, telephony_netw
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -372,6 +388,7 @@ int telephony_network_get_type(telephony_h handle, telephony_network_type_e *net
 
                LOGI("network_type:[%d]", *network_type);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -379,6 +396,7 @@ int telephony_network_get_type(telephony_h handle, telephony_network_type_e *net
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -417,6 +435,7 @@ int telephony_network_get_ps_type(telephony_h handle, telephony_network_ps_type_
 
                LOGI("ps_type:[%d]", *ps_type);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -424,6 +443,7 @@ int telephony_network_get_ps_type(telephony_h handle, telephony_network_ps_type_
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -457,6 +477,7 @@ int telephony_network_get_service_state(telephony_h handle, telephony_network_se
                }
                LOGI("network_service_state:[%d]", *network_service_state);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -464,6 +485,7 @@ int telephony_network_get_service_state(telephony_h handle, telephony_network_se
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -497,6 +519,7 @@ int telephony_network_get_default_data_subscription(telephony_h handle,
                }
                LOGI("default data subscription: [%d]", *default_data_sub);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -504,6 +527,7 @@ int telephony_network_get_default_data_subscription(telephony_h handle,
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
@@ -537,6 +561,7 @@ int telephony_network_get_default_subscription(telephony_h handle,
                }
                LOGI("default subscription: [%d]", *default_sub);
                ret = TELEPHONY_ERROR_NONE;
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                ret = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -544,10 +569,12 @@ int telephony_network_get_default_subscription(telephony_h handle,
                LOGE("OPERATION_FAILED");
                ret = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return ret;
 }
 
+/* LCOV_EXCL_START */
 int telephony_network_get_selection_mode(telephony_h handle, telephony_network_selection_mode_e *mode)
 {
        int ret = TELEPHONY_ERROR_OPERATION_FAILED;
@@ -798,3 +825,4 @@ int telephony_network_get_base_station_longitude(telephony_h handle, int *bs_lon
 
        return ret;
 }
+/* LCOV_EXCL_STOP */
index 3763eab1bb566aa556e1e28d672af5301c1f18e6..3de01abac7717fe821389f853a19be59340b42a0 100644 (file)
@@ -51,6 +51,7 @@
        } \
 }
 
+/* LCOV_EXCL_START */
 static telephony_error_e _convert_dbus_errmsg_to_sim_error(gchar *err_msg)
 {
        telephony_error_e ret = TELEPHONY_ERROR_OPERATION_FAILED;
@@ -82,6 +83,7 @@ static telephony_error_e _convert_dbus_errmsg_to_sim_error(gchar *err_msg)
 
        return ret;
 }
+/* LCOV_EXCL_STOP */
 
 int telephony_sim_get_icc_id(telephony_h handle, char **icc_id)
 {
@@ -126,9 +128,11 @@ int telephony_sim_get_icc_id(telephony_h handle, char **icc_id)
                        g_free(iccid);
                        g_variant_unref(sync_gv);
                } else {
+                       /* LCOV_EXCL_START */
                        LOGE("g_dbus_conn failed. error (%s)", gerr->message);
                        error_code = _convert_dbus_errmsg_to_sim_error(gerr->message);
                        g_error_free(gerr);
+                       /* LCOV_EXCL_STOP */
                }
        }
 
@@ -158,6 +162,7 @@ int telephony_sim_get_operator(telephony_h handle, char **sim_operator)
                        *sim_operator = malloc(len + 1);
                        snprintf(*sim_operator, len + 1, "%s%s", sim_imsi_info.szMcc, sim_imsi_info.szMnc);
                        LOGI("SIM operator: [%s]", *sim_operator);
+               /* LCOV_EXCL_START */
                } else if (ret == TAPI_API_ACCESS_DENIED) {
                        LOGE("PERMISSION_DENIED");
                        error_code = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -165,6 +170,7 @@ int telephony_sim_get_operator(telephony_h handle, char **sim_operator)
                        LOGE("OPERATION_FAILED");
                        error_code = TELEPHONY_ERROR_OPERATION_FAILED;
                }
+               /* LCOV_EXCL_STOP */
        }
 
        return error_code;
@@ -190,6 +196,7 @@ int telephony_sim_get_msin(telephony_h handle, char **msin)
                int ret = tel_get_sim_imsi(tapi_h, &sim_imsi_info);
                if (ret == TAPI_API_SUCCESS) {
                        *msin = strdup(sim_imsi_info.szMsin);
+               /* LCOV_EXCL_START */
                } else if (ret == TAPI_API_ACCESS_DENIED) {
                        LOGE("PERMISSION_DENIED");
                        error_code = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -197,6 +204,7 @@ int telephony_sim_get_msin(telephony_h handle, char **msin)
                        LOGE("OPERATION_FAILED");
                        error_code = TELEPHONY_ERROR_OPERATION_FAILED;
                }
+               /* LCOV_EXCL_STOP */
        }
 
        return error_code;
@@ -247,9 +255,11 @@ int telephony_sim_get_spn(telephony_h handle, char **spn)
                        g_free(spn_str);
                        g_variant_unref(sync_gv);
                } else {
+                       /* LCOV_EXCL_START */
                        LOGE("g_dbus_conn failed. error (%s)", gerr->message);
                        error_code = _convert_dbus_errmsg_to_sim_error(gerr->message);
                        g_error_free(gerr);
+                       /* LCOV_EXCL_STOP */
                }
        }
 
@@ -278,6 +288,7 @@ int telephony_sim_is_changed(telephony_h handle, bool *is_changed)
                        LOGE("NOT_AVAILABLE");
                        error_code = TELEPHONY_ERROR_SIM_NOT_AVAILABLE;
                }
+       /* LCOV_EXCL_START */
        } else if (ret == TAPI_API_ACCESS_DENIED) {
                LOGE("PERMISSION_DENIED");
                error_code = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -285,6 +296,7 @@ int telephony_sim_is_changed(telephony_h handle, bool *is_changed)
                LOGE("OPERATION_FAILED");
                error_code = TELEPHONY_ERROR_OPERATION_FAILED;
        }
+       /* LCOV_EXCL_STOP */
 
        return error_code;
 }
@@ -353,6 +365,7 @@ int telephony_sim_get_application_list(telephony_h handle, unsigned int *app_lis
                if (ret == TAPI_API_SUCCESS) {
                        *app_list = (unsigned int)tapi_app_list;
                        LOGI("SIM Application List: [0x%x]", *app_list);
+               /* LCOV_EXCL_START */
                } else if (ret == TAPI_API_ACCESS_DENIED) {
                        LOGE("PERMISSION_DENIED");
                        error_code = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -360,6 +373,7 @@ int telephony_sim_get_application_list(telephony_h handle, unsigned int *app_lis
                        LOGE("OPERATION_FAILED");
                        error_code = TELEPHONY_ERROR_OPERATION_FAILED;
                }
+               /* LCOV_EXCL_STOP */
        }
 
        return error_code;
@@ -412,9 +426,11 @@ int telephony_sim_get_subscriber_number(telephony_h handle, char **subscriber_nu
                g_variant_iter_free(iter);
                g_variant_unref(sync_gv);
        } else {
+               /* LCOV_EXCL_START */
                LOGE("g_dbus_conn failed. error (%s)", gerr->message);
                error_code = _convert_dbus_errmsg_to_sim_error(gerr->message);
                g_error_free(gerr);
+               /* LCOV_EXCL_STOP */
        }
 
        return error_code;
@@ -456,6 +472,7 @@ int telephony_sim_get_subscriber_id(telephony_h handle, char **subscriber_id)
                                snprintf(*subscriber_id + (i * 2), 3,  "%02x", md[i]);
                        LOGI("Subscriber ID: [%s]", *subscriber_id);
                        g_free(imsi);
+               /* LCOV_EXCL_START */
                } else if (error_code == TAPI_API_ACCESS_DENIED) {
                        LOGE("get_subscriber_id: PERMISSION_DENIED");
                        error_code = TELEPHONY_ERROR_PERMISSION_DENIED;
@@ -463,11 +480,13 @@ int telephony_sim_get_subscriber_id(telephony_h handle, char **subscriber_id)
                        LOGE("get_subscriber_id: OPERATION_FAILED");
                        error_code = TELEPHONY_ERROR_OPERATION_FAILED;
                }
+               /* LCOV_EXCL_STOP */
        }
 
        return error_code;
 }
 
+/* LCOV_EXCL_START */
 int telephony_sim_get_lock_state(telephony_h handle, telephony_sim_lock_state_e *lock_state)
 {
        TelSimCardStatus_t sim_card_state;
@@ -599,3 +618,4 @@ int telephony_sim_get_call_forwarding_indicator_state(telephony_h handle, bool *
 
        return error_code;
 }
+/* LCOV_EXCL_STOP */
index 94f4d6bf5e1d069ec0d35a1ffff011fdf64fa866..ed231c21ee122f059cdd00a413fd9efbc978987d 100644 (file)
@@ -480,11 +480,10 @@ int main()
        }
 
        ret_value = telephony_sim_get_lock_state(handle_list.handle[0], &lock_state);
-       if (ret_value != TELEPHONY_ERROR_NONE) {
+       if (ret_value != TELEPHONY_ERROR_NONE)
                LOGE("telephony_sim_get_lock_state() failed!!! [%d]", ret_value);
-       } else {
+       else
                LOGI("Lock state is [%d]", lock_state);
-       }
 
        ret_value = telephony_sim_get_group_id1(handle_list.handle[0], &gid1);
        if (ret_value != TELEPHONY_ERROR_NONE) {
@@ -495,11 +494,10 @@ int main()
        }
 
        ret_value = telephony_sim_get_call_forwarding_indicator_state(handle_list.handle[0], &cf_state);
-       if (ret_value != TELEPHONY_ERROR_NONE) {
+       if (ret_value != TELEPHONY_ERROR_NONE)
                LOGE("telephony_sim_get_call_forwarding_indicator_state() failed!!! [%d]", ret_value);
-       } else {
+       else
                LOGI("Call forwarding indicator state is [%s]", cf_state ? "ON" : "OFF");
-       }
 
        /* Network API */
        ret_value = telephony_network_get_cell_id(handle_list.handle[0], &cell_id);