2.0_alpha release commit
[framework/messaging/email-service.git] / email-daemon / include / email-daemon.h
index 4f3f213..d54ab1d 100755 (executable)
@@ -4,7 +4,7 @@
 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
 *
 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
-* 
+*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
@@ -48,7 +48,7 @@
 #include <time.h>
 
 #ifdef __cplusplus
-extern "C" 
+extern "C"
 {
 #endif /* __cplusplus */
 
@@ -80,12 +80,12 @@ INTERNAL_FUNC int emdaemon_finalize(int* err_code);
 /**
  * Create a new email account.
  *
- * @param[in] account  Specifies the structure pointer of account. 
+ * @param[in] account  Specifies the structure pointer of account.
  * @param[out] err_code        Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_create_account(emf_account_t* account, int* err_code);
+INTERNAL_FUNC int emdaemon_create_account(email_account_t* account, int* err_code);
 
 /**
  * Delete a email account.
@@ -116,7 +116,7 @@ INTERNAL_FUNC int emdaemon_validate_account(int account_id, unsigned* handle, in
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_update_account(int account_id, emf_account_t* new_account, int* err_code);
+INTERNAL_FUNC int emdaemon_update_account(int account_id, email_account_t* new_account, int* err_code);
 
 /**
  * Change the information of a email account after validation
@@ -128,7 +128,7 @@ INTERNAL_FUNC int emdaemon_update_account(int account_id, emf_account_t* new_acc
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_validate_account_and_update(int old_account_id, emf_account_t* new_account_info, unsigned* handle,int *err_code);
+INTERNAL_FUNC int emdaemon_validate_account_and_update(int old_account_id, email_account_t* new_account_info, unsigned* handle,int *err_code);
 
 /**
  * Get a email account by ID.
@@ -140,7 +140,7 @@ INTERNAL_FUNC int emdaemon_validate_account_and_update(int old_account_id, emf_a
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_account(int account_id, int pulloption, emf_account_t** acount, int* err_code);
+INTERNAL_FUNC int emdaemon_get_account(int account_id, int pulloption, email_account_t* acount, int* err_code);
 
 /**
  * Get all emails.
@@ -151,7 +151,7 @@ INTERNAL_FUNC int emdaemon_get_account(int account_id, int pulloption, emf_accou
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_account_list(emf_account_t** acount_list, int* count, int* err_code);
+INTERNAL_FUNC int emdaemon_get_account_list(email_account_t** acount_list, int* count, int* err_code);
 
 /**
  * Free allocated memory.
@@ -162,7 +162,7 @@ INTERNAL_FUNC int emdaemon_get_account_list(emf_account_t** acount_list, int* co
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_free_account(emf_account_t** account_list, int count, int* err_code);
+INTERNAL_FUNC int emdaemon_free_account(email_account_t** account_list, int count, int* err_code);
 
 /**
  * Get a information of filtering.
@@ -173,7 +173,7 @@ INTERNAL_FUNC int emdaemon_free_account(emf_account_t** account_list, int count,
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_filter(int filter_id, emf_rule_t** filtering_set, int* err_code);
+INTERNAL_FUNC int emdaemon_get_filter(int filter_id, email_rule_t** filtering_set, int* err_code);
 
 /**
  * Get all filterings.
@@ -184,7 +184,7 @@ INTERNAL_FUNC int emdaemon_get_filter(int filter_id, emf_rule_t** filtering_set,
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_filter_list(emf_rule_t** filtering_set, int* count, int* err_code);
+INTERNAL_FUNC int emdaemon_get_filter_list(email_rule_t** filtering_set, int* count, int* err_code);
 
 /**
  * find a filter already exists.
@@ -194,7 +194,7 @@ INTERNAL_FUNC int emdaemon_get_filter_list(emf_rule_t** filtering_set, int* coun
  * @remarks N/A
  * @return This function returns true if enable add filter, else returns false.
  */
-INTERNAL_FUNC int emdaemon_find_filter(emf_rule_t* filter_info, int* err_code);
+INTERNAL_FUNC int emdaemon_find_filter(email_rule_t* filter_info, int* err_code);
 
 /**
  * Add a filter information.
@@ -202,9 +202,9 @@ INTERNAL_FUNC int emdaemon_find_filter(emf_rule_t* filter_info, int* err_code);
  * @param[in] filtering_set            Specifies the pointer of adding filter structure.
  * @param[out] err_code                Specifies the error code returned.
  * @remarks N/A
- * @return This function returns true on success or false on failure.(only EMF_FILTER_BLOCK supported.)
+ * @return This function returns true on success or false on failure.(only EMAIL_FILTER_BLOCK supported.)
  */
-INTERNAL_FUNC int emdaemon_add_filter(emf_rule_t* filtering_set, int* err_code);
+INTERNAL_FUNC int emdaemon_add_filter(email_rule_t* filtering_set, int* err_code);
 
 /**
  * Change a filter information.
@@ -215,7 +215,7 @@ INTERNAL_FUNC int emdaemon_add_filter(emf_rule_t* filtering_set, int* err_code);
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_update_filter(int filter_id, emf_rule_t* new_set, int* err_code);
+INTERNAL_FUNC int emdaemon_update_filter(int filter_id, email_rule_t* new_set, int* err_code);
 
 /**
  * Delete a filter information.
@@ -236,7 +236,7 @@ INTERNAL_FUNC int emdaemon_delete_filter(int filter_id, int* err_code);
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_free_filter (emf_rule_t** filtering_set, int count, int* err_code);
+INTERNAL_FUNC int emdaemon_free_filter (email_rule_t** filtering_set, int count, int* err_code);
 
 
 /*****************************************************************************/
@@ -246,7 +246,6 @@ INTERNAL_FUNC int emdaemon_free_filter (emf_rule_t** filtering_set, int count, i
 /**
  * Send a mail.
  *
- * @param[in] mailbox                  Specifies the mailbox to consist a sending email.
  * @param[in] mail_id                          Specifies the mail ID.
  * @param[in] sending_option   Specifies the sending option.
  * @param[in] callback                 Specifies the callback function for retrieving sending information.
@@ -255,7 +254,7 @@ INTERNAL_FUNC int emdaemon_free_filter (emf_rule_t** filtering_set, int count, i
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_send_mail(emf_mailbox_t* mailbox, int mail_id, emf_option_t* sending_option,  unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_send_mail(int mail_id, email_option_t* sending_option,  unsigned* handle, int* err_code);
 
 /**
  * Send all mails to been saved in Offline-mode.
@@ -268,17 +267,16 @@ INTERNAL_FUNC int emdaemon_send_mail(emf_mailbox_t* mailbox, int mail_id, emf_op
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_send_mail_saved(int account_id, emf_option_t* sending_option,  unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_send_mail_saved(int account_id, email_option_t* sending_option,  unsigned* handle, int* err_code);
 
-INTERNAL_FUNC int emdaemon_add_mail(emf_mail_data_t *input_mail_data, emf_attachment_data_t *input_attachment_data_list, int input_attachment_count, emf_meeting_request_t *input_meeting_request, int input_from_eas);
+INTERNAL_FUNC int emdaemon_add_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t *input_meeting_request, int input_from_eas);
 
-INTERNAL_FUNC int emdaemon_add_meeting_request(int account_id, char *mailbox_name, emf_meeting_request_t *meeting_req, int* err_code);
+INTERNAL_FUNC int emdaemon_add_meeting_request(int account_id, int input_mailbox_id, email_meeting_request_t *meeting_req, int* err_code);
 
 /**
  * Delete a mail or multiple mails.
  *
- * @param[in] account_id        Specifies the account id.
- * @param[in] mailbox                  Specifies the mailbox.
+ * @param[in] mailbox_id               Specifies the mailbox.
  * @param[in] mail_id                  Specifies the arrary of mail id.
  * @param[in] num                              Specifies the number of mail id.
  * @param[in] from_server          Specifies whether mails are deleted from server.
@@ -289,46 +287,45 @@ INTERNAL_FUNC int emdaemon_add_meeting_request(int account_id, char *mailbox_nam
  * @return This function returns true on success or false on failure.
  */
 
-INTERNAL_FUNC int emdaemon_delete_mail(int account_id, emf_mailbox_t* mailbox, int mail_id[], int num, int from_server,  unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_delete_mail(int mailbox_id, int mail_id[], int num, int from_server,  unsigned* handle, int* err_code);
 
 /**
  * Delete all mail from a mailbox.
  *
- * @param[in] mailbox                  Specifies the structure of mailbox.
- * @param[in] with_server              Specifies whether mails are also deleted from server.
- * @param[in] callback                 Specifies the callback function for delivering status during deleting.
- * @param[in] handle                           Reserved.
- * @param[out] err_code                Specifies the error code returned.
+ * @param[in] input_mailbox_id Specifies the id of target mailbox.
+ * @param[in] input_from_server        Specifies whether mails are also deleted from server.
+ * @param[in] output_handle            Reserved.
+ * @param[out] output_err_code Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_delete_mail_all(emf_mailbox_t* mailbox, int with_server,  unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_delete_mail_all(int input_mailbox_id, int input_from_server, unsigned *output_handle, int *output_err_code);
 
 /**
  * Move a email to another mailbox.
  *
- * 
- * @param[in] mail_id          Specifies the mail ID.
- * @param[in] dst_mailbox      Specifies the mailbox structure for moving email.
- * @param[in] noti_param_1  Specifies first parameter of result notification.
- * @param[in] noti_param_2  Specifies second parameter of result notification.
- * @param[out] err_code                Specifies the error code returned.
+ *
+ * @param[in] mail_id                  Specifies the mail ID.
+ * @param[in] dst_mailbox_id   Specifies the mailbox ID for moving email.
+ * @param[in] noti_param_1     Specifies first parameter of result notification.
+ * @param[in] noti_param_2     Specifies second parameter of result notification.
+ * @param[out] err_code                        Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_move_mail(int mail_ids[], int num, emf_mailbox_t* dst_mailbox, int noti_param_1, int noti_param_2, int* err_code);
+INTERNAL_FUNC int emdaemon_move_mail(int mail_ids[], int num, int dst_mailbox_id, int noti_param_1, int noti_param_2, int* err_code);
 
 /**
  * Move all email to another mailbox.
  *
- * 
- * @param[in] src_mailbox              Specifies the source mailbox structure for moving email.
- * @param[in] dst_mailbox              Specifies the destination mailbox structure for moving email.
- * @param[out] err_code                Specifies the error code returned.
+ *
+ * @param[in] src_mailbox_id           Specifies the source mailbox ID for moving email.
+ * @param[in] dst_mailbox_id           Specifies the destination mailbox ID for moving email.
+ * @param[out] err_code                                Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_move_mail_all_mails(emf_mailbox_t* src_mailbox, emf_mailbox_t* dst_mailbox, int* err_code);
+INTERNAL_FUNC int emdaemon_move_mail_all_mails(int src_mailbox_id, int dst_mailbox_id, int* err_code);
 
 
 /**
@@ -340,9 +337,9 @@ INTERNAL_FUNC int emdaemon_move_mail_all_mails(emf_mailbox_t* src_mailbox, emf_m
  * @param[in] input_meeting_request    Specifies the number of attachment data.
  * @param[in] input_from_eas   Specifies whether the mail is from EAS.
  * @remarks N/A
- * @return This function returns EMF_ERROR_NONE on success or error code on failure.
+ * @return This function returns EMAIL_ERROR_NONE on success or error code on failure.
  */
-INTERNAL_FUNC int emdaemon_update_mail(emf_mail_data_t *input_mail_data, emf_attachment_data_t *input_attachment_data_list, int input_attachment_count, emf_meeting_request_t *input_meeting_request, int input_from_eas);
+INTERNAL_FUNC int emdaemon_update_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t *input_meeting_request, int input_from_eas);
 
 
 /**
@@ -357,7 +354,7 @@ INTERNAL_FUNC void _OnMailSendRetryTimerCB( void* data );
 /**
  * Download email body from server.
  *
- * @param[in] mailbox          Reserved.
+ * @param[in] account_id               Specifies the account ID.
  * @param[in] mail_id                  Specifies the mail ID.
  * @param[in] callback         Specifies the callback function for retrieving download status.
  * @param[in] handle                   Specifies the handle for stopping downloading.
@@ -365,25 +362,24 @@ INTERNAL_FUNC void _OnMailSendRetryTimerCB( void* data );
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_download_body(emf_mailbox_t* mailbox, int mail_id, int verbose, int with_attachment,  unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_download_body(int account_id, int mail_id, int verbose, int with_attachment,  unsigned* handle, int* err_code);
 
 /**
  * Get a mail attachment.
  *
- * @param[in] mailbox          Reserved.
  * @param[in] mail_id          Specifies the mail ID.
- * @param[in] attachment_id    Specifies the buffer that a attachment ID been saved.
+ * @param[in] attachment_id    Specifies the attachment ID.
  * @param[out] attachment      The returned attachment is save here.
  * @param[out] err_code                Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_attachment(emf_mailbox_t* mailbox, int mail_id, char* attachment_id, emf_attachment_info_t** attachment, int* err_code);
+INTERNAL_FUNC int emdaemon_get_attachment(int attachment_id, email_attachment_data_t** attachment, int* err_code);
 
 /**
  * Download a email nth-attachment from server.
  *
- * @param[in] mailbox          Reserved.
+ * @param[in] account_id               Specifies the account ID.
  * @param[in] mail_id                  Specifies the mail ID.
  * @param[in] nth                              Specifies the buffer that a attachment number been saved. the minimum number is "1".
  * @param[in] callback         Specifies the callback function for retrieving download status.
@@ -392,32 +388,30 @@ INTERNAL_FUNC int emdaemon_get_attachment(emf_mailbox_t* mailbox, int mail_id, c
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_download_attachment(emf_mailbox_t* mailbox, int mail_id, char* nth,  unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_download_attachment(int account_id, int mail_id, int nth,  unsigned* handle, int* err_code);
 
 
 /**
  * Append a attachment to email.
  *
- * @param[in] mailbox          Reserved.
  * @param[in] mail_id          Specifies the mail ID.
  * @param[in] attachment       Specifies the structure of attachment.
  * @param[out] err_code                Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_add_attachment(emf_mailbox_t* mailbox, int mail_id, emf_attachment_info_t* attachment, int* err_code);
+INTERNAL_FUNC int emdaemon_add_attachment(int mail_id, email_attachment_data_t* attachment, int* err_code);
 
 /**
  * Delete a attachment from email.
  *
- * @param[in] mailbox          Reserved.
- * @param[in] mail_id          Specifies the mail ID.
- * @param[in] attachment_id    Specifies the buffer that a attachment ID been saved.
- * @param[out] err_code                Specifies the error code returned.
+ * @param[in] mail_id           Specifies the mail id.
+ * @param[in] attachment_id  Specifies the attachment id.
+ * @param[out] err_code         Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_delete_mail_attachment(emf_mailbox_t* mailbox, int mail_id, char* attachment_id, int* err_code);
+INTERNAL_FUNC int emdaemon_delete_mail_attachment(int attachment_id, int* err_code);
 
 /**
  * Free allocated memroy for email attachment.
@@ -427,7 +421,7 @@ INTERNAL_FUNC int emdaemon_delete_mail_attachment(emf_mailbox_t* mailbox, int ma
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_free_attachment_info(emf_attachment_info_t** atch_info, int* err_code);
+INTERNAL_FUNC int emdaemon_free_attachment_data(email_attachment_data_t** atch_info, int* err_code);
 
 /**
  * Change email flag.
@@ -439,7 +433,7 @@ INTERNAL_FUNC int emdaemon_free_attachment_info(emf_attachment_info_t** atch_inf
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_modify_flag(int mail_id, emf_mail_flag_t new_flag, int onserver, int sticky_flag, int* err_code);
+INTERNAL_FUNC int emdaemon_modify_flag(int mail_id, email_mail_flag_t new_flag, int onserver, int sticky_flag, int* err_code);
 
 /**
  * Change email extra flag.
@@ -451,21 +445,21 @@ INTERNAL_FUNC int emdaemon_modify_flag(int mail_id, emf_mail_flag_t new_flag, in
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_modify_extra_flag(int mail_id, emf_extra_flag_t new_flag, int* err_code);
+INTERNAL_FUNC int emdaemon_modify_extra_flag(int mail_id, email_extra_flag_t new_flag, int* err_code);
 
 /**
  * Change email read/unread flag.
  * @param[in] account_id  Specifies the account id.
  * @param[in] mail_ids         Specifies the array of mail ID.
  * @param[in] num                          Specifies the numbers of mail ID.
- * @param[in] field_type  Specifies the field type what you want to set. Refer emf_flags_field_type.
- * @param[in] value          Specifies the value what you want to set. 
+ * @param[in] field_type  Specifies the field type what you want to set. Refer email_flags_field_type.
+ * @param[in] value          Specifies the value what you want to set.
  * @param[in] onserver         Specifies the mail on server.
  * @param[out] err_code          Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_set_flags_field(int account_id, int mail_ids[], int num, emf_flags_field_type field_type, int value, int onserver, int* err_code);
+INTERNAL_FUNC int emdaemon_set_flags_field(int account_id, int mail_ids[], int num, email_flags_field_type field_type, int value, int onserver, int* err_code);
 
 /*****************************************************************************/
 /*  Mailbox                                                                  */
@@ -473,16 +467,16 @@ INTERNAL_FUNC int emdaemon_set_flags_field(int account_id, int mail_ids[], int n
 INTERNAL_FUNC int emdaemon_get_imap_mailbox_list(int account_id, char* mailbox, unsigned* handle, int* err_code);
 
 /**
- * Download header of new emails from mail server. 
+ * Download header of new emails from mail server.
  *
- * @param[in] mailbox          Specifies the structure of mailbox.
- * @param[in] callback         Specifies the callback function for retrieving download status.
+ * @param[in] input_account_id         Specifies the account ID.
+ * @param[in] input_mailbox_id         Specifies the mailbox ID.
  * @param[out] handle          Specifies the handle for stopping downloading.
  * @param[out] err_code        Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_sync_header(emf_mailbox_t* mailbox, unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_sync_header(int input_account_id, int input_mailbox_id, unsigned* handle, int* err_code);
 
 
 /**
@@ -495,7 +489,7 @@ INTERNAL_FUNC int emdaemon_sync_header(emf_mailbox_t* mailbox, unsigned* handle,
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_mail_count_of_mailbox(emf_mailbox_t* mailbox, int* total, int* unseen, int* err_code);
+INTERNAL_FUNC int emdaemon_get_mail_count_of_mailbox(email_mailbox_t* mailbox, int* total, int* unseen, int* err_code);
 
 /**
  * Get all mailboxes from account.
@@ -507,7 +501,7 @@ INTERNAL_FUNC int emdaemon_get_mail_count_of_mailbox(emf_mailbox_t* mailbox, int
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_mailbox_list(int account_id, emf_mailbox_t** mailbox_list, int* count, int* err_code);
+INTERNAL_FUNC int emdaemon_get_mailbox_list(int account_id, email_mailbox_t** mailbox_list, int* count, int* err_code);
 
 /**
  * Create a new mailbox.
@@ -518,18 +512,18 @@ INTERNAL_FUNC int emdaemon_get_mailbox_list(int account_id, emf_mailbox_t** mail
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_add_mailbox(emf_mailbox_t* new_mailbox, int on_server, unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_add_mailbox(email_mailbox_t* new_mailbox, int on_server, unsigned* handle, int* err_code);
 
 /**
  * Delete a mailbox.
  *
- * @param[in] mailbox  Specifies the pointer of deleting mailbox information.
- * @param[out] handle          Specifies the handle for stopping creating mailbox.
- * @param[out] err_code        Specifies the error code returned.
+ * @param[in] input_mailbox_id Specifies the input_mailbox_id of deleting mailbox information.
+ * @param[out] handle                  Specifies the handle for stopping creating mailbox.
+ * @param[out] err_code                        Specifies the error code returned.
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_delete_mailbox(emf_mailbox_t* mailbox, int on_server, unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_delete_mailbox(int input_mailbox_id, int on_server, unsigned* handle, int* err_code);
 
 /**
  * Delete all sub-mailboxes from a specific mailbox.
@@ -539,7 +533,7 @@ INTERNAL_FUNC int emdaemon_delete_mailbox(emf_mailbox_t* mailbox, int on_server,
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_delete_mailbox_all(emf_mailbox_t* mailbox, int* err_code);
+INTERNAL_FUNC int emdaemon_delete_mailbox_all(email_mailbox_t* mailbox, int* err_code);
 
 /**
  * Free allocated memory for mailbox information.
@@ -550,7 +544,7 @@ INTERNAL_FUNC int emdaemon_delete_mailbox_all(emf_mailbox_t* mailbox, int* err_c
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_free_mailbox(emf_mailbox_t** mailbox_list, int count, int* err_code);
+INTERNAL_FUNC int emdaemon_free_mailbox(email_mailbox_t** mailbox_list, int count, int* err_code);
 
 /*****************************************************************************/
 /*  Etc                                                                      */
@@ -566,7 +560,7 @@ INTERNAL_FUNC int emdaemon_free_mailbox(emf_mailbox_t** mailbox_list, int count,
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_register_event_callback(emf_action_t action, emf_event_callback callback, void* event_data);
+INTERNAL_FUNC int emdaemon_register_event_callback(email_action_t action, email_event_callback callback, void* event_data);
 
 /**
  * Unregister a callback for event processing.
@@ -576,7 +570,7 @@ INTERNAL_FUNC int emdaemon_register_event_callback(emf_action_t action, emf_even
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_unregister_event_callback(emf_action_t action, emf_event_callback callback);
+INTERNAL_FUNC int emdaemon_unregister_event_callback(email_action_t action, email_event_callback callback);
 
 /**
  * Get current event queue status.
@@ -596,7 +590,7 @@ INTERNAL_FUNC void emdaemon_get_event_queue_status(int* on_sending, int* on_rece
  * @remarks N/A
  * @return This function return its handle if a pending job exists, otherwise -1.
  */
-INTERNAL_FUNC int emdaemon_get_pending_job(emf_action_t action, int account_id, int mail_id, emf_event_status_type_t* status);
+INTERNAL_FUNC int emdaemon_get_pending_job(email_action_t action, int account_id, int mail_id, email_event_status_type_t* status);
 
 /**
  * Cancel a progressive work.
@@ -630,7 +624,7 @@ INTERNAL_FUNC int emdaemon_cancel_sending_mail_job(int account_id, int mail_id,
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_set_option(emf_option_t* option, int* err_code);
+INTERNAL_FUNC int emdaemon_set_option(email_option_t* option, int* err_code);
 
 /**
  * get email options.
@@ -640,12 +634,12 @@ INTERNAL_FUNC int emdaemon_set_option(emf_option_t* option, int* err_code);
  * @remarks N/A
  * @return This function returns true on success or false on failure.
  */
-INTERNAL_FUNC int emdaemon_get_option(emf_option_t* option, int* err_code);
+INTERNAL_FUNC int emdaemon_get_option(email_option_t* option, int* err_code);
 
 /**
- * Sync the Local activity 
+ * Sync the Local activity
+ *
  *
- * 
  * @param[in] account_id               Specifies the Account ID.
  * @param[out] err_code                Specifies the error code returned.
  * @remarks N/A
@@ -658,28 +652,34 @@ INTERNAL_FUNC int emdaemon_sync_local_activity(int account_id, int *err_code);
 INTERNAL_FUNC int emdaemon_start_auto_polling(int* err_code);
 #endif /* __FEATURE_AUTO_POLLING__ */
 
-INTERNAL_FUNC int emdaemon_insert_accountinfo_to_contact(emf_account_t* account);
+INTERNAL_FUNC int emdaemon_insert_accountinfo_to_contact(email_account_t* account);
+
+INTERNAL_FUNC int emdaemon_update_accountinfo_to_contact(email_account_t* old_account, email_account_t* new_account);
 
-INTERNAL_FUNC int emdaemon_update_accountinfo_to_contact(emf_account_t* old_account, emf_account_t* new_account);
+INTERNAL_FUNC int emdaemon_update_mailbox(email_mailbox_t* old_mailbox, email_mailbox_t* new_mailbox, int on_server, unsigned* handle, int* err_code);
 
-INTERNAL_FUNC int emdaemon_update_mailbox(emf_mailbox_t* old_mailbox, emf_mailbox_t* new_mailbox, int on_server, unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_set_mailbox_type(int input_mailbox_id, email_mailbox_type_e input_mailbox_type);
 
-INTERNAL_FUNC int emdaemon_search_mail_on_server(int input_account_id, const char *input_mailbox_name, email_search_filter_t *input_search_filter, int input_search_filter_count, unsigned int *output_handle);
+INTERNAL_FUNC int emdaemon_search_mail_on_server(int input_account_id, int input_mailbox_id, email_search_filter_t *input_search_filter, int input_search_filter_count, unsigned int *output_handle, int *err_code);
 
 INTERNAL_FUNC int emdaemon_clear_all_mail_data(int* err_code);
 
 INTERNAL_FUNC int emdaemon_send_mail_retry( int mail_id,  int timeout_in_sec, int* err_code);
 
-INTERNAL_FUNC int emdaemon_validate_account_and_create(emf_account_t* new_account, unsigned* handle, int* err_code);
+INTERNAL_FUNC int emdaemon_validate_account_and_create(email_account_t* new_account, unsigned* handle, int* err_code);
 
-INTERNAL_FUNC int emdaemon_set_mail_slot_size_of_mailbox(int account_id, char* mailbox_name, int new_slot_size, unsigned* handle, int *err_code);
+INTERNAL_FUNC int emdaemon_set_mail_slot_size_of_mailbox(int account_id, int mailbox_id, int new_slot_size, unsigned* handle, int *err_code);
 
-INTERNAL_FUNC int emdaemon_move_mail_thread_to_mailbox(int thread_id, char *target_mailbox_name, int move_always_flag, int *err_code);
+INTERNAL_FUNC int emdaemon_rename_mailbox(int input_mailbox_id, char *input_mailbox_path, char *input_mailbox_alias, int input_on_server, unsigned *output_handle);
+
+INTERNAL_FUNC int emdaemon_move_mail_thread_to_mailbox(int thread_id, int target_mailbox_id, int move_always_flag, int *err_code);
 
 INTERNAL_FUNC int emdaemon_delete_mail_thread(int thread_id, int delete_always_flag, unsigned* handle, int *err_code);
 
 INTERNAL_FUNC int emdaemon_modify_seen_flag_of_thread(int thread_id, int seen_flag, int on_server, unsigned* handle, int *err_code);
 
+INTERNAL_FUNC int emdaemon_expunge_mails_deleted_flagged(int input_mailbox_id, int input_on_server, unsigned *output_handle);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */