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) {
/* 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);
}
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);
/* 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);
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));
/* 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 */
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);
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);
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);
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);
/* 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);
/* 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);
/* 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);
/* 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);
/* 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);
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);
/* 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);
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,
}
/* 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();
EM_DEBUG_API_END("error[%d]", error);
return error;
}
-
+/* LCOV_EXCL_STOP */
EXPORT_API int email_ping_service(void)
{
EM_DEBUG_API_BEGIN();
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);
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);
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))
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 */
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))
/* 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 */
}
}
} 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 */
}
}
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);
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++) {
}
}
}
-
+ /* LCOV_EXCL_STOP */
FINISH_OFF:
if ((err = email_close_db()) != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("email_close_db failed [%d]", err);
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 */
/* 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) {
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);
EM_DEBUG_API_END("err[%d]", err);
return err;
}
-
+/* LCOV_EXCL_START */
EXPORT_API int email_clear_mail_data()
{
EM_DEBUG_API_BEGIN();
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)
{
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);
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);
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 */
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);
/* 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);
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);
}
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;
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);
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);
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);
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);
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);
/* 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;
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);
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);
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);
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);
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);
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);
/* 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) {
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)
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);
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);
/* 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 */
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);
/* 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 */
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)
&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) {
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);
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);
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();
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)
{
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++)
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++)
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++)
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);
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) {
}
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);
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);
/* 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) {
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 */
/* 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) {
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;
/* 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);
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) {
/* 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) {
/* 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);
/* 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);
/* 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);
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 */
}
}
}
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);
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);
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);
}
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);
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);
}
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 */
}
}
/* 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);
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 */
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)
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,
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) {
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);
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 */
}
}
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 */
/* 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);
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 */
#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_
#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 {;}