1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
|
#ifndef __MAILCORE_MCMESSAGECONSTANTS_H_
#define __MAILCORE_MCMESSAGECONSTANTS_H_
#ifdef __cplusplus
namespace mailcore {
enum ConnectionType {
ConnectionTypeClear = 1 << 0,
ConnectionTypeStartTLS = 1 << 1,
ConnectionTypeTLS = 1 << 2,
};
enum AuthType {
AuthTypeSASLNone = 0,
AuthTypeSASLCRAMMD5 = 1 << 0,
AuthTypeSASLPlain = 1 << 1,
AuthTypeSASLGSSAPI = 1 << 2,
AuthTypeSASLDIGESTMD5 = 1 << 3,
AuthTypeSASLLogin = 1 << 4,
AuthTypeSASLSRP = 1 << 5,
AuthTypeSASLNTLM = 1 << 6,
AuthTypeSASLKerberosV4 = 1 << 7,
AuthTypeXOAuth2 = 1 << 8,
};
enum IMAPFolderFlag {
IMAPFolderFlagNone = 0,
IMAPFolderFlagMarked = 1 << 0,
IMAPFolderFlagUnmarked = 1 << 1,
IMAPFolderFlagNoSelect = 1 << 2,
IMAPFolderFlagNoInferiors = 1 << 3,
IMAPFolderFlagInbox = 1 << 4,
IMAPFolderFlagSentMail = 1 << 5,
IMAPFolderFlagStarred = 1 << 6,
IMAPFolderFlagAllMail = 1 << 7,
IMAPFolderFlagTrash = 1 << 8,
IMAPFolderFlagDrafts = 1 << 9,
IMAPFolderFlagSpam = 1 << 10,
IMAPFolderFlagImportant = 1 << 11,
IMAPFolderFlagArchive = 1 << 12,
IMAPFolderFlagAll = IMAPFolderFlagAllMail,
IMAPFolderFlagJunk = IMAPFolderFlagSpam,
IMAPFolderFlagFlagged = IMAPFolderFlagStarred,
};
enum MessageFlag {
MessageFlagNone = 0,
MessageFlagSeen = 1 << 0,
MessageFlagAnswered = 1 << 1,
MessageFlagFlagged = 1 << 2,
MessageFlagDeleted = 1 << 3,
MessageFlagDraft = 1 << 4,
MessageFlagMDNSent = 1 << 5,
MessageFlagForwarded = 1 << 6,
MessageFlagSubmitPending = 1 << 7,
MessageFlagSubmitted = 1 << 8,
} ;
enum IMAPMessagesRequestKind {
IMAPMessagesRequestKindUid = 0, // This is the default and it's always fetched
IMAPMessagesRequestKindFlags = 1 << 0,
IMAPMessagesRequestKindHeaders = 1 << 1,
IMAPMessagesRequestKindStructure = 1 << 2,
IMAPMessagesRequestKindInternalDate = 1 << 3,
IMAPMessagesRequestKindFullHeaders = 1 << 4,
IMAPMessagesRequestKindHeaderSubject = 1 << 5,
IMAPMessagesRequestKindGmailLabels = 1 << 6,
IMAPMessagesRequestKindGmailMessageID = 1 << 7,
IMAPMessagesRequestKindGmailThreadID = 1 << 8,
IMAPMessagesRequestKindExtraHeaders = 1 << 9,
};
enum IMAPFetchRequestType {
IMAPFetchRequestTypeUID = 0,
IMAPFetchRequestTypeSequence = 1
};
enum IMAPStoreFlagsRequestKind {
IMAPStoreFlagsRequestKindAdd,
IMAPStoreFlagsRequestKindRemove,
IMAPStoreFlagsRequestKindSet,
};
enum IMAPWorkaround {
IMAPWorkaroundGmail = 1 << 0,
IMAPWorkaroundYahoo = 1 << 1,
IMAPWorkaroundExchange2003 = 1 << 2,
};
enum IMAPCapability {
IMAPCapabilityACL,
IMAPCapabilityBinary,
IMAPCapabilityCatenate,
IMAPCapabilityChildren,
IMAPCapabilityCompressDeflate,
IMAPCapabilityCondstore,
IMAPCapabilityEnable,
IMAPCapabilityIdle,
IMAPCapabilityId,
IMAPCapabilityLiteralPlus,
IMAPCapabilityMultiAppend,
IMAPCapabilityNamespace,
IMAPCapabilityQResync,
IMAPCapabilityQuota,
IMAPCapabilitySort,
IMAPCapabilityStartTLS,
IMAPCapabilityThreadOrderedSubject,
IMAPCapabilityThreadReferences,
IMAPCapabilityUIDPlus,
IMAPCapabilityUnselect,
IMAPCapabilityXList,
IMAPCapabilityAuthAnonymous,
IMAPCapabilityAuthCRAMMD5,
IMAPCapabilityAuthDigestMD5,
IMAPCapabilityAuthExternal,
IMAPCapabilityAuthGSSAPI,
IMAPCapabilityAuthKerberosV4,
IMAPCapabilityAuthLogin,
IMAPCapabilityAuthNTLM,
IMAPCapabilityAuthOTP,
IMAPCapabilityAuthPlain,
IMAPCapabilityAuthSKey,
IMAPCapabilityAuthSRP,
IMAPCapabilityXOAuth2,
IMAPCapabilityGmail,
};
enum POPCapability {
POPCapabilityNone,
POPCapabilityStartTLS,
POPCapabilityTop,
POPCapabilityUser,
POPCapabilityRespCodes,
POPCapabilityPipelining,
POPCapabilityUIDL,
POPCapabilitySASL,
POPCapabilityAuthAnonymous,
POPCapabilityAuthCRAMMD5,
POPCapabilityAuthDigestMD5,
POPCapabilityAuthExternal,
POPCapabilityAuthGSSAPI,
POPCapabilityAuthKerberosV4,
POPCapabilityAuthLogin,
POPCapabilityAuthNTLM,
POPCapabilityAuthOTP,
POPCapabilityAuthPlain,
POPCapabilityAuthSKey,
POPCapabilityAuthSRP,
};
enum Encoding {
Encoding7Bit = 0, // should match MAILIMAP_BODY_FLD_ENC_7BIT
Encoding8Bit = 1, // should match MAILIMAP_BODY_FLD_ENC_8BIT
EncodingBinary = 2, // should match MAILIMAP_BODY_FLD_ENC_BINARY
EncodingBase64 = 3, // should match MAILIMAP_BODY_FLD_ENC_BASE64
EncodingQuotedPrintable = 4, // should match MAILIMAP_BODY_FLD_ENC_QUOTED_PRINTABLE
EncodingOther = 5, // should match MAILIMAP_BODY_FLD_ENC_OTHER
// negative values should be used for other encoding
EncodingUUEncode = -1
};
enum IMAPSearchKind {
IMAPSearchKindNone,
IMAPSearchKindFrom,
IMAPSearchKindRecipient,
IMAPSearchKindSubject,
IMAPSearchKindContent,
IMAPSearchKindHeader,
IMAPSearchKindOr,
IMAPSearchKindAnd,
};
enum ErrorCode {
ErrorNone,
ErrorConnection,
ErrorTLSNotAvailable,
ErrorParse,
ErrorCertificate,
ErrorAuthentication,
ErrorGmailIMAPNotEnabled,
ErrorGmailExceededBandwidthLimit,
ErrorGmailTooManySimultaneousConnections,
ErrorMobileMeMoved,
ErrorYahooUnavailable,
ErrorNonExistantFolder,
ErrorRename,
ErrorDelete,
ErrorCreate,
ErrorSubscribe,
ErrorAppend,
ErrorCopy,
ErrorExpunge,
ErrorFetch,
ErrorIdle,
ErrorIdentity,
ErrorNamespace,
ErrorStore,
ErrorCapability,
ErrorStartTLSNotAvailable,
ErrorSendMessageIllegalAttachment,
ErrorStorageLimit,
ErrorSendMessageNotAllowed,
ErrorNeedsConnectToWebmail,
ErrorSendMessage,
ErrorAuthenticationRequired,
ErrorFetchMessageList,
ErrorDeleteMessage,
ErrorInvalidAccount,
ErrorFile,
ErrorCompression,
ErrorNoSender,
ErrorNoRecipient,
ErrorNoop,
};
enum PartType {
PartTypeSingle,
PartTypeMessage,
PartTypeMultipartMixed,
PartTypeMultipartRelated,
PartTypeMultipartAlternative,
};
// Private type - It should not be used directly.
enum IMAPMessageRenderingType {
IMAPMessageRenderingTypeHTML,
IMAPMessageRenderingTypeHTMLBody,
IMAPMessageRenderingTypePlainText,
IMAPMessageRenderingTypePlainTextBody
};
}
#endif
#endif
|