4 * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 #ifndef __EMAIL_TYPES_H__
24 #define __EMAIL_TYPES_H__
27 * @defgroup EMAIL_SERVICE Email Service
32 * @ingroup EMAIL_SERVICE
33 * @defgroup EMAIL_TYPES Email Types
37 * This file defines structures and enums of Email Framework.
39 * @author Kyu-ho Jo(kyuho.jo@samsung.com)
40 * @author Choongho Lee(ch715.lee@samsung.com)
42 * @brief This file is the header file of Email Framework library.
49 #endif /* __cplusplus */
53 #include "email-errors.h"
56 /*****************************************************************************/
58 /*****************************************************************************/
60 #define MAILBOX_NAME_LENGTH 256
61 #define MAX_EMAIL_ADDRESS_LENGTH 254 /* RFC5322, RFC3696 */
62 #define MAX_USER_NAME_LENGTH 64
63 #define MAX_DATETIME_STRING_LENGTH 20
64 #define MAX_PREVIEW_TEXT_LENGTH 512
65 #define STRING_LENGTH_FOR_DISPLAY 100
66 #define MEETING_REQ_OBJECT_ID_LENGTH 256
69 #define NEW_ACCOUNT_ID 0xFFFFFFFE
72 #define EMAIL_SEARCH_FILTER_NONE 0x00
73 #define EMAIL_SEARCH_FILTER_SUBJECT 0x01
74 #define EMAIL_SEARCH_FILTER_SENDER 0x02
75 #define EMAIL_SEARCH_FILTER_RECIPIENT 0x04
76 #define EMAIL_SEARCH_FILTER_ALL 0x07 /* EMAIL_SEARCH_FILTER_SUBJECT + EMAIL_SEARCH_FILTER_SENDER + EMAIL_SEARCH_FILTER_RECIPIEN */
78 #define EMAIL_SUCCESS 0 /* we need to modify the success return value */
80 #define EMAIL_ACC_GET_OPT_DEFAULT 0x01 /**< Default values without account name */
81 #define EMAIL_ACC_GET_OPT_ACCOUNT_NAME 0x02 /**< Account name */
82 #define EMAIL_ACC_GET_OPT_PASSWORD 0x04 /**< With password */
83 #define EMAIL_ACC_GET_OPT_OPTIONS 0x08 /**< Account options : email_option_t */
84 #define EMAIL_ACC_GET_OPT_FULL_DATA 0xFF /**< With all data of account */
86 #define GET_FULL_DATA (EMAIL_ACC_GET_OPT_FULL_DATA)
87 #define GET_FULL_DATA_WITHOUT_PASSWORD (EMAIL_ACC_GET_OPT_DEFAULT | EMAIL_ACC_GET_OPT_ACCOUNT_NAME | EMAIL_ACC_GET_OPT_OPTIONS )
88 #define WITHOUT_OPTION (EMAIL_ACC_GET_OPT_DEFAULT | EMAIL_ACC_GET_OPT_ACCOUNT_NAME )
89 #define ONLY_OPTION (EMAIL_ACC_GET_OPT_OPTIONS)
91 #define THREAD_TYPE_RECEIVING 0 /**< for function 'email_activate_pdp' */
92 #define THREAD_TYPE_SENDING 1 /**< for function 'email_activate_pdp' */
94 #define EMAIL_IMAP_PORT 143 /**< Specifies the default IMAP port.*/
95 #define EMAIL_POP3_PORT 110 /**< Specifies the default POP3 port.*/
96 #define EMAIL_SMTP_PORT 25 /**< Specifies the default SMTP port.*/
97 #define EMAIL_IMAPS_PORT 993 /**< Specifies the default IMAP SSL port.*/
98 #define EMAIL_POP3S_PORT 995 /**< Specifies the default POP3 SSL port.*/
99 #define EMAIL_SMTPS_PORT 465 /**< Specifies the default SMTP SSL port.*/
100 #define EMAIL_ACCOUNT_MAX 10 /**< Specifies the MAX account.*/
102 #define EMAIL_INBOX_NAME "INBOX" /**< Specifies the name of inbox.*/
103 #define EMAIL_DRAFTBOX_NAME "DRAFTBOX" /**< Specifies the name of draftbox.*/
104 #define EMAIL_OUTBOX_NAME "OUTBOX" /**< Specifies the name of outbox.*/
105 #define EMAIL_SENTBOX_NAME "SENTBOX" /**< Specifies the name of sentbox.*/
106 #define EMAIL_TRASH_NAME "TRASH" /**< Specifies the name of trash.*/
107 #define EMAIL_SPAMBOX_NAME "SPAMBOX" /**< Specifies the name of spambox.*/
109 #define EMAIL_INBOX_DISPLAY_NAME "Inbox" /**< Specifies the display name of inbox.*/
110 #define EMAIL_DRAFTBOX_DISPLAY_NAME "Draftbox" /**< Specifies the display name of draftbox.*/
111 #define EMAIL_OUTBOX_DISPLAY_NAME "Outbox" /**< Specifies the display name of outbox.*/
112 #define EMAIL_SENTBOX_DISPLAY_NAME "Sentbox" /**< Specifies the display name of sentbox.*/
113 #define EMAIL_TRASH_DISPLAY_NAME "Trash" /**< Specifies the display name of sentbox.*/
114 #define EMAIL_SPAMBOX_DISPLAY_NAME "Spambox" /**< Specifies the display name of spambox.*/
116 #define EMAIL_SEARCH_RESULT_MAILBOX_NAME "_`S1!E2@A3#R4$C5^H6&R7*E8(S9)U0-L=T_" /**< Specifies the name of search result mailbox.*/
118 #define SYNC_STATUS_FINISHED 0 /* BIN 00000000 */
119 #define SYNC_STATUS_SYNCING 1 /* BIN 00000001 */
120 #define SYNC_STATUS_HAVE_NEW_MAILS 2 /* BIN 00000010 */
122 #define UNKNOWN_CHARSET_PLAIN_TEXT_FILE "unknown"
123 #define UNKNOWN_CHARSET_HTML_TEXT_FILE "unknown.htm"
128 #define DAEMON_EXECUTABLE_PATH "/usr/bin/email-service"
131 #define EXPORT_API __attribute__((visibility("default")))
135 #define DEPRECATED __attribute__((deprecated))
138 #define VCONF_VIP_NOTI_RINGTONE_PATH "db/private/email-service/noti_ringtone_path"
139 #define VCONF_VIP_NOTI_REP_TYPE "db/private/email-service/noti_rep_type"
140 #define VCONF_VIP_NOTI_NOTIFICATION_TICKER "db/private/email-service/noti_notification_ticker"
141 #define VCONF_VIP_NOTI_DISPLAY_CONTENT_TICKER "db/private/email-service/noti_display_content_ticker"
142 #define VCONF_VIP_NOTI_BADGE_TICKER "db/private/email-service/noti_badge_ticker"
144 /*****************************************************************************/
146 /*****************************************************************************/
150 _EMAIL_API_ADD_ACCOUNT = 0x01000000,
151 _EMAIL_API_DELETE_ACCOUNT = 0x01000001,
152 _EMAIL_API_UPDATE_ACCOUNT = 0x01000002,
153 _EMAIL_API_GET_ACCOUNT = 0x01000003,
154 _EMAIL_API_GET_ACCOUNT_LIST = 0x01000005,
155 _EMAIL_API_GET_MAILBOX_COUNT = 0x01000007,
156 _EMAIL_API_VALIDATE_ACCOUNT = 0x01000008,
157 _EMAIL_API_ADD_ACCOUNT_WITH_VALIDATION = 0x01000009,
158 _EMAIL_API_BACKUP_ACCOUNTS = 0x0100000A,
159 _EMAIL_API_RESTORE_ACCOUNTS = 0x0100000B,
160 _EMAIL_API_GET_PASSWORD_LENGTH_OF_ACCOUNT = 0x0100000C,
163 _EMAIL_API_DELETE_MAIL = 0x01100002,
164 _EMAIL_API_DELETE_ALL_MAIL = 0x01100004,
165 _EMAIL_API_GET_MAILBOX_LIST = 0x01100006,
166 _EMAIL_API_GET_SUBMAILBOX_LIST = 0x01100007,
167 _EMAIL_API_CLEAR_DATA = 0x01100009,
168 _EMAIL_API_MOVE_MAIL = 0x0110000A,
169 _EMAIL_API_MOVE_ALL_MAIL = 0x0110000B,
170 _EMAIL_API_ADD_ATTACHMENT = 0x0110000C,
171 _EMAIL_API_GET_ATTACHMENT = 0x0110000D,
172 _EMAIL_API_DELETE_ATTACHMENT = 0x0110000E,
173 _EMAIL_API_MODIFY_MAIL_FLAG = 0x0110000F,
174 _EMAIL_API_MODIFY_MAIL_EXTRA_FLAG = 0x01100011,
175 _EMAIL_API_SET_FLAGS_FIELD = 0x01100016,
176 _EMAIL_API_ADD_MAIL = 0x01100017,
177 _EMAIL_API_UPDATE_MAIL = 0x01100018,
178 _EMAIL_API_ADD_READ_RECEIPT = 0x01100019,
179 _EMAIL_API_EXPUNGE_MAILS_DELETED_FLAGGED = 0x0110001A,
180 _EMAIL_API_UPDATE_MAIL_ATTRIBUTE = 0x0110001B,
183 _EMAIL_API_MOVE_THREAD_TO_MAILBOX = 0x01110000,
184 _EMAIL_API_DELETE_THREAD = 0x01110001,
185 _EMAIL_API_MODIFY_SEEN_FLAG_OF_THREAD = 0x01110002,
188 _EMAIL_API_ADD_MAILBOX = 0x01200000,
189 _EMAIL_API_DELETE_MAILBOX = 0x01200001,
190 _EMAIL_API_SET_MAIL_SLOT_SIZE = 0x01200007,
191 _EMAIL_API_RENAME_MAILBOX = 0x01200008,
192 _EMAIL_API_SET_MAILBOX_TYPE = 0x01200009,
193 _EMAIL_API_SET_LOCAL_MAILBOX = 0x0120000A,
196 _EMAIL_API_SEND_MAIL = 0x01300000,
197 _EMAIL_API_SYNC_HEADER = 0x01300001,
198 _EMAIL_API_DOWNLOAD_BODY = 0x01300002,
199 _EMAIL_API_DOWNLOAD_ATTACHMENT = 0x01300003,
200 _EMAIL_API_NETWORK_GET_STATUS = 0x01300004,
201 _EMAIL_API_SEND_SAVED = 0x01300005,
202 _EMAIL_API_DELETE_EMAIL = 0x01300007,
203 _EMAIL_API_DELETE_EMAIL_ALL = 0x01300008,
204 _EMAIL_API_GET_IMAP_MAILBOX_LIST = 0x01300015,
205 _EMAIL_API_SEND_MAIL_CANCEL_JOB = 0x01300017,
206 _EMAIL_API_SEARCH_MAIL_ON_SERVER = 0x01300019,
207 _EMAIL_API_CLEAR_RESULT_OF_SEARCH_MAIL_ON_SERVER = 0x0130001A,
210 _EMAIL_API_ADD_RULE = 0x01400000,
211 _EMAIL_API_GET_RULE = 0x01400001,
212 _EMAIL_API_GET_RULE_LIST = 0x01400002,
213 _EMAIL_API_FIND_RULE = 0x01400003,
214 _EMAIL_API_DELETE_RULE = 0x01400004,
215 _EMAIL_API_UPDATE_RULE = 0x01400005,
216 _EMAIL_API_CANCEL_JOB = 0x01400006,
217 _EMAIL_API_GET_PENDING_JOB = 0x01400007,
218 _EMAIL_API_SEND_RETRY = 0x01400008,
219 _EMAIL_API_UPDATE_ACTIVITY = 0x01400009,
220 _EMAIL_API_SYNC_LOCAL_ACTIVITY = 0x0140000A,
221 _EMAIL_API_PRINT_RECEIVING_EVENT_QUEUE = 0x0140000B,
224 _EMAIL_API_PING_SERVICE = 0x01500000,
225 _EMAIL_API_UPDATE_NOTIFICATION_BAR_FOR_UNREAD_MAIL = 0x01500001,
226 _EMAIL_API_SHOW_USER_MESSAGE = 0x01500002,
227 _EMAIL_API_WRITE_MIME_FILE = 0x01500003,
230 _EMAIL_API_ADD_CERTIFICATE = 0x01600000,
231 _EMAIL_API_DELETE_CERTIFICATE = 0x01600001,
232 _EMAIL_API_VERIFY_SIGNATURE = 0x01600002,
233 _EMAIL_API_VERIFY_CERTIFICATE = 0x01600003,
238 EMAIL_DELETE_LOCALLY = 0, /**< Specifies Mail Delete local only */
239 EMAIL_DELETE_LOCAL_AND_SERVER, /**< Specifies Mail Delete local & server */
240 EMAIL_DELETE_FOR_SEND_THREAD, /**< Created to check which activity to delete in send thread */
241 EMAIL_DELETE_FROM_SERVER,
242 EMAIL_DELETE_MAIL_AND_MEETING_FOR_EAS, /**< Delete mails and meetings on an EAS account. */
243 } email_delete_option_t;
247 NOTI_MAIL_ADD = 10000,
248 NOTI_MAIL_DELETE = 10001,
249 NOTI_MAIL_DELETE_ALL = 10002,
250 NOTI_MAIL_DELETE_WITH_ACCOUNT = 10003,
251 NOTI_MAIL_DELETE_FAIL = 10007,
252 NOTI_MAIL_DELETE_FINISH = 10008,
254 NOTI_MAIL_UPDATE = 10004,
255 NOTI_MAIL_FIELD_UPDATE = 10020,
257 NOTI_MAIL_MOVE = 10005,
258 NOTI_MAIL_MOVE_FAIL = 10010,
259 NOTI_MAIL_MOVE_FINISH = 10006,
261 NOTI_THREAD_MOVE = 11000,
262 NOTI_THREAD_DELETE = 11001,
263 NOTI_THREAD_MODIFY_SEEN_FLAG = 11002,
265 NOTI_ACCOUNT_ADD = 20000,
266 NOTI_ACCOUNT_DELETE = 20001,
267 NOTI_ACCOUNT_DELETE_FAIL = 20003,
268 NOTI_ACCOUNT_UPDATE = 20002,
269 NOTI_ACCOUNT_UPDATE_SYNC_STATUS = 20010,
271 NOTI_MAILBOX_ADD = 40000,
272 NOTI_MAILBOX_DELETE = 40001,
273 NOTI_MAILBOX_UPDATE = 40002,
274 NOTI_MAILBOX_FIELD_UPDATE = 40003,
276 NOTI_MAILBOX_RENAME = 40010,
277 NOTI_MAILBOX_RENAME_FAIL = 40011,
279 NOTI_CERTIFICATE_ADD = 50000,
280 NOTI_CERTIFICATE_DELETE = 50001,
281 NOTI_CERTIFICATE_UPDATE = 50002,
282 /* To be added more */
283 } email_noti_on_storage_event;
287 NOTI_SEND_START = 1002,
288 NOTI_SEND_FINISH = 1004,
289 NOTI_SEND_FAIL = 1005,
290 NOTI_SEND_CANCEL = 1003,
292 NOTI_DOWNLOAD_START = 2000,
293 NOTI_DOWNLOAD_FINISH,
295 NOTI_DOWNLOAD_CANCEL = 2004,
296 NOTI_DOWNLOAD_NEW_MAIL = 2003,
298 NOTI_DOWNLOAD_BODY_START = 3000,
299 NOTI_DOWNLOAD_BODY_FINISH = 3002,
300 NOTI_DOWNLOAD_BODY_FAIL = 3004,
301 NOTI_DOWNLOAD_BODY_CANCEL = 3003,
302 NOTI_DOWNLOAD_MULTIPART_BODY = 3001,
304 NOTI_DOWNLOAD_ATTACH_START = 4000,
305 NOTI_DOWNLOAD_ATTACH_FINISH,
306 NOTI_DOWNLOAD_ATTACH_FAIL,
307 NOTI_DOWNLOAD_ATTACH_CANCEL,
309 NOTI_MAIL_DELETE_ON_SERVER_FAIL = 5000,
310 NOTI_MAIL_MOVE_ON_SERVER_FAIL,
312 NOTI_SEARCH_ON_SERVER_START = 6000,
313 NOTI_SEARCH_ON_SERVER_FINISH = 6001,
314 NOTI_SEARCH_ON_SERVER_FAIL = 6002,
315 NOTI_SEARCH_ON_SERVER_CANCEL = 6003,
317 NOTI_VALIDATE_ACCOUNT_FINISH = 7000,
318 NOTI_VALIDATE_ACCOUNT_FAIL,
319 NOTI_VALIDATE_ACCOUNT_CANCEL,
321 NOTI_VALIDATE_AND_CREATE_ACCOUNT_FINISH = 8000,
322 NOTI_VALIDATE_AND_CREATE_ACCOUNT_FAIL,
323 NOTI_VALIDATE_AND_CREATE_ACCOUNT_CANCEL,
325 NOTI_VALIDATE_AND_UPDATE_ACCOUNT_FINISH = 9000,
326 NOTI_VALIDATE_AND_UPDATE_ACCOUNT_FAIL,
327 NOTI_VALIDATE_AND_UPDATE_ACCOUNT_CANCEL,
329 NOTI_VALIDATE_CERTIFICATE_FINISH = 10000,
330 NOTI_VALIDATE_CERTIFICATE_FAIL = 10001,
331 NOTI_VALIDATE_CERTIFICATE_CANCEL = 10002,
333 NOTI_RESOLVE_RECIPIENT_START = 11000,
334 NOTI_RESOLVE_RECIPIENT_FINISH,
335 NOTI_RESOLVE_RECIPIENT_FAIL,
336 NOTI_RESOLVE_RECIPIENT_CANCEL,
338 NOTI_RENAME_MAILBOX_START = 12000,
339 NOTI_RENAME_MAILBOX_FINISH,
340 NOTI_RENAME_MAILBOX_FAIL,
341 NOTI_RENAME_MAILBOX_CANCEL,
343 NOTI_ADD_MAILBOX_START = 12100,
344 NOTI_ADD_MAILBOX_FINISH,
345 NOTI_ADD_MAILBOX_FAIL,
346 NOTI_ADD_MAILBOX_CANCEL,
348 NOTI_DELETE_MAILBOX_START = 12200,
349 NOTI_DELETE_MAILBOX_FINISH,
350 NOTI_DELETE_MAILBOX_FAIL,
351 NOTI_DELETE_MAILBOX_CANCEL,
353 NOTI_SYNC_IMAP_MAILBOX_LIST_START = 12300,
354 NOTI_SYNC_IMAP_MAILBOX_LIST_FINISH,
355 NOTI_SYNC_IMAP_MAILBOX_LIST_FAIL,
356 NOTI_SYNC_IMAP_MAILBOX_LIST_CANCEL,
358 /* To be added more */
359 } email_noti_on_network_event;
363 RESPONSE_SUCCEEDED = 0,
365 RESPONSE_CANCELED = 2
366 /* To be added more */
367 } email_response_to_request;
370 * This enumeration specifies the mail type of account.
374 EMAIL_BIND_TYPE_DISABLE = 0, /**< Specifies the bind type for Disabled account.*/
375 EMAIL_BIND_TYPE_EM_CORE = 1, /**< Specifies the bind type for email-service .*/
376 } email_account_bind_t DEPRECATED;
379 * This enumeration specifies the server type of account.
383 EMAIL_SERVER_TYPE_POP3 = 1, /**< Specifies the POP3 Server.*/
384 EMAIL_SERVER_TYPE_IMAP4, /**< Specifies the IMAP4 Server.*/
385 EMAIL_SERVER_TYPE_SMTP, /**< Specifies the SMTP Server.*/
386 EMAIL_SERVER_TYPE_NONE, /**< Specifies the Local.*/
387 EMAIL_SERVER_TYPE_ACTIVE_SYNC, /** < Specifies the Active Sync. */
388 } email_account_server_t;
391 * This enumeration specifies the mode of retrieval.
395 EMAIL_IMAP4_RETRIEVAL_MODE_NEW = 0, /**< Specifies the retrieval mode for new email.*/
396 EMAIL_IMAP4_RETRIEVAL_MODE_ALL, /**< Specifies the retrieval mode for all email.*/
397 } email_imap4_retrieval_mode_t;
400 * This enumeration specifies the filtering type.
404 EMAIL_FILTER_FROM = 1, /**< Specifies the filtering of sender.*/
405 EMAIL_FILTER_SUBJECT, /**< Specifies the filtering of email subject.*/
406 EMAIL_FILTER_BODY, /**< Specifies the filterinf of email body.*/
407 EMAIL_PRIORITY_SENDER, /**< Specifies the priority sender of email. */
412 * This enumeration specifies the rules for filtering type.
416 RULE_TYPE_INCLUDES = 1, /**< Specifies the filtering rule for includes.*/
417 RULE_TYPE_EXACTLY, /**< Specifies the filtering rule for Exactly same as.*/
418 } email_filtering_type_t;
422 * This enumeration specifies the action for filtering type.
426 EMAIL_FILTER_MOVE = 1, /**< Specifies the move of email.*/
427 EMAIL_FILTER_BLOCK = 2, /**< Specifies the block of email.*/
428 EMAIL_FILTER_DELETE = 3, /**< Specifies delete email.*/
429 } email_rule_action_t;
432 * This enumeration specifies the email status.
436 EMAIL_MAIL_STATUS_NONE = 0, /**< The Mail is in No Operation state */
437 EMAIL_MAIL_STATUS_RECEIVED, /**< The mail is a received mail.*/
438 EMAIL_MAIL_STATUS_SENT, /**< The mail is a sent mail.*/
439 EMAIL_MAIL_STATUS_SAVED, /**< The mail is a saved mail.*/
440 EMAIL_MAIL_STATUS_SAVED_OFFLINE, /**< The mail is a saved mail in off-line mode.*/
441 EMAIL_MAIL_STATUS_SENDING, /**< The mail is being sent.*/
442 EMAIL_MAIL_STATUS_SEND_FAILURE, /**< The mail is a mail to been failed to send.*/
443 EMAIL_MAIL_STATUS_SEND_CANCELED, /**< The mail is a canceled mail.*/
444 EMAIL_MAIL_STATUS_SEND_WAIT, /**< The mail is a mail to be send .*/
445 } email_mail_status_t;
448 * This enumeration specifies the email priority.
452 EMAIL_MAIL_PRIORITY_HIGH = 1, /**< The priority is high.*/
453 EMAIL_MAIL_PRIORITY_NORMAL = 3, /**< The priority is normal.*/
454 EMAIL_MAIL_PRIORITY_LOW = 5, /**< The priority is low.*/
455 } email_mail_priority_t;
458 * This enumeration specifies the email status.
462 EMAIL_MAIL_REPORT_NONE = 0x00, /**< The mail isn't report mail.*/
463 EMAIL_MAIL_REPORT_REQUEST = 0x03, /* Deprecated */
464 EMAIL_MAIL_REPORT_DSN = 0x04, /**< The mail is a Delivery Status Notifications mail.*/
465 EMAIL_MAIL_REPORT_MDN = 0x08, /**< The mail is a Message Disposition Notifications mail.*/
466 EMAIL_MAIL_REQUEST_DSN = 0x10, /**< The mail requires Delivery Status Notifications.*/
467 EMAIL_MAIL_REQUEST_MDN = 0x20, /**< The mail requires Message Disposition Notifications.*/
468 } email_mail_report_t;
471 * This enumeration specifies the DRM type
475 EMAIL_ATTACHMENT_DRM_NONE = 0, /**< The mail isn't DRM file.*/
476 EMAIL_ATTACHMENT_DRM_OBJECT, /**< The mail is a DRM object.*/
477 EMAIL_ATTACHMENT_DRM_RIGHTS, /**< The mail is a DRM rights as xml format.*/
478 EMAIL_ATTACHMENT_DRM_DCF, /**< The mail is a DRM dcf.*/
479 } email_attachment_drm_t;
482 * This enumeration specifies the mail type
486 EMAIL_MAIL_TYPE_NORMAL = 0, /**< NOT a meeting request mail. A Normal mail */
487 EMAIL_MAIL_TYPE_MEETING_REQUEST = 1, /**< a meeting request mail from a serve */
488 EMAIL_MAIL_TYPE_MEETING_RESPONSE = 2, /**< a response mail about meeting reques */
489 EMAIL_MAIL_TYPE_MEETING_ORIGINATINGREQUEST = 3 /**< a originating mail about meeting reques */
493 * This enumeration specifies the meeting response type
497 EMAIL_MEETING_RESPONSE_NONE = 0, /**< NOT response */
498 EMAIL_MEETING_RESPONSE_ACCEPT = 1, /**< The response is acceptance */
499 EMAIL_MEETING_RESPONSE_TENTATIVE = 2, /**< The response is tentative */
500 EMAIL_MEETING_RESPONSE_DECLINE = 3, /**< The response is decline */
501 EMAIL_MEETING_RESPONSE_REQUEST = 4, /**< The response is request */
502 EMAIL_MEETING_RESPONSE_CANCEL = 5, /**< The response is cancelation */
503 } email_meeting_response_t;
507 EMAIL_ACTION_SEND_MAIL = 0,
508 EMAIL_ACTION_SYNC_HEADER = 1,
509 EMAIL_ACTION_DOWNLOAD_BODY = 2,
510 EMAIL_ACTION_DOWNLOAD_ATTACHMENT = 3,
511 EMAIL_ACTION_DELETE_MAIL = 4,
512 EMAIL_ACTION_SEARCH_MAIL = 5,
513 EMAIL_ACTION_SAVE_MAIL = 6,
514 EMAIL_ACTION_SYNC_MAIL_FLAG_TO_SERVER = 7,
515 EMAIL_ACTION_SYNC_FLAGS_FIELD_TO_SERVER = 8,
516 EMAIL_ACTION_MOVE_MAIL = 9,
517 EMAIL_ACTION_CREATE_MAILBOX = 10,
518 EMAIL_ACTION_DELETE_MAILBOX = 11,
519 EMAIL_ACTION_SYNC_HEADER_OMA = 12,
520 EMAIL_ACTION_VALIDATE_ACCOUNT = 13,
521 EMAIL_ACTION_VALIDATE_AND_CREATE_ACCOUNT = 14,
522 EMAIL_ACTION_VALIDATE_AND_UPDATE_ACCOUNT = 15,
523 EMAIL_ACTION_UPDATE_MAIL = 30,
524 EMAIL_ACTION_SET_MAIL_SLOT_SIZE = 31,
525 EMAIL_ACTION_EXPUNGE_MAILS_DELETED_FLAGGED = 32,
526 EMAIL_ACTION_SEARCH_ON_SERVER = 33,
527 EMAIL_ACTION_MOVE_MAILBOX = 34,
532 * This enumeration specifies the status of getting envelope list.
538 EMAIL_LIST_PREPARE, /**< Specifies the preparation.*/
539 EMAIL_LIST_CONNECTION_START, /**< Specifies the connection start.*/
540 EMAIL_LIST_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
541 EMAIL_LIST_CONNECTION_FINISH, /**< Specifies the connection finish.*/
542 EMAIL_LIST_CONNECTION_FAIL, /**< Specifies the connection failure.*/
543 EMAIL_LIST_START, /**< Specifies the getting start.*/
544 EMAIL_LIST_PROGRESS, /**< Specifies the status of getting.*/
545 EMAIL_LIST_FINISH, /**< Specifies the getting complete.*/
546 EMAIL_LIST_FAIL, /**< Specifies the download failure.*/
547 } email_envelope_list_status_t;
550 * This enumeration specifies the downloaded status of email.
554 EMAIL_DOWNLOAD_NONE = 0,
555 EMAIL_DOWNLOAD_WAITING,
556 EMAIL_DOWNLOAD_PREPARE, /**< Specifies the preparation.*/
557 EMAIL_DOWNLOAD_CONNECTION_START, /**< Specifies the connection start.*/
558 EMAIL_DOWNLOAD_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
559 EMAIL_DOWNLOAD_CONNECTION_FINISH, /**< Specifies the connection finish.*/
560 EMAIL_DOWNLOAD_CONNECTION_FAIL, /**< Specifies the connection failure.*/
561 EMAIL_DOWNLOAD_START, /**< Specifies the download start.*/
562 EMAIL_DOWNLOAD_PROGRESS, /**< Specifies the status of download.*/
563 EMAIL_DOWNLOAD_FINISH, /**< Specifies the download complete.*/
564 EMAIL_DOWNLOAD_FAIL, /**< Specifies the download failure.*/
565 } email_download_status_t;
568 * This enumeration specifies the status of sending email.
574 EMAIL_SEND_PREPARE, /**< Specifies the preparation.*/
575 EMAIL_SEND_CONNECTION_START, /**< Specifies the connection start.*/
576 EMAIL_SEND_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
577 EMAIL_SEND_CONNECTION_FINISH, /**< Specifies the connection finish.*/
578 EMAIL_SEND_CONNECTION_FAIL, /**< Specifies the connection failure.*/
579 EMAIL_SEND_START, /**< Specifies the sending start.*/
580 EMAIL_SEND_PROGRESS, /**< Specifies the status of sending.*/
581 EMAIL_SEND_FINISH, /**< Specifies the sending complete.*/
582 EMAIL_SEND_FAIL, /**< Specifies the sending failure.*/
583 EMAIL_SAVE_WAITING, /**< Specfies the Waiting of Sync */
584 } email_send_status_t;
591 EMAIL_SYNC_CONNECTION_START,
592 EMAIL_SYNC_CONNECTION_SUCCEED,
593 EMAIL_SYNC_CONNECTION_FINISH,
594 EMAIL_SYNC_CONNECTION_FAIL,
599 } email_sync_status_t;
602 * This enumeration specifies the deleting status of email.
606 EMAIL_DELETE_NONE = 0,
607 EMAIL_DELETE_WAITING,
608 EMAIL_DELETE_PREPARE, /**< Specifies the preparation.*/
609 EMAIL_DELETE_CONNECTION_START, /**< Specifies the connection start.*/
610 EMAIL_DELETE_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
611 EMAIL_DELETE_CONNECTION_FINISH, /**< Specifies the connection finish.*/
612 EMAIL_DELETE_CONNECTION_FAIL, /**< Specifies the connection failure.*/
613 EMAIL_DELETE_START, /**< Specifies the deletion start.*/
614 EMAIL_DELETE_PROGRESS, /**< Specifies the status of deleting.*/
615 EMAIL_DELETE_SERVER_PROGRESS, /**< Specifies the status of server deleting.*/
616 EMAIL_DELETE_LOCAL_PROGRESS, /**< Specifies the status of local deleting.*/
617 EMAIL_DELETE_FINISH, /**< Specifies the deletion complete.*/
618 EMAIL_DELETE_FAIL, /**< Specifies the deletion failure.*/
619 } email_delete_status_t;
622 * This enumeration specifies the status of validating account
626 EMAIL_VALIDATE_ACCOUNT_NONE = 0,
627 EMAIL_VALIDATE_ACCOUNT_WAITING,
628 EMAIL_VALIDATE_ACCOUNT_PREPARE, /**< Specifies the preparation.*/
629 EMAIL_VALIDATE_ACCOUNT_CONNECTION_START, /**< Specifies the connection start.*/
630 EMAIL_VALIDATE_ACCOUNT_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
631 EMAIL_VALIDATE_ACCOUNT_CONNECTION_FINISH, /**< Specifies the connection finish.*/
632 EMAIL_VALIDATE_ACCOUNT_CONNECTION_FAIL, /**< Specifies the connection failure.*/
633 EMAIL_VALIDATE_ACCOUNT_START, /**< Specifies the getting start.*/
634 EMAIL_VALIDATE_ACCOUNT_PROGRESS, /**< Specifies the status of getting.*/
635 EMAIL_VALIDATE_ACCOUNT_FINISH, /**< Specifies the getting complete.*/
636 EMAIL_VALIDATE_ACCOUNT_FAIL, /**< Specifies the validation failure.*/
637 } email_validate_account_status_t;
641 EMAIL_SET_SLOT_SIZE_NONE = 0,
642 EMAIL_SET_SLOT_SIZE_WAITING,
643 EMAIL_SET_SLOT_SIZE_START,
644 EMAIL_SET_SLOT_SIZE_FINISH,
645 EMAIL_SET_SLOT_SIZE_FAIL,
646 }email_set_slot_size_status_e;
650 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_NONE = 0,
651 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_WAITING,
652 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_START,
653 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_FINISH,
654 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_FAIL,
655 }email_expunge_mails_deleted_flagged_status_e;
659 EMAIL_SEARCH_ON_SERVER_NONE = 0,
660 EMAIL_SEARCH_ON_SERVER_WAITING,
661 EMAIL_SEARCH_ON_SERVER_START,
662 EMAIL_SEARCH_ON_SERVER_FINISH,
663 EMAIL_SEARCH_ON_SERVER_FAIL,
664 }email_search_on_server_status_e;
668 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_NONE = 0,
669 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_WAITING,
670 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_START,
671 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_FINISH,
672 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_FAIL,
673 }email_move_mailbox_status_e;
677 EMAIL_UPDATE_MAIL_NONE = 0,
678 EMAIL_UPDATE_MAIL_WAITING,
679 EMAIL_UPDATE_MAIL_START,
680 EMAIL_UPDATE_MAIL_FINISH,
681 EMAIL_UPDATE_MAIL_FAIL,
682 }email_update_mail_status_e;
685 * This enumeration specifies the type of mailbox
689 EMAIL_MAILBOX_TYPE_NONE = 0, /**< Unspecified mailbox type*/
690 EMAIL_MAILBOX_TYPE_INBOX = 1, /**< Specified inbox type*/
691 EMAIL_MAILBOX_TYPE_SENTBOX = 2, /**< Specified sent box type*/
692 EMAIL_MAILBOX_TYPE_TRASH = 3, /**< Specified trash type*/
693 EMAIL_MAILBOX_TYPE_DRAFT = 4, /**< Specified draft box type*/
694 EMAIL_MAILBOX_TYPE_SPAMBOX = 5, /**< Specified spam box type*/
695 EMAIL_MAILBOX_TYPE_OUTBOX = 6, /**< Specified outbox type*/
696 EMAIL_MAILBOX_TYPE_ALL_EMAILS = 7, /**< Specified all emails type of gmail*/
697 EMAIL_MAILBOX_TYPE_SEARCH_RESULT = 8, /**< Specified mailbox type for result of search on server */
698 EMAIL_MAILBOX_TYPE_FLAGGED = 9, /**< Specified flagged mailbox type on gmail */
699 EMAIL_MAILBOX_TYPE_USER_DEFINED = 0xFF, /**< Specified mailbox type for all other mailboxes */
700 }email_mailbox_type_e;
704 EMAIL_SYNC_LATEST_MAILS_FIRST = 0,
705 EMAIL_SYNC_OLDEST_MAILS_FIRST,
706 EMAIL_SYNC_ALL_MAILBOX_50_MAILS,
707 } EMAIL_RETRIEVE_MODE;
712 EMAIL_EVENT_NONE = 0,
713 EMAIL_EVENT_SYNC_HEADER = 1, /* synchronize mail headers with server (network used) */
714 EMAIL_EVENT_DOWNLOAD_BODY = 2, /* download mail body from server (network used)*/
715 EMAIL_EVENT_DOWNLOAD_ATTACHMENT = 3, /* download mail attachment from server (network used) */
716 EMAIL_EVENT_SEND_MAIL = 4, /* send a mail (network used) */
717 EMAIL_EVENT_SEND_MAIL_SAVED = 5, /* send all mails in 'outbox' box (network used) */
718 EMAIL_EVENT_SYNC_IMAP_MAILBOX = 6, /* download imap mailboxes from server (network used) */
719 EMAIL_EVENT_DELETE_MAIL = 7, /* delete mails (network unused) */
720 EMAIL_EVENT_DELETE_MAIL_ALL = 8, /* delete all mails (network unused) */
721 EMAIL_EVENT_SYNC_MAIL_FLAG_TO_SERVER = 9, /* sync mail flag to server */
722 EMAIL_EVENT_SYNC_FLAGS_FIELD_TO_SERVER = 10, /* sync a field of flags to server */
723 EMAIL_EVENT_SAVE_MAIL = 11, /* add mail on server */
724 EMAIL_EVENT_MOVE_MAIL = 12, /* move mails to specific mailbox on server */
725 EMAIL_EVENT_CREATE_MAILBOX = 13,
726 EMAIL_EVENT_UPDATE_MAILBOX = 14,
727 EMAIL_EVENT_DELETE_MAILBOX = 15,
728 EMAIL_EVENT_ISSUE_IDLE = 16,
729 EMAIL_EVENT_SYNC_HEADER_OMA = 17,
730 EMAIL_EVENT_VALIDATE_ACCOUNT = 18,
731 EMAIL_EVENT_VALIDATE_AND_CREATE_ACCOUNT = 19,
732 EMAIL_EVENT_VALIDATE_AND_UPDATE_ACCOUNT = 20,
733 EMAIL_EVENT_SEARCH_ON_SERVER = 21,
734 EMAIL_EVENT_RENAME_MAILBOX_ON_IMAP_SERVER = 22,
736 EMAIL_EVENT_ADD_MAIL = 10001, /* Deprecated */
737 EMAIL_EVENT_UPDATE_MAIL_OLD = 10002, /* Deprecated */
738 EMAIL_EVENT_UPDATE_MAIL = 10003,
739 EMAIL_EVENT_SET_MAIL_SLOT_SIZE = 20000,
740 EMAIL_EVENT_EXPUNGE_MAILS_DELETED_FLAGGED = 20001,
742 /* EMAIL_EVENT_LOCAL_ACTIVITY, __LOCAL_ACTIVITY_ */
744 EMAIL_EVENT_BULK_PARTIAL_BODY_DOWNLOAD = 20002, /* __FEATURE_PARTIAL_BODY_DOWNLOAD__ supported */
745 EMAIL_EVENT_LOCAL_ACTIVITY_SYNC_BULK_PBD = 20003, /* __FEATURE_PARTIAL_BODY_DOWNLOAD__ supported */
746 EMAIL_EVENT_GET_PASSWORD_LENGTH = 20004, /* get password length of an account */
747 } email_event_type_t;
752 EMAIL_EVENT_STATUS_UNUSED = 0,
753 EMAIL_EVENT_STATUS_WAIT,
754 EMAIL_EVENT_STATUS_STARTED,
755 EMAIL_EVENT_STATUS_CANCELED,
756 } email_event_status_type_t;
762 EMAIL_SORT_DATETIME_HIGH = 0,
763 EMAIL_SORT_DATETIME_LOW,
764 EMAIL_SORT_SENDER_HIGH,
765 EMAIL_SORT_SENDER_LOW,
766 EMAIL_SORT_RCPT_HIGH,
768 EMAIL_SORT_SUBJECT_HIGH,
769 EMAIL_SORT_SUBJECT_LOW,
770 EMAIL_SORT_PRIORITY_HIGH,
771 EMAIL_SORT_PRIORITY_LOW,
772 EMAIL_SORT_ATTACHMENT_HIGH,
773 EMAIL_SORT_ATTACHMENT_LOW,
774 EMAIL_SORT_FAVORITE_HIGH,
775 EMAIL_SORT_FAVORITE_LOW,
776 EMAIL_SORT_MAILBOX_NAME_HIGH,
777 EMAIL_SORT_MAILBOX_NAME_LOW,
778 EMAIL_SORT_FLAGGED_FLAG_HIGH,
779 EMAIL_SORT_FLAGGED_FLAG_LOW,
780 EMAIL_SORT_SEEN_FLAG_HIGH,
781 EMAIL_SORT_SEEN_FLAG_LOW,
787 EMAIL_MAILBOX_SORT_BY_NAME_ASC = 0,
788 EMAIL_MAILBOX_SORT_BY_NAME_DSC,
789 EMAIL_MAILBOX_SORT_BY_TYPE_ASC,
790 EMAIL_MAILBOX_SORT_BY_TYPE_DSC,
791 } email_mailbox_sort_type_t;
795 * This enumeration specifies the priority.
799 EMAIL_OPTION_PRIORITY_HIGH = 1, /**< Specifies the high priority.*/
800 EMAIL_OPTION_PRIORITY_NORMAL = 3, /**< Specifies the normal priority*/
801 EMAIL_OPTION_PRIORITY_LOW = 5, /**< Specifies the low priority.*/
805 * This enumeration specifies the saving save a copy after sending.
809 EMAIL_OPTION_KEEP_LOCAL_COPY_OFF = 0, /**< Specifies off the keeping local copy.*/
810 EMAIL_OPTION_KEEP_LOCAL_COPY_ON = 1, /**< Specifies on the keeping local copy.*/
814 * This enumeration specifies the request of delivery report.
818 EMAIL_OPTION_REQ_DELIVERY_RECEIPT_OFF = 0, /**< Specifies off the requesting delivery receipt.*/
819 EMAIL_OPTION_REQ_DELIVERY_RECEIPT_ON = 1, /**< Specifies on the requesting delivery receipt.*/
823 * This enumeration specifies the request of read receipt.
827 EMAIL_OPTION_REQ_READ_RECEIPT_OFF = 0, /**< Specifies off the requesting read receipt.*/
828 EMAIL_OPTION_REQ_READ_RECEIPT_ON = 1, /**< Specifies on the requesting read receipt.*/
832 * This enumeration specifies the blocking of address.
836 EMAIL_OPTION_BLOCK_ADDRESS_OFF = 0, /**< Specifies off the blocking by address.*/
837 EMAIL_OPTION_BLOCK_ADDRESS_ON = 1, /**< Specifies on the blocking by address.*/
841 * This enumeration specifies the blocking of subject.
845 EMAIL_OPTION_BLOCK_SUBJECT_OFF = 0, /**< Specifies off the blocking by subject.*/
846 EMAIL_OPTION_BLOCK_SUBJECT_ON = 1, /**< Specifies on the blocking by subject.*/
851 EMAIL_LIST_TYPE_UNREAD = -3,
852 EMAIL_LIST_TYPE_LOCAL = -2,
853 EMAIL_LIST_TYPE_THREAD = -1,
854 EMAIL_LIST_TYPE_NORMAL = 0
858 * This enumeration specifies the mailbox sync type.
862 EMAIL_MAILBOX_ALL = -1, /**< All mailboxes.*/
863 EMAIL_MAILBOX_FROM_SERVER = 0, /**< Mailboxes from server. */
864 EMAIL_MAILBOX_FROM_LOCAL = 1, /**< Mailboxes from local. */
871 UPDATE_ATTACHMENT_INFO,
877 UPDATE_FROM_CONTACT_INFO,
878 UPDATE_TO_CONTACT_INFO,
879 UPDATE_ALL_CONTACT_NAME,
880 UPDATE_ALL_CONTACT_INFO,
881 UPDATE_STICKY_EXTRA_FLAG,
882 UPDATE_PARTIAL_BODY_DOWNLOAD,
884 UPDATE_SEEN_FLAG_OF_THREAD,
886 } email_mail_change_type_t; // Should be moved intenal types */
890 * This enumeration specifies the address type.
894 EMAIL_ADDRESS_TYPE_FROM = 1, /**< Specifies the from address.*/
895 EMAIL_ADDRESS_TYPE_TO, /**< Specifies the to recipient address.*/
896 EMAIL_ADDRESS_TYPE_CC, /**< Specifies the cc recipient address.*/
897 EMAIL_ADDRESS_TYPE_BCC, /**< Specifies the bcc recipient address.*/
898 EMAIL_ADDRESS_TYPE_REPLY, /**< Specifies the reply recipient address.*/
899 EMAIL_ADDRESS_TYPE_RETURN, /**< Specifies the return recipient address.*/
900 } email_address_type_t;
903 * This enumeration specifies the search type for searching mailbox.
907 EMAIL_MAILBOX_SEARCH_KEY_TYPE_SUBJECT, /**< The search key is for searching subject.*/
908 EMAIL_MAILBOX_SEARCH_KEY_TYPE_FROM, /**< The search key is for searching sender address.*/
909 EMAIL_MAILBOX_SEARCH_KEY_TYPE_BODY, /**< The search key is for searching body.*/
910 EMAIL_MAILBOX_SEARCH_KEY_TYPE_TO, /**< The search key is for searching recipient address.*/
911 } email_mailbox_search_key_t;
914 * This enumeration specifies the download status of mail body.
919 EMAIL_BODY_DOWNLOAD_STATUS_NONE = 0,
920 EMAIL_BODY_DOWNLOAD_STATUS_FULLY_DOWNLOADED = 1,
921 EMAIL_BODY_DOWNLOAD_STATUS_PARTIALLY_DOWNLOADED = 2,
922 } email_body_download_status_t;
925 * This enumeration specifies the moving type.
929 EMAIL_MOVED_BY_COMMAND = 0,
930 EMAIL_MOVED_BY_MOVING_THREAD,
931 EMAIL_MOVED_AFTER_SENDING,
932 EMAIL_MOVED_CANCELATION_MAIL
936 * This enumeration specifies the deletion type.
940 EMAIL_DELETED_BY_COMMAND = 0,
941 EMAIL_DELETED_BY_OVERFLOW,
942 EMAIL_DELETED_BY_DELETING_THREAD,
943 EMAIL_DELETED_BY_MOVING_TO_OTHER_ACCOUNT,
944 EMAIL_DELETED_AFTER_SENDING,
945 EMAIL_DELETED_FROM_SERVER,
949 * This enumeration specifies the status field type.
953 EMAIL_FLAGS_SEEN_FIELD = 0,
954 EMAIL_FLAGS_DELETED_FIELD,
955 EMAIL_FLAGS_FLAGGED_FIELD,
956 EMAIL_FLAGS_ANSWERED_FIELD,
957 EMAIL_FLAGS_RECENT_FIELD,
958 EMAIL_FLAGS_DRAFT_FIELD,
959 EMAIL_FLAGS_FORWARDED_FIELD,
960 EMAIL_FLAGS_FIELD_COUNT,
961 } email_flags_field_type;
965 EMAIL_FLAG_FLAGED = 1,
966 EMAIL_FLAG_TASK_STATUS_CLEAR = 2,
967 EMAIL_FLAG_TASK_STATUS_COMPLETE = 3,
968 EMAIL_FLAG_TASK_STATUS_ACTIVE = 4,
969 } email_flagged_type;
972 EMAIL_SEARCH_FILTER_TYPE_MESSAGE_NO = 1, /* integer type */
973 EMAIL_SEARCH_FILTER_TYPE_UID = 2, /* integer type */
974 EMAIL_SEARCH_FILTER_TYPE_BCC = 7, /* string type */
975 EMAIL_SEARCH_FILTER_TYPE_CC = 9, /* string type */
976 EMAIL_SEARCH_FILTER_TYPE_FROM = 10, /* string type */
977 EMAIL_SEARCH_FILTER_TYPE_KEYWORD = 11, /* string type */
978 EMAIL_SEARCH_FILTER_TYPE_SUBJECT = 13, /* string type */
979 EMAIL_SEARCH_FILTER_TYPE_TO = 15, /* string type */
980 EMAIL_SEARCH_FILTER_TYPE_SIZE_LARSER = 16, /* integer type */
981 EMAIL_SEARCH_FILTER_TYPE_SIZE_SMALLER = 17, /* integer type */
982 EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_BEFORE = 20, /* time type */
983 EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_ON = 21, /* time type */
984 EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_SINCE = 22, /* time type */
985 EMAIL_SEARCH_FILTER_TYPE_FLAGS_ANSWERED = 26, /* integer type */
986 EMAIL_SEARCH_FILTER_TYPE_FLAGS_DELETED = 28, /* integer type */
987 EMAIL_SEARCH_FILTER_TYPE_FLAGS_DRAFT = 30, /* integer type */
988 EMAIL_SEARCH_FILTER_TYPE_FLAGS_FLAGED = 32, /* integer type */
989 EMAIL_SEARCH_FILTER_TYPE_FLAGS_RECENT = 34, /* integer type */
990 EMAIL_SEARCH_FILTER_TYPE_FLAGS_SEEN = 36, /* integer type */
991 EMAIL_SEARCH_FILTER_TYPE_MESSAGE_ID = 43, /* string type */
992 } email_search_filter_type;
995 EMAIL_DRM_TYPE_NONE = 0,
996 EMAIL_DRM_TYPE_OBJECT = 1,
997 EMAIL_DRM_TYPE_RIGHT = 2,
998 EMAIL_DRM_TYPE_DCF = 3
1002 EMAIL_DRM_METHOD_NONE = 0,
1003 EMAIL_DRM_METHOD_FL = 1,
1004 EMAIL_DRM_METHOD_CD = 2,
1005 EMAIL_DRM_METHOD_SSD = 3,
1006 EMAIL_DRM_METHOD_SD = 4
1010 EMAIL_CANCELED_BY_USER = 0,
1011 EMAIL_CANCELED_BY_MDM = 1,
1012 } email_cancelation_type;
1015 EMAIL_MAIL_ATTRIBUTE_MAIL_ID = 0, /* integer type */
1016 EMAIL_MAIL_ATTRIBUTE_ACCOUNT_ID = 1, /* integer type */
1017 EMAIL_MAIL_ATTRIBUTE_MAILBOX_ID = 2, /* integer type */
1018 EMAIL_MAIL_ATTRIBUTE_MAILBOX_NAME = 3, /* string type */
1019 EMAIL_MAIL_ATTRIBUTE_MAILBOX_TYPE = 4, /* integer type */
1020 EMAIL_MAIL_ATTRIBUTE_SUBJECT = 5, /* string type */
1021 EMAIL_MAIL_ATTRIBUTE_DATE_TIME = 6, /* datetime type */
1022 EMAIL_MAIL_ATTRIBUTE_SERVER_MAIL_STATUS = 7, /* integer type */
1023 EMAIL_MAIL_ATTRIBUTE_SERVER_MAILBOX_NAME = 8, /* string type */
1024 EMAIL_MAIL_ATTRIBUTE_SERVER_MAIL_ID = 9, /* string type */
1025 EMAIL_MAIL_ATTRIBUTE_MESSAGE_ID = 10, /* string type */
1026 EMAIL_MAIL_ATTRIBUTE_REFERENCE_MAIL_ID = 11, /* integer type */
1027 EMAIL_MAIL_ATTRIBUTE_FROM = 12, /* string type */
1028 EMAIL_MAIL_ATTRIBUTE_TO = 13, /* string type */
1029 EMAIL_MAIL_ATTRIBUTE_CC = 14, /* string type */
1030 EMAIL_MAIL_ATTRIBUTE_BCC = 15, /* string type */
1031 EMAIL_MAIL_ATTRIBUTE_BODY_DOWNLOAD_STATUS = 16, /* integer type */
1032 EMAIL_MAIL_ATTRIBUTE_FILE_PATH_PLAIN = 17, /* string type */
1033 EMAIL_MAIL_ATTRIBUTE_FILE_PATH_HTML = 18, /* string type */
1034 EMAIL_MAIL_ATTRIBUTE_FILE_SIZE = 19, /* integer type */
1035 EMAIL_MAIL_ATTRIBUTE_FLAGS_SEEN_FIELD = 20, /* integer type */
1036 EMAIL_MAIL_ATTRIBUTE_FLAGS_DELETED_FIELD = 21, /* integer type */
1037 EMAIL_MAIL_ATTRIBUTE_FLAGS_FLAGGED_FIELD = 22, /* integer type */
1038 EMAIL_MAIL_ATTRIBUTE_FLAGS_ANSWERED_FIELD = 23, /* integer type */
1039 EMAIL_MAIL_ATTRIBUTE_FLAGS_RECENT_FIELD = 24, /* integer type */
1040 EMAIL_MAIL_ATTRIBUTE_FLAGS_DRAFT_FIELD = 25, /* integer type */
1041 EMAIL_MAIL_ATTRIBUTE_FLAGS_FORWARDED_FIELD = 26, /* integer type */
1042 EMAIL_MAIL_ATTRIBUTE_DRM_STATUS = 27, /* integer type */
1043 EMAIL_MAIL_ATTRIBUTE_PRIORITY = 28, /* integer type */
1044 EMAIL_MAIL_ATTRIBUTE_SAVE_STATUS = 29, /* integer type */
1045 EMAIL_MAIL_ATTRIBUTE_LOCK_STATUS = 30, /* integer type */
1046 EMAIL_MAIL_ATTRIBUTE_REPORT_STATUS = 31, /* integer type */
1047 EMAIL_MAIL_ATTRIBUTE_ATTACHMENT_COUNT = 32, /* integer type */
1048 EMAIL_MAIL_ATTRIBUTE_INLINE_CONTENT_COUNT = 33, /* integer type */
1049 EMAIL_MAIL_ATTRIBUTE_THREAD_ID = 34, /* integer type */
1050 EMAIL_MAIL_ATTRIBUTE_THREAD_ITEM_COUNT = 35, /* integer type */
1051 EMAIL_MAIL_ATTRIBUTE_PREVIEW_TEXT = 36, /* string type */
1052 EMAIL_MAIL_ATTRIBUTE_MEETING_REQUEST_STATUS = 37, /* integer type */
1053 EMAIL_MAIL_ATTRIBUTE_MESSAGE_CLASS = 38, /* integer type */
1054 EMAIL_MAIL_ATTRIBUTE_DIGEST_TYPE = 39, /* integer type */
1055 EMAIL_MAIL_ATTRIBUTE_SMIME_TYPE = 40, /* integer type */
1056 EMAIL_MAIL_ATTRIBUTE_END
1057 } email_mail_attribute_type;
1060 EMAIL_ADD_MY_ADDRESS_OPTION_DO_NOT_ADD = 0,
1061 EMAIL_ADD_MY_ADDRESS_OPTION_ALWAYS_ADD_TO_CC = 1,
1062 EMAIL_ADD_MY_ADDRESS_OPTION_ALWAYS_ADD_TO_BCC = 2,
1063 } email_add_my_address_option_type;
1066 EMAIL_MESSAGE_CLASS_UNSPECIFIED,
1067 EMAIL_MESSAGE_CLASS_UNKNOWN,
1068 EMAIL_MESSAGE_CLASS_NOTE,
1069 EMAIL_MESSAGE_CLASS_NOTE_RULES_OF_TEMPLATE_MICROSOFT,
1070 EMAIL_MESSAGE_CLASS_NOTE_SMIME,
1071 EMAIL_MESSAGE_CLASS_NOTE_SMIME_MULTIPART_SIGNED,
1072 EMAIL_MESSAGE_CLASS_NOTIFICATION_MEETING,
1073 EMAIL_MESSAGE_CLASS_OCTEL_VOICE,
1074 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_REQUEST,
1075 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_CANCELED,
1076 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_RESP_POS,
1077 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_RESP_TENT,
1078 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_RESP_NEG,
1079 EMAIL_MESSAGE_CLASS_POST,
1080 EMAIL_MESSAGE_CLASS_INFO_PATH_FORM,
1081 EMAIL_MESSAGE_CLASS_VOICE_NOTES,
1082 EMAIL_MESSAGE_CLASS_SHARING,
1083 EMAIL_MESSAGE_CLASS_NOTE_EXCHANGE_ACTIVE_SYNC_REMOTE_WIPE_CONFIRMATION,
1084 EMAIL_MESSAGE_CLASS_VOICE_MAIL,
1085 EMAIL_MESSAGE_CLASS_SMS,
1086 EMAIL_MESSAGE_CLASS_IRM_MESSAGE = 0x00100000,
1087 EMAIL_MESSAGE_CLASS_SMART_REPLY = 0x01000000,
1088 EMAIL_MESSAGE_CLASS_SMART_FORWARD = 0x02000000,
1089 EMAIL_MESSAGE_CLASS_REPORT_NOT_READ_REPORT = 0x10000000,
1090 EMAIL_MESSAGE_CLASS_REPORT_READ_REPORT = 0x20000000,
1091 EMAIL_MESSAGE_CLASS_REPORT_NON_DELIVERY_RECEIPT = 0x40000000,
1092 EMAIL_MESSAGE_CLASS_REPORT_DELIVERY_RECEIPT = 0x80000000,
1093 } email_message_class;
1096 EMAIL_SMIME_NONE = 0, /* Not use smime */
1098 EMAIL_SMIME_ENCRYPTED,
1099 EMAIL_SMIME_SIGNED_AND_ENCRYPTED,
1103 CIPHER_TYPE_DES3 = 0,
1105 CIPHER_TYPE_RC2_128,
1108 } email_cipher_type;
1111 DIGEST_TYPE_SHA1 = 0,
1113 } email_digest_type;
1115 /*****************************************************************************/
1116 /* Data Structures */
1117 /*****************************************************************************/
1120 * This structure is used to save mail time.
1124 unsigned short year; /**< Specifies the Year.*/
1125 unsigned short month; /**< Specifies the Month.*/
1126 unsigned short day; /**< Specifies the Day.*/
1127 unsigned short hour; /**< Specifies the Hour.*/
1128 unsigned short minute; /**< Specifies the Minute.*/
1129 unsigned short second; /**< Specifies the Second.*/
1130 } email_datetime_t DEPRECATED;
1133 * This structure is used to save the options.
1137 email_mail_priority_t priority; /**< Specifies the prority. 1=high 3=normal 5=low.*/
1138 int keep_local_copy; /**< Specifies the saving save a copy after sending.*/
1139 int req_delivery_receipt; /**< Specifies the request of delivery report. 0=off 1=on*/
1140 int req_read_receipt; /**< Specifies the request of read receipt. 0=off 1=on*/
1141 int download_limit; /**< Specifies the limit of size for downloading.*/
1142 int block_address; /**< Specifies the blocking of address. 0=off 1=on*/
1143 int block_subject; /**< Specifies the blocking of subject. 0=off 1=on*/
1144 char *display_name_from; /**< Specifies the display name of from.*/
1145 int reply_with_body; /**< Specifies the replying with body 0=off 1=on*/
1146 int forward_with_files; /**< Specifies the fowarding with files 0=off 1=on*/
1147 int add_myname_card; /**< Specifies the adding name card 0=off 1=on*/
1148 int add_signature; /**< Specifies the adding signature 0=off 1=on*/
1149 char *signature; /**< Specifies the signature*/
1150 email_add_my_address_option_type add_my_address_to_bcc; /**< Specifies whether cc or bcc field should be always filled with my address. */
1154 * This structure is used to save the information of email account.
1158 /* General account information */
1159 int account_id; /**< Account id */
1160 char *account_name; /**< Account name */
1161 int account_svc_id; /**< AccountSvc priv data: Specifies id from account-svc */
1162 int sync_status; /**< Sync Status. SYNC_STATUS_FINISHED, SYNC_STATUS_SYNCING, SYNC_STATUS_HAVE_NEW_MAILS */
1163 int sync_disabled; /**< If this attriube is set as true, email-service will not synchronize this account. */
1164 int default_mail_slot_size;
1165 char *logo_icon_path; /**< account logo icon (used by account svc and email app) */
1166 void *user_data; /**< binary user data */
1167 int user_data_length; /**< user data length */
1169 /* User information */
1170 char *user_display_name; /**< User's display */
1171 char *user_email_address; /**< User's email address */
1172 char *reply_to_address; /**< Email address for reply */
1173 char *return_address; /**< Email address for error from server*/
1175 /* Configuration for incoming server */
1176 email_account_server_t incoming_server_type; /**< Incoming server type */
1177 char *incoming_server_address; /**< Incoming server address */
1178 int incoming_server_port_number; /**< Incoming server port number */
1179 char *incoming_server_user_name; /**< Incoming server user name */
1180 char *incoming_server_password; /**< Incoming server password */
1181 int incoming_server_secure_connection; /**< Does incoming server requires secured connection? */
1183 /* Options for incoming server */
1184 email_imap4_retrieval_mode_t retrieval_mode; /**< Retrieval mode : EMAIL_IMAP4_RETRIEVAL_MODE_NEW or EMAIL_IMAP4_RETRIEVAL_MODE_ALL */
1185 int keep_mails_on_pop_server_after_download; /**< Keep mails on POP server after download */
1186 int check_interval; /**< Specifies the interval for checking new mail periodically */
1187 int auto_download_size; /**< Specifies the size for auto download in bytes. -1 means entire mails body */
1189 /* Configuration for outgoing server */
1190 email_account_server_t outgoing_server_type; /**< Outgoing server type */
1191 char *outgoing_server_address; /**< Outgoing server address */
1192 int outgoing_server_port_number; /**< Outgoing server port number */
1193 char *outgoing_server_user_name; /**< Outgoing server user name */
1194 char *outgoing_server_password; /**< Outgoing server password */
1195 int outgoing_server_secure_connection; /**< Does outgoing server requires secured connection? */
1196 int outgoing_server_need_authentication; /**< Does outgoing server requires authentication? */
1197 int outgoing_server_use_same_authenticator; /**< Use same authenticator for outgoing server */
1200 /* Options for outgoing server */
1201 email_option_t options;
1203 /* Authentication Options */
1204 int pop_before_smtp; /**< POP before SMTP Authentication */
1205 int incoming_server_requires_apop; /**< APOP authentication */
1207 /* S/MIME Options */
1208 email_smime_type smime_type; /**< Specifies the smime type 0=Normal 1=Clear signed 2=encrypted 3=Signed + encrypted */
1209 char *certificate_path; /**< Specifies the certificate path of private*/
1210 email_cipher_type cipher_type; /**< Specifies the encryption algorithm*/
1211 email_digest_type digest_type; /**< Specifies the digest algorithm*/
1215 * This structure is used to save the information of certificate
1224 int expiration_year;
1225 int expiration_month;
1227 char *issue_organization_name;
1228 char *email_address;
1231 } email_certificate_t;
1234 * This structure is used to save the information of email server.
1239 int configuration_id; /**< Specifies the id of configuration.*/
1240 email_account_server_t protocol_type; /**< Specifies the type of configuration.*/
1241 char *server_addr; /**< Specifies the address of configuration.*/
1242 int port_number; /**< Specifies the port number of configuration.*/
1243 int security_type; /**< Specifies the security such as SSL.*/
1244 int auth_type; /**< Specifies the authentication type of configuration.*/
1245 } email_protocol_config_t;
1249 char *service_name; /**< Specifies the name of service.*/
1250 int authname_format; /**< Specifies the type of user name for authentication.*/
1251 int protocol_conf_count; /**< Specifies count of protocol configurations.*/
1252 email_protocol_config_t *protocol_config_array; /**< Specifies array of protocol configurations.*/
1253 } email_server_info_t;
1258 char mailbox_name[MAILBOX_NAME_LENGTH];
1259 } email_mailbox_type_item_t;
1262 * This structure is contains the Mail information.
1267 int mail_id; /**< Specifies the Mail ID.*/
1268 int account_id; /**< Specifies the Account ID.*/
1269 int mailbox_id; /**< Specifies the Mailbox ID.*/
1270 email_mailbox_type_e mailbox_type; /**< Specifies the mailbox type of the mail. */
1271 char *subject; /**< Specifies the subject.*/
1272 time_t date_time; /**< Specifies the Date time.*/
1273 int server_mail_status; /**< Specifies the Whether sever mail or not.*/
1274 char *server_mailbox_name; /**< Specifies the server mailbox.*/
1275 char *server_mail_id; /**< Specifies the Server Mail ID.*/
1276 char *message_id; /**< Specifies the message id */
1277 int reference_mail_id; /**< Specifies the reference mail id */
1278 char *full_address_from; /**< Specifies the From address.*/
1279 char *full_address_reply; /**< Specifies the Reply to address */
1280 char *full_address_to; /**< Specifies the To address.*/
1281 char *full_address_cc; /**< Specifies the CC address.*/
1282 char *full_address_bcc; /**< Specifies the BCC address*/
1283 char *full_address_return; /**< Specifies the return Path*/
1284 char *email_address_sender; /**< Specifies the email address of sender.*/
1285 char *email_address_recipient; /**< Specifies the email address of recipients.*/
1286 char *alias_sender; /**< Specifies the alias of sender. */
1287 char *alias_recipient; /**< Specifies the alias of recipients. */
1288 int body_download_status; /**< Specifies the Text downloaded or not.*/
1289 char *file_path_plain; /**< Specifies the path of text mail body.*/
1290 char *file_path_html; /**< Specifies the path of HTML mail body.*/
1291 char *file_path_mime_entity; /**< Specifies the path of MIME entity. */
1292 int mail_size; /**< Specifies the Mail Size.*/
1293 char flags_seen_field; /**< Specifies the seen flags*/
1294 char flags_deleted_field; /**< Specifies the deleted flags*/
1295 char flags_flagged_field; /**< Specifies the flagged flags*/
1296 char flags_answered_field; /**< Specifies the answered flags*/
1297 char flags_recent_field; /**< Specifies the recent flags*/
1298 char flags_draft_field; /**< Specifies the draft flags*/
1299 char flags_forwarded_field; /**< Specifies the forwarded flags*/
1300 int DRM_status; /**< Has the mail DRM content? (1 : true, 0 : false) */
1301 email_mail_priority_t priority; /**< Specifies the priority of the mail.*/
1302 email_mail_status_t save_status; /**< Specifies the save status*/
1303 int lock_status; /**< Specifies the mail is locked*/
1304 email_mail_report_t report_status; /**< Specifies the Mail Report.*/
1305 int attachment_count; /**< Specifies the attachment count. */
1306 int inline_content_count; /**< Specifies the inline content count. */
1307 int thread_id; /**< Specifies the thread id for thread view. */
1308 int thread_item_count; /**< Specifies the item count of specific thread. */
1309 char *preview_text; /**< Specifies the preview body. */
1310 email_mail_type_t meeting_request_status; /**< Specifies the status of meeting request. */
1311 int message_class; /**< Specifies the class of message for EAS. */ /* email_message_class */
1312 email_digest_type digest_type; /**< Specifies the digest algorithm*/
1313 email_smime_type smime_type; /**< Specifies the SMIME type. */
1314 } email_mail_data_t;
1317 * This structure is contains information for displaying mail list.
1321 int mail_id; /**< Specifies the mail id.*/
1322 int account_id; /**< Specifies the account id.*/
1323 int mailbox_id; /**< Specifies the mailbox id.*/
1324 char full_address_from[STRING_LENGTH_FOR_DISPLAY]; /**< Specifies the full from email address.*/
1325 char email_address_sender[MAX_EMAIL_ADDRESS_LENGTH]; /**< Specifies the sender email address.*/
1326 char email_address_recipient[STRING_LENGTH_FOR_DISPLAY]; /**< Specifies the recipients email address.*/
1327 char subject[STRING_LENGTH_FOR_DISPLAY]; /**< Specifies the subject.*/
1328 int body_download_status; /**< Specifies the text donwloaded or not.*/
1329 time_t date_time; /**< Specifies the date time.*/
1330 char flags_seen_field; /**< Specifies the seen flags*/
1331 char flags_deleted_field; /**< Specifies the deleted flags*/
1332 char flags_flagged_field; /**< Specifies the flagged flags*/
1333 char flags_answered_field; /**< Specifies the answered flags*/
1334 char flags_recent_field; /**< Specifies the recent flags*/
1335 char flags_draft_field; /**< Specifies the draft flags*/
1336 char flags_forwarded_field; /**< Specifies the forwarded flags*/
1337 int DRM_status; /**< Has the mail DRM content? (1 : true, 0 : false) */
1338 email_mail_priority_t priority; /**< Specifies the priority of Mails.*/ /* email_mail_priority_t*/
1339 email_mail_status_t save_status; /**< Specifies the save status*/ /* email_mail_status_t */
1340 int lock_status; /**< Specifies the locked*/
1341 email_mail_report_t report_status; /**< Specifies the mail report.*/ /* email_mail_report_t */
1342 int attachment_count; /**< Specifies the attachment count. */
1343 int inline_content_count; /**< Specifies the inline content count. */
1344 char preview_text[MAX_PREVIEW_TEXT_LENGTH]; /**< text for preview body*/
1345 int thread_id; /**< thread id for thread view*/
1346 int thread_item_count; /**< item count of specific thread */
1347 email_mail_type_t meeting_request_status; /**< Whether the mail is a meeting request or not */ /* email_mail_type_t */
1348 int message_class; /**< Specifies the message class */ /* email_message_class */
1349 email_smime_type smime_type; /**< Specifies the smime type */ /* email_smime_type */
1350 } email_mail_list_item_t;
1353 * This structure is used to save the filtering structure.
1357 int account_id; /**< Specifies the account ID.*/
1358 int filter_id; /**< Specifies the filtering ID.*/
1359 email_rule_type_t type; /**< Specifies the filtering type.*/
1360 char *value; /**< Specifies the filtering value.*/
1361 email_rule_action_t faction; /**< Specifies the action type for filtering.*/
1362 int target_mailbox_id; /**< Specifies the mail box if action type means move.*/
1363 int flag1; /**< Specifies the activation.*/
1364 int flag2; /**< Reserved.*/
1368 * This structure is used to save the information of mail flag.
1372 unsigned int seen : 1; /**< Specifies the read email.*/
1373 unsigned int deleted : 1; /**< Reserved.*/
1374 unsigned int flagged : 1; /**< Specifies the flagged email.*/
1375 unsigned int answered : 1; /**< Reserved.*/
1376 unsigned int recent : 1; /**< Reserved.*/
1377 unsigned int draft : 1; /**< Specifies the draft email.*/
1378 unsigned int attachment_count : 1; /**< Reserved.*/
1379 unsigned int forwarded : 1; /**< Reserved.*/
1380 unsigned int sticky : 1; /**< Sticky flagged mails cannot be deleted */
1381 } email_mail_flag_t /* DEPRECATED */;
1385 * This structure is used to save the information of mail extra flag.
1389 unsigned int priority : 3; /**< Specifies the mail priority.
1390 The value is greater than or equal to EMAIL_MAIL_PRIORITY_HIGH.
1391 The value is less than or equal to EMAIL_MAIL_PRIORITY_LOW.*/
1392 unsigned int status : 4; /**< Specifies the mail status.
1393 The value is a value of enumeration email_mail_status_t.*/
1394 unsigned int noti : 1; /**< Specifies the notified mail.*/
1395 unsigned int lock : 1; /**< Specifies the locked mail.*/
1396 unsigned int report : 2; /**< Specifies the MDN/DSN mail. The value is a value of enumeration email_mail_report_t.*/
1397 unsigned int drm : 1; /**< Specifies the drm mail.*/
1398 unsigned int text_download_yn : 2; /**< body download y/n*/
1399 } email_extra_flag_t DEPRECATED;
1402 * This structure is used to save the information of attachment.
1407 char *attachment_name;
1408 char *attachment_path;
1409 int attachment_size;
1415 int inline_content_status;
1416 char *attachment_mime_type; /**< Specifies the context mime type.*/
1417 } email_attachment_data_t;
1421 int offset_from_GMT;
1422 char standard_name[32];
1423 struct tm standard_time_start_date;
1425 char daylight_name[32];
1426 struct tm daylight_time_start_date;
1428 } email_time_zone_t;
1432 int mail_id; /**< Specifies the mail id of meeting request on DB. This is the primary key. */
1433 email_meeting_response_t meeting_response; /**< Specifies the meeting response. */
1434 struct tm start_time;
1436 char *location; /**< Specifies the location of meeting. Maximum length of this string is 32768 */
1437 char *global_object_id; /**< Specifies the object id. */
1438 email_time_zone_t time_zone;
1439 } email_meeting_request_t;
1442 * This structure is used to save the information of sender list with unread/total mail counts
1446 char *address; /**< Specifies the address of a sender.*/
1447 char *display_name; /**< Specifies a display name. This may be one of contact name, alias in original mail and email address of sender. (Priority order : contact name, alias, email address) */
1448 int unread_count; /**< Specifies the number of unread mails received from sender address*/
1449 int total_count; /**< Specifies the total number of mails which are received from sender address*/
1450 } email_sender_list_t /* DEPRECATED */;
1454 * This structure is used to save the information of mailbox.
1458 int mailbox_id; /**< Unique id on mailbox table.*/
1459 char *mailbox_name; /**< Specifies the path of mailbox.*/
1460 email_mailbox_type_e mailbox_type; /**< Specifies the type of mailbox */
1461 char *alias; /**< Specifies the display name of mailbox.*/
1462 int unread_count; /**< Specifies the unread mail count in the mailbox.*/
1463 int total_mail_count_on_local; /**< Specifies the total number of mails in the mailbox in the local DB.*/
1464 int total_mail_count_on_server; /**< Specifies the total number of mails in the mailbox in the mail server.*/
1465 int local; /**< Specifies the local mailbox.*/
1466 int account_id; /**< Specifies the account ID for mailbox.*/
1467 int mail_slot_size; /**< Specifies how many mails can be stored in local mailbox.*/
1468 int no_select; /**< Specifies the 'no_select' attribute from xlist.*/
1469 time_t last_sync_time;
1470 int deleted_flag; /**< Specifies whether mailbox is deleted.*/
1475 email_address_type_t address_type;
1480 } email_address_info_t;
1488 } email_address_info_list_t;
1492 int address_type; /* type of mail (sender : 0, recipient : 1)*/
1493 int address_count; /* The number of email addresses */
1494 char **address_list; /* strings of email addresses */
1495 } email_email_address_list_t;
1498 typedef struct _email_search_filter_t {
1499 email_search_filter_type search_filter_type; /* type of search filter */
1501 int integer_type_key_value;
1502 time_t time_type_key_value;
1503 char *string_type_key_value;
1504 } search_filter_key_value;
1505 } email_search_filter_t;
1508 EMAIL_LIST_FILTER_RULE_EQUAL = 0,
1509 EMAIL_LIST_FILTER_RULE_NOT_EQUAL = 1,
1510 EMAIL_LIST_FILTER_RULE_LESS_THAN = 2,
1511 EMAIL_LIST_FILTER_RULE_GREATER_THAN = 3,
1512 EMAIL_LIST_FILTER_RULE_LESS_THAN_OR_EQUAL = 4,
1513 EMAIL_LIST_FILTER_RULE_GREATER_THAN_OR_EQUAL = 5,
1514 EMAIL_LIST_FILTER_RULE_INCLUDE = 6,
1515 EMAIL_LIST_FILTER_RULE_IN = 7,
1516 EMAIL_LIST_FILTER_RULE_NOT_IN = 8
1517 } email_list_filter_rule_type_t;
1520 EMAIL_CASE_SENSITIVE = 0,
1521 EMAIL_CASE_INSENSITIVE = 1,
1522 } email_list_filter_case_sensitivity_t;
1525 int integer_type_value;
1526 char *string_type_value;
1527 time_t datetime_type_value;
1528 } email_mail_attribute_value_t;
1531 email_list_filter_rule_type_t rule_type;
1532 email_mail_attribute_type target_attribute;
1533 email_mail_attribute_value_t key_value;
1534 email_list_filter_case_sensitivity_t case_sensitivity;
1535 } email_list_filter_rule_t;
1538 EMAIL_LIST_FILTER_ITEM_RULE = 0,
1539 EMAIL_LIST_FILTER_ITEM_OPERATOR = 1,
1540 } email_list_filter_item_type_t;
1543 EMAIL_LIST_FILTER_OPERATOR_AND = 0,
1544 EMAIL_LIST_FILTER_OPERATOR_OR = 1,
1545 EMAIL_LIST_FILTER_OPERATOR_LEFT_PARENTHESIS = 2,
1546 EMAIL_LIST_FILTER_OPERATOR_RIGHT_PARENTHESIS = 3
1547 } email_list_filter_operator_type_t;
1550 email_list_filter_item_type_t list_filter_item_type;
1553 email_list_filter_rule_t rule;
1554 email_list_filter_operator_type_t operator_type;
1557 } email_list_filter_t;
1560 EMAIL_SORT_ORDER_ASCEND = 0,
1561 EMAIL_SORT_ORDER_DESCEND = 1
1562 } email_list_filter_sort_order_t;
1565 email_mail_attribute_type target_attribute;
1566 bool force_boolean_check;
1567 email_list_filter_sort_order_t sort_order;
1568 } email_list_sorting_rule_t;
1570 /*****************************************************************************/
1571 /* For Active Sync */
1572 /*****************************************************************************/
1574 #define VCONFKEY_EMAIL_SERVICE_ACTIVE_SYNC_HANDLE "db/email_handle/active_sync_handle"
1575 #define EMAIL_ACTIVE_SYNC_NOTI "User.Email.ActiveSync"
1579 ACTIVE_SYNC_NOTI_SEND_MAIL, /* a sending notification to ASE (active sync engine */
1580 ACTIVE_SYNC_NOTI_SEND_SAVED, /* a sending notification to ASE (active sync engine), All saved mails should be sent */
1581 ACTIVE_SYNC_NOTI_SEND_REPORT, /* a sending notification to ASE (active sync engine), report should be sen */
1582 ACTIVE_SYNC_NOTI_SYNC_HEADER, /* a sync header - download mails from server. */
1583 /* It is depended on account/s flag1 field whether it excutes downloading header only or downloading header + body */
1584 /* downloading option : 0 is subject only, 1 is text body, 2 is normal */
1585 ACTIVE_SYNC_NOTI_DOWNLOAD_BODY, /* a downloading body notification to AS */
1586 ACTIVE_SYNC_NOTI_DOWNLOAD_ATTACHMENT, /* a downloading attachment notification to AS */
1587 ACTIVE_SYNC_NOTI_VALIDATE_ACCOUNT, /* a account validating notification to AS */
1588 ACTIVE_SYNC_NOTI_CANCEL_JOB, /* a cancling job notification to AS */
1589 ACTIVE_SYNC_NOTI_SEARCH_ON_SERVER, /* a searching on server notification to AS */
1590 ACTIVE_SYNC_NOTI_CLEAR_RESULT_OF_SEARCH_ON_SERVER, /* a notification for clearing result of search on server to AS */
1591 ACTIVE_SYNC_NOTI_EXPUNGE_MAILS_DELETED_FLAGGED, /* a notification to expunge deleted flagged mails */
1592 ACTIVE_SYNC_NOTI_RESOLVE_RECIPIENT, /* a notification to get the resolve recipients */
1593 ACTIVE_SYNC_NOTI_VALIDATE_CERTIFICATE, /* a notification to validate certificate */
1594 ACTIVE_SYNC_NOTI_ADD_MAILBOX, /* a notification to add mailbox */
1595 ACTIVE_SYNC_NOTI_RENAME_MAILBOX, /* a notification to rename mailbox */
1596 ACTIVE_SYNC_NOTI_DELETE_MAILBOX, /* a notification to delete mailbox */
1597 ACTIVE_SYNC_NOTI_CANCEL_SENDING_MAIL, /* a notification to cancel a sending mail */
1598 ACTIVE_SYNC_NOTI_DELETE_MAILBOX_EX, /* a notification to delete multiple mailboxes */
1599 ACTIVE_SYNC_NOTI_SEND_MAIL_WITH_DOWNLOADING_OF_ORIGINAL_MAIL, /* a notification to send a mail with downloading attachment of original mail */
1600 } eactivesync_noti_t;
1611 struct _send_mail_saved
1612 {/* not defined ye */
1618 {/* not defined ye */
1630 struct _download_body
1635 int with_attachment; /* 0: without attachments, 1: with attachment */
1638 struct _download_attachment
1643 int attachment_order;
1644 } download_attachment;
1649 int handle; /* job handle to be canceled. this value is issued by email-service. */
1653 struct _validate_account
1654 {/* not defined yet */
1659 struct _search_mail_on_server
1664 email_search_filter_t *search_filter_list;
1665 int search_filter_count;
1666 } search_mail_on_server;
1668 struct _clear_result_of_search_mail_on_server
1672 } clear_result_of_search_mail_on_server;
1674 struct _expunge_mails_deleted_flagged
1679 } expunge_mails_deleted_flagged;
1681 struct _get_resolve_recipients
1685 char *email_address;
1686 } get_resolve_recipients;
1688 struct _validate_certificate
1692 char *email_address;
1693 } validate_certificate;
1700 char *mailbox_alias;
1703 struct _rename_mailbox
1709 char *mailbox_alias;
1712 struct _delete_mailbox
1719 struct _cancel_sending_mail
1722 } cancel_sending_mail;
1724 struct _delete_mailbox_ex
1728 int *mailbox_id_array;
1729 int mailbox_id_count;
1731 } delete_mailbox_ex;
1733 struct _send_mail_with_downloading_attachment_of_original_mail
1737 } send_mail_with_downloading_attachment_of_original_mail;
1740 /* types for noti string */
1743 EMAIL_CONVERT_STRUCT_TYPE_MAIL_LIST_ITEM, /** specifies email_mail_list_t */
1744 } email_convert_struct_type_e;
1749 /* Sync tasks for account - from 11000 */
1750 EMAIL_SYNC_TASK_ADD_ACCOUNT = 11010,
1751 EMAIL_SYNC_TASK_DELETE_ACCOUNT = 11020,
1752 EMAIL_SYNC_TASK_UPDATE_ACCOUNT = 11030,
1753 EMAIL_SYNC_TASK_GET_ACCOUNT = 11040,
1754 EMAIL_SYNC_TASK_GET_ACCOUNT_LIST = 11050,
1755 EMAIL_SYNC_TASK_BACKUP_ACCOUNTS = 11060,
1756 EMAIL_SYNC_TASK_RESTORE_ACCOUNTS = 11070,
1757 EMAIL_SYNC_TASK_GET_PASSWORD_LENGTH_OF_ACCOUNT = 11090,
1759 /* Sync tasks for mailbox - from 12000 */
1760 EMAIL_SYNC_TASK_GET_MAILBOX_COUNT = 12010,
1761 EMAIL_SYNC_TASK_GET_MAILBOX_LIST = 12020,
1762 EMAIL_SYNC_TASK_GET_SUB_MAILBOX_LIST = 12030,
1763 EMAIL_SYNC_TASK_SET_MAIL_SLOT_SIZE = 12040,
1764 EMAIL_SYNC_TASK_SET_MAILBOX_TYPE = 12050,
1765 EMAIL_SYNC_TASK_SET_LOCAL_MAILBOX = 12060,
1767 /* Sync tasks for mail - from 13000 */
1768 EMAIL_SYNC_GET_ATTACHMENT = 13010,
1769 EMAIL_SYNC_CLEAR_RESULT_OF_SEARCH_MAIL_ON_SERVER = 13020,
1771 /* Sync tasks for mail thread - from 14000 */
1773 /* Sync tasks for rule - from 15000 */
1775 /* Sync tasks for etc - from 16000 */
1778 EMAIL_ASYNC_TASK_BOUNDARY = 60000,
1779 /* Async tasks for account - from 61000 */
1780 EMAIL_ASYNC_TASK_VALIDATE_ACCOUNT = 61010,
1781 EMAIL_ASYNC_TASK_ADD_ACCOUNT_WITH_VALIDATION = 61020,
1783 /* Async tasks for mailbox - from 62000 */
1784 EMAIL_ASYNC_TASK_ADD_MAILBOX = 62010,
1785 EMAIL_ASYNC_TASK_DELETE_MAILBOX = 62020,
1786 EMAIL_ASYNC_TASK_RENAME_MAILBOX = 62030,
1787 EMAIL_ASYNC_TASK_DOWNLOAD_IMAP_MAILBOX_LIST = 62040,
1788 EMAIL_ASYNC_TASK_DELETE_MAILBOX_EX = 62050,
1790 /* Async tasks for mail - from 63000 */
1791 EMAIL_ASYNC_TASK_ADD_MAIL = 63010,
1792 EMAIL_ASYNC_TASK_ADD_READ_RECEIPT = 63020,
1794 EMAIL_ASYNC_TASK_UPDATE_MAIL = 63030,
1796 EMAIL_ASYNC_TASK_DELETE_MAIL = 63040,
1797 EMAIL_ASYNC_TASK_DELETE_ALL_MAIL = 63050,
1798 EMAIL_ASYNC_TASK_EXPUNGE_MAILS_DELETED_FLAGGED = 63060,
1800 EMAIL_ASYNC_TASK_MOVE_MAIL = 63070,
1801 EMAIL_ASYNC_TASK_MOVE_ALL_MAIL = 63080,
1802 EMAIL_ASYNC_TASK_MOVE_MAILS_TO_MAILBOX_OF_ANOTHER_ACCOUNT = 63090,
1804 EMAIL_ASYNC_TASK_SET_FLAGS_FIELD = 63300,
1806 EMAIL_ASYNC_TASK_DOWNLOAD_MAIL_LIST = 63400,
1807 EMAIL_ASYNC_TASK_DOWNLOAD_BODY = 63410,
1808 EMAIL_ASYNC_TASK_DOWNLOAD_ATTACHMENT = 63420,
1810 EMAIL_ASYNC_TASK_SEND_MAIL = 63500,
1811 EMAIL_ASYNC_TASK_SEND_SAVED = 63510,
1812 EMAIL_ASYNC_TASK_SEND_MAIL_WITH_DOWNLOADING_ATTACHMENT_OF_ORIGINAL_MAIL = 63520,
1814 EMAIL_ASYNC_TASK_SEARCH_MAIL_ON_SERVER = 63600,
1816 /* Async tasks for mail thread - from 64000 */
1817 EMAIL_ASYNC_TASK_MOVE_THREAD_TO_MAILBOX = 64010,
1818 EMAIL_ASYNC_TASK_DELETE_THREAD = 64020,
1819 EMAIL_ASYNC_TASK_MODIFY_SEEN_FLAG_OF_THREAD = 64030,
1821 /* Async tasks for rule - from 65000 */
1823 /* Async tasks for etc - from 66000 */
1825 } email_task_type_t;
1829 EMAIL_TASK_STATUS_UNUSED = 0,
1830 EMAIL_TASK_STATUS_WAIT = 1,
1831 EMAIL_TASK_STATUS_STARTED = 2,
1832 EMAIL_TASK_STATUS_IN_PROGRESS = 3,
1833 EMAIL_TASK_STATUS_FINISHED = 4,
1834 EMAIL_TASK_STATUS_FAILED = 5,
1835 EMAIL_TASK_STATUS_CANCELED = 6,
1836 } email_task_status_type_t;
1840 EMAIL_TASK_PRIORITY_UNUSED = 0,
1841 EMAIL_TASK_PRIORITY_SCHEDULED = 1,
1842 EMAIL_TASK_PRIORITY_LOW = 3,
1843 EMAIL_TASK_PRIORITY_MID = 5,
1844 EMAIL_TASK_PRIORITY_HIGH = 7,
1845 EMAIL_TASK_PRIORITY_BACK_GROUND_TASK = 9,
1846 } email_task_priority_t;
1857 #endif /* __EMAIL_TYPES_H__ */