Extending test-client-custom-summary to try e_book_client_get_contacts_uids()
[platform/upstream/evolution-data-server.git] / camel / camel-enums.h
1 /*
2  * camel-enums.h
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) version 3.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with the program; if not, see <http://www.gnu.org/licenses/>
16  *
17  */
18
19 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
20 #error "Only <camel/camel.h> can be included directly."
21 #endif
22
23 #ifndef CAMEL_ENUMS_H
24 #define CAMEL_ENUMS_H
25
26 /**
27  * CamelAuthenticationResult:
28  * @CAMEL_AUTHENTICATION_ERROR:
29  *    An error occurred while authenticating.
30  * @CAMEL_AUTHENTICATION_ACCEPTED:
31  *    Server accepted our authentication attempt.
32  * @CAMEL_AUTHENTICATION_REJECTED:
33  *    Server rejected our authentication attempt.
34  *
35  * Authentication result codes used by #CamelService.
36  *
37  * Since: 3.4
38  **/
39 typedef enum {
40         CAMEL_AUTHENTICATION_ERROR,
41         CAMEL_AUTHENTICATION_ACCEPTED,
42         CAMEL_AUTHENTICATION_REJECTED
43 } CamelAuthenticationResult;
44
45 typedef enum { /*< flags >*/
46         CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY = 1 << 0,
47         CAMEL_FOLDER_FILTER_RECENT          = 1 << 2,
48         CAMEL_FOLDER_HAS_BEEN_DELETED       = 1 << 3,
49         CAMEL_FOLDER_IS_TRASH               = 1 << 4,
50         CAMEL_FOLDER_IS_JUNK                = 1 << 5,
51         CAMEL_FOLDER_FILTER_JUNK            = 1 << 6
52 } CamelFolderFlags;
53
54 #define CAMEL_FOLDER_TYPE_BIT (10)
55
56 /**
57  * CamelFolderInfoFlags:
58  * @CAMEL_FOLDER_NOSELECT:
59  *    The folder cannot contain messages.
60  * @CAMEL_FOLDER_NOINFERIORS:
61  *    The folder cannot have child folders.
62  * @CAMEL_FOLDER_CHILDREN:
63  *    The folder has children (not yet fully implemented).
64  * @CAMEL_FOLDER_NOCHILDREN:
65  *    The folder does not have children (not yet fully implemented).
66  * @CAMEL_FOLDER_SUBSCRIBED:
67  *    The folder is subscribed.
68  * @CAMEL_FOLDER_VIRTUAL:
69  *    The folder is virtual.  Messages cannot be copied or moved to
70  *    virtual folders since they are only queries of other folders.
71  * @CAMEL_FOLDER_SYSTEM:
72  *    The folder is a built-in "system" folder.  System folders
73  *    cannot be renamed or deleted.
74  * @CAMEL_FOLDER_VTRASH:
75  *    The folder is a virtual trash folder.  It cannot be copied to,
76  *    and can only be moved to if in an existing folder.
77  * @CAMEL_FOLDER_SHARED_TO_ME:
78  *    A folder being shared by someone else.
79  * @CAMEL_FOLDER_SHARED_BY_ME:
80  *    A folder being shared by the user.
81  * @CAMEL_FOLDER_TYPE_NORMAL:
82  *    The folder is a normal folder.
83  * @CAMEL_FOLDER_TYPE_INBOX:
84  *    The folder is an inbox folder.
85  * @CAMEL_FOLDER_TYPE_OUTBOX:
86  *    The folder is an outbox folder.
87  * @CAMEL_FOLDER_TYPE_TRASH:
88  *    The folder shows deleted messages.
89  * @CAMEL_FOLDER_TYPE_JUNK:
90  *    The folder shows junk messages.
91  * @CAMEL_FOLDER_TYPE_SENT:
92  *    The folder shows sent messages.
93  * @CAMEL_FOLDER_TYPE_CONTACTS:
94  *    The folder contains contacts, instead of mail messages.
95  * @CAMEL_FOLDER_TYPE_EVENTS:
96  *    The folder contains calendar events, instead of mail messages.
97  * @CAMEL_FOLDER_TYPE_MEMOS:
98  *    The folder contains memos, instead of mail messages.
99  * @CAMEL_FOLDER_TYPE_TASKS:
100  *    The folder contains tasks, instead of mail messages.
101  *
102  * These flags are abstractions.  It's up to the CamelProvider to give
103  * them suitable interpretations.  Use #CAMEL_FOLDER_TYPE_MASK to isolate
104  * the folder's type.
105  **/
106 /* WARNING: This enum and CamelStoreInfoFlags must stay in sync.
107  * FIXME: Eliminate the need for two separate types. */
108 typedef enum { /*< flags >*/
109         CAMEL_FOLDER_NOSELECT      = 1 << 0,
110         CAMEL_FOLDER_NOINFERIORS   = 1 << 1,
111         CAMEL_FOLDER_CHILDREN      = 1 << 2,
112         CAMEL_FOLDER_NOCHILDREN    = 1 << 3,
113         CAMEL_FOLDER_SUBSCRIBED    = 1 << 4,
114         CAMEL_FOLDER_VIRTUAL       = 1 << 5,
115         CAMEL_FOLDER_SYSTEM        = 1 << 6,
116         CAMEL_FOLDER_VTRASH        = 1 << 7,
117         CAMEL_FOLDER_SHARED_TO_ME  = 1 << 8,
118         CAMEL_FOLDER_SHARED_BY_ME  = 1 << 9,
119         CAMEL_FOLDER_TYPE_NORMAL   = 0 << CAMEL_FOLDER_TYPE_BIT,
120         CAMEL_FOLDER_TYPE_INBOX    = 1 << CAMEL_FOLDER_TYPE_BIT,
121         CAMEL_FOLDER_TYPE_OUTBOX   = 2 << CAMEL_FOLDER_TYPE_BIT,
122         CAMEL_FOLDER_TYPE_TRASH    = 3 << CAMEL_FOLDER_TYPE_BIT,
123         CAMEL_FOLDER_TYPE_JUNK     = 4 << CAMEL_FOLDER_TYPE_BIT,
124         CAMEL_FOLDER_TYPE_SENT     = 5 << CAMEL_FOLDER_TYPE_BIT,
125         CAMEL_FOLDER_TYPE_CONTACTS = 6 << CAMEL_FOLDER_TYPE_BIT,
126         CAMEL_FOLDER_TYPE_EVENTS   = 7 << CAMEL_FOLDER_TYPE_BIT,
127         CAMEL_FOLDER_TYPE_MEMOS    = 8 << CAMEL_FOLDER_TYPE_BIT,
128         CAMEL_FOLDER_TYPE_TASKS    = 9 << CAMEL_FOLDER_TYPE_BIT,
129         CAMEL_FOLDER_READONLY      = 1 << 16,
130         CAMEL_FOLDER_CHECK_FOR_NEW = 1 << 17,
131         CAMEL_FOLDER_FLAGGED       = 1 << 18,
132
133         CAMEL_FOLDER_FLAGS_LAST    = 1 << 24  /*< skip >*/
134 } CamelFolderInfoFlags;
135
136 #define CAMEL_FOLDER_TYPE_MASK (63 << CAMEL_FOLDER_TYPE_BIT)
137
138 /* WARNING: This enum and CamelFolderInfoFlags must stay in sync.
139  * FIXME: Eliminate the need for two separate types. */
140 typedef enum { /*< flags >*/
141         CAMEL_STORE_INFO_FOLDER_NOSELECT      = 1 << 0,
142         CAMEL_STORE_INFO_FOLDER_NOINFERIORS   = 1 << 1,
143         CAMEL_STORE_INFO_FOLDER_CHILDREN      = 1 << 2,
144         CAMEL_STORE_INFO_FOLDER_NOCHILDREN    = 1 << 3,
145         CAMEL_STORE_INFO_FOLDER_SUBSCRIBED    = 1 << 4,
146         CAMEL_STORE_INFO_FOLDER_VIRTUAL       = 1 << 5,
147         CAMEL_STORE_INFO_FOLDER_SYSTEM        = 1 << 6,
148         CAMEL_STORE_INFO_FOLDER_VTRASH        = 1 << 7,
149         CAMEL_STORE_INFO_FOLDER_SHARED_TO_ME  = 1 << 8,
150         CAMEL_STORE_INFO_FOLDER_SHARED_BY_ME  = 1 << 9,
151         CAMEL_STORE_INFO_FOLDER_READONLY      = 1 << 16,
152         CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW = 1 << 17,
153         CAMEL_STORE_INFO_FOLDER_FLAGGED       = 1 << 18,
154
155         CAMEL_STORE_INFO_FOLDER_LAST          = 1 << 24  /*< skip >*/
156 } CamelStoreInfoFlags;
157
158 /**
159  * CamelFetchHeadersType:
160  * @CAMEL_FETCH_HEADERS_BASIC:
161  *     Fetch only basic headers (Date, From, To, Subject, etc.).
162  * @CAMEL_FETCH_HEADERS_BASIC_AND_MAILING_LIST:
163  *     Fetch all basic headers and mailing list headers.
164  * @CAMEL_FETCH_HEADERS_ALL:
165  *     Fetch all available message headers.
166  *
167  * Describes what headers to fetch when downloading message summaries.
168  *
169  * Since: 3.2
170  **/
171 typedef enum {
172         CAMEL_FETCH_HEADERS_BASIC,
173         CAMEL_FETCH_HEADERS_BASIC_AND_MAILING_LIST,
174         CAMEL_FETCH_HEADERS_ALL
175 } CamelFetchHeadersType;
176
177 /**
178  * CamelJunkStatus:
179  * @CAMEL_JUNK_STATUS_ERROR:
180  *     An error occurred while invoking the junk filter.
181  * @CAMEL_JUNK_STATUS_INCONCLUSIVE:
182  *     The junk filter could not determine whether the message is junk.
183  * @CAMEL_JUNK_STATUS_MESSAGE_IS_JUNK:
184  *     The junk filter believes the message is junk.
185  * @CAMEL_JUNK_STATUS_MESSAGE_IS_NOT_JUNK:
186  *     The junk filter believes the message is not junk.
187  *
188  * These are result codes used when passing messages through a junk filter.
189  **/
190 typedef enum {
191         CAMEL_JUNK_STATUS_ERROR,
192         CAMEL_JUNK_STATUS_INCONCLUSIVE,
193         CAMEL_JUNK_STATUS_MESSAGE_IS_JUNK,
194         CAMEL_JUNK_STATUS_MESSAGE_IS_NOT_JUNK
195 } CamelJunkStatus;
196
197 typedef enum {
198         CAMEL_MIME_FILTER_BASIC_INVALID,
199         CAMEL_MIME_FILTER_BASIC_BASE64_ENC,
200         CAMEL_MIME_FILTER_BASIC_BASE64_DEC,
201         CAMEL_MIME_FILTER_BASIC_QP_ENC,
202         CAMEL_MIME_FILTER_BASIC_QP_DEC,
203         CAMEL_MIME_FILTER_BASIC_UU_ENC,
204         CAMEL_MIME_FILTER_BASIC_UU_DEC
205 } CamelMimeFilterBasicType;
206
207 typedef enum {
208         CAMEL_MIME_FILTER_CRLF_ENCODE,
209         CAMEL_MIME_FILTER_CRLF_DECODE
210 } CamelMimeFilterCRLFDirection;
211
212 typedef enum {
213         CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS,
214         CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY
215 } CamelMimeFilterCRLFMode;
216
217 typedef enum {
218         CAMEL_MIME_FILTER_GZIP_MODE_ZIP,
219         CAMEL_MIME_FILTER_GZIP_MODE_UNZIP
220 } CamelMimeFilterGZipMode;
221
222 typedef enum {
223         CAMEL_MIME_FILTER_YENC_DIRECTION_ENCODE,
224         CAMEL_MIME_FILTER_YENC_DIRECTION_DECODE
225 } CamelMimeFilterYencDirection;
226
227 /**
228  * CamelNetworkSecurityMethod:
229  * @CAMEL_NETWORK_SECURITY_METHOD_NONE:
230  *   Use an unencrypted network connection.
231  * @CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT:
232  *   Use SSL by connecting to an alternate port number.
233  * @CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT:
234  *   Use SSL or TLS by connecting to the standard port and invoking
235  *   STARTTLS before authenticating.  This is the recommended method.
236  *
237  * Methods for establishing an encrypted (or unencrypted) network connection.
238  *
239  * Since: 3.2
240  **/
241 typedef enum {
242         CAMEL_NETWORK_SECURITY_METHOD_NONE,
243         CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT,
244         CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT
245 } CamelNetworkSecurityMethod;
246
247 typedef enum {
248         CAMEL_PROVIDER_CONF_END,
249         CAMEL_PROVIDER_CONF_SECTION_START,
250         CAMEL_PROVIDER_CONF_SECTION_END,
251         CAMEL_PROVIDER_CONF_CHECKBOX,
252         CAMEL_PROVIDER_CONF_CHECKSPIN,
253         CAMEL_PROVIDER_CONF_ENTRY,
254         CAMEL_PROVIDER_CONF_LABEL,
255         CAMEL_PROVIDER_CONF_HIDDEN,
256         CAMEL_PROVIDER_CONF_OPTIONS
257 } CamelProviderConfType;
258
259 /**
260  * CamelProviderFlags;
261  * @CAMEL_PROVIDER_IS_REMOTE:
262  *   Provider works with remote data.
263  * @CAMEL_PROVIDER_IS_LOCAL:
264  *   Provider can be used as a backend for local folder tree folders.
265  *   (Not just the opposite of #CAMEL_PROVIDER_IS_REMOTE.)
266  * @CAMEL_PROVIDER_IS_SOURCE:
267  *   Mail arrives there, so it should be offered as an option in the
268  *   mail config dialog.
269  * @CAMEL_PROVIDER_IS_STORAGE:
270  *   Mail is stored there.  It will appear in the folder tree.
271  * @CAMEL_PROVIDER_IS_EXTERNAL:
272  *   Provider appears in the folder tree but is not created by the
273  *   mail component.
274  * @CAMEL_PROVIDER_HAS_LICENSE:
275  *   Provider configuration first needs the license to be accepted.
276  *   (No longer used.)
277  * @CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER:
278  *   Provider may use a real trash folder instead of a virtual folder.
279  * @CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER:
280  *   Provider may use a real junk folder instead of a virtual folder.
281  * @CAMEL_PROVIDER_SUPPORTS_MOBILE_DEVICES:
282  *  Download limited set of emails instead of operating on full cache.
283  * @CAMEL_PROVIDER_SUPPORTS_BATCH_FETCH:
284  *  Support to fetch messages in batch.
285  * @CAMEL_PROVIDER_SUPPORTS_PURGE_MESSAGE_CACHE:
286  *  Support to remove oldest downloaded messages to conserve space.
287  *
288  **/
289 typedef enum { /*< flags >*/
290         CAMEL_PROVIDER_IS_REMOTE               = 1 << 0,
291         CAMEL_PROVIDER_IS_LOCAL                = 1 << 1,
292         CAMEL_PROVIDER_IS_EXTERNAL             = 1 << 2,
293         CAMEL_PROVIDER_IS_SOURCE               = 1 << 3,
294         CAMEL_PROVIDER_IS_STORAGE              = 1 << 4,
295         CAMEL_PROVIDER_SUPPORTS_SSL            = 1 << 5,
296         CAMEL_PROVIDER_HAS_LICENSE             = 1 << 6,
297         CAMEL_PROVIDER_DISABLE_SENT_FOLDER     = 1 << 7,
298         CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER = 1 << 8,
299         CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER  = 1 << 9,
300         CAMEL_PROVIDER_SUPPORTS_MOBILE_DEVICES = 1 << 10,
301         CAMEL_PROVIDER_SUPPORTS_BATCH_FETCH    = 1 << 11,
302         CAMEL_PROVIDER_SUPPORTS_PURGE_MESSAGE_CACHE = 1 << 12
303 } CamelProviderFlags;
304
305 typedef enum {
306         CAMEL_PROVIDER_STORE,
307         CAMEL_PROVIDER_TRANSPORT,
308         CAMEL_NUM_PROVIDER_TYPES  /*< skip >*/
309 } CamelProviderType;
310
311 typedef enum {
312         CAMEL_SASL_ANON_TRACE_EMAIL,
313         CAMEL_SASL_ANON_TRACE_OPAQUE,
314         CAMEL_SASL_ANON_TRACE_EMPTY
315 } CamelSaslAnonTraceType;
316
317 /**
318  * CamelServiceConnectionStatus:
319  * @CAMEL_SERVICE_DISCONNECTED:
320  *   #CamelService is disconnected from a remote server.
321  * @CAMEL_SERVICE_CONNECTING:
322  *   #CamelService is connecting to a remote server.
323  * @CAMEL_SERVICE_CONNECTED:
324  *   #CamelService is connected to a remote server.
325  * @CAMEL_SERVICE_DISCONNECTING:
326  *   #CamelService is disconnecting from a remote server.
327  *
328  * Connection status returned by camel_service_get_connection_status().
329  *
330  * Since: 3.6
331  **/
332 typedef enum {
333         CAMEL_SERVICE_DISCONNECTED,
334         CAMEL_SERVICE_CONNECTING,
335         CAMEL_SERVICE_CONNECTED,
336         CAMEL_SERVICE_DISCONNECTING
337 } CamelServiceConnectionStatus;
338
339 typedef enum {
340         CAMEL_SESSION_ALERT_INFO,
341         CAMEL_SESSION_ALERT_WARNING,
342         CAMEL_SESSION_ALERT_ERROR
343 } CamelSessionAlertType;
344
345 /**
346  * CamelSortType:
347  * @CAMEL_SORT_ASCENDING:
348  *   Sorting is in ascending order.
349  * @CAMEL_SORT_DESCENDING:
350  *   Sorting is in descending order.
351  *
352  * Determines the direction of a sort.
353  *
354  * Since: 3.2
355  **/
356 typedef enum {
357         CAMEL_SORT_ASCENDING,
358         CAMEL_SORT_DESCENDING
359 } CamelSortType;
360
361 typedef enum { /*< flags >*/
362         CAMEL_STORE_VTRASH           = 1 << 0,
363         CAMEL_STORE_VJUNK            = 1 << 1,
364         CAMEL_STORE_PROXY            = 1 << 2,
365         CAMEL_STORE_IS_MIGRATING     = 1 << 3,
366         CAMEL_STORE_REAL_JUNK_FOLDER = 1 << 4,
367         CAMEL_STORE_CAN_EDIT_FOLDERS = 1 << 5,
368         CAMEL_STORE_USE_CACHE_DIR    = 1 << 6
369 } CamelStoreFlags;
370
371 /**
372  * CamelStoreGetFolderInfoFlags:
373  * @CAMEL_STORE_FOLDER_INFO_FAST:
374  * @CAMEL_STORE_FOLDER_INFO_RECURSIVE:
375  * @CAMEL_STORE_FOLDER_INFO_SUBSCRIBED:
376  * @CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL:
377  *   Do not include virtual trash or junk folders.
378  * @CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST:
379  *   Fetch only the subscription list. Clients should use this
380  *   flag for requesting the list of folders available for
381  *   subscription. Used in Exchange / IMAP connectors for public
382  *   folder fetching.
383  **/
384 typedef enum { /*< flags >*/
385         CAMEL_STORE_FOLDER_INFO_FAST              = 1 << 0,
386         CAMEL_STORE_FOLDER_INFO_RECURSIVE         = 1 << 1,
387         CAMEL_STORE_FOLDER_INFO_SUBSCRIBED        = 1 << 2,
388         CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL        = 1 << 3,
389         CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST = 1 << 4
390 } CamelStoreGetFolderInfoFlags;
391
392 typedef enum { /*< flags >*/
393         CAMEL_STORE_READ  = 1 << 0,
394         CAMEL_STORE_WRITE = 1 << 1
395 } CamelStorePermissionFlags;
396
397 typedef enum { /*< flags >*/
398         CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 = 1 << 0,
399         CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 = 1 << 1,
400         CAMEL_TCP_STREAM_SSL_ENABLE_TLS  = 1 << 2
401 } CamelTcpStreamSSLFlags;
402
403 /* Note: If you change this, make sure you change the
404  *       'encodings' array in camel-mime-part.c. */
405 typedef enum {
406         CAMEL_TRANSFER_ENCODING_DEFAULT,
407         CAMEL_TRANSFER_ENCODING_7BIT,
408         CAMEL_TRANSFER_ENCODING_8BIT,
409         CAMEL_TRANSFER_ENCODING_BASE64,
410         CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE,
411         CAMEL_TRANSFER_ENCODING_BINARY,
412         CAMEL_TRANSFER_ENCODING_UUENCODE,
413         CAMEL_TRANSFER_NUM_ENCODINGS
414 } CamelTransferEncoding;
415
416 /**
417  * CamelStreamVFSOpenMethod:
418  * CAMEL_STREAM_VFS_CREATE:
419  *      Writable, creates new file or replaces old file.
420  * CAMEL_STREAM_VFS_APPEND:
421  *      Writable, creates new file or appends at the end of the old file.
422  * CAMEL_STREAM_VFS_READ:
423  *      Readable, opens existing file for reading.
424  *
425  * Since: 2.24
426  **/
427 typedef enum {
428         CAMEL_STREAM_VFS_CREATE,
429         CAMEL_STREAM_VFS_APPEND,
430         CAMEL_STREAM_VFS_READ
431 } CamelStreamVFSOpenMethod;
432
433 #endif /* CAMEL_ENUMS_H */