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,
161 _EMAIL_API_VALIDATE_ACCOUNT_EX = 0x0100000D,
164 _EMAIL_API_DELETE_MAIL = 0x01100002,
165 _EMAIL_API_DELETE_ALL_MAIL = 0x01100004,
166 _EMAIL_API_GET_MAILBOX_LIST = 0x01100006,
167 _EMAIL_API_GET_SUBMAILBOX_LIST = 0x01100007,
168 _EMAIL_API_CLEAR_DATA = 0x01100009,
169 _EMAIL_API_MOVE_MAIL = 0x0110000A,
170 _EMAIL_API_MOVE_ALL_MAIL = 0x0110000B,
171 _EMAIL_API_ADD_ATTACHMENT = 0x0110000C,
172 _EMAIL_API_GET_ATTACHMENT = 0x0110000D,
173 _EMAIL_API_DELETE_ATTACHMENT = 0x0110000E,
174 _EMAIL_API_MODIFY_MAIL_FLAG = 0x0110000F,
175 _EMAIL_API_MODIFY_MAIL_EXTRA_FLAG = 0x01100011,
176 _EMAIL_API_SET_FLAGS_FIELD = 0x01100016,
177 _EMAIL_API_ADD_MAIL = 0x01100017,
178 _EMAIL_API_UPDATE_MAIL = 0x01100018,
179 _EMAIL_API_ADD_READ_RECEIPT = 0x01100019,
180 _EMAIL_API_EXPUNGE_MAILS_DELETED_FLAGGED = 0x0110001A,
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_SEND_SAVED = 0x01300005,
201 _EMAIL_API_DELETE_EMAIL = 0x01300007,
202 _EMAIL_API_DELETE_EMAIL_ALL = 0x01300008,
203 _EMAIL_API_GET_IMAP_MAILBOX_LIST = 0x01300015,
204 _EMAIL_API_SEND_MAIL_CANCEL_JOB = 0x01300017,
205 _EMAIL_API_SEARCH_MAIL_ON_SERVER = 0x01300019,
206 _EMAIL_API_CLEAR_RESULT_OF_SEARCH_MAIL_ON_SERVER = 0x0130001A,
209 _EMAIL_API_ADD_RULE = 0x01400000,
210 _EMAIL_API_GET_RULE = 0x01400001,
211 _EMAIL_API_GET_RULE_LIST = 0x01400002,
212 _EMAIL_API_FIND_RULE = 0x01400003,
213 _EMAIL_API_DELETE_RULE = 0x01400004,
214 _EMAIL_API_UPDATE_RULE = 0x01400005,
215 _EMAIL_API_APPLY_RULE = 0x01400006,
216 _EMAIL_API_CANCEL_JOB = 0x01400007,
217 _EMAIL_API_SEND_RETRY = 0x01400009,
218 _EMAIL_API_UPDATE_ACTIVITY = 0x0140000A,
219 _EMAIL_API_SYNC_LOCAL_ACTIVITY = 0x0140000B,
222 _EMAIL_API_PING_SERVICE = 0x01500000,
223 _EMAIL_API_UPDATE_NOTIFICATION_BAR_FOR_UNREAD_MAIL = 0x01500001,
224 _EMAIL_API_SHOW_USER_MESSAGE = 0x01500002,
225 _EMAIL_API_WRITE_MIME_FILE = 0x01500003,
226 _EMAIL_API_GET_TASK_INFORMATION = 0x01500004,
229 _EMAIL_API_ADD_CERTIFICATE = 0x01600000,
230 _EMAIL_API_DELETE_CERTIFICATE = 0x01600001,
231 _EMAIL_API_VERIFY_SIGNATURE = 0x01600002,
232 _EMAIL_API_VERIFY_CERTIFICATE = 0x01600003,
237 EMAIL_DELETE_LOCALLY = 0, /**< Specifies Mail Delete local only */
238 EMAIL_DELETE_LOCAL_AND_SERVER, /**< Specifies Mail Delete local & server */
239 EMAIL_DELETE_FOR_SEND_THREAD, /**< Created to check which activity to delete in send thread */
240 EMAIL_DELETE_FROM_SERVER,
241 EMAIL_DELETE_MAIL_AND_MEETING_FOR_EAS, /**< Delete mails and meetings on an EAS account. */
242 } email_delete_option_t;
246 NOTI_MAIL_ADD = 10000,
247 NOTI_MAIL_DELETE = 10001,
248 NOTI_MAIL_DELETE_ALL = 10002,
249 NOTI_MAIL_DELETE_WITH_ACCOUNT = 10003,
250 NOTI_MAIL_DELETE_FAIL = 10007,
251 NOTI_MAIL_DELETE_FINISH = 10008,
253 NOTI_MAIL_UPDATE = 10004,
254 NOTI_MAIL_FIELD_UPDATE = 10020,
256 NOTI_MAIL_MOVE = 10005,
257 NOTI_MAIL_MOVE_FAIL = 10010,
258 NOTI_MAIL_MOVE_FINISH = 10006,
260 NOTI_THREAD_MOVE = 11000,
261 NOTI_THREAD_DELETE = 11001,
262 NOTI_THREAD_MODIFY_SEEN_FLAG = 11002,
264 NOTI_ACCOUNT_ADD = 20000,
265 NOTI_ACCOUNT_DELETE = 20001,
266 NOTI_ACCOUNT_DELETE_FAIL = 20003,
267 NOTI_ACCOUNT_UPDATE = 20002,
268 NOTI_ACCOUNT_UPDATE_SYNC_STATUS = 20010,
270 NOTI_MAILBOX_ADD = 40000,
271 NOTI_MAILBOX_DELETE = 40001,
272 NOTI_MAILBOX_UPDATE = 40002,
273 NOTI_MAILBOX_FIELD_UPDATE = 40003,
275 NOTI_MAILBOX_RENAME = 40010,
276 NOTI_MAILBOX_RENAME_FAIL = 40011,
278 NOTI_CERTIFICATE_ADD = 50000,
279 NOTI_CERTIFICATE_DELETE = 50001,
280 NOTI_CERTIFICATE_UPDATE = 50002,
281 /* To be added more */
282 } email_noti_on_storage_event;
286 NOTI_SEND_START = 1002,
287 NOTI_SEND_FINISH = 1004,
288 NOTI_SEND_FAIL = 1005,
289 NOTI_SEND_CANCEL = 1003,
291 NOTI_DOWNLOAD_START = 2000,
292 NOTI_DOWNLOAD_FINISH,
294 NOTI_DOWNLOAD_CANCEL = 2004,
295 NOTI_DOWNLOAD_NEW_MAIL = 2003,
297 NOTI_DOWNLOAD_BODY_START = 3000,
298 NOTI_DOWNLOAD_BODY_FINISH = 3002,
299 NOTI_DOWNLOAD_BODY_FAIL = 3004,
300 NOTI_DOWNLOAD_BODY_CANCEL = 3003,
301 NOTI_DOWNLOAD_MULTIPART_BODY = 3001,
303 NOTI_DOWNLOAD_ATTACH_START = 4000,
304 NOTI_DOWNLOAD_ATTACH_FINISH,
305 NOTI_DOWNLOAD_ATTACH_FAIL,
306 NOTI_DOWNLOAD_ATTACH_CANCEL,
308 NOTI_MAIL_DELETE_ON_SERVER_FAIL = 5000,
309 NOTI_MAIL_MOVE_ON_SERVER_FAIL,
311 NOTI_SEARCH_ON_SERVER_START = 6000,
312 NOTI_SEARCH_ON_SERVER_FINISH = 6001,
313 NOTI_SEARCH_ON_SERVER_FAIL = 6002,
314 NOTI_SEARCH_ON_SERVER_CANCEL = 6003,
316 NOTI_VALIDATE_ACCOUNT_FINISH = 7000,
317 NOTI_VALIDATE_ACCOUNT_FAIL,
318 NOTI_VALIDATE_ACCOUNT_CANCEL,
320 NOTI_VALIDATE_AND_CREATE_ACCOUNT_FINISH = 8000,
321 NOTI_VALIDATE_AND_CREATE_ACCOUNT_FAIL,
322 NOTI_VALIDATE_AND_CREATE_ACCOUNT_CANCEL,
324 NOTI_VALIDATE_AND_UPDATE_ACCOUNT_FINISH = 9000,
325 NOTI_VALIDATE_AND_UPDATE_ACCOUNT_FAIL,
326 NOTI_VALIDATE_AND_UPDATE_ACCOUNT_CANCEL,
328 NOTI_VALIDATE_CERTIFICATE_FINISH = 10000,
329 NOTI_VALIDATE_CERTIFICATE_FAIL = 10001,
330 NOTI_VALIDATE_CERTIFICATE_CANCEL = 10002,
332 NOTI_RESOLVE_RECIPIENT_START = 11000,
333 NOTI_RESOLVE_RECIPIENT_FINISH,
334 NOTI_RESOLVE_RECIPIENT_FAIL,
335 NOTI_RESOLVE_RECIPIENT_CANCEL,
337 NOTI_RENAME_MAILBOX_START = 12000,
338 NOTI_RENAME_MAILBOX_FINISH,
339 NOTI_RENAME_MAILBOX_FAIL,
340 NOTI_RENAME_MAILBOX_CANCEL,
342 NOTI_ADD_MAILBOX_START = 12100,
343 NOTI_ADD_MAILBOX_FINISH,
344 NOTI_ADD_MAILBOX_FAIL,
345 NOTI_ADD_MAILBOX_CANCEL,
347 NOTI_DELETE_MAILBOX_START = 12200,
348 NOTI_DELETE_MAILBOX_FINISH,
349 NOTI_DELETE_MAILBOX_FAIL,
350 NOTI_DELETE_MAILBOX_CANCEL,
352 NOTI_SYNC_IMAP_MAILBOX_LIST_START = 12300,
353 NOTI_SYNC_IMAP_MAILBOX_LIST_FINISH,
354 NOTI_SYNC_IMAP_MAILBOX_LIST_FAIL,
355 NOTI_SYNC_IMAP_MAILBOX_LIST_CANCEL,
357 NOTI_DELETE_MAIL_START = 12300,
358 NOTI_DELETE_MAIL_FINISH,
359 NOTI_DELETE_MAIL_FAIL,
360 NOTI_DELETE_MAIL_CANCEL,
362 /* To be added more */
363 } email_noti_on_network_event;
367 RESPONSE_SUCCEEDED = 0,
369 RESPONSE_CANCELED = 2
370 /* To be added more */
371 } email_response_to_request;
374 * This enumeration specifies the mail type of account.
378 EMAIL_BIND_TYPE_DISABLE = 0, /**< Specifies the bind type for Disabled account.*/
379 EMAIL_BIND_TYPE_EM_CORE = 1, /**< Specifies the bind type for email-service .*/
380 } email_account_bind_t DEPRECATED;
383 * This enumeration specifies the server type of account.
387 EMAIL_SERVER_TYPE_POP3 = 1, /**< Specifies the POP3 Server.*/
388 EMAIL_SERVER_TYPE_IMAP4, /**< Specifies the IMAP4 Server.*/
389 EMAIL_SERVER_TYPE_SMTP, /**< Specifies the SMTP Server.*/
390 EMAIL_SERVER_TYPE_NONE, /**< Specifies the Local.*/
391 EMAIL_SERVER_TYPE_ACTIVE_SYNC, /** < Specifies the Active Sync. */
392 } email_account_server_t;
395 * This enumeration specifies the mode of retrieval.
399 EMAIL_IMAP4_RETRIEVAL_MODE_NEW = 0, /**< Specifies the retrieval mode for new email.*/
400 EMAIL_IMAP4_RETRIEVAL_MODE_ALL, /**< Specifies the retrieval mode for all email.*/
401 } email_imap4_retrieval_mode_t;
404 * This enumeration specifies the filtering type.
408 EMAIL_FILTER_FROM = 1, /**< Specifies the filtering of sender.*/
409 EMAIL_FILTER_SUBJECT, /**< Specifies the filtering of email subject.*/
410 EMAIL_FILTER_BODY, /**< Specifies the filterinf of email body.*/
411 EMAIL_PRIORITY_SENDER, /**< Specifies the priority sender of email. */
416 * This enumeration specifies the rules for filtering type.
420 RULE_TYPE_INCLUDES = 1, /**< Specifies the filtering rule for includes.*/
421 RULE_TYPE_EXACTLY, /**< Specifies the filtering rule for Exactly same as.*/
422 } email_filtering_type_t;
426 * This enumeration specifies the action for filtering type.
430 EMAIL_FILTER_MOVE = 1, /**< Specifies the move of email.*/
431 EMAIL_FILTER_BLOCK = 2, /**< Specifies the block of email.*/
432 EMAIL_FILTER_DELETE = 3, /**< Specifies delete email.*/
433 } email_rule_action_t;
436 * This enumeration specifies the email status.
440 EMAIL_MAIL_STATUS_NONE = 0, /**< The Mail is in No Operation state */
441 EMAIL_MAIL_STATUS_RECEIVED, /**< The mail is a received mail.*/
442 EMAIL_MAIL_STATUS_SENT, /**< The mail is a sent mail.*/
443 EMAIL_MAIL_STATUS_SAVED, /**< The mail is a saved mail.*/
444 EMAIL_MAIL_STATUS_SAVED_OFFLINE, /**< The mail is a saved mail in off-line mode.*/
445 EMAIL_MAIL_STATUS_SENDING, /**< The mail is being sent.*/
446 EMAIL_MAIL_STATUS_SEND_FAILURE, /**< The mail is a mail to been failed to send.*/
447 EMAIL_MAIL_STATUS_SEND_CANCELED, /**< The mail is a canceled mail.*/
448 EMAIL_MAIL_STATUS_SEND_WAIT, /**< The mail is a mail to be send .*/
449 EMAIL_MAIL_STATUS_SEND_SCHEDULED, /**< The mail is a scheduled mail to be send later.*/
450 } email_mail_status_t;
453 * This enumeration specifies the email priority.
457 EMAIL_MAIL_PRIORITY_HIGH = 1, /**< The priority is high.*/
458 EMAIL_MAIL_PRIORITY_NORMAL = 3, /**< The priority is normal.*/
459 EMAIL_MAIL_PRIORITY_LOW = 5, /**< The priority is low.*/
460 } email_mail_priority_t;
463 * This enumeration specifies the email status.
467 EMAIL_MAIL_REPORT_NONE = 0x00, /**< The mail isn't report mail.*/
468 EMAIL_MAIL_REPORT_REQUEST = 0x03, /* Deprecated */
469 EMAIL_MAIL_REPORT_DSN = 0x04, /**< The mail is a Delivery Status Notifications mail.*/
470 EMAIL_MAIL_REPORT_MDN = 0x08, /**< The mail is a Message Disposition Notifications mail.*/
471 EMAIL_MAIL_REQUEST_DSN = 0x10, /**< The mail requires Delivery Status Notifications.*/
472 EMAIL_MAIL_REQUEST_MDN = 0x20, /**< The mail requires Message Disposition Notifications.*/
473 } email_mail_report_t;
476 * This enumeration specifies the DRM type
480 EMAIL_ATTACHMENT_DRM_NONE = 0, /**< The mail isn't DRM file.*/
481 EMAIL_ATTACHMENT_DRM_OBJECT, /**< The mail is a DRM object.*/
482 EMAIL_ATTACHMENT_DRM_RIGHTS, /**< The mail is a DRM rights as XML format.*/
483 EMAIL_ATTACHMENT_DRM_DCF, /**< The mail is a DRM DCF.*/
484 } email_attachment_drm_t;
487 * This enumeration specifies the mail type
491 EMAIL_MAIL_TYPE_NORMAL = 0, /**< NOT a meeting request mail. A Normal mail */
492 EMAIL_MAIL_TYPE_MEETING_REQUEST = 1, /**< a meeting request mail from a serve */
493 EMAIL_MAIL_TYPE_MEETING_RESPONSE = 2, /**< a response mail about meeting request */
494 EMAIL_MAIL_TYPE_MEETING_ORIGINATINGREQUEST = 3 /**< a originating mail about meeting request */
498 * This enumeration specifies the meeting response type
502 EMAIL_MEETING_RESPONSE_NONE = 0, /**< NOT response */
503 EMAIL_MEETING_RESPONSE_ACCEPT = 1, /**< The response is acceptance */
504 EMAIL_MEETING_RESPONSE_TENTATIVE = 2, /**< The response is tentative */
505 EMAIL_MEETING_RESPONSE_DECLINE = 3, /**< The response is decline */
506 EMAIL_MEETING_RESPONSE_REQUEST = 4, /**< The response is request */
507 EMAIL_MEETING_RESPONSE_CANCEL = 5, /**< The response is cancellation */
508 } email_meeting_response_t;
512 EMAIL_ACTION_SEND_MAIL = 0,
513 EMAIL_ACTION_SYNC_HEADER = 1,
514 EMAIL_ACTION_DOWNLOAD_BODY = 2,
515 EMAIL_ACTION_DOWNLOAD_ATTACHMENT = 3,
516 EMAIL_ACTION_DELETE_MAIL = 4,
517 EMAIL_ACTION_SEARCH_MAIL = 5,
518 EMAIL_ACTION_SAVE_MAIL = 6,
519 EMAIL_ACTION_SYNC_MAIL_FLAG_TO_SERVER = 7,
520 EMAIL_ACTION_SYNC_FLAGS_FIELD_TO_SERVER = 8,
521 EMAIL_ACTION_MOVE_MAIL = 9,
522 EMAIL_ACTION_CREATE_MAILBOX = 10,
523 EMAIL_ACTION_DELETE_MAILBOX = 11,
524 EMAIL_ACTION_SYNC_HEADER_OMA = 12,
525 EMAIL_ACTION_VALIDATE_ACCOUNT = 13,
526 EMAIL_ACTION_VALIDATE_AND_CREATE_ACCOUNT = 14,
527 EMAIL_ACTION_VALIDATE_AND_UPDATE_ACCOUNT = 15,
528 EMAIL_ACTION_VALIDATE_ACCOUNT_EX = 16,
529 EMAIL_ACTION_UPDATE_MAIL = 30,
530 EMAIL_ACTION_SET_MAIL_SLOT_SIZE = 31,
531 EMAIL_ACTION_EXPUNGE_MAILS_DELETED_FLAGGED = 32,
532 EMAIL_ACTION_SEARCH_ON_SERVER = 33,
533 EMAIL_ACTION_MOVE_MAILBOX = 34,
538 * This enumeration specifies the status of getting envelope list.
544 EMAIL_LIST_PREPARE, /**< Specifies the preparation.*/
545 EMAIL_LIST_CONNECTION_START, /**< Specifies the connection start.*/
546 EMAIL_LIST_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
547 EMAIL_LIST_CONNECTION_FINISH, /**< Specifies the connection finish.*/
548 EMAIL_LIST_CONNECTION_FAIL, /**< Specifies the connection failure.*/
549 EMAIL_LIST_START, /**< Specifies the getting start.*/
550 EMAIL_LIST_PROGRESS, /**< Specifies the status of getting.*/
551 EMAIL_LIST_FINISH, /**< Specifies the getting complete.*/
552 EMAIL_LIST_FAIL, /**< Specifies the download failure.*/
553 } email_envelope_list_status_t;
556 * This enumeration specifies the downloaded status of email.
560 EMAIL_DOWNLOAD_NONE = 0,
561 EMAIL_DOWNLOAD_WAITING,
562 EMAIL_DOWNLOAD_PREPARE, /**< Specifies the preparation.*/
563 EMAIL_DOWNLOAD_CONNECTION_START, /**< Specifies the connection start.*/
564 EMAIL_DOWNLOAD_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
565 EMAIL_DOWNLOAD_CONNECTION_FINISH, /**< Specifies the connection finish.*/
566 EMAIL_DOWNLOAD_CONNECTION_FAIL, /**< Specifies the connection failure.*/
567 EMAIL_DOWNLOAD_START, /**< Specifies the download start.*/
568 EMAIL_DOWNLOAD_PROGRESS, /**< Specifies the status of download.*/
569 EMAIL_DOWNLOAD_FINISH, /**< Specifies the download complete.*/
570 EMAIL_DOWNLOAD_FAIL, /**< Specifies the download failure.*/
571 } email_download_status_t;
574 * This enumeration specifies the status of sending email.
580 EMAIL_SEND_PREPARE, /**< Specifies the preparation.*/
581 EMAIL_SEND_CONNECTION_START, /**< Specifies the connection start.*/
582 EMAIL_SEND_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
583 EMAIL_SEND_CONNECTION_FINISH, /**< Specifies the connection finish.*/
584 EMAIL_SEND_CONNECTION_FAIL, /**< Specifies the connection failure.*/
585 EMAIL_SEND_START, /**< Specifies the sending start.*/
586 EMAIL_SEND_PROGRESS, /**< Specifies the status of sending.*/
587 EMAIL_SEND_FINISH, /**< Specifies the sending complete.*/
588 EMAIL_SEND_FAIL, /**< Specifies the sending failure.*/
589 EMAIL_SAVE_WAITING, /**< Specfies the Waiting of Sync */
590 } email_send_status_t;
597 EMAIL_SYNC_CONNECTION_START,
598 EMAIL_SYNC_CONNECTION_SUCCEED,
599 EMAIL_SYNC_CONNECTION_FINISH,
600 EMAIL_SYNC_CONNECTION_FAIL,
605 } email_sync_status_t;
608 * This enumeration specifies the deleting status of email.
612 EMAIL_DELETE_NONE = 0,
613 EMAIL_DELETE_WAITING,
614 EMAIL_DELETE_PREPARE, /**< Specifies the preparation.*/
615 EMAIL_DELETE_CONNECTION_START, /**< Specifies the connection start.*/
616 EMAIL_DELETE_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
617 EMAIL_DELETE_CONNECTION_FINISH, /**< Specifies the connection finish.*/
618 EMAIL_DELETE_CONNECTION_FAIL, /**< Specifies the connection failure.*/
619 EMAIL_DELETE_START, /**< Specifies the deletion start.*/
620 EMAIL_DELETE_PROGRESS, /**< Specifies the status of deleting.*/
621 EMAIL_DELETE_SERVER_PROGRESS, /**< Specifies the status of server deleting.*/
622 EMAIL_DELETE_LOCAL_PROGRESS, /**< Specifies the status of local deleting.*/
623 EMAIL_DELETE_FINISH, /**< Specifies the deletion complete.*/
624 EMAIL_DELETE_FAIL, /**< Specifies the deletion failure.*/
625 } email_delete_status_t;
628 * This enumeration specifies the status of validating account
632 EMAIL_VALIDATE_ACCOUNT_NONE = 0,
633 EMAIL_VALIDATE_ACCOUNT_WAITING,
634 EMAIL_VALIDATE_ACCOUNT_PREPARE, /**< Specifies the preparation.*/
635 EMAIL_VALIDATE_ACCOUNT_CONNECTION_START, /**< Specifies the connection start.*/
636 EMAIL_VALIDATE_ACCOUNT_CONNECTION_SUCCEED, /**< Specifies the success of connection.*/
637 EMAIL_VALIDATE_ACCOUNT_CONNECTION_FINISH, /**< Specifies the connection finish.*/
638 EMAIL_VALIDATE_ACCOUNT_CONNECTION_FAIL, /**< Specifies the connection failure.*/
639 EMAIL_VALIDATE_ACCOUNT_START, /**< Specifies the getting start.*/
640 EMAIL_VALIDATE_ACCOUNT_PROGRESS, /**< Specifies the status of getting.*/
641 EMAIL_VALIDATE_ACCOUNT_FINISH, /**< Specifies the getting complete.*/
642 EMAIL_VALIDATE_ACCOUNT_FAIL, /**< Specifies the validation failure.*/
643 } email_validate_account_status_t;
647 EMAIL_SET_SLOT_SIZE_NONE = 0,
648 EMAIL_SET_SLOT_SIZE_WAITING,
649 EMAIL_SET_SLOT_SIZE_START,
650 EMAIL_SET_SLOT_SIZE_FINISH,
651 EMAIL_SET_SLOT_SIZE_FAIL,
652 }email_set_slot_size_status_e;
656 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_NONE = 0,
657 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_WAITING,
658 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_START,
659 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_FINISH,
660 EMAIL_EXPUNGE_MAILS_DELETED_FLAGGED_FAIL,
661 }email_expunge_mails_deleted_flagged_status_e;
665 EMAIL_SEARCH_ON_SERVER_NONE = 0,
666 EMAIL_SEARCH_ON_SERVER_WAITING,
667 EMAIL_SEARCH_ON_SERVER_START,
668 EMAIL_SEARCH_ON_SERVER_FINISH,
669 EMAIL_SEARCH_ON_SERVER_FAIL,
670 }email_search_on_server_status_e;
674 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_NONE = 0,
675 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_WAITING,
676 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_START,
677 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_FINISH,
678 EMAIL_MOVE_MAILBOX_ON_IMAP_SERVER_FAIL,
679 }email_move_mailbox_status_e;
683 EMAIL_UPDATE_MAIL_NONE = 0,
684 EMAIL_UPDATE_MAIL_WAITING,
685 EMAIL_UPDATE_MAIL_START,
686 EMAIL_UPDATE_MAIL_FINISH,
687 EMAIL_UPDATE_MAIL_FAIL,
688 }email_update_mail_status_e;
691 * This enumeration specifies the type of mailbox
695 EMAIL_MAILBOX_TYPE_NONE = 0, /**< Unspecified mailbox type*/
696 EMAIL_MAILBOX_TYPE_INBOX = 1, /**< Specified inbox type*/
697 EMAIL_MAILBOX_TYPE_SENTBOX = 2, /**< Specified sent box type*/
698 EMAIL_MAILBOX_TYPE_TRASH = 3, /**< Specified trash type*/
699 EMAIL_MAILBOX_TYPE_DRAFT = 4, /**< Specified draft box type*/
700 EMAIL_MAILBOX_TYPE_SPAMBOX = 5, /**< Specified spam box type*/
701 EMAIL_MAILBOX_TYPE_OUTBOX = 6, /**< Specified outbox type*/
702 EMAIL_MAILBOX_TYPE_ALL_EMAILS = 7, /**< Specified all emails type of gmail*/
703 EMAIL_MAILBOX_TYPE_SEARCH_RESULT = 8, /**< Specified mailbox type for result of search on server */
704 EMAIL_MAILBOX_TYPE_FLAGGED = 9, /**< Specified flagged mailbox type on gmail */
705 EMAIL_MAILBOX_TYPE_USER_DEFINED = 0xFF, /**< Specified mailbox type for all other mailboxes */
706 }email_mailbox_type_e;
710 EMAIL_SYNC_LATEST_MAILS_FIRST = 0,
711 EMAIL_SYNC_OLDEST_MAILS_FIRST,
712 EMAIL_SYNC_ALL_MAILBOX_50_MAILS,
713 } EMAIL_RETRIEVE_MODE;
718 EMAIL_EVENT_NONE = 0,
719 EMAIL_EVENT_SYNC_HEADER = 1, /* synchronize mail headers with server (network used) */
720 EMAIL_EVENT_DOWNLOAD_BODY = 2, /* download mail body from server (network used)*/
721 EMAIL_EVENT_DOWNLOAD_ATTACHMENT = 3, /* download mail attachment from server (network used) */
722 EMAIL_EVENT_SEND_MAIL = 4, /* send a mail (network used) */
723 EMAIL_EVENT_SEND_MAIL_SAVED = 5, /* send all mails in 'outbox' box (network used) */
724 EMAIL_EVENT_SYNC_IMAP_MAILBOX = 6, /* download imap mailboxes from server (network used) */
725 EMAIL_EVENT_DELETE_MAIL = 7, /* delete mails (network unused) */
726 EMAIL_EVENT_DELETE_MAIL_ALL = 8, /* delete all mails (network unused) */
727 EMAIL_EVENT_SYNC_MAIL_FLAG_TO_SERVER = 9, /* sync mail flag to server */
728 EMAIL_EVENT_SYNC_FLAGS_FIELD_TO_SERVER = 10, /* sync a field of flags to server */
729 EMAIL_EVENT_SAVE_MAIL = 11, /* add mail on server */
730 EMAIL_EVENT_MOVE_MAIL = 12, /* move mails to specific mailbox on server */
731 EMAIL_EVENT_CREATE_MAILBOX = 13,
732 EMAIL_EVENT_UPDATE_MAILBOX = 14,
733 EMAIL_EVENT_DELETE_MAILBOX = 15,
734 EMAIL_EVENT_ISSUE_IDLE = 16,
735 EMAIL_EVENT_SYNC_HEADER_OMA = 17,
736 EMAIL_EVENT_VALIDATE_ACCOUNT = 18,
737 EMAIL_EVENT_VALIDATE_AND_CREATE_ACCOUNT = 19,
738 EMAIL_EVENT_VALIDATE_AND_UPDATE_ACCOUNT = 20,
739 EMAIL_EVENT_SEARCH_ON_SERVER = 21,
740 EMAIL_EVENT_RENAME_MAILBOX_ON_IMAP_SERVER = 22,
741 EMAIL_EVENT_VALIDATE_ACCOUNT_EX = 23,
743 EMAIL_EVENT_ADD_MAIL = 10001, /* Deprecated */
744 EMAIL_EVENT_UPDATE_MAIL_OLD = 10002, /* Deprecated */
745 EMAIL_EVENT_UPDATE_MAIL = 10003,
746 EMAIL_EVENT_SET_MAIL_SLOT_SIZE = 20000,
747 EMAIL_EVENT_EXPUNGE_MAILS_DELETED_FLAGGED = 20001,
749 /* EMAIL_EVENT_LOCAL_ACTIVITY, __LOCAL_ACTIVITY_ */
751 EMAIL_EVENT_BULK_PARTIAL_BODY_DOWNLOAD = 20002, /* __FEATURE_PARTIAL_BODY_DOWNLOAD__ supported */
752 EMAIL_EVENT_LOCAL_ACTIVITY_SYNC_BULK_PBD = 20003, /* __FEATURE_PARTIAL_BODY_DOWNLOAD__ supported */
753 EMAIL_EVENT_GET_PASSWORD_LENGTH = 20004, /* get password length of an account */
754 } email_event_type_t;
759 EMAIL_EVENT_STATUS_UNUSED = 0,
760 EMAIL_EVENT_STATUS_WAIT,
761 EMAIL_EVENT_STATUS_STARTED,
762 EMAIL_EVENT_STATUS_CANCELED,
763 } email_event_status_type_t;
769 EMAIL_SORT_DATETIME_HIGH = 0,
770 EMAIL_SORT_DATETIME_LOW,
771 EMAIL_SORT_SENDER_HIGH,
772 EMAIL_SORT_SENDER_LOW,
773 EMAIL_SORT_RCPT_HIGH,
775 EMAIL_SORT_SUBJECT_HIGH,
776 EMAIL_SORT_SUBJECT_LOW,
777 EMAIL_SORT_PRIORITY_HIGH,
778 EMAIL_SORT_PRIORITY_LOW,
779 EMAIL_SORT_ATTACHMENT_HIGH,
780 EMAIL_SORT_ATTACHMENT_LOW,
781 EMAIL_SORT_FAVORITE_HIGH,
782 EMAIL_SORT_FAVORITE_LOW,
783 EMAIL_SORT_MAILBOX_NAME_HIGH,
784 EMAIL_SORT_MAILBOX_NAME_LOW,
785 EMAIL_SORT_FLAGGED_FLAG_HIGH,
786 EMAIL_SORT_FLAGGED_FLAG_LOW,
787 EMAIL_SORT_SEEN_FLAG_HIGH,
788 EMAIL_SORT_SEEN_FLAG_LOW,
794 EMAIL_MAILBOX_SORT_BY_NAME_ASC = 0,
795 EMAIL_MAILBOX_SORT_BY_NAME_DSC,
796 EMAIL_MAILBOX_SORT_BY_TYPE_ASC,
797 EMAIL_MAILBOX_SORT_BY_TYPE_DSC,
798 } email_mailbox_sort_type_t;
802 * This enumeration specifies the priority.
806 EMAIL_OPTION_PRIORITY_HIGH = 1, /**< Specifies the high priority.*/
807 EMAIL_OPTION_PRIORITY_NORMAL = 3, /**< Specifies the normal priority*/
808 EMAIL_OPTION_PRIORITY_LOW = 5, /**< Specifies the low priority.*/
812 * This enumeration specifies the saving save a copy after sending.
816 EMAIL_OPTION_KEEP_LOCAL_COPY_OFF = 0, /**< Specifies off the keeping local copy.*/
817 EMAIL_OPTION_KEEP_LOCAL_COPY_ON = 1, /**< Specifies on the keeping local copy.*/
821 * This enumeration specifies the request of delivery report.
825 EMAIL_OPTION_REQ_DELIVERY_RECEIPT_OFF = 0, /**< Specifies off the requesting delivery receipt.*/
826 EMAIL_OPTION_REQ_DELIVERY_RECEIPT_ON = 1, /**< Specifies on the requesting delivery receipt.*/
830 * This enumeration specifies the request of read receipt.
834 EMAIL_OPTION_REQ_READ_RECEIPT_OFF = 0, /**< Specifies off the requesting read receipt.*/
835 EMAIL_OPTION_REQ_READ_RECEIPT_ON = 1, /**< Specifies on the requesting read receipt.*/
839 * This enumeration specifies the blocking of address.
843 EMAIL_OPTION_BLOCK_ADDRESS_OFF = 0, /**< Specifies off the blocking by address.*/
844 EMAIL_OPTION_BLOCK_ADDRESS_ON = 1, /**< Specifies on the blocking by address.*/
848 * This enumeration specifies the blocking of subject.
852 EMAIL_OPTION_BLOCK_SUBJECT_OFF = 0, /**< Specifies off the blocking by subject.*/
853 EMAIL_OPTION_BLOCK_SUBJECT_ON = 1, /**< Specifies on the blocking by subject.*/
858 EMAIL_LIST_TYPE_UNREAD = -3,
859 EMAIL_LIST_TYPE_LOCAL = -2,
860 EMAIL_LIST_TYPE_THREAD = -1,
861 EMAIL_LIST_TYPE_NORMAL = 0
865 * This enumeration specifies the mailbox sync type.
869 EMAIL_MAILBOX_ALL = -1, /**< All mailboxes.*/
870 EMAIL_MAILBOX_FROM_SERVER = 0, /**< Mailboxes from server. */
871 EMAIL_MAILBOX_FROM_LOCAL = 1, /**< Mailboxes from local. */
878 UPDATE_ATTACHMENT_INFO,
884 UPDATE_FROM_CONTACT_INFO,
885 UPDATE_TO_CONTACT_INFO,
886 UPDATE_ALL_CONTACT_NAME,
887 UPDATE_ALL_CONTACT_INFO,
888 UPDATE_STICKY_EXTRA_FLAG,
889 UPDATE_PARTIAL_BODY_DOWNLOAD,
891 UPDATE_SEEN_FLAG_OF_THREAD,
893 } email_mail_change_type_t; // Should be moved intenal types */
897 * This enumeration specifies the address type.
901 EMAIL_ADDRESS_TYPE_FROM = 1, /**< Specifies the from address.*/
902 EMAIL_ADDRESS_TYPE_TO, /**< Specifies the to recipient address.*/
903 EMAIL_ADDRESS_TYPE_CC, /**< Specifies the cc recipient address.*/
904 EMAIL_ADDRESS_TYPE_BCC, /**< Specifies the bcc recipient address.*/
905 EMAIL_ADDRESS_TYPE_REPLY, /**< Specifies the reply recipient address.*/
906 EMAIL_ADDRESS_TYPE_RETURN, /**< Specifies the return recipient address.*/
907 } email_address_type_t;
910 * This enumeration specifies the search type for searching mailbox.
914 EMAIL_MAILBOX_SEARCH_KEY_TYPE_SUBJECT, /**< The search key is for searching subject.*/
915 EMAIL_MAILBOX_SEARCH_KEY_TYPE_FROM, /**< The search key is for searching sender address.*/
916 EMAIL_MAILBOX_SEARCH_KEY_TYPE_BODY, /**< The search key is for searching body.*/
917 EMAIL_MAILBOX_SEARCH_KEY_TYPE_TO, /**< The search key is for searching recipient address.*/
918 } email_mailbox_search_key_t;
921 * This enumeration specifies the download status of mail body.
926 EMAIL_BODY_DOWNLOAD_STATUS_NONE = 0,
927 EMAIL_BODY_DOWNLOAD_STATUS_FULLY_DOWNLOADED = 1,
928 EMAIL_BODY_DOWNLOAD_STATUS_PARTIALLY_DOWNLOADED = 2,
929 } email_body_download_status_t;
932 * This enumeration specifies the moving type.
936 EMAIL_MOVED_BY_COMMAND = 0,
937 EMAIL_MOVED_BY_MOVING_THREAD,
938 EMAIL_MOVED_AFTER_SENDING,
939 EMAIL_MOVED_CANCELATION_MAIL
943 * This enumeration specifies the deletion type.
947 EMAIL_DELETED_BY_COMMAND = 0,
948 EMAIL_DELETED_BY_OVERFLOW,
949 EMAIL_DELETED_BY_DELETING_THREAD,
950 EMAIL_DELETED_BY_MOVING_TO_OTHER_ACCOUNT,
951 EMAIL_DELETED_AFTER_SENDING,
952 EMAIL_DELETED_FROM_SERVER,
956 * This enumeration specifies the status field type.
960 EMAIL_FLAGS_SEEN_FIELD = 0,
961 EMAIL_FLAGS_DELETED_FIELD,
962 EMAIL_FLAGS_FLAGGED_FIELD,
963 EMAIL_FLAGS_ANSWERED_FIELD,
964 EMAIL_FLAGS_RECENT_FIELD,
965 EMAIL_FLAGS_DRAFT_FIELD,
966 EMAIL_FLAGS_FORWARDED_FIELD,
967 EMAIL_FLAGS_FIELD_COUNT,
968 } email_flags_field_type;
972 EMAIL_FLAG_FLAGED = 1,
973 EMAIL_FLAG_TASK_STATUS_CLEAR = 2,
974 EMAIL_FLAG_TASK_STATUS_COMPLETE = 3,
975 EMAIL_FLAG_TASK_STATUS_ACTIVE = 4,
976 } email_flagged_type;
979 EMAIL_SEARCH_FILTER_TYPE_MESSAGE_NO = 1, /* integer type */
980 EMAIL_SEARCH_FILTER_TYPE_UID = 2, /* integer type */
981 EMAIL_SEARCH_FILTER_TYPE_BCC = 7, /* string type */
982 EMAIL_SEARCH_FILTER_TYPE_CC = 9, /* string type */
983 EMAIL_SEARCH_FILTER_TYPE_FROM = 10, /* string type */
984 EMAIL_SEARCH_FILTER_TYPE_KEYWORD = 11, /* string type */
985 EMAIL_SEARCH_FILTER_TYPE_SUBJECT = 13, /* string type */
986 EMAIL_SEARCH_FILTER_TYPE_TO = 15, /* string type */
987 EMAIL_SEARCH_FILTER_TYPE_SIZE_LARSER = 16, /* integer type */
988 EMAIL_SEARCH_FILTER_TYPE_SIZE_SMALLER = 17, /* integer type */
989 EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_BEFORE = 20, /* time type */
990 EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_ON = 21, /* time type */
991 EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_SINCE = 22, /* time type */
992 EMAIL_SEARCH_FILTER_TYPE_FLAGS_ANSWERED = 26, /* integer type */
993 EMAIL_SEARCH_FILTER_TYPE_FLAGS_DELETED = 28, /* integer type */
994 EMAIL_SEARCH_FILTER_TYPE_FLAGS_DRAFT = 30, /* integer type */
995 EMAIL_SEARCH_FILTER_TYPE_FLAGS_FLAGED = 32, /* integer type */
996 EMAIL_SEARCH_FILTER_TYPE_FLAGS_RECENT = 34, /* integer type */
997 EMAIL_SEARCH_FILTER_TYPE_FLAGS_SEEN = 36, /* integer type */
998 EMAIL_SEARCH_FILTER_TYPE_MESSAGE_ID = 43, /* string type */
999 } email_search_filter_type;
1002 EMAIL_DRM_TYPE_NONE = 0,
1003 EMAIL_DRM_TYPE_OBJECT = 1,
1004 EMAIL_DRM_TYPE_RIGHT = 2,
1005 EMAIL_DRM_TYPE_DCF = 3
1009 EMAIL_DRM_METHOD_NONE = 0,
1010 EMAIL_DRM_METHOD_FL = 1,
1011 EMAIL_DRM_METHOD_CD = 2,
1012 EMAIL_DRM_METHOD_SSD = 3,
1013 EMAIL_DRM_METHOD_SD = 4
1017 EMAIL_CANCELED_BY_USER = 0,
1018 EMAIL_CANCELED_BY_MDM = 1,
1019 } email_cancelation_type;
1022 EMAIL_MAIL_ATTRIBUTE_MAIL_ID = 0, /* integer type */
1023 EMAIL_MAIL_ATTRIBUTE_ACCOUNT_ID = 1, /* integer type */
1024 EMAIL_MAIL_ATTRIBUTE_MAILBOX_ID = 2, /* integer type */
1025 EMAIL_MAIL_ATTRIBUTE_MAILBOX_NAME = 3, /* string type */
1026 EMAIL_MAIL_ATTRIBUTE_MAILBOX_TYPE = 4, /* integer type */
1027 EMAIL_MAIL_ATTRIBUTE_SUBJECT = 5, /* string type */
1028 EMAIL_MAIL_ATTRIBUTE_DATE_TIME = 6, /* datetime type */
1029 EMAIL_MAIL_ATTRIBUTE_SERVER_MAIL_STATUS = 7, /* integer type */
1030 EMAIL_MAIL_ATTRIBUTE_SERVER_MAILBOX_NAME = 8, /* string type */
1031 EMAIL_MAIL_ATTRIBUTE_SERVER_MAIL_ID = 9, /* string type */
1032 EMAIL_MAIL_ATTRIBUTE_MESSAGE_ID = 10, /* string type */
1033 EMAIL_MAIL_ATTRIBUTE_REFERENCE_MAIL_ID = 11, /* integer type */
1034 EMAIL_MAIL_ATTRIBUTE_FROM = 12, /* string type */
1035 EMAIL_MAIL_ATTRIBUTE_TO = 13, /* string type */
1036 EMAIL_MAIL_ATTRIBUTE_CC = 14, /* string type */
1037 EMAIL_MAIL_ATTRIBUTE_BCC = 15, /* string type */
1038 EMAIL_MAIL_ATTRIBUTE_BODY_DOWNLOAD_STATUS = 16, /* integer type */
1039 EMAIL_MAIL_ATTRIBUTE_FILE_PATH_PLAIN = 17, /* string type */
1040 EMAIL_MAIL_ATTRIBUTE_FILE_PATH_HTML = 18, /* string type */
1041 EMAIL_MAIL_ATTRIBUTE_FILE_SIZE = 19, /* integer type */
1042 EMAIL_MAIL_ATTRIBUTE_FLAGS_SEEN_FIELD = 20, /* integer type */
1043 EMAIL_MAIL_ATTRIBUTE_FLAGS_DELETED_FIELD = 21, /* integer type */
1044 EMAIL_MAIL_ATTRIBUTE_FLAGS_FLAGGED_FIELD = 22, /* integer type */
1045 EMAIL_MAIL_ATTRIBUTE_FLAGS_ANSWERED_FIELD = 23, /* integer type */
1046 EMAIL_MAIL_ATTRIBUTE_FLAGS_RECENT_FIELD = 24, /* integer type */
1047 EMAIL_MAIL_ATTRIBUTE_FLAGS_DRAFT_FIELD = 25, /* integer type */
1048 EMAIL_MAIL_ATTRIBUTE_FLAGS_FORWARDED_FIELD = 26, /* integer type */
1049 EMAIL_MAIL_ATTRIBUTE_DRM_STATUS = 27, /* integer type */
1050 EMAIL_MAIL_ATTRIBUTE_PRIORITY = 28, /* integer type */
1051 EMAIL_MAIL_ATTRIBUTE_SAVE_STATUS = 29, /* integer type */
1052 EMAIL_MAIL_ATTRIBUTE_LOCK_STATUS = 30, /* integer type */
1053 EMAIL_MAIL_ATTRIBUTE_REPORT_STATUS = 31, /* integer type */
1054 EMAIL_MAIL_ATTRIBUTE_ATTACHMENT_COUNT = 32, /* integer type */
1055 EMAIL_MAIL_ATTRIBUTE_INLINE_CONTENT_COUNT = 33, /* integer type */
1056 EMAIL_MAIL_ATTRIBUTE_THREAD_ID = 34, /* integer type */
1057 EMAIL_MAIL_ATTRIBUTE_THREAD_ITEM_COUNT = 35, /* integer type */
1058 EMAIL_MAIL_ATTRIBUTE_PREVIEW_TEXT = 36, /* string type */
1059 EMAIL_MAIL_ATTRIBUTE_MEETING_REQUEST_STATUS = 37, /* integer type */
1060 EMAIL_MAIL_ATTRIBUTE_MESSAGE_CLASS = 38, /* integer type */
1061 EMAIL_MAIL_ATTRIBUTE_DIGEST_TYPE = 39, /* integer type */
1062 EMAIL_MAIL_ATTRIBUTE_SMIME_TYPE = 40, /* integer type */
1063 EMAIL_MAIL_ATTRIBUTE_SCHEDULED_SENDING_TIME = 41, /* integer type */
1064 EMAIL_MAIL_ATTRIBUTE_EAS_DATA_LENGTH_TYPE = 42, /* integer type */
1065 EMAIL_MAIL_ATTRIBUTE_EAS_DATA_TYPE = 43, /* binary type */
1066 EMAIL_MAIL_ATTRIBUTE_END
1067 } email_mail_attribute_type;
1070 EMAIL_MAIL_TEXT_ATTRIBUTE_FULL_TEXT = 1,
1071 EMAIL_MAIL_TEXT_ATTRIBUTE_END
1072 } email_mail_text_attribute_type;
1075 EMAIL_MAIL_ATTRIBUTE_VALUE_TYPE_NONE = 0,
1076 EMAIL_MAIL_ATTRIBUTE_VALUE_TYPE_INTEGER = 1,
1077 EMAIL_MAIL_ATTRIBUTE_VALUE_TYPE_STRING = 2,
1078 EMAIL_MAIL_ATTRIBUTE_VALUE_TYPE_TIME = 3,
1079 EMAIL_MAIL_ATTRIBUTE_VALUE_TYPE_BINARY = 4
1080 } email_mail_attribute_value_type;
1083 EMAIL_ADD_MY_ADDRESS_OPTION_DO_NOT_ADD = 0,
1084 EMAIL_ADD_MY_ADDRESS_OPTION_ALWAYS_ADD_TO_CC = 1,
1085 EMAIL_ADD_MY_ADDRESS_OPTION_ALWAYS_ADD_TO_BCC = 2,
1086 } email_add_my_address_option_type;
1089 EMAIL_MESSAGE_CLASS_UNSPECIFIED,
1090 EMAIL_MESSAGE_CLASS_UNKNOWN,
1091 EMAIL_MESSAGE_CLASS_NOTE,
1092 EMAIL_MESSAGE_CLASS_NOTE_RULES_OF_TEMPLATE_MICROSOFT,
1093 EMAIL_MESSAGE_CLASS_NOTE_SMIME,
1094 EMAIL_MESSAGE_CLASS_NOTE_SMIME_MULTIPART_SIGNED,
1095 EMAIL_MESSAGE_CLASS_NOTIFICATION_MEETING,
1096 EMAIL_MESSAGE_CLASS_OCTEL_VOICE,
1097 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_REQUEST,
1098 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_CANCELED,
1099 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_RESP_POS,
1100 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_RESP_TENT,
1101 EMAIL_MESSAGE_CLASS_SCHEDULE_MEETING_RESP_NEG,
1102 EMAIL_MESSAGE_CLASS_POST,
1103 EMAIL_MESSAGE_CLASS_INFO_PATH_FORM,
1104 EMAIL_MESSAGE_CLASS_VOICE_NOTES,
1105 EMAIL_MESSAGE_CLASS_SHARING,
1106 EMAIL_MESSAGE_CLASS_NOTE_EXCHANGE_ACTIVE_SYNC_REMOTE_WIPE_CONFIRMATION,
1107 EMAIL_MESSAGE_CLASS_VOICE_MAIL,
1108 EMAIL_MESSAGE_CLASS_SMS,
1109 EMAIL_MESSAGE_CLASS_IRM_MESSAGE = 0x00100000,
1110 EMAIL_MESSAGE_CLASS_SMART_REPLY = 0x01000000,
1111 EMAIL_MESSAGE_CLASS_SMART_FORWARD = 0x02000000,
1112 EMAIL_MESSAGE_CLASS_REPORT_NOT_READ_REPORT = 0x10000000,
1113 EMAIL_MESSAGE_CLASS_REPORT_READ_REPORT = 0x20000000,
1114 EMAIL_MESSAGE_CLASS_REPORT_NON_DELIVERY_RECEIPT = 0x40000000,
1115 EMAIL_MESSAGE_CLASS_REPORT_DELIVERY_RECEIPT = 0x80000000,
1116 } email_message_class;
1119 EMAIL_SMIME_NONE = 0, /* Not use smime */
1121 EMAIL_SMIME_ENCRYPTED,
1122 EMAIL_SMIME_SIGNED_AND_ENCRYPTED,
1126 CIPHER_TYPE_DES3 = 0,
1128 CIPHER_TYPE_RC2_128,
1131 } email_cipher_type;
1134 DIGEST_TYPE_SHA1 = 0,
1136 } email_digest_type;
1138 /*****************************************************************************/
1139 /* Data Structures */
1140 /*****************************************************************************/
1143 * This structure is used to save mail time.
1147 unsigned short year; /**< Specifies the Year.*/
1148 unsigned short month; /**< Specifies the Month.*/
1149 unsigned short day; /**< Specifies the Day.*/
1150 unsigned short hour; /**< Specifies the Hour.*/
1151 unsigned short minute; /**< Specifies the Minute.*/
1152 unsigned short second; /**< Specifies the Second.*/
1153 } email_datetime_t DEPRECATED;
1156 * This structure is used to save the options.
1160 email_mail_priority_t priority; /**< Specifies the prority. 1=high 3=normal 5=low.*/
1161 int keep_local_copy; /**< Specifies the saving save a copy after sending.*/
1162 int req_delivery_receipt; /**< Specifies the request of delivery report. 0=off 1=on*/
1163 int req_read_receipt; /**< Specifies the request of read receipt. 0=off 1=on*/
1164 int download_limit; /**< Specifies the limit of size for downloading.*/
1165 int block_address; /**< Specifies the blocking of address. 0=off 1=on*/
1166 int block_subject; /**< Specifies the blocking of subject. 0=off 1=on*/
1167 char *display_name_from; /**< Specifies the display name of from.*/
1168 int reply_with_body; /**< Specifies the replying with body 0=off 1=on*/
1169 int forward_with_files; /**< Specifies the fowarding with files 0=off 1=on*/
1170 int add_myname_card; /**< Specifies the adding name card 0=off 1=on*/
1171 int add_signature; /**< Specifies the adding signature 0=off 1=on*/
1172 char *signature; /**< Specifies the signature*/
1173 email_add_my_address_option_type add_my_address_to_bcc; /**< Specifies whether cc or bcc field should be always filled with my address. */
1177 * This structure is used to save the information of email account.
1181 /* General account information */
1182 int account_id; /**< Account id */
1183 char *account_name; /**< Account name */
1184 int account_svc_id; /**< AccountSvc priv data: Specifies id from account-svc */
1185 int sync_status; /**< Sync Status. SYNC_STATUS_FINISHED, SYNC_STATUS_SYNCING, SYNC_STATUS_HAVE_NEW_MAILS */
1186 int sync_disabled; /**< If this attriube is set as true, email-service will not synchronize this account. */
1187 int default_mail_slot_size;
1188 char *logo_icon_path; /**< account logo icon (used by account svc and email app) */
1189 void *user_data; /**< binary user data */
1190 int user_data_length; /**< user data length */
1192 /* User information */
1193 char *user_display_name; /**< User's display */
1194 char *user_email_address; /**< User's email address */
1195 char *reply_to_address; /**< Email address for reply */
1196 char *return_address; /**< Email address for error from server*/
1198 /* Configuration for incoming server */
1199 email_account_server_t incoming_server_type; /**< Incoming server type */
1200 char *incoming_server_address; /**< Incoming server address */
1201 int incoming_server_port_number; /**< Incoming server port number */
1202 char *incoming_server_user_name; /**< Incoming server user name */
1203 char *incoming_server_password; /**< Incoming server password */
1204 int incoming_server_secure_connection; /**< Does incoming server requires secured connection? */
1206 /* Options for incoming server */
1207 email_imap4_retrieval_mode_t retrieval_mode; /**< Retrieval mode : EMAIL_IMAP4_RETRIEVAL_MODE_NEW or EMAIL_IMAP4_RETRIEVAL_MODE_ALL */
1208 int keep_mails_on_pop_server_after_download; /**< Keep mails on POP server after download */
1209 int check_interval; /**< Specifies the interval for checking new mail periodically */
1210 int auto_download_size; /**< Specifies the size for auto download in bytes. -1 means entire mails body */
1212 /* Configuration for outgoing server */
1213 email_account_server_t outgoing_server_type; /**< Outgoing server type */
1214 char *outgoing_server_address; /**< Outgoing server address */
1215 int outgoing_server_port_number; /**< Outgoing server port number */
1216 char *outgoing_server_user_name; /**< Outgoing server user name */
1217 char *outgoing_server_password; /**< Outgoing server password */
1218 int outgoing_server_secure_connection; /**< Does outgoing server requires secured connection? */
1219 int outgoing_server_need_authentication; /**< Does outgoing server requires authentication? */
1220 int outgoing_server_use_same_authenticator; /**< Use same authenticator for outgoing server */
1223 /* Options for outgoing server */
1224 email_option_t options;
1226 /* Authentication Options */
1227 int pop_before_smtp; /**< POP before SMTP Authentication */
1228 int incoming_server_requires_apop; /**< APOP authentication */
1230 /* S/MIME Options */
1231 email_smime_type smime_type; /**< Specifies the smime type 0=Normal 1=Clear signed 2=encrypted 3=Signed + encrypted */
1232 char *certificate_path; /**< Specifies the certificate path of private*/
1233 email_cipher_type cipher_type; /**< Specifies the encryption algorithm*/
1234 email_digest_type digest_type; /**< Specifies the digest algorithm*/
1238 * This structure is used to save the information of certificate
1247 int expiration_year;
1248 int expiration_month;
1250 char *issue_organization_name;
1251 char *email_address;
1254 } email_certificate_t;
1257 * This structure is used to save the information of email server.
1262 int configuration_id; /**< Specifies the id of configuration.*/
1263 email_account_server_t protocol_type; /**< Specifies the type of configuration.*/
1264 char *server_addr; /**< Specifies the address of configuration.*/
1265 int port_number; /**< Specifies the port number of configuration.*/
1266 int security_type; /**< Specifies the security such as SSL.*/
1267 int auth_type; /**< Specifies the authentication type of configuration.*/
1268 } email_protocol_config_t;
1272 char *service_name; /**< Specifies the name of service.*/
1273 int authname_format; /**< Specifies the type of user name for authentication.*/
1274 int protocol_conf_count; /**< Specifies count of protocol configurations.*/
1275 email_protocol_config_t *protocol_config_array; /**< Specifies array of protocol configurations.*/
1276 } email_server_info_t;
1281 char mailbox_name[MAILBOX_NAME_LENGTH];
1282 } email_mailbox_type_item_t;
1285 * This structure is contains the Mail information.
1290 int mail_id; /**< Specifies the Mail ID.*/
1291 int account_id; /**< Specifies the Account ID.*/
1292 int mailbox_id; /**< Specifies the Mailbox ID.*/
1293 email_mailbox_type_e mailbox_type; /**< Specifies the mailbox type of the mail. */
1294 char *subject; /**< Specifies the subject.*/
1295 time_t date_time; /**< Specifies the Date time.*/
1296 int server_mail_status; /**< Specifies the Whether sever mail or not.*/
1297 char *server_mailbox_name; /**< Specifies the server mailbox.*/
1298 char *server_mail_id; /**< Specifies the Server Mail ID.*/
1299 char *message_id; /**< Specifies the message id */
1300 int reference_mail_id; /**< Specifies the reference mail id */
1301 char *full_address_from; /**< Specifies the From address.*/
1302 char *full_address_reply; /**< Specifies the Reply to address */
1303 char *full_address_to; /**< Specifies the To address.*/
1304 char *full_address_cc; /**< Specifies the CC address.*/
1305 char *full_address_bcc; /**< Specifies the BCC address*/
1306 char *full_address_return; /**< Specifies the return Path*/
1307 char *email_address_sender; /**< Specifies the email address of sender.*/
1308 char *email_address_recipient; /**< Specifies the email address of recipients.*/
1309 char *alias_sender; /**< Specifies the alias of sender. */
1310 char *alias_recipient; /**< Specifies the alias of recipients. */
1311 int body_download_status; /**< Specifies the Text downloaded or not.*/
1312 char *file_path_plain; /**< Specifies the path of text mail body.*/
1313 char *file_path_html; /**< Specifies the path of HTML mail body.*/
1314 char *file_path_mime_entity; /**< Specifies the path of MIME entity. */
1315 int mail_size; /**< Specifies the Mail Size.*/
1316 char flags_seen_field; /**< Specifies the seen flags*/
1317 char flags_deleted_field; /**< Specifies the deleted flags*/
1318 char flags_flagged_field; /**< Specifies the flagged flags*/
1319 char flags_answered_field; /**< Specifies the answered flags*/
1320 char flags_recent_field; /**< Specifies the recent flags*/
1321 char flags_draft_field; /**< Specifies the draft flags*/
1322 char flags_forwarded_field; /**< Specifies the forwarded flags*/
1323 int DRM_status; /**< Has the mail DRM content? (1 : true, 0 : false) */
1324 email_mail_priority_t priority; /**< Specifies the priority of the mail.*/
1325 email_mail_status_t save_status; /**< Specifies the save status*/
1326 int lock_status; /**< Specifies the mail is locked*/
1327 email_mail_report_t report_status; /**< Specifies the Mail Report.*/
1328 int attachment_count; /**< Specifies the attachment count. */
1329 int inline_content_count; /**< Specifies the inline content count. */
1330 int thread_id; /**< Specifies the thread id for thread view. */
1331 int thread_item_count; /**< Specifies the item count of specific thread. */
1332 char *preview_text; /**< Specifies the preview body. */
1333 email_mail_type_t meeting_request_status; /**< Specifies the status of meeting request. */
1334 int message_class; /**< Specifies the class of message for EAS. */ /* email_message_class */
1335 email_digest_type digest_type; /**< Specifies the digest algorithm*/
1336 email_smime_type smime_type; /**< Specifies the SMIME type. */
1337 time_t scheduled_sending_time; /**< Specifies the scheduled sending time.*/
1338 int eas_data_length; /**< Specifies the length of eas_data. */
1339 char *eas_data; /**< Specifies the data for eas engine. */
1340 } email_mail_data_t;
1343 * This structure is contains information for displaying mail list.
1347 int mail_id; /**< Specifies the mail id.*/
1348 int account_id; /**< Specifies the account id.*/
1349 int mailbox_id; /**< Specifies the mailbox id.*/
1350 char full_address_from[STRING_LENGTH_FOR_DISPLAY]; /**< Specifies the full from email address.*/
1351 char email_address_sender[MAX_EMAIL_ADDRESS_LENGTH]; /**< Specifies the sender email address.*/
1352 char email_address_recipient[STRING_LENGTH_FOR_DISPLAY]; /**< Specifies the recipients email address.*/
1353 char subject[STRING_LENGTH_FOR_DISPLAY]; /**< Specifies the subject.*/
1354 int body_download_status; /**< Specifies the text donwloaded or not.*/
1355 time_t date_time; /**< Specifies the date time.*/
1356 char flags_seen_field; /**< Specifies the seen flags*/
1357 char flags_deleted_field; /**< Specifies the deleted flags*/
1358 char flags_flagged_field; /**< Specifies the flagged flags*/
1359 char flags_answered_field; /**< Specifies the answered flags*/
1360 char flags_recent_field; /**< Specifies the recent flags*/
1361 char flags_draft_field; /**< Specifies the draft flags*/
1362 char flags_forwarded_field; /**< Specifies the forwarded flags*/
1363 int DRM_status; /**< Has the mail DRM content? (1 : true, 0 : false) */
1364 email_mail_priority_t priority; /**< Specifies the priority of Mails.*/ /* email_mail_priority_t*/
1365 email_mail_status_t save_status; /**< Specifies the save status*/ /* email_mail_status_t */
1366 int lock_status; /**< Specifies the locked*/
1367 email_mail_report_t report_status; /**< Specifies the mail report.*/ /* email_mail_report_t */
1368 int attachment_count; /**< Specifies the attachment count. */
1369 int inline_content_count; /**< Specifies the inline content count. */
1370 char preview_text[MAX_PREVIEW_TEXT_LENGTH]; /**< text for preview body*/
1371 int thread_id; /**< thread id for thread view*/
1372 int thread_item_count; /**< item count of specific thread */
1373 email_mail_type_t meeting_request_status; /**< Whether the mail is a meeting request or not */ /* email_mail_type_t */
1374 int message_class; /**< Specifies the message class */ /* email_message_class */
1375 email_smime_type smime_type; /**< Specifies the smime type */ /* email_smime_type */
1376 time_t scheduled_sending_time; /**< Specifies the scheduled sending time.*/
1377 int eas_data_length; /**< Specifies the length of eas_data. */
1378 char *eas_data; /**< Specifies the data for eas engine. */
1379 } email_mail_list_item_t;
1382 * This structure is used to save the filtering structure.
1386 int account_id; /**< Specifies the account ID.*/
1387 int filter_id; /**< Specifies the filtering ID.*/
1388 email_rule_type_t type; /**< Specifies the filtering type.*/
1389 char *value; /**< Specifies the filtering value.*/
1390 email_rule_action_t faction; /**< Specifies the action type for filtering.*/
1391 int target_mailbox_id; /**< Specifies the mail box if action type means move.*/
1392 int flag1; /**< Specifies the activation.*/
1393 int flag2; /**< Reserved.*/
1397 * This structure is used to save the information of mail flag.
1401 unsigned int seen : 1; /**< Specifies the read email.*/
1402 unsigned int deleted : 1; /**< Reserved.*/
1403 unsigned int flagged : 1; /**< Specifies the flagged email.*/
1404 unsigned int answered : 1; /**< Reserved.*/
1405 unsigned int recent : 1; /**< Reserved.*/
1406 unsigned int draft : 1; /**< Specifies the draft email.*/
1407 unsigned int attachment_count : 1; /**< Reserved.*/
1408 unsigned int forwarded : 1; /**< Reserved.*/
1409 unsigned int sticky : 1; /**< Sticky flagged mails cannot be deleted */
1410 } email_mail_flag_t /* DEPRECATED */;
1414 * This structure is used to save the information of mail extra flag.
1418 unsigned int priority : 3; /**< Specifies the mail priority.
1419 The value is greater than or equal to EMAIL_MAIL_PRIORITY_HIGH.
1420 The value is less than or equal to EMAIL_MAIL_PRIORITY_LOW.*/
1421 unsigned int status : 4; /**< Specifies the mail status.
1422 The value is a value of enumeration email_mail_status_t.*/
1423 unsigned int noti : 1; /**< Specifies the notified mail.*/
1424 unsigned int lock : 1; /**< Specifies the locked mail.*/
1425 unsigned int report : 2; /**< Specifies the MDN/DSN mail. The value is a value of enumeration email_mail_report_t.*/
1426 unsigned int drm : 1; /**< Specifies the drm mail.*/
1427 unsigned int text_download_yn : 2; /**< body download y/n*/
1428 } email_extra_flag_t DEPRECATED;
1431 * This structure is used to save the information of attachment.
1436 char *attachment_name;
1437 char *attachment_path;
1438 int attachment_size;
1444 int inline_content_status;
1445 char *attachment_mime_type; /**< Specifies the context mime type.*/
1446 } email_attachment_data_t;
1450 int offset_from_GMT;
1451 char standard_name[32];
1452 struct tm standard_time_start_date;
1454 char daylight_name[32];
1455 struct tm daylight_time_start_date;
1457 } email_time_zone_t;
1461 int mail_id; /**< Specifies the mail id of meeting request on DB. This is the primary key. */
1462 email_meeting_response_t meeting_response; /**< Specifies the meeting response. */
1463 struct tm start_time;
1465 char *location; /**< Specifies the location of meeting. Maximum length of this string is 32768 */
1466 char *global_object_id; /**< Specifies the object id. */
1467 email_time_zone_t time_zone;
1468 } email_meeting_request_t;
1471 * This structure is used to save the information of sender list with unread/total mail counts
1475 char *address; /**< Specifies the address of a sender.*/
1476 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) */
1477 int unread_count; /**< Specifies the number of unread mails received from sender address*/
1478 int total_count; /**< Specifies the total number of mails which are received from sender address*/
1479 } email_sender_list_t /* DEPRECATED */;
1483 * This structure is used to save the information of mailbox.
1487 int mailbox_id; /**< Unique id on mailbox table.*/
1488 char *mailbox_name; /**< Specifies the path of mailbox.*/
1489 email_mailbox_type_e mailbox_type; /**< Specifies the type of mailbox */
1490 char *alias; /**< Specifies the display name of mailbox.*/
1491 int unread_count; /**< Specifies the unread mail count in the mailbox.*/
1492 int total_mail_count_on_local; /**< Specifies the total number of mails in the mailbox in the local DB.*/
1493 int total_mail_count_on_server; /**< Specifies the total number of mails in the mailbox in the mail server.*/
1494 int local; /**< Specifies the local mailbox.*/
1495 int account_id; /**< Specifies the account ID for mailbox.*/
1496 int mail_slot_size; /**< Specifies how many mails can be stored in local mailbox.*/
1497 int no_select; /**< Specifies the 'no_select' attribute from xlist.*/
1498 time_t last_sync_time;
1499 int deleted_flag; /**< Specifies whether mailbox is deleted.*/
1504 email_address_type_t address_type;
1509 } email_address_info_t;
1517 } email_address_info_list_t;
1521 int address_type; /* type of mail (sender : 0, recipient : 1)*/
1522 int address_count; /* The number of email addresses */
1523 char **address_list; /* strings of email addresses */
1524 } email_email_address_list_t;
1527 typedef struct _email_search_filter_t {
1528 email_search_filter_type search_filter_type; /* type of search filter */
1530 int integer_type_key_value;
1531 time_t time_type_key_value;
1532 char *string_type_key_value;
1533 } search_filter_key_value;
1534 } email_search_filter_t;
1537 EMAIL_LIST_FILTER_RULE_EQUAL = 0,
1538 EMAIL_LIST_FILTER_RULE_NOT_EQUAL = 1,
1539 EMAIL_LIST_FILTER_RULE_LESS_THAN = 2,
1540 EMAIL_LIST_FILTER_RULE_GREATER_THAN = 3,
1541 EMAIL_LIST_FILTER_RULE_LESS_THAN_OR_EQUAL = 4,
1542 EMAIL_LIST_FILTER_RULE_GREATER_THAN_OR_EQUAL = 5,
1543 EMAIL_LIST_FILTER_RULE_INCLUDE = 6,
1544 EMAIL_LIST_FILTER_RULE_MATCH = 7,
1545 EMAIL_LIST_FILTER_RULE_IN = 8,
1546 EMAIL_LIST_FILTER_RULE_NOT_IN = 9
1547 } email_list_filter_rule_type_t;
1550 EMAIL_CASE_SENSITIVE = 0,
1551 EMAIL_CASE_INSENSITIVE = 1,
1552 } email_list_filter_case_sensitivity_t;
1555 int integer_type_value;
1556 char *string_type_value;
1557 time_t datetime_type_value;
1558 } email_mail_attribute_value_t;
1561 email_list_filter_rule_type_t rule_type;
1562 email_mail_attribute_type target_attribute;
1563 email_mail_attribute_value_t key_value;
1564 email_list_filter_case_sensitivity_t case_sensitivity;
1565 } email_list_filter_rule_t;
1568 email_list_filter_rule_type_t rule_type;
1569 email_mail_text_attribute_type target_attribute;
1570 email_mail_attribute_value_t key_value;
1571 } email_list_filter_rule_fts_t;
1574 EMAIL_LIST_FILTER_ITEM_RULE = 0,
1575 EMAIL_LIST_FILTER_ITEM_RULE_FTS = 1,
1576 EMAIL_LIST_FILTER_ITEM_OPERATOR = 2,
1577 } email_list_filter_item_type_t;
1580 EMAIL_LIST_FILTER_OPERATOR_AND = 0,
1581 EMAIL_LIST_FILTER_OPERATOR_OR = 1,
1582 EMAIL_LIST_FILTER_OPERATOR_LEFT_PARENTHESIS = 2,
1583 EMAIL_LIST_FILTER_OPERATOR_RIGHT_PARENTHESIS = 3
1584 } email_list_filter_operator_type_t;
1587 email_list_filter_item_type_t list_filter_item_type;
1590 email_list_filter_rule_t rule;
1591 email_list_filter_rule_fts_t rule_fts;
1592 email_list_filter_operator_type_t operator_type;
1595 } email_list_filter_t;
1598 EMAIL_SORT_ORDER_ASCEND = 0,
1599 EMAIL_SORT_ORDER_DESCEND = 1
1600 } email_list_filter_sort_order_t;
1604 email_mail_attribute_type target_attribute;
1605 bool force_boolean_check;
1606 email_list_filter_sort_order_t sort_order;
1607 } email_list_sorting_rule_t;
1613 email_event_type_t type;
1614 email_event_status_type_t status;
1615 } email_task_information_t;
1617 /*****************************************************************************/
1618 /* For Active Sync */
1619 /*****************************************************************************/
1621 #define VCONFKEY_EMAIL_SERVICE_ACTIVE_SYNC_HANDLE "db/email_handle/active_sync_handle"
1622 #define EMAIL_ACTIVE_SYNC_NOTI "User.Email.ActiveSync"
1626 ACTIVE_SYNC_NOTI_SEND_MAIL, /* a sending notification to ASE (active sync engine */
1627 ACTIVE_SYNC_NOTI_SEND_SAVED, /* a sending notification to ASE (active sync engine), All saved mails should be sent */
1628 ACTIVE_SYNC_NOTI_SEND_REPORT, /* a sending notification to ASE (active sync engine), report should be sen */
1629 ACTIVE_SYNC_NOTI_SYNC_HEADER, /* a sync header - download mails from server. */
1630 /* It is depended on account/s flag1 field whether it excutes downloading header only or downloading header + body */
1631 /* downloading option : 0 is subject only, 1 is text body, 2 is normal */
1632 ACTIVE_SYNC_NOTI_DOWNLOAD_BODY, /* a downloading body notification to AS */
1633 ACTIVE_SYNC_NOTI_DOWNLOAD_ATTACHMENT, /* a downloading attachment notification to AS */
1634 ACTIVE_SYNC_NOTI_VALIDATE_ACCOUNT, /* a account validating notification to AS */
1635 ACTIVE_SYNC_NOTI_CANCEL_JOB, /* a cancling job notification to AS */
1636 ACTIVE_SYNC_NOTI_SEARCH_ON_SERVER, /* a searching on server notification to AS */
1637 ACTIVE_SYNC_NOTI_CLEAR_RESULT_OF_SEARCH_ON_SERVER, /* a notification for clearing result of search on server to AS */
1638 ACTIVE_SYNC_NOTI_EXPUNGE_MAILS_DELETED_FLAGGED, /* a notification to expunge deleted flagged mails */
1639 ACTIVE_SYNC_NOTI_RESOLVE_RECIPIENT, /* a notification to get the resolve recipients */
1640 ACTIVE_SYNC_NOTI_VALIDATE_CERTIFICATE, /* a notification to validate certificate */
1641 ACTIVE_SYNC_NOTI_ADD_MAILBOX, /* a notification to add mailbox */
1642 ACTIVE_SYNC_NOTI_RENAME_MAILBOX, /* a notification to rename mailbox */
1643 ACTIVE_SYNC_NOTI_DELETE_MAILBOX, /* a notification to delete mailbox */
1644 ACTIVE_SYNC_NOTI_CANCEL_SENDING_MAIL, /* a notification to cancel a sending mail */
1645 ACTIVE_SYNC_NOTI_DELETE_MAILBOX_EX, /* a notification to delete multiple mailboxes */
1646 ACTIVE_SYNC_NOTI_SEND_MAIL_WITH_DOWNLOADING_OF_ORIGINAL_MAIL, /* a notification to send a mail with downloading attachment of original mail */
1647 ACTIVE_SYNC_NOTI_SCHEDULE_SENDING_MAIL, /* a notification to schedule a mail to send later*/
1648 } eactivesync_noti_t;
1659 struct _send_mail_saved
1660 {/* not defined ye */
1666 {/* not defined ye */
1678 struct _download_body
1683 int with_attachment; /* 0: without attachments, 1: with attachment */
1686 struct _download_attachment
1691 int attachment_order;
1692 } download_attachment;
1697 int handle; /* job handle to be canceled. this value is issued by email-service. */
1701 struct _validate_account
1702 {/* not defined yet */
1707 struct _search_mail_on_server
1712 email_search_filter_t *search_filter_list;
1713 int search_filter_count;
1714 } search_mail_on_server;
1716 struct _clear_result_of_search_mail_on_server
1720 } clear_result_of_search_mail_on_server;
1722 struct _expunge_mails_deleted_flagged
1728 } expunge_mails_deleted_flagged;
1730 struct _get_resolve_recipients
1734 char *email_address;
1735 } get_resolve_recipients;
1737 struct _validate_certificate
1741 char *email_address;
1742 } validate_certificate;
1749 char *mailbox_alias;
1752 struct _rename_mailbox
1758 char *mailbox_alias;
1761 struct _delete_mailbox
1768 struct _cancel_sending_mail
1773 } cancel_sending_mail;
1775 struct _delete_mailbox_ex
1779 int *mailbox_id_array;
1780 int mailbox_id_count;
1782 } delete_mailbox_ex;
1784 struct _send_mail_with_downloading_attachment_of_original_mail
1789 } send_mail_with_downloading_attachment_of_original_mail;
1791 struct _schedule_sending_mail
1796 time_t scheduled_time;
1797 } schedule_sending_mail;
1800 /* types for noti string */
1803 EMAIL_CONVERT_STRUCT_TYPE_MAIL_LIST_ITEM, /** specifies email_mail_list_t */
1804 } email_convert_struct_type_e;
1809 EMAIL_SYNC_TASK_BOUNDARY_START = 11000,
1810 /* Sync tasks for account - from 11000 */
1811 EMAIL_SYNC_TASK_ADD_ACCOUNT = 11010,
1812 EMAIL_SYNC_TASK_DELETE_ACCOUNT = 11020,
1813 EMAIL_SYNC_TASK_UPDATE_ACCOUNT = 11030,
1814 EMAIL_SYNC_TASK_GET_ACCOUNT = 11040,
1815 EMAIL_SYNC_TASK_GET_ACCOUNT_LIST = 11050,
1816 EMAIL_SYNC_TASK_BACKUP_ACCOUNTS = 11060,
1817 EMAIL_SYNC_TASK_RESTORE_ACCOUNTS = 11070,
1818 EMAIL_SYNC_TASK_GET_PASSWORD_LENGTH_OF_ACCOUNT = 11090,
1820 /* Sync tasks for mailbox - from 12000 */
1821 EMAIL_SYNC_TASK_GET_MAILBOX_COUNT = 12010,
1822 EMAIL_SYNC_TASK_GET_MAILBOX_LIST = 12020,
1823 EMAIL_SYNC_TASK_GET_SUB_MAILBOX_LIST = 12030,
1824 EMAIL_SYNC_TASK_SET_MAIL_SLOT_SIZE = 12040,
1825 EMAIL_SYNC_TASK_SET_MAILBOX_TYPE = 12050,
1826 EMAIL_SYNC_TASK_SET_LOCAL_MAILBOX = 12060,
1828 /* Sync tasks for mail - from 13000 */
1829 EMAIL_SYNC_TASK_GET_ATTACHMENT = 13010,
1830 EMAIL_SYNC_TASK_CLEAR_RESULT_OF_SEARCH_MAIL_ON_SERVER = 13020,
1831 EMAIL_SYNC_TASK_SCHEDULE_SENDING_MAIL = 13030,
1832 EMAIL_SYNC_TASK_UPDATE_ATTRIBUTE = 13040,
1834 /* Sync tasks for mail thread - from 14000 */
1836 /* Sync tasks for rule - from 15000 */
1838 /* Sync tasks for etc - from 16000 */
1839 EMAIL_SYNC_TASK_BOUNDARY_END = 59999,
1841 EMAIL_ASYNC_TASK_BOUNDARY_START = 60000,
1842 /* Async tasks for account - from 61000 */
1843 EMAIL_ASYNC_TASK_VALIDATE_ACCOUNT = 61010,
1844 EMAIL_ASYNC_TASK_ADD_ACCOUNT_WITH_VALIDATION = 61020,
1846 /* Async tasks for mailbox - from 62000 */
1847 EMAIL_ASYNC_TASK_ADD_MAILBOX = 62010,
1848 EMAIL_ASYNC_TASK_DELETE_MAILBOX = 62020,
1849 EMAIL_ASYNC_TASK_RENAME_MAILBOX = 62030,
1850 EMAIL_ASYNC_TASK_DOWNLOAD_IMAP_MAILBOX_LIST = 62040,
1851 EMAIL_ASYNC_TASK_DELETE_MAILBOX_EX = 62050,
1853 /* Async tasks for mail - from 63000 */
1854 EMAIL_ASYNC_TASK_ADD_MAIL = 63010,
1855 EMAIL_ASYNC_TASK_ADD_READ_RECEIPT = 63020,
1857 EMAIL_ASYNC_TASK_UPDATE_MAIL = 63030,
1859 EMAIL_ASYNC_TASK_DELETE_MAIL = 63040,
1860 EMAIL_ASYNC_TASK_DELETE_ALL_MAIL = 63050,
1861 EMAIL_ASYNC_TASK_EXPUNGE_MAILS_DELETED_FLAGGED = 63060,
1863 EMAIL_ASYNC_TASK_MOVE_MAIL = 63070,
1864 EMAIL_ASYNC_TASK_MOVE_ALL_MAIL = 63080,
1865 EMAIL_ASYNC_TASK_MOVE_MAILS_TO_MAILBOX_OF_ANOTHER_ACCOUNT = 63090,
1867 EMAIL_ASYNC_TASK_SET_FLAGS_FIELD = 63300,
1869 EMAIL_ASYNC_TASK_DOWNLOAD_MAIL_LIST = 63400,
1870 EMAIL_ASYNC_TASK_DOWNLOAD_BODY = 63410,
1871 EMAIL_ASYNC_TASK_DOWNLOAD_ATTACHMENT = 63420,
1873 EMAIL_ASYNC_TASK_SEND_MAIL = 63500,
1874 EMAIL_ASYNC_TASK_SEND_SAVED = 63510,
1875 EMAIL_ASYNC_TASK_SEND_MAIL_WITH_DOWNLOADING_ATTACHMENT_OF_ORIGINAL_MAIL = 63520,
1877 EMAIL_ASYNC_TASK_SEARCH_MAIL_ON_SERVER = 63600,
1879 /* Async tasks for mail thread - from 64000 */
1880 EMAIL_ASYNC_TASK_MOVE_THREAD_TO_MAILBOX = 64010,
1881 EMAIL_ASYNC_TASK_DELETE_THREAD = 64020,
1882 EMAIL_ASYNC_TASK_MODIFY_SEEN_FLAG_OF_THREAD = 64030,
1884 /* Async tasks for rule - from 65000 */
1886 /* Async tasks for etc - from 66000 */
1887 EMAIL_ASYNC_TASK_BOUNDARY_END = 99999,
1888 } email_task_type_t;
1892 EMAIL_TASK_STATUS_UNUSED = 0,
1893 EMAIL_TASK_STATUS_WAIT = 1,
1894 EMAIL_TASK_STATUS_STARTED = 2,
1895 EMAIL_TASK_STATUS_IN_PROGRESS = 3,
1896 EMAIL_TASK_STATUS_FINISHED = 4,
1897 EMAIL_TASK_STATUS_FAILED = 5,
1898 EMAIL_TASK_STATUS_CANCELED = 6,
1899 EMAIL_TASK_STATUS_SCHEDULED = 7,
1900 } email_task_status_type_t;
1904 EMAIL_TASK_PRIORITY_UNUSED = 0,
1905 EMAIL_TASK_PRIORITY_SCHEDULED = 1,
1906 EMAIL_TASK_PRIORITY_LOW = 3,
1907 EMAIL_TASK_PRIORITY_MID = 5,
1908 EMAIL_TASK_PRIORITY_HIGH = 7,
1909 EMAIL_TASK_PRIORITY_BACK_GROUND_TASK = 9,
1910 } email_task_priority_t;
1921 #endif /* __EMAIL_TYPES_H__ */