diff options
author | Sunghyun Kwon <sh0701.kwon@samsung.com> | 2012-09-06 11:27:55 +0900 |
---|---|---|
committer | Sunghyun Kwon <sh0701.kwon@samsung.com> | 2012-09-06 11:27:55 +0900 |
commit | 936b87081ce4285c8825c08a7b009ab5b0559c2c (patch) | |
tree | 1f9a233fcc8b104b903ba4b1ce0a31bd55479434 | |
parent | 7cfd2879e4ab12a9d1d83f6b184bbb1b58fd5e4c (diff) | |
download | email-2.0alpha.tar.gz email-2.0alpha.tar.bz2 email-2.0alpha.zip |
Fixed the defineHEADsubmit/master/20120920.1510232.0_alphamaster2.0alpha
-rwxr-xr-x | include/email.h | 2 | ||||
-rwxr-xr-x | include/email_error.h | 14 | ||||
-rwxr-xr-x | packaging/capi-messaging-email.spec | 2 | ||||
-rwxr-xr-x | src/email.c | 26 |
4 files changed, 21 insertions, 23 deletions
diff --git a/include/email.h b/include/email.h index 52a84c7..96d35a3 100755 --- a/include/email.h +++ b/include/email.h @@ -48,7 +48,7 @@ extern "C" * @return 0 on success, otherwise a negative error value. * @retval #EMAIL_ERROR_NONE Successful * @retval #EMAIL_ERROR_OUT_OF_MEMORY Out of memory - * @retval #EMAIL_ERROR_ACCOUNT_NOT_FOUND Email account not found + * @retval #EMAIL_ERROR_ACCOUNT_NOT_FOUND Email account not found * * @see email_destroy_message() */ diff --git a/include/email_error.h b/include/email_error.h index e7d4e5e..157886d 100755 --- a/include/email_error.h +++ b/include/email_error.h @@ -41,15 +41,15 @@ extern "C" */ typedef enum { - EMAIL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - EMAIL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Memory cannot be allocated */ - EMAIL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + EMAIL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + EMAIL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Memory cannot be allocated */ + EMAIL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - EMAIL_ERROR_SERVER_NOT_READY = TIZEN_ERROR_MESSAGING_CLASS|0x200, /**< Server not ready */ + EMAIL_ERROR_SERVER_NOT_READY = TIZEN_ERROR_MESSAGING_CLASS|0x200, /**< Server not ready */ EMAIL_ERROR_COMMUNICATION_WITH_SERVER_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x201, /**< Communication with server failed */ - EMAIL_ERROR_OPERATION_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x202, /**< Operation failed */ - EMAIL_ERROR_ACCOUNT_NOT_FOUND = TIZEN_ERROR_MESSAGING_CLASS|0x203, /**< Email account not found */ - EMAIL_ERROR_DB_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x204, /**< Email database failed */ + EMAIL_ERROR_OPERATION_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x202, /**< Operation failed */ + EMAIL_ERROR_ACCOUNT_NOT_FOUND = TIZEN_ERROR_MESSAGING_CLASS|0x203, /**< Email account not found */ + EMAIL_ERROR_DB_FAILED = TIZEN_ERROR_MESSAGING_CLASS|0x204, /**< Email database failed */ } email_error_e; /** diff --git a/packaging/capi-messaging-email.spec b/packaging/capi-messaging-email.spec index 6acca5b..b42dce0 100755 --- a/packaging/capi-messaging-email.spec +++ b/packaging/capi-messaging-email.spec @@ -1,6 +1,6 @@ Name: capi-messaging-email Summary: Email library in Tizen Native API -Version: 0.1.5 +Version: 0.1.6 Release: 3 Group: TO_BE/FILLED_IN License: TO BE FILLED IN diff --git a/src/email.c b/src/email.c index 6ac7e96..e879ce8 100755 --- a/src/email.c +++ b/src/email.c @@ -25,15 +25,13 @@ #include <email-api-init.h> #include <email-api.h> -#define EMAIL_API_ERROR_NONE EMAIL_ERROR_NONE -#define EMAIL_API_ERROR_OUT_OF_MEMORY EMAIL_ERROR_OUT_OF_MEMORY -#define EMAIL_API_ERROR_ACCOUNT_NOT_FOUND EMAIL_ERROR_ACCOUNT_NOT_FOUND -#define EMAIL_API_ERROR_OUT_OF_MEMORY EMAIL_ERROR_OUT_OF_MEMORY +#define EMAIL_API_ERROR_NONE 1 +#define EMAIL_API_ERROR_OUT_OF_MEMORY -1028 +#define EMAIL_API_ERROR_ACCOUNT_NOT_FOUND -1014 #undef EMAIL_ERROR_NONE #undef EMAIL_ERROR_OUT_OF_MEMORY #undef EMAIL_ERROR_ACCOUNT_NOT_FOUND -#undef EMAIL_ERROR_OUT_OF_MEMORY #include<email.h> #include<email_private.h> @@ -113,7 +111,7 @@ int email_create_message(email_h *msg) //return error from F/W //EMAIL_ERROR_INVALID_PARAM/EMAIL_API_ERROR_NONE/EMAIL_ERROR_DB_FAILURE/EMAIL_ERROR_ACCOUNT_NOT_FOUND/EMAIL_ERROR_OUT_OF_MEMORY int default_account_id = 0; - if ((ret = email_load_default_account_id(&default_account_id)) != EMAIL_ERROR_NONE) { + if ((ret = email_load_default_account_id(&default_account_id)) != EMAIL_API_ERROR_NONE) { LOGE("[%s] email_load_default_account_id failed : [%d]",__FUNCTION__, ret); return CONVERT_ERROR(ret); } @@ -678,36 +676,36 @@ int _email_error_converter(int err, const char *func, int line) { switch(err) { - case EMAIL_ERROR_INVALID_PARAM: + case EMAIL_ERROR_INVALID_PARAM : LOGE("[%s:%d] INVALID_PARAM(0x%08x) : Error from Email F/W. ret: (0x%08x) ", func, line, EMAIL_ERROR_INVALID_PARAMETER, err); return EMAIL_ERROR_INVALID_PARAMETER; - case EMAIL_ERROR_DB_FAILURE: + case EMAIL_ERROR_DB_FAILURE : LOGE("[%s:%d] DB_FAILURE(0x%08x) : Error from Email F/W. ret: (0x%08x) ", func, line, EMAIL_ERROR_DB_FAILED, err); return EMAIL_ERROR_DB_FAILED; - case EMAIL_API_ERROR_ACCOUNT_NOT_FOUND: + case EMAIL_API_ERROR_ACCOUNT_NOT_FOUND : LOGE("[%s:%d] ACCOUNT_NOT_FOUND(0x%08x) : Error from Email F/W. ret: (0x%08x) ", func, line, EMAIL_ERROR_ACCOUNT_NOT_FOUND,err); return EMAIL_ERROR_ACCOUNT_NOT_FOUND; - case EMAIL_API_ERROR_OUT_OF_MEMORY: + case EMAIL_API_ERROR_OUT_OF_MEMORY : LOGE("[%s:%d] OUT_OF_MEMORY(0x%08x) : Error from Email F/W. ret: (0x%08x) ", func, line, EMAIL_ERROR_OUT_OF_MEMORY,err); return EMAIL_ERROR_OUT_OF_MEMORY; // Tizen email F/W is often using this error type when it gets a null value from server //It could be caused from server or IPC. - case EMAIL_ERROR_NULL_VALUE: + case EMAIL_ERROR_NULL_VALUE : LOGE("[%s:%d] NULL_VALUE(0x%08x) : Error from Email F/W. ret: (0x%08x) ", func, line, EMAIL_ERROR_COMMUNICATION_WITH_SERVER_FAILED,err); return EMAIL_ERROR_COMMUNICATION_WITH_SERVER_FAILED; - case EMAIL_ERROR_IPC_SOCKET_FAILURE: + case EMAIL_ERROR_IPC_SOCKET_FAILURE : LOGE("[%s:%d] IPC_SOCKET_FAILURE(0x%08x) : Error from Email F/W. ret: (0x%08x) ", func, line, EMAIL_ERROR_COMMUNICATION_WITH_SERVER_FAILED,err); return EMAIL_ERROR_COMMUNICATION_WITH_SERVER_FAILED; - case EMAIL_API_ERROR_NONE: + case EMAIL_API_ERROR_NONE : return EMAIL_ERROR_NONE; - default: + default : LOGE("[%s:%d] OPERATION_FAILED(0x%08x) : Error from Email F/W. ret: (0x%08x) ", func, line, EMAIL_ERROR_OPERATION_FAILED,err); return EMAIL_ERROR_OPERATION_FAILED; |