summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintae, jeon <intae.jeon@samsung.com>2016-12-06 11:24:17 +0900
committerintae jeon <intae.jeon@samsung.com>2017-01-12 16:47:56 -0800
commit3852653d36e0f5cc8c99ae0880376174540b5a60 (patch)
tree7a330a27b2b7d29949df19593b2a2770df62a236
parent5e31cdc364039ec52449d8343a7d91409c0a060b (diff)
downloademail-service-3852653d36e0f5cc8c99ae0880376174540b5a60.tar.gz
email-service-3852653d36e0f5cc8c99ae0880376174540b5a60.tar.bz2
email-service-3852653d36e0f5cc8c99ae0880376174540b5a60.zip
add excluding coverage
Change-Id: I38f6a7e98d55ec52f76e4cc65adfb8b389c8be19 Signed-off-by: intae, jeon <intae.jeon@samsung.com> (cherry picked from commit e64dbcf781fcd01a9938b29b83bf41b5a205da49)
-rwxr-xr-xemail-api/email-api-account.c114
-rw-r--r--[-rwxr-xr-x]email-api/email-api-etc.c14
-rw-r--r--[-rwxr-xr-x]email-api/email-api-init.c9
-rw-r--r--[-rwxr-xr-x]email-api/email-api-mail.c181
-rw-r--r--[-rwxr-xr-x]email-api/email-api-mailbox.c74
-rw-r--r--[-rwxr-xr-x]email-api/email-api-network.c102
-rw-r--r--[-rwxr-xr-x]email-api/email-api-rule.c10
-rw-r--r--[-rwxr-xr-x]email-common-use/include/email-debug-log.h18
8 files changed, 497 insertions, 25 deletions
diff --git a/email-api/email-api-account.c b/email-api/email-api-account.c
index 1c63a46..b7af867 100755
--- a/email-api/email-api-account.c
+++ b/email-api/email-api-account.c
@@ -52,55 +52,87 @@ EXPORT_API int email_add_account(email_account_t* account)
HIPC_API hAPI = NULL;
if (account == NULL || account->user_email_address == NULL || account->incoming_server_user_name == NULL || account->incoming_server_address == NULL ||
+
account->outgoing_server_user_name == NULL || account->outgoing_server_address == NULL) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("EMAIL_ERROR_INVALID_PARAM");
return EMAIL_ERROR_INVALID_PARAM;
+
+ /* LCOV_EXCL_STOP */
}
if ((err = emipc_get_user_name(&multi_user_name)) != EMAIL_ERROR_NONE) {
- EM_DEBUG_EXCEPTION("emipc_get_user_name failed : [%d]", err);
+
+ /* LCOV_EXCL_START */
+ EM_DEBUG_EXCEPTION("emipc_get_user_name failed : [%d]", err);
goto FINISH_OFF;
+
+ /* LCOV_EXCL_STOP */
}
if (!emstorage_check_duplicated_account(multi_user_name, account, true, &err)) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emstorage_check_duplicated_account failed (%d) ", err);
goto FINISH_OFF;
+
+ /* LCOV_EXCL_STOP */
}
/* composing account information to be added */
hAPI = emipc_create_email_api(_EMAIL_API_ADD_ACCOUNT);
if (hAPI == NULL) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+
+ /* LCOV_EXCL_STOP */
}
local_account_stream = em_convert_account_to_byte_stream(account, &size);
if (local_account_stream == NULL) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_convert_account_to_byte_stream failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, local_account_stream, size)) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+
+ /* LCOV_EXCL_STOP */
}
EM_DEBUG_LOG("APPID[%d], APIID [%d]", emipc_get_app_id(hAPI), emipc_get_api_id(hAPI));
/* passing account information to service */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+
+ /* LCOV_EXCL_STOP */
}
/* get result from service */
if ((ret_from_ipc = emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err)) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_get_parameter failed [%d]", ret_from_ipc);
err = ret_from_ipc;
goto FINISH_OFF;
+
+ /* LCOV_EXCL_STOP */
}
if (err == EMAIL_ERROR_NONE) {
@@ -184,18 +216,24 @@ EXPORT_API int email_delete_account(int account_id)
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter account_id failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &ret);
if (ret != EMAIL_ERROR_NONE) { /* get error code */
+ /* LCOV_EXCL_START */
emipc_get_parameter(hAPI, ePARAMETER_OUT, 1, sizeof(int), &err);
+ /* LCOV_EXCL_STOP */
}
emipc_destroy_email_api(hAPI);
@@ -245,8 +283,10 @@ EXPORT_API int email_update_account(int account_id, email_account_t* new_account
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -282,28 +322,36 @@ EXPORT_API int email_update_account_with_validation(int account_id, email_accoun
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("email_update_account--emipc_add_parameter account_id failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* new_account */
new_account_stream = em_convert_account_to_byte_stream(new_account, &size);
EM_PROXY_IF_NULL_RETURN_VALUE(new_account_stream, hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, new_account_stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("email_update_account--emipc_add_parameter new_account failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* with_validation */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&with_validation, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("email_update_account--emipc_add_parameter with_validation failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("email_update_account--emipc_execute_proxy_api failed ");
/* Prevent defect 18624 */
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -396,9 +444,11 @@ EXPORT_API int email_get_account_list(email_account_t** account_list, int* count
if (temp_account_tbl && (*count) > 0) {
*account_list = em_malloc(sizeof(email_account_t) * (*count));
if (!*account_list) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("allocation failed [%d]", err);
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
memset((void*)*account_list, 0, sizeof(email_account_t) * (*count));
@@ -436,13 +486,17 @@ EXPORT_API int email_validate_account(int account_id, int *handle)
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_execute_proxy_api failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &ret); /* return */
@@ -481,13 +535,17 @@ EXPORT_API int email_validate_account_ex(email_account_t* account, int *handle)
local_account_stream = em_convert_account_to_byte_stream(account, &size);
EM_PROXY_IF_NULL_RETURN_VALUE(local_account_stream, hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, local_account_stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_execute_proxy_api failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &ret);
@@ -542,21 +600,27 @@ EXPORT_API int email_add_account_with_validation(email_account_t* account, int *
local_account_stream = em_convert_account_to_byte_stream(account, &size);
if (local_account_stream == NULL) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_convert_account_to_byte_stream failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, local_account_stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter failed ");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_execute_proxy_api failed ");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &ret);
@@ -581,7 +645,7 @@ FINISH_OFF:
return err;
}
-
+/* LCOV_EXCL_START */
EXPORT_API int email_backup_accounts_into_secure_storage(const char *file_name)
{
EM_DEBUG_API_BEGIN("file_name[%p]", file_name);
@@ -676,6 +740,7 @@ EXPORT_API int email_restore_accounts_from_secure_storage(const char * file_name
return err;
}
+/* LCOV_EXCL_STOP */
EXPORT_API int email_get_password_length_of_account(int account_id, email_get_password_length_type password_type, int *password_length)
{
EM_DEBUG_API_BEGIN("account_id[%d] password_length[%p]", account_id, password_length);
@@ -694,19 +759,27 @@ EXPORT_API int email_get_password_length_of_account(int account_id, email_get_pa
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* password type */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&password_type, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_execute_proxy_api failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &ret);
@@ -737,32 +810,48 @@ EXPORT_API int email_update_notification_bar(int account_id, int total_mail_coun
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
+
/* total_mail_count */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&total_mail_count, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* unread_mail_count */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&unread_mail_count, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* input_from_eas */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_from_eas, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_execute_proxy_api failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -785,13 +874,19 @@ EXPORT_API int email_clear_all_notification_bar()
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_execute_proxy_api failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -818,13 +913,19 @@ EXPORT_API int email_clear_notification_bar(int account_id)
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_execute_proxy_api failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -850,13 +951,19 @@ EXPORT_API int email_save_default_account_id(int input_account_id)
/* Input account ID */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char *)&input_account_id, sizeof(int))) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter input_account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -880,8 +987,11 @@ EXPORT_API int email_load_default_account_id(int *output_account_id)
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
diff --git a/email-api/email-api-etc.c b/email-api/email-api-etc.c
index c86640e..baa66a9 100755..100644
--- a/email-api/email-api-etc.c
+++ b/email-api/email-api-etc.c
@@ -52,25 +52,33 @@ EXPORT_API int email_show_user_message(int id, email_action_t action, int error_
/* id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_LOG("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* action */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&action, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_LOG("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* error_code */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&error_code, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_LOG("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_execute_proxy_api(hAPI)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_LOG("ipcProxy_ExecuteAsyncAPI failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -115,22 +123,28 @@ EXPORT_API int email_write_mime_file(email_mail_data_t *input_mail_data,
hAPI = emipc_create_email_api(_EMAIL_API_WRITE_MIME_FILE);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_execute_proxy_api(hAPI)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if ((ret_from_ipc = emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err)) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_get_parameter failed:[%d]", ret_from_ipc);
err = ret_from_ipc;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emcore_make_rfc822_file(NULL, input_mail_data, input_attachment_data, input_attachment_count, false,
diff --git a/email-api/email-api-init.c b/email-api/email-api-init.c
index bd16579..79d2e73 100755..100644
--- a/email-api/email-api-init.c
+++ b/email-api/email-api-init.c
@@ -118,8 +118,7 @@ EXPORT_API int email_service_end(void)
}
/* API - Exposed to External Application- core team.Creates all Email DB tables [ EXTERNAL] */
-
-
+/* LCOV_EXCL_START */
EXPORT_API int email_init_storage(void)
{
EM_DEBUG_API_BEGIN();
@@ -140,7 +139,7 @@ EXPORT_API int email_init_storage(void)
EM_DEBUG_API_END("error[%d]", error);
return error;
}
-
+/* LCOV_EXCL_STOP */
EXPORT_API int email_ping_service(void)
{
EM_DEBUG_API_BEGIN();
@@ -150,8 +149,12 @@ EXPORT_API int email_ping_service(void)
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &error);
diff --git a/email-api/email-api-mail.c b/email-api/email-api-mail.c
index b6ea750..ffcf793 100755..100644
--- a/email-api/email-api-mail.c
+++ b/email-api/email-api-mail.c
@@ -84,11 +84,12 @@ EXPORT_API int email_add_mail(email_mail_data_t *input_mail_data, email_attachme
if (input_from_eas == 0) { /* native emails */
if ((input_mail_data->smime_type != EMAIL_SMIME_NONE) && (input_mail_data->mailbox_type != EMAIL_MAILBOX_TYPE_DRAFT)) {
+ /* LCOV_EXCL_START */
if (!emcore_make_rfc822_file(multi_user_name, input_mail_data, input_attachment_data_list, input_attachment_count, true, &rfc822_file, &err)) {
EM_DEBUG_EXCEPTION("emcore_make_rfc822_file failed [%d]", err);
goto FINISH_OFF;
}
-
+ /* LCOV_EXCL_STOP */
input_mail_data->file_path_mime_entity = EM_SAFE_STRDUP(emcore_set_mime_entity(rfc822_file));
emstorage_delete_file(rfc822_file, NULL);
@@ -98,18 +99,22 @@ EXPORT_API int email_add_mail(email_mail_data_t *input_mail_data, email_attachme
hAPI = emipc_create_email_api(_EMAIL_API_ADD_MAIL);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* email_mail_data_t */
mail_data_stream = em_convert_mail_data_to_byte_stream(input_mail_data, &size);
if (!mail_data_stream) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_convert_mail_data_to_byte_stream failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, mail_data_stream, size))
@@ -119,9 +124,11 @@ EXPORT_API int email_add_mail(email_mail_data_t *input_mail_data, email_attachme
attachment_data_list_stream = em_convert_attachment_data_to_byte_stream(input_attachment_data_list, input_attachment_count, &size);
if ((size > 0) && !emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, attachment_data_list_stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_dynamic_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* email_meeting_request_t */
@@ -129,9 +136,11 @@ EXPORT_API int email_add_mail(email_mail_data_t *input_mail_data, email_attachme
meeting_request_stream = em_convert_meeting_req_to_byte_stream(input_meeting_request, &size);
if (!meeting_request_stream) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_convert_meeting_req_to_byte_stream failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, meeting_request_stream, size))
@@ -143,9 +152,11 @@ EXPORT_API int email_add_mail(email_mail_data_t *input_mail_data, email_attachme
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* get result from service */
@@ -168,14 +179,18 @@ EXPORT_API int email_add_mail(email_mail_data_t *input_mail_data, email_attachme
}
}
} else {
+ /* LCOV_EXCL_START */
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
} else { /* take care of mails from eas */
+ /* LCOV_EXCL_START */
err = emcore_add_mail(multi_user_name, input_mail_data, input_attachment_data_list, input_attachment_count, input_meeting_request, input_from_eas, false);
if (err != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("emcore_add_mail failed [%d]", err);
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
}
@@ -202,14 +217,18 @@ EXPORT_API int email_add_read_receipt(int input_read_mail_id, int *output_receip
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_read_mail_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("Add Param mail body Fail");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -275,7 +294,7 @@ EXPORT_API int email_create_db_full()
EM_DEBUG_EXCEPTION("email_get_mailbox_list_ex failed [%d]", err);
goto FINISH_OFF;
}
-
+ /* LCOV_EXCL_START */
for (mailbox_index = 0; mailbox_index < mailbox_count; mailbox_index++) {
mail_slot_size = mailbox_list[mailbox_index].mail_slot_size;
for (mail_index = 0; mail_index < mail_slot_size; mail_index++) {
@@ -289,7 +308,7 @@ EXPORT_API int email_create_db_full()
}
}
}
-
+ /* LCOV_EXCL_STOP */
FINISH_OFF:
if ((err = email_close_db()) != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("email_close_db failed [%d]", err);
@@ -332,24 +351,30 @@ EXPORT_API int email_update_mail(email_mail_data_t *input_mail_data, email_attac
hAPI = emipc_create_email_api(_EMAIL_API_UPDATE_MAIL);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* email_mail_data_t */
mail_data_stream = em_convert_mail_data_to_byte_stream(input_mail_data, &size);
if (!mail_data_stream) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_convert_mail_data_to_byte_stream failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, mail_data_stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter for head failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* email_attachment_data_t */
@@ -362,6 +387,7 @@ EXPORT_API int email_update_mail(email_mail_data_t *input_mail_data, email_attac
/* email_meeting_request_t */
if (input_mail_data->meeting_request_status != EMAIL_MAIL_TYPE_NORMAL) {
+ /* LCOV_EXCL_START */
meeting_request_stream = em_convert_meeting_req_to_byte_stream(input_meeting_request, &size);
if (!meeting_request_stream) {
@@ -375,20 +401,24 @@ EXPORT_API int email_update_mail(email_mail_data_t *input_mail_data, email_attac
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
}
- }
+ }/* LCOV_EXCL_STOP */
/* input_from_eas */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_from_eas, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -454,7 +484,7 @@ FINISH_OFF:
EM_DEBUG_API_END("err[%d]", err);
return err;
}
-
+/* LCOV_EXCL_START */
EXPORT_API int email_clear_mail_data()
{
EM_DEBUG_API_BEGIN();
@@ -477,6 +507,7 @@ EXPORT_API int email_clear_mail_data()
return err;
}
+/* LCOV_EXCL_STOP */
EXPORT_API int email_count_mail(email_list_filter_t *input_filter_list, int input_filter_count, int *output_total_mail_count, int *output_unseen_mail_count)
{
@@ -544,43 +575,55 @@ EXPORT_API int email_delete_mail(int input_mailbox_id, int *input_mail_ids, int
hAPI = emipc_create_email_api(_EMAIL_API_DELETE_MAIL);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* mailbox id*/
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Number of mail_ids */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_num, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* set of mail_ids */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)input_mail_ids, input_num * sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* from-server */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_from_server, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -610,27 +653,35 @@ EXPORT_API int email_delete_all_mails_in_mailbox(int input_mailbox_id, int input
hAPI = emipc_create_email_api(_EMAIL_API_DELETE_ALL_MAIL);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_from_server, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -658,31 +709,39 @@ EXPORT_API int email_add_attachment(int mail_id, email_attachment_data_t* attach
hAPI = emipc_create_email_api(_EMAIL_API_ADD_ATTACHMENT);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* mail_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&mail_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Attachment */
attchment_stream = em_convert_attachment_data_to_byte_stream(attachment, 1, &size);
if (!attchment_stream) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_convert_attachment_data_to_byte_stream failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, attchment_stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
@@ -720,23 +779,29 @@ EXPORT_API int email_delete_attachment(int attachment_id)
hAPI = emipc_create_email_api(_EMAIL_API_DELETE_ATTACHMENT);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* attachment_index */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&attachment_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -841,16 +906,20 @@ EXPORT_API int email_get_attachment_data(int attachment_id, email_attachment_dat
/* attachment_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&attachment_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -861,9 +930,11 @@ EXPORT_API int email_get_attachment_data(int attachment_id, email_attachment_dat
attchment_stream = (char*)em_malloc(nSize+1);
if (!attchment_stream) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_malloc failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 1, nSize, attchment_stream);
@@ -871,9 +942,11 @@ EXPORT_API int email_get_attachment_data(int attachment_id, email_attachment_dat
}
if (!attachment_data) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("EMAIL_ERROR_NULL_VALUE");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
*attachment = attachment_data;
@@ -1206,6 +1279,7 @@ EXPORT_API int email_get_mail_data(int input_mail_id, email_mail_data_t **output
Mail Flag API
-----------------------------------------------------------*/
+/* LCOV_EXCL_START */
EXPORT_API int email_modify_seen_flag(int *mail_ids, int num, int seen_flag, int onserver)
{
EM_DEBUG_API_BEGIN("mail_ids[%p] num[%d] seen_flag[%d] on_server[%d]", mail_ids, num, seen_flag, onserver);
@@ -1213,6 +1287,7 @@ EXPORT_API int email_modify_seen_flag(int *mail_ids, int num, int seen_flag, int
return EMAIL_ERROR_NOT_IMPLEMENTED;
}
+/* LCOV_EXCL_STOP */
EXPORT_API int email_set_flags_field(int account_id, int *mail_ids, int num, email_flags_field_type field_type, int value, int onserver)
{
EM_DEBUG_API_BEGIN("account_id[%d] mail_ids[%p] num[%d] field_type[%d] seen_flag[%d] on_server[%d]", account_id, mail_ids, num, field_type, value, onserver);
@@ -1222,65 +1297,83 @@ EXPORT_API int email_set_flags_field(int account_id, int *mail_ids, int num, ema
EM_IF_NULL_RETURN_VALUE(mail_ids, EMAIL_ERROR_INVALID_PARAM);
if (account_id == 0 || num <= 0 || (onserver != 0 && onserver != 1)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("EMAIL_ERROR_INVALID_PARAM");
return EMAIL_ERROR_INVALID_PARAM;
+ /* LCOV_EXCL_STOP */
}
HIPC_API hAPI = emipc_create_email_api(_EMAIL_API_SET_FLAGS_FIELD);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* account_id*/
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Number of mail_ids */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&num, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* set of mail_ids */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)mail_ids, num * sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* field_type */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&field_type, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* value */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&value, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* onserver */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &(onserver), sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1320,37 +1413,47 @@ EXPORT_API int email_move_mail_to_mailbox(int *mail_ids, int num, int input_targ
hAPI = emipc_create_email_api(_EMAIL_API_MOVE_MAIL);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Number of mail_ids */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&num, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* set of mail_ids */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)mail_ids, num * sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* input_target_mailbox_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_target_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1380,30 +1483,38 @@ EXPORT_API int email_move_all_mails_to_mailbox(int input_source_mailbox_id, int
hAPI = emipc_create_email_api(_EMAIL_API_MOVE_ALL_MAIL);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* input_source_mailbox_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_source_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* input_target_mailbox_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_target_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1486,15 +1597,17 @@ EXPORT_API int email_cancel_sending_mail(int mail_id)
/* check account bind type and branch off */
if (em_get_account_server_type_by_account_id(multi_user_name, account_id, &account_server_type, false, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC) {
int as_handle;
ASNotiData as_noti_data;
-
+ /* LCOV_EXCL_START */
if (em_get_handle_for_activesync(&as_handle, &err) == false) {
EM_DEBUG_EXCEPTION("em_get_handle_for_activesync failed[%d].", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
@@ -1512,34 +1625,43 @@ EXPORT_API int email_cancel_sending_mail(int mail_id)
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
}
+ /* LCOV_EXCL_STOP */
} else {
hAPI = emipc_create_email_api(_EMAIL_API_SEND_MAIL_CANCEL_JOB);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Mail ID */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &(mail_id), sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1575,30 +1697,38 @@ EXPORT_API int email_retry_sending_mail(int mail_id, int timeout_in_sec)
HIPC_API hAPI = emipc_create_email_api(_EMAIL_API_SEND_RETRY);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Mail ID */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &(mail_id), sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* timeout */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &(timeout_in_sec), sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1787,37 +1917,47 @@ EXPORT_API int email_move_thread_to_mailbox(int thread_id, int target_mailbox_id
HIPC_API hAPI = emipc_create_email_api(_EMAIL_API_MOVE_THREAD_TO_MAILBOX);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* thread_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&thread_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* target mailbox information */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&target_mailbox_id, sizeof(int))) {
- EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
+ /* LCOV_EXCL_START */
+ EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* move_always_flag */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&move_always_flag, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1844,30 +1984,38 @@ EXPORT_API int email_delete_thread(int thread_id, int delete_always_flag)
HIPC_API hAPI = emipc_create_email_api(_EMAIL_API_DELETE_THREAD);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* thread_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&thread_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* delete_always_flag */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&delete_always_flag, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1895,37 +2043,47 @@ EXPORT_API int email_modify_seen_flag_of_thread(int thread_id, int seen_flag, in
HIPC_API hAPI = emipc_create_email_api(_EMAIL_API_MODIFY_SEEN_FLAG_OF_THREAD);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* thread_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&thread_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* seen_flag */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&seen_flag, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* on_server */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&on_server, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1991,34 +2149,43 @@ EXPORT_API int email_expunge_mails_deleted_flagged(int input_mailbox_id, int inp
if (output_handle)
*output_handle = as_handle;
+
} else {
hAPI = emipc_create_email_api(_EMAIL_API_EXPUNGE_MAILS_DELETED_FLAGGED);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* input_mailbox_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* input_on_server */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_on_server, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
diff --git a/email-api/email-api-mailbox.c b/email-api/email-api-mailbox.c
index fb979ba..a6314b0 100755..100644
--- a/email-api/email-api-mailbox.c
+++ b/email-api/email-api-mailbox.c
@@ -64,9 +64,11 @@ EXPORT_API int email_add_mailbox(email_mailbox_t* new_mailbox, int on_server, in
/* check account bind type and branch off */
if (em_get_account_server_type_by_account_id(multi_user_name, new_mailbox->account_id, &account_server_type, false, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC && on_server) {
@@ -88,9 +90,11 @@ EXPORT_API int email_add_mailbox(email_mailbox_t* new_mailbox, int on_server, in
as_noti_data.add_mailbox.multi_user_name = multi_user_name;
if (em_send_notification_to_active_sync_engine(ACTIVE_SYNC_NOTI_ADD_MAILBOX, &as_noti_data) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_send_notification_to_active_sync_engine failed.");
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (handle)
@@ -105,19 +109,25 @@ EXPORT_API int email_add_mailbox(email_mailbox_t* new_mailbox, int on_server, in
EM_PROXY_IF_NULL_RETURN_VALUE(local_mailbox_stream, hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, local_mailbox_stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_SAFE_FREE(local_mailbox_stream);
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &on_server, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -205,28 +215,38 @@ EXPORT_API int email_rename_mailbox(int input_mailbox_id, char *input_mailbox_na
hAPI = emipc_create_email_api(_EMAIL_API_RENAME_MAILBOX);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for input_mailbox_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, input_mailbox_name, EM_SAFE_STRLEN(input_mailbox_name)+1)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for input_mailbox_path failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, input_mailbox_alias, EM_SAFE_STRLEN(input_mailbox_alias)+1)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for input_mailbox_alias failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_on_server, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -272,18 +292,22 @@ EXPORT_API int email_rename_mailbox_ex(int input_mailbox_id, char *input_mailbox
/* check account bind type and branch off */
if (em_get_account_server_type_by_account_id(multi_user_name, mailbox_tbl->account_id, &account_server_type, false, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC && input_on_server) {
int as_handle;
if (em_get_handle_for_activesync(&as_handle, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_handle_for_activesync failed[%d].", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* noti to active sync */
@@ -308,33 +332,45 @@ EXPORT_API int email_rename_mailbox_ex(int input_mailbox_id, char *input_mailbox
hAPI = emipc_create_email_api(_EMAIL_API_RENAME_MAILBOX_EX);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for input_mailbox_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, input_mailbox_name, EM_SAFE_STRLEN(input_mailbox_name)+1)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for input_mailbox_path failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, input_mailbox_alias, EM_SAFE_STRLEN(input_mailbox_alias)+1)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for input_mailbox_alias failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, input_eas_data, input_eas_data_length)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for input_eas_data failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_on_server, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -381,18 +417,22 @@ EXPORT_API int email_delete_mailbox(int input_mailbox_id, int input_on_server, i
/* check account bind type and branch off */
if (em_get_account_server_type_by_account_id(multi_user_name, mailbox_tbl->account_id, &account_server_type, false, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC && input_on_server) {
int as_handle;
if (em_get_handle_for_activesync(&as_handle, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_handle_for_activesync failed[%d].", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* noti to active sync */
@@ -402,9 +442,11 @@ EXPORT_API int email_delete_mailbox(int input_mailbox_id, int input_on_server, i
as_noti_data.delete_mailbox.multi_user_name = multi_user_name;
if (em_send_notification_to_active_sync_engine(ACTIVE_SYNC_NOTI_DELETE_MAILBOX, &as_noti_data) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_send_notification_to_active_sync_engine failed.");
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (output_handle)
@@ -481,9 +523,11 @@ EXPORT_API int email_delete_mailbox_ex(int input_account_id, int *input_mailbox_
&account_server_type,
false,
&err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC && input_on_server) {
@@ -545,18 +589,24 @@ EXPORT_API int email_set_mailbox_type(int input_mailbox_id, email_mailbox_type_e
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_mailbox_type, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -580,18 +630,24 @@ EXPORT_API int email_set_local_mailbox(int input_mailbox_id, int input_is_local_
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_is_local_mailbox, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -602,7 +658,7 @@ EXPORT_API int email_set_local_mailbox(int input_mailbox_id, int input_is_local_
EM_DEBUG_API_END("err[%d]", err);
return err;
}
-
+/* LCOV_EXCL_START */
EXPORT_API int email_get_sync_mailbox_list(int account_id, email_mailbox_t** mailbox_list, int* count)
{
EM_DEBUG_API_BEGIN();
@@ -649,7 +705,7 @@ FINISH_OFF:
EM_DEBUG_API_END("err[%d]", err);
return err;
}
-
+/* LCOV_EXCL_STOP */
EXPORT_API int email_get_mailbox_list(int account_id, int mailbox_sync_type, email_mailbox_t** mailbox_list, int* count)
{
@@ -678,9 +734,11 @@ EXPORT_API int email_get_mailbox_list(int account_id, int mailbox_sync_type, ema
if (mailbox_count > 0) {
if (!(*mailbox_list = em_malloc(sizeof(email_mailbox_t) * mailbox_count))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("malloc failed for mailbox_list");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
for (i = 0; i < mailbox_count; i++)
@@ -732,9 +790,11 @@ EXPORT_API int email_get_mailbox_list_ex(int account_id, int mailbox_sync_type,
if (mailbox_count > 0) {
if (!(*mailbox_list = em_malloc(sizeof(email_mailbox_t) * mailbox_count))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("malloc failed for mailbox_list");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
for (i = 0; i < mailbox_count; i++)
@@ -781,9 +841,11 @@ EXPORT_API int email_get_mailbox_list_by_keyword(int account_id, char *keyword,
if (mailbox_count > 0) {
if (!(*mailbox_list = em_malloc(sizeof(email_mailbox_t) * mailbox_count))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("malloc failed for mailbox_list");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
for (i = 0; i < mailbox_count; i++)
@@ -917,23 +979,31 @@ EXPORT_API int email_set_mail_slot_size(int account_id, int mailbox_id, int new_
if (hAPI) {
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &new_slot_size, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION(" emipc_add_parameter for new_slot_size failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
diff --git a/email-api/email-api-network.c b/email-api/email-api-network.c
index 8f27238..44b541d 100755..100644
--- a/email-api/email-api-network.c
+++ b/email-api/email-api-network.c
@@ -52,8 +52,10 @@ EXPORT_API int email_send_mail(int mail_id, int *handle)
ASNotiData as_noti_data;
if ((err = emipc_get_user_name(&multi_user_name)) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_get_user_name failed : [%d]", err);
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (mail_id <= 0) {
@@ -68,9 +70,11 @@ EXPORT_API int email_send_mail(int mail_id, int *handle)
}
if (mail_table_data->account_id <= 0) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("EM_IF_ACCOUNT_ID_NULL: Account ID [ %d ] ", mail_table_data->account_id);
emstorage_free_mail(&mail_table_data, 1, NULL);
return EMAIL_ERROR_INVALID_PARAM;
+ /* LCOV_EXCL_STOP */
}
EM_DEBUG_LOG("mail_table_data->account_id[%d], mail_table_data->mailbox_id[%d]", mail_table_data->account_id, mail_table_data->mailbox_id);
@@ -110,22 +114,28 @@ EXPORT_API int email_send_mail(int mail_id, int *handle)
hAPI = emipc_create_email_api(_EMAIL_API_SEND_MAIL);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("INVALID PARAM: hAPI NULL ");
emstorage_free_mail(&mail_table_data, 1, NULL);
return EMAIL_ERROR_NULL_VALUE;
+ /* LCOV_EXCL_STOP */
}
/* mail_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&mail_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("email_send_mail--Add Param mail_id failed");
emstorage_free_mail(&mail_table_data, 1, NULL);
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("email_send_mail--emipc_execute_proxy_api failed ");
emstorage_free_mail(&mail_table_data, 1, NULL);
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_CRASH);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -184,9 +194,11 @@ EXPORT_API int email_send_mail_with_downloading_attachment_of_original_mail(int
/* check account bind type and branch off */
if (em_get_account_server_type_by_account_id(multi_user_name, mail_table_data->account_id, &account_server_type, false, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC) {
@@ -196,9 +208,11 @@ EXPORT_API int email_send_mail_with_downloading_attachment_of_original_mail(int
memset(&as_noti_data, 0x00, sizeof(ASNotiData));
if (em_get_handle_for_activesync(&as_handle, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_handle_for_activesync failed[%d].", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* noti to active sync */
@@ -265,9 +279,11 @@ EXPORT_API int email_schedule_sending_mail(int input_mail_id, time_t input_sched
/* check account bind type and branch off */
if (em_get_account_server_type_by_account_id(multi_user_name, mail_table_data->account_id, &account_server_type, false, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC) {
@@ -275,13 +291,13 @@ EXPORT_API int email_schedule_sending_mail(int input_mail_id, time_t input_sched
ASNotiData as_noti_data;
memset(&as_noti_data, 0x00, sizeof(ASNotiData));
-
+ /* LCOV_EXCL_START */
if (em_get_handle_for_activesync(&as_handle, &err) == false) {
EM_DEBUG_EXCEPTION("em_get_handle_for_activesync failed[%d].", err);
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
}
-
+ /* LCOV_EXCL_STOP */
/* noti to active sync */
as_noti_data.schedule_sending_mail.handle = as_handle;
as_noti_data.schedule_sending_mail.account_id = mail_table_data->account_id;
@@ -332,15 +348,19 @@ EXPORT_API int email_send_saved(int account_id, int *handle)
/* Account ID */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &(account_id), sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter account_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_SAFE_FREE(pOptionStream);
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -368,14 +388,18 @@ EXPORT_API int email_sync_header(int input_account_id, int input_mailbox_id, int
memset(&as_noti_data, 0x00, sizeof(ASNotiData));
if ((err = emipc_get_user_name(&multi_user_name)) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_get_user_name failed : [%d]", err);
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* 2010/02/12 ch715.lee : check account bind type and branch off */
if (em_get_account_server_type_by_account_id(multi_user_name, input_account_id, &account_server_type, true, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_account_server_type_by_account_id failed[%d]", err);
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (account_server_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC) {
@@ -408,16 +432,20 @@ EXPORT_API int email_sync_header(int input_account_id, int input_mailbox_id, int
/* input_account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* input_mailbox_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
@@ -471,22 +499,28 @@ EXPORT_API int email_sync_header_for_all_account(int *handle)
/* input_account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* input_account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_SAFE_FREE(multi_user_name);
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -617,24 +651,32 @@ EXPORT_API int email_download_body(int mail_id, int with_attachment, int *handle
/* Account Id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* Mail Id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&mail_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* with_attachment */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&with_attachment, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -735,26 +777,34 @@ EXPORT_API int email_download_attachment(int mail_id, int nth, int *handle)
/* Account Id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* Mail ID */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &(mail_id), sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter mail_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* nth */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &(nth), sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter mail_id failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -823,9 +873,11 @@ EXPORT_API int email_cancel_job(int input_account_id, int input_handle, email_ca
as_noti_data.cancel_job.multi_user_name = multi_user_name;
if (em_send_notification_to_active_sync_engine(ACTIVE_SYNC_NOTI_CANCEL_JOB, &as_noti_data) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_send_notification_to_active_sync_engine failed.");
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
}
}
@@ -834,28 +886,36 @@ EXPORT_API int email_cancel_job(int input_account_id, int input_handle, email_ca
hAPI = emipc_create_email_api(_EMAIL_API_CANCEL_JOB);
if (!hAPI) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("INVALID PARAM: hAPI NULL ");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_account_id, sizeof(int))) { /* input_account_id == 0 */
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_handle, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_SOCKET_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -874,9 +934,11 @@ EXPORT_API int email_cancel_job(int input_account_id, int input_handle, email_ca
as_noti_data.cancel_job.multi_user_name = multi_user_name;
if (em_send_notification_to_active_sync_engine(ACTIVE_SYNC_NOTI_CANCEL_JOB, &as_noti_data) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_send_notification_to_active_sync_engine failed.");
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
} else {
hAPI = emipc_create_email_api(_EMAIL_API_CANCEL_JOB);
@@ -884,19 +946,25 @@ EXPORT_API int email_cancel_job(int input_account_id, int input_handle, email_ca
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, &input_handle, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* Execute API */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
emipc_destroy_email_api(hAPI);
@@ -948,15 +1016,19 @@ EXPORT_API int email_get_task_information(email_task_information_t **output_task
}
if ((hAPI = emipc_create_email_api(_EMAIL_API_GET_TASK_INFORMATION)) == NULL) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_create_email_api failed");
err = EMAIL_ERROR_IPC_CRASH;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
err = EMAIL_ERROR_IPC_CRASH;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -966,9 +1038,11 @@ EXPORT_API int email_get_task_information(email_task_information_t **output_task
task_information_stream = (char*)em_malloc(task_information_stream_length + 1);
if (!task_information_stream) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_malloc failed");
err = EMAIL_ERROR_OUT_OF_MEMORY;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 1, task_information_stream_length, task_information_stream);
@@ -977,9 +1051,11 @@ EXPORT_API int email_get_task_information(email_task_information_t **output_task
}
if (!output_task_information) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("EMAIL_ERROR_NULL_VALUE");
err = EMAIL_ERROR_NULL_VALUE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
}
@@ -1009,13 +1085,17 @@ EXPORT_API int email_sync_imap_mailbox_list(int account_id, int *handle)
/* account_id */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_LOG("emipc_add_parameter failed ");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
if (!emipc_execute_proxy_api(hAPI)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_LOG("ipcProxy_ExecuteAsyncAPI failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
@@ -1073,8 +1153,10 @@ EXPORT_API int email_search_mail_on_server(int input_account_id,
int as_handle = 0;
if (em_get_handle_for_activesync(&as_handle, &err) == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_get_handle_for_activesync failed[%d].", err);
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
/* noti to active sync */
@@ -1088,9 +1170,11 @@ EXPORT_API int email_search_mail_on_server(int input_account_id,
return_value = em_send_notification_to_active_sync_engine(ACTIVE_SYNC_NOTI_SEARCH_ON_SERVER, &as_noti_data);
if (return_value == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_send_notification_to_active_sync_engine failed.");
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (output_handle)
@@ -1101,15 +1185,19 @@ EXPORT_API int email_search_mail_on_server(int input_account_id,
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (void*)&input_account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
err = EMAIL_ERROR_IPC_PROTOCOL_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (void*)&input_mailbox_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
err = EMAIL_ERROR_IPC_PROTOCOL_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
stream_for_search_filter_list = em_convert_search_filter_to_byte_stream(input_search_filter_list,
@@ -1121,9 +1209,11 @@ EXPORT_API int email_search_mail_on_server(int input_account_id,
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN,
stream_for_search_filter_list,
stream_size_for_search_filter_list)) { /*prevent 18950*/
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
err = EMAIL_ERROR_IPC_PROTOCOL_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
@@ -1198,9 +1288,11 @@ EXPORT_API int email_clear_result_of_search_mail_on_server(int input_account_id)
return_value = em_send_notification_to_active_sync_engine(ACTIVE_SYNC_NOTI_CLEAR_RESULT_OF_SEARCH_ON_SERVER,
&as_noti_data);
if (return_value == false) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("em_send_notification_to_active_sync_engine failed.");
err = EMAIL_ERROR_ACTIVE_SYNC_NOTI_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
} else {
hAPI = emipc_create_email_api(_EMAIL_API_CLEAR_RESULT_OF_SEARCH_MAIL_ON_SERVER);
@@ -1208,20 +1300,26 @@ EXPORT_API int email_clear_result_of_search_mail_on_server(int input_account_id)
EM_IF_NULL_RETURN_VALUE(hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (void*)&input_account_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_add_parameter failed ");
err = EMAIL_ERROR_IPC_PROTOCOL_FAILURE;
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
emipc_get_parameter(hAPI, ePARAMETER_OUT, 0, sizeof(int), &err);
if (err != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("_EMAIL_API_CLEAR_RESULT_OF_SEARCH_MAIL_ON_SERVER failed [%d]", err);
goto FINISH_OFF;
+ /* LCOV_EXCL_STOP */
}
}
diff --git a/email-api/email-api-rule.c b/email-api/email-api-rule.c
index 373d1a7..8ebed31 100755..100644
--- a/email-api/email-api-rule.c
+++ b/email-api/email-api-rule.c
@@ -124,14 +124,18 @@ EXPORT_API int email_add_rule(email_rule_t* filtering_set)
stream = em_convert_rule_to_byte_stream(filtering_set, &size);
EM_PROXY_IF_NULL_RETURN_VALUE(stream, hAPI, EMAIL_ERROR_NULL_VALUE);
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("Add Param Failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* pass rule info */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api Failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
/* get reult form service */
@@ -170,8 +174,10 @@ EXPORT_API int email_update_rule(int filter_id, email_rule_t* new_set)
/* make filter info */
if (!emipc_add_parameter(hAPI, ePARAMETER_IN, (char*)&filter_id, sizeof(int))) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("Add Param filter_id Failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
stream = em_convert_rule_to_byte_stream(new_set, &size);
@@ -179,14 +185,18 @@ EXPORT_API int email_update_rule(int filter_id, email_rule_t* new_set)
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
}
if (!emipc_add_dynamic_parameter(hAPI, ePARAMETER_IN, stream, size)) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("Add Param new_set Failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_NULL_VALUE);
+ /* LCOV_EXCL_STOP */
}
/* request update rule with filter info */
if (emipc_execute_proxy_api(hAPI) != EMAIL_ERROR_NONE) {
+ /* LCOV_EXCL_START */
EM_DEBUG_EXCEPTION("emipc_execute_proxy_api Failed");
EM_PROXY_IF_NULL_RETURN_VALUE(0, hAPI, EMAIL_ERROR_IPC_SOCKET_FAILURE);
+ /* LCOV_EXCL_STOP */
}
/* get result */
diff --git a/email-common-use/include/email-debug-log.h b/email-common-use/include/email-debug-log.h
index 8c9cf9c..92c878b 100755..100644
--- a/email-common-use/include/email-debug-log.h
+++ b/email-common-use/include/email-debug-log.h
@@ -58,12 +58,12 @@ extern "C"
#define LOG_TAG "EMAIL_SERVICE"
-#define EM_DEBUG_LOG(format, arg...) SLOGD(format, ##arg)
-#define EM_DEBUG_EXCEPTION(format, arg...) SLOGE("[EXCEPTION!] " format "\n", ##arg)
+#define EM_DEBUG_LOG(format, arg...) SLOGD(format, ##arg) /* LCOV_EXCL_LINE */
+#define EM_DEBUG_EXCEPTION(format, arg...) SLOGE("[EXCEPTION!] " format "\n", ##arg) /* LCOV_EXCL_LINE */
-#define EM_DEBUG_LOG_SEC(format, arg...) SECURE_SLOGD(format, ##arg)
-#define EM_DEBUG_EXCEPTION_SEC(format, arg...) SECURE_SLOGE("[EXCEPTION!] " format "\n", ##arg)
-#define EM_DEBUG_FUNC_BEGIN_SEC(format, arg...) EM_DEBUG_LOG_SEC("BEGIN - "format, ##arg)
+#define EM_DEBUG_LOG_SEC(format, arg...) SECURE_SLOGD(format, ##arg) /* LCOV_EXCL_LINE */
+#define EM_DEBUG_EXCEPTION_SEC(format, arg...) SECURE_SLOGE("[EXCEPTION!] " format "\n", ##arg) /* LCOV_EXCL_LINE */
+#define EM_DEBUG_FUNC_BEGIN_SEC(format, arg...) EM_DEBUG_LOG_SEC("BEGIN - "format, ##arg) /* LCOV_EXCL_LINE */
#define EM_DEBUG_FUNC_END_SEC(format, arg...) EM_DEBUG_LOG_SEC("END - "format, ##arg)
#ifdef _DEBUG_MIME_PARSE_
@@ -178,10 +178,10 @@ extern "C"
#else /* __FEATURE_DEBUG_LOG__ */
- #define EM_DEBUG_LINE
- #define EM_DEBUG_LOG(format, arg...)
- #define EM_DEBUG_ASSERT(format, arg...)
- #define EM_DEBUG_EXCEPTION(format, arg...)
+ #define EM_DEBUG_LINE /* LCOV_EXCL_LINE */
+ #define EM_DEBUG_LOG(format, arg...) /* LCOV_EXCL_LINE */
+ #define EM_DEBUG_ASSERT(format, arg...) /* LCOV_EXCL_LINE */
+ #define EM_DEBUG_EXCEPTION(format, arg...) /* LCOV_EXCL_LINE */
#define EM_DEBUG_DB_EXEC(eval, expr, X) if (eval) { EM_DEBUG_DB X; expr;} else {;}