2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef _EMAIL_COMMON_TYPES_H_
18 #define _EMAIL_COMMON_TYPES_H_
20 #include <email-types.h>
21 #include "email-locale.h"
23 #define MAX_STR_LEN 1024
24 #define MAX_PATH_LEN 1024
25 #define MAX_URL_LEN 1024
26 #define MAX_RECPT_LEN (MAX_STR_LEN * 8 + 1)
27 #define MIN_FREE_SPACE (5) /* 5MB */
29 #define DIR_TMP_PREFIX "/tmp"
30 #define DIR_DEFAULT_MEDIA_PHONE "/opt/usr/media"
31 #define DIR_DEFAULT_MEDIA_MMC "/opt/storage/sdcard"
32 #define DIR_DEFAULT_EMAIL_STORAGE "/opt/usr/data"
34 /* define bundle key */
35 #define EMAIL_BUNDLE_KEY_ACCOUNT_ID "ACCOUNT_ID"
36 #define EMAIL_BUNDLE_KEY_IS_NULL "IS_NULL"
37 #define EMAIL_BUNDLE_KEY_MAILBOX "MAILBOX_ID"
38 #define EMAIL_BUNDLE_KEY_MAILBOX_ALIAS "MAILBOX_ALIAS"
39 #define EMAIL_BUNDLE_KEY_USER_EMAIL "USER_EMAIL"
40 #define EMAIL_BUNDLE_KEY_SAVE_ALL "SAVE_ALL"
41 #define EMAIL_BUNDLE_KEY_CANCEL_ALL "CANCEL_ALL"
42 #define EMAIL_BUNDLE_KEY_VIEW_TYPE "VIEW_TYPE"
43 #define EMAIL_BUNDLE_KEY_RUN_TYPE "RUN_TYPE"
44 #define EMAIL_BUNDLE_KEY_MAIL_ID "MAIL_ID"
45 #define EMAIL_BUNDLE_KEY_INTERNAL "bInternal"
46 #define EMAIL_BUNDLE_KEY_FIRST_LANDSCAPE "bFirstLandscape"
47 #define EMAIL_BUNDLE_KEY_MSG "MSG"
48 #define EMAIL_BUNDLE_KEY_DO_DELETE "DO_DELETE"
49 #define EMAIL_BUNDLE_KEY_UNLOCK_LIST "UNLOCK_LIST"
50 #define EMAIL_BUNDLE_KEY_TO "TO"
51 #define EMAIL_BUNDLE_KEY_CC "CC"
52 #define EMAIL_BUNDLE_KEY_BCC "BCC"
53 #define EMAIL_BUNDLE_KEY_SUBJECT "SUBJECT"
54 #define EMAIL_BUNDLE_KEY_MAILBOX_SIZE "MAILBOX_SIZE"
55 #define EMAIL_BUNDLE_KEY_BODY "BODY"
56 #define EMAIL_BUNDLE_KEY_ATTACHMENT "ATTACHMENT"
57 #define EMAIL_BUNDLE_KEY_THREAD_ID "thread_id"
58 #define EMAIL_BUNDLE_KEY_ESP_NAME "ESP_NAME"
59 #define EMAIL_BUNDLE_KEY_INITIAL_RUN "INITIAL_RUN"
60 #define EMAIL_BUNDLE_KEY_REFRESH_ACCOUNT "REFRESH_ACCOUNT"
61 #define EMAIL_BUNDLE_KEY_MAILBOX_TYPE "MAILBOX_TYPE"
63 #define EMAIL_BUNDLE_KEY_CONTACT_TYPE "type"
64 #define EMAIL_BUNDLE_KEY_CALENDAR_EDIT_ACCOUNT_ID "account_id"
65 #define EMAIL_BUNDLE_KEY_CALENDAR_EDIT_MAIL_ID "mail_id"
66 #define EMAIL_BUNDLE_KEY_CALENDAR_EDIT_SRC_BOX "src_box"
67 #define EMAIL_BUNDLE_KEY_CALENDAR_EDIT_INDEX "index"
68 #define EMAIL_BUNDLE_KEY_CALENDAR_EDIT_NOTE "note"
69 #define EMAIL_BUNDLE_KEY_VIDEO_PLAYER_LAUNCH_APP "launching_application"
72 #define UG_NAME_EMAIL_MAILBOX "email-mailbox-efl"
73 #define UG_NAME_EMAIL_VIEWER "email-viewer-efl"
74 #define UG_NAME_EMAIL_BLOCK "email-block-efl"
75 #define UG_NAME_EMAIL_COMPOSER "email-composer-efl"
76 #define UG_NAME_EMAIL_SETTING "email-setting-efl"
77 #define UG_NAME_EMAIL_ACCOUNT "email-account-efl"
78 #define UG_NAME_EMAIL_DOCUMENT "email-docsearch-efl"
79 #define UG_NAME_CONTACT "contacts-tabui-efl"
80 #define UG_NAME_CALENDAR_EDIT "calendar-edit-efl"
82 /* define bundle value */
83 #define EMAIL_BUNDLE_VAL_CALENDAR_EDIT_INDEX "0"
84 #define EMAIL_BUNDLE_VAL_END_KEY "END_KEY_EVENT"
85 #define EMAIL_BUNDLE_VAL_NEXT_MSG "NEXT_MSG"
86 #define EMAIL_BUNDLE_VAL_PREV_MSG "PREV_MSG"
88 #define EMAIL_BUNDLE_VAL_VIEW_SETTING_MAIN "main-view"
89 #define EMAIL_BUNDLE_VAL_VIEW_FIRST_SETUP "first-setup"
90 #define EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_EDIT "account-edit"
91 #define EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD "account-add"
92 #define EMAIL_BUNDLE_VAL_VIEW_SELECT_ACCOUNT "select-account"
94 #define EMAIL_BUNDLE_VAL_ESP_GMAIL "gmail"
95 #define EMAIL_BUNDLE_VAL_ESP_YAHOO "yahoomail"
96 #define EMAIL_BUNDLE_VAL_ESP_AOL "aol"
97 #define EMAIL_BUNDLE_VAL_ESP_HOTMAIL "hotmail"
98 #define EMAIL_BUNDLE_VAL_ESP_MSN "msn"
99 #define EMAIL_BUNDLE_VAL_ESP_OTHERS "others"
102 RUN_TYPE_UNKNOWN = -1,
103 RUN_COMPOSER_NEW, /*< Specific new type. this type is used to create new email */
104 RUN_COMPOSER_EDIT, /*< Specific edit type. this type is used to open draft email */
105 RUN_COMPOSER_REPLY, /*< Specific reply type. this type is used to reply email */
106 RUN_COMPOSER_REPLY_ALL, /*< Specific reply all type. this type is used to replay email to all */
107 RUN_COMPOSER_FORWARD, /*< Specific forward type. this type is used to forward email */
108 RUN_COMPOSER_EXTERNAL, /*< Specific external type. this type is used to create new email from external app except email app */
109 RUN_COMPOSER_REPLY_INTERNAL,
112 RUN_SETTING_ACCOUNT_ADD,
117 EMAIL_STATUS_REPLY = (1 << 3),
118 EMAIL_STATUS_FORWARD = (1 << 7)
119 } EmailMailStatusType;
124 EMAIL_SEARCH_SUBJECT,
128 EMAIL_SEARCH_ADVANCED,
134 EMAIL_SORT_DATE_RECENT,
135 EMAIL_SORT_DATE_OLDEST,
136 EMAIL_SORT_SENDER_ATOZ,
137 EMAIL_SORT_SENDER_ZTOA,
138 EMAIL_SORT_RCPT_ATOZ,
139 EMAIL_SORT_RCPT_ZTOA,
141 EMAIL_SORT_IMPORTANT,
143 EMAIL_SORT_ATTACHMENTS,
148 EMAIL_GET_MAIL_THREAD = -1,
149 EMAIL_GET_MAIL_NORMAL = 0,
153 EMAIL_EXT_SAVE_ERR_NONE = 0,
154 EMAIL_EXT_SAVE_ERR_ALREADY_EXIST,
155 EMAIL_EXT_SAVE_ERR_UNKNOWN
156 } EmailExtSaveErrType;
161 email_mailbox_type_e mailbox_type;
164 int total_mail_count_on_local;
165 int total_mail_count_on_server;
166 } EmailMailboxNameAndAlias;
169 int is_preset_account;
172 int send_read_report;
173 int pop3_deleting_option;
174 } account_user_data_t;
184 #endif /* _EMAIL_COMMON_TYPES_H_ */