49 EFSMsgFlag_CalendarMsg = 256, // Message is a calendar message |
49 EFSMsgFlag_CalendarMsg = 256, // Message is a calendar message |
50 EFSMsgFlag_Answered = 512, // The message was replied to |
50 EFSMsgFlag_Answered = 512, // The message was replied to |
51 EFSMsgFlag_Forwarded = 1024, // The message was forwarded |
51 EFSMsgFlag_Forwarded = 1024, // The message was forwarded |
52 EFSMsgFlag_OnlyToMe = 2048, // The message was sent only to this user |
52 EFSMsgFlag_OnlyToMe = 2048, // The message was sent only to this user |
53 EFSMsgFlag_RemoteDeleted = 4096, // The message has been deleted on the server |
53 EFSMsgFlag_RemoteDeleted = 4096, // The message has been deleted on the server |
54 EFSMsgFlag_HasMsgSender = 8192, // The message has one or more senders |
54 EFSMsgFlag_HasMsgSender = 8192, // The message has one or more senders |
55 }; |
55 }; |
56 |
56 |
57 /** email list sorting options */ |
57 /** email list sorting options */ |
58 enum TFSMailSortField |
58 enum TFSMailSortField |
59 { |
59 { |
60 EFSMailDontCare, // user accepts any sort order |
60 EFSMailDontCare, // user accepts any sort order |
61 EFSMailSortByDate, // sorting is done by date |
61 EFSMailSortByDate, // sorting is done by date |
62 EFSMailSortBySender, // sorting is done by sender |
62 EFSMailSortBySender, // sorting is done by sender |
63 EFSMailSortByRecipient, // sorting is done by recipients |
63 EFSMailSortByRecipient, // sorting is done by recipients |
64 EFSMailSortBySubject, // sorting is done by subject |
64 EFSMailSortBySubject, // sorting is done by subject |
65 EFSMailSortByPriority, // sorting is done by priority |
65 EFSMailSortByPriority, // sorting is done by priority |
66 EFSMailSortByFlagStatus, // follow up and completed |
66 EFSMailSortByFlagStatus, // follow up and completed |
67 EFSMailSortByUnread, // sorting is based on unread |
67 EFSMailSortByUnread, // sorting is based on unread |
68 EFSMailSortBySize, // sorting is done by size |
68 EFSMailSortBySize, // sorting is done by size |
69 EFSMailSortByAttachment // sorting is based on if message has attachments |
69 EFSMailSortByAttachment // sorting is based on if message has attachments |
70 }; |
70 }; |
71 |
71 |
72 /** email list sort order */ |
72 /** email list sort order */ |
73 enum TFSMailSortOrder |
73 enum TFSMailSortOrder |
74 { |
74 { |
75 EFSMailDescending, |
75 EFSMailDescending, |
76 EFSMailAscending |
76 EFSMailAscending |
77 }; |
77 }; |
78 |
78 |
79 /** email list sort criteria definition */ |
79 /** email list sort criteria definition */ |
80 class TFSMailSortCriteria |
80 class TFSMailSortCriteria |
81 { |
81 { |
82 public: |
82 public: |
83 TFSMailSortField iField; |
83 TFSMailSortField iField; |
84 TFSMailSortOrder iOrder; |
84 TFSMailSortOrder iOrder; |
85 }; |
85 }; |
86 |
86 |
87 /** mailbox status */ |
87 /** mailbox status */ |
88 enum TFSMailBoxStatus |
88 enum TFSMailBoxStatus |
89 { |
89 { |
90 EFSMailBoxOffline = 1, |
90 EFSMailBoxOffline = 1, |
91 EFSMailBoxOnline |
91 EFSMailBoxOnline |
92 }; |
92 }; |
93 |
93 |
94 /** mailbox capabilities */ |
94 /** mailbox capabilities */ |
95 enum TFSMailBoxCapabilities |
95 enum TFSMailBoxCapabilities |
96 { |
96 { |
97 // Mailbox supports creating subfolders. |
97 // Mailbox supports creating subfolders. |
98 // Not supported by UI in 1.0 release. |
98 // Not supported by UI in 1.0 release. |
99 EFSMBoxCapaCreateSubfolder = 1, |
99 EFSMBoxCapaCreateSubfolder = 1, |
100 |
100 |
101 // Mailbox supports responding to meeting requests. |
101 // Mailbox supports responding to meeting requests. |
102 EFSMBoxCapaMeetingRequestRespond, |
102 EFSMBoxCapaMeetingRequestRespond, |
103 |
103 |
104 // Mailbox supports meeting request creation. |
104 // Mailbox supports meeting request creation. |
105 EFSMBoxCapaMeetingRequestCreate, |
105 EFSMBoxCapaMeetingRequestCreate, |
106 |
106 |
107 // Mailbox supports meeting request update. |
107 // Mailbox supports meeting request update. |
108 EFSMBoxCapaCanUpdateMeetingRequest, |
108 EFSMBoxCapaCanUpdateMeetingRequest, |
109 |
109 |
110 // Mailbox supports user folder manipulation (rename and delete). |
110 // Mailbox supports user folder manipulation (rename and delete). |
111 // Not supported by UI in 1.0 release. |
111 // Not supported by UI in 1.0 release. |
112 EFSMBoxCapaManipulateUserFolders, |
112 EFSMBoxCapaManipulateUserFolders, |
113 |
113 |
114 // Mailbox supports moving messages to and from user folders. |
114 // Mailbox supports moving messages to and from user folders. |
115 // Not supported in 1.0 release. |
115 // Not supported in 1.0 release. |
116 // (NOT USED. To be defined in the future.) |
116 // (NOT USED. To be defined in the future.) |
117 EFSMBoxCapaMoveMessageToUserFolder, |
117 EFSMBoxCapaMoveMessageToUserFolder, |
118 |
118 |
|
119 // Mailbox can move messages in offline or handle go online itself |
|
120 EFSMBoxCapaMoveMessageNoConnectNeeded, |
|
121 |
119 // Mailbox supports moving messages between folders. |
122 // Mailbox supports moving messages between folders. |
120 EFSMBoxCapaMoveToFolder, |
123 EFSMBoxCapaMoveToFolder, |
121 |
124 |
122 // Mailbox supports copying messages between folders. |
125 // Mailbox supports copying messages between folders. |
123 // Not supported by UI in 1.0 release. |
126 // Not supported by UI in 1.0 release. |
124 EFSMBoxCapaCopyToFolder, |
127 EFSMBoxCapaCopyToFolder, |
125 |
128 |
126 // Mailbox supports smart reply feature. |
129 // Mailbox supports smart reply feature. |
127 // Returned by Intellisync and ActiveSync. UI will fetch rest of message if not supported. |
130 // Returned by Intellisync and ActiveSync. UI will fetch rest of message if not supported. |
128 EFSMBoxCapaSmartReply, |
131 EFSMBoxCapaSmartReply, |
129 |
132 |
130 // Mailbox supports smart forward feature. |
133 // Mailbox supports smart forward feature. |
131 // Returned by Intellisync and ActiveSync. UI will fetch rest of message if not supported. |
134 // Returned by Intellisync and ActiveSync. UI will fetch rest of message if not supported. |
132 EFSMBoxCapaSmartForward, |
135 EFSMBoxCapaSmartForward, |
133 |
136 |
134 // Mailbox handles itself integration to Symbian Messaging. |
137 // Mailbox handles itself integration to Symbian Messaging. |
135 // Not supported by any protocol in 1.0 release. |
138 // Not supported by any protocol in 1.0 release. |
136 // |
139 // |
137 // (Should be returned for mailboxes that handle possible Symbian Messaging |
140 // (Should be returned for mailboxes that handle possible Symbian Messaging |
138 // integration themselves. I.e. FW must not ask FS Integration MTM to replicate |
141 // integration themselves. I.e. FW must not ask FS Integration MTM to replicate |
139 // these mailboxes to Symbian Messaging. It is intended to prevent duplicate |
142 // these mailboxes to Symbian Messaging. It is intended to prevent duplicate |
140 // accounts in Symbian Messaging in the case when protocol plugin actually |
143 // accounts in Symbian Messaging in the case when protocol plugin actually |
141 // already has visible accounts in Symbian Messaging.) |
144 // already has visible accounts in Symbian Messaging.) |
142 EFSMBoxCapaSymbianMsgIntegration, |
145 EFSMBoxCapaSymbianMsgIntegration, |
143 |
146 |
144 // Mailbox implements new email notifications itself. |
147 // Mailbox implements new email notifications itself. |
145 // Not supported by any protocol in 1.0 release. |
148 // Not supported by any protocol in 1.0 release. |
146 // |
149 // |
147 // (EFSMBoxCapaNewEmailNotifications is intended to be defined for mailboxes that |
150 // (EFSMBoxCapaNewEmailNotifications is intended to be defined for mailboxes that |
148 // handle new email notifications some other way than relying to FW |
151 // handle new email notifications some other way than relying to FW |
149 // displaying them (e.g. via NCNList). If this is defined for a mailbox then |
152 // displaying them (e.g. via NCNList). If this is defined for a mailbox then |
150 // FW will not monitor and display new email notifications for the mailbox. |
153 // FW will not monitor and display new email notifications for the mailbox. |
151 // The aim is to prevent possible duplicate notifications to user.) |
154 // The aim is to prevent possible duplicate notifications to user.) |
152 EFSMBoxCapaNewEmailNotifications, |
155 EFSMBoxCapaNewEmailNotifications, |
153 |
156 |
154 // Mailbox supports MRU feature. |
157 // Mailbox supports MRU feature. |
155 // Framework can check this before updating the list for optimization. Intellisync and ActiveSync need to set. |
158 // Framework can check this before updating the list for optimization. Intellisync and ActiveSync need to set. |
156 // Capability is not checked in UI. Plugin just returns a null if there’s no MRU list and the UI doesn’t show anything. |
159 // Capability is not checked in UI. Plugin just returns a null if there’s no MRU list and the UI doesn’t show anything. |
157 EFSMBoxCapaSupportsMRU, |
160 EFSMBoxCapaSupportsMRU, |
158 |
161 |
159 // Mailbox can be deleted. |
162 // Mailbox can be deleted. |
160 // Set by Intellisync and ActiveSync only if the server supports. |
163 // Set by Intellisync and ActiveSync only if the server supports. |
161 EFSMBoxCapaCanBeDeleted, |
164 EFSMBoxCapaCanBeDeleted, |
162 |
165 |
163 // Mailbox supports out of office feature. |
166 // Mailbox supports out of office feature. |
164 // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated? |
167 // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated? |
165 // EFSMBoxCapaSupportsOutOfOffice, |
168 // EFSMBoxCapaSupportsOutOfOffice, |
166 |
169 |
167 // Mailbox supports setting OoO on/off. |
170 // Mailbox supports setting OoO on/off. |
168 // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated? |
171 // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated? |
169 // EFSMBoxCapaOutOfOfficeSet, |
172 // EFSMBoxCapaOutOfOfficeSet, |
170 |
173 |
171 // Mailbox supports editing out of office. |
174 // Mailbox supports editing out of office. |
172 // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated? |
175 // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated? |
173 // EFSMBoxCapaOutOfOfficeEdit, |
176 // EFSMBoxCapaOutOfOfficeEdit, |
174 |
177 |
175 // Mailbox supports saving to drafts automically when "create message to send" and |
178 // Mailbox supports saving to drafts automically when "create message to send" and |
176 // "save message" (in framework api) are used. |
179 // "save message" (in framework api) are used. |
177 EFSMBoxCapaSupportsSaveToDrafts, |
180 EFSMBoxCapaSupportsSaveToDrafts, |
178 |
181 |
179 // Remote Contact Lookup is supported via this mailbox. |
182 // Remote Contact Lookup is supported via this mailbox. |
180 // Set by Intellisync and ActiveSync. |
183 // Set by Intellisync and ActiveSync. |
181 EFSMBoxCapaSupportsRCL, |
184 EFSMBoxCapaSupportsRCL, |
182 |
185 |
183 // Mailbox supports followup. Email UI hides Follow Up flagging if mailbox does not support it. |
186 // Mailbox supports followup. Email UI hides Follow Up flagging if mailbox does not support it. |
184 EFSMBoxCapaSupportsFollowUp, |
187 EFSMBoxCapaSupportsFollowUp, |
185 |
188 |
186 // Mailbox supports for "do you want to delete"prompt. |
189 // Mailbox supports for "do you want to delete"prompt. |
187 EFSMBoxCapaSupportsDeletedItemsFolder, |
190 EFSMBoxCapaSupportsDeletedItemsFolder, |
188 |
191 |
189 // Mailbox does not support editing original message with smart reply or forward |
192 // Mailbox does not support editing original message with smart reply or forward |
190 EFSMBoxCapaReadOnlySmartQuote, |
193 EFSMBoxCapaReadOnlySmartQuote, |
191 |
194 |
192 // Mailbox supports sync |
195 // Mailbox supports sync |
193 EFSMBoxCapaSupportsSync, |
196 EFSMBoxCapaSupportsSync, |
194 |
197 |
198 // Mailbox supports tracking meeting request attendee status |
201 // Mailbox supports tracking meeting request attendee status |
199 // only supported by IntelliSync |
202 // only supported by IntelliSync |
200 EFSMBoxCapaMeetingRequestAttendeeStatus, |
203 EFSMBoxCapaMeetingRequestAttendeeStatus, |
201 |
204 |
202 EFSMBoxCapaMRRequiresReplyEmail, |
205 EFSMBoxCapaMRRequiresReplyEmail, |
203 |
206 |
204 // Mailbox supports embedded reply / forward message feature. |
207 // Mailbox supports embedded reply / forward message feature. |
205 EFSMBoxCapaEmbeddedReplyForwardMessage |
208 EFSMBoxCapaEmbeddedReplyForwardMessage, |
206 |
209 |
|
210 // Mailbox supports removing entry from calendar |
|
211 EFSMBoxCapaRemoveFromCalendar, |
|
212 |
|
213 // Mailbox supports attachments in meeting requests |
|
214 EFSMboxCapaSupportsAttahmentsInMR, |
|
215 |
|
216 // Mailbox supports saving of embedded messages |
|
217 EFSMboxCapaSupportsSavingOfEmbeddedMessages, |
|
218 |
|
219 // Mailbox supports smart editing feature. |
|
220 // Returned by Intellisync and ActiveSync. If defined, UI will fetch message body fully. |
|
221 EFSMBoxCapaSmartEdit |
207 }; |
222 }; |
208 |
223 |
209 /** email details included in plugin responses */ |
224 /** email details included in plugin responses */ |
210 enum TFSMailDetails |
225 enum TFSMailDetails |
211 { |
226 { |
212 EFSMsgDataIdOnly = 1, // Doesn't get any data. The object just contains the ID. |
227 EFSMsgDataIdOnly = 1, // Doesn't get any data. The object just contains the ID. |
213 EFSMsgDataDate = 2, // Get received date only. To be used when showing messages sorted by date. |
228 EFSMsgDataDate = 2, // Get received date only. To be used when showing messages sorted by date. |
214 // The rest would be retreived when needed but date is needed to build the list. |
229 // The rest would be retreived when needed but date is needed to build the list. |
215 EFSMsgDataSubject = 4, // Like above but when sorting by subject |
230 EFSMsgDataSubject = 4, // Like above but when sorting by subject |
216 EFSMsgDataSender = 8, // Likewise for sender address. |
231 EFSMsgDataSender = 8, // Likewise for sender address. |
217 EFSMsgDataEnvelope = 16, // Date, subject, Sender, To, Cc at least. |
232 EFSMsgDataEnvelope = 16, // Date, subject, Sender, To, Cc at least. |
218 EFSMsgDataStructure = 32 // the part structure including mime type, size and name headers. |
233 EFSMsgDataStructure = 32 // the part structure including mime type, size and name headers. |
219 }; |
234 }; |
220 |
235 |
221 enum TFSPartFetchState |
236 enum TFSPartFetchState |
222 { |
237 { |
223 EFSDefault, |
238 EFSDefault, |
224 EFSNone, |
239 EFSNone, |
225 EFSPartial, |
240 EFSPartial, |
226 EFSFull, |
241 EFSFull, |
227 EFSEmailStructureUnknown |
242 EFSEmailStructureUnknown |
228 }; |
243 }; |
229 |
244 |
230 |
|
231 /** class for message part / message / folder / mailbox id */ |
245 /** class for message part / message / folder / mailbox id */ |
232 class TFSMailMsgId |
246 class TFSMailMsgId |
233 { |
247 { |
234 public: |
248 public: |
235 |
249 |
236 inline TFSMailMsgId( ) // constructs NULL id |
250 inline TFSMailMsgId( ) // constructs NULL id |
237 { iPluginId.iUid = 0; iId = 0; iNullId = ETrue; }; |
251 { iPluginId.iUid = 0; iId = 0; iNullId = ETrue; iSeparator = EFalse; }; |
238 inline TFSMailMsgId(TUid aPluginId, TUint aId) |
252 inline TFSMailMsgId(TUid aPluginId, TUint aId) |
239 { iPluginId = aPluginId; iId = aId; iNullId = EFalse; }; |
253 { iPluginId = aPluginId; iId = aId; iNullId = EFalse; iSeparator = EFalse; }; |
240 inline TFSMailMsgId(TUint aPluginId, TUint aId) |
254 inline TFSMailMsgId(TUint aPluginId, TUint aId) |
241 { iPluginId.iUid = aPluginId; iId = aId; iNullId = EFalse; }; |
255 { iPluginId.iUid = aPluginId; iId = aId; iNullId = EFalse; iSeparator = EFalse; }; |
242 inline TFSMailMsgId(NmId aId) |
256 // <qmail> |
|
257 inline TFSMailMsgId(NmId aId) |
243 { iPluginId.iUid = aId.pluginId32(); |
258 { iPluginId.iUid = aId.pluginId32(); |
244 iId = aId.id32(); |
259 iId = aId.id32(); |
245 (aId.id() == 0) ? iNullId = ETrue : iNullId = EFalse; |
260 (aId.id() == 0) ? iNullId = ETrue : iNullId = EFalse; |
|
261 iSeparator = EFalse; |
246 }; |
262 }; |
247 inline TBool operator==(TFSMailMsgId aId) const |
263 // </qmail> |
248 { if(iNullId != aId.IsNullId()) return EFalse; |
264 inline TBool operator==(TFSMailMsgId aId) const |
249 if(iPluginId.iUid != aId.PluginId().iUid) return EFalse; |
265 { if(iNullId != aId.IsNullId()) return EFalse; |
250 if(iId != aId.Id()) return EFalse; return ETrue; }; |
266 if(iPluginId.iUid != aId.PluginId().iUid) return EFalse; |
251 inline TBool operator!=(TFSMailMsgId aId) const |
267 if(iId != aId.Id()) return EFalse; return ETrue; }; |
252 { if(iNullId != aId.IsNullId()) return ETrue; |
268 inline TBool operator!=(TFSMailMsgId aId) const |
253 if(iPluginId.iUid != aId.PluginId().iUid) return ETrue; |
269 { if(iNullId != aId.IsNullId()) return ETrue; |
254 if(iId != aId.Id()) return ETrue; return EFalse; } |
270 if(iPluginId.iUid != aId.PluginId().iUid) return ETrue; |
255 inline TBool IsNullId() const { return iNullId; }; |
271 if(iId != aId.Id()) return ETrue; return EFalse; } |
256 inline void SetNullId() { iPluginId.iUid = 0; iId = 0; iNullId = ETrue; } ; |
272 inline TBool IsNullId() const { return iNullId; }; |
257 inline TUid PluginId() const { return iPluginId; }; |
273 inline void SetNullId() { iPluginId.iUid = 0; iId = 0; iNullId = ETrue; } ; |
258 inline TUint Id() const { return iId; }; |
274 inline TUid PluginId() const { return iPluginId; }; |
259 inline void SetPluginId(TUid aPluginId) { iPluginId = aPluginId; iNullId = EFalse; }; |
275 inline TUint Id() const { return iId; }; |
260 inline void SetId(TUint aId) { iId = aId; iNullId = EFalse; }; |
276 inline void SetPluginId(TUid aPluginId) { iPluginId = aPluginId; iNullId = EFalse; }; |
261 inline NmId GetNmId() |
277 inline void SetId(TUint aId) { iId = aId; iNullId = EFalse; }; |
262 { |
278 inline void SetSeparator( TBool aSeparator ) { iSeparator = aSeparator; } |
263 NmId nmid; |
279 inline TBool IsSeparator() const { return iSeparator; } |
264 if( !iNullId ){ |
280 // <qmail> |
265 nmid.setId32(iId); |
281 inline NmId GetNmId() |
266 nmid.setPluginId32(iPluginId.iUid); |
282 { |
267 } |
283 NmId nmid; |
268 return nmid; |
284 if( !iNullId ) { |
269 }; |
285 nmid.setId32(iId); |
270 |
286 nmid.setPluginId32(iPluginId.iUid); |
271 protected: |
287 } |
272 |
288 return nmid; |
273 TBool iNullId; |
289 }; |
274 TUid iPluginId; // ecom implementation id |
290 // </qmail> |
275 TUint iId; // message, folder, mailbox id |
291 |
276 }; |
292 protected: |
|
293 |
|
294 TBool iNullId; |
|
295 TUid iPluginId; // ecom implementation id |
|
296 TUint iId; // message, folder, mailbox id |
|
297 TBool iSeparator; // if object is separator |
|
298 }; |
277 |
299 |
278 /* Predefined constants for ContentTypes and parameters for ContentType and ContentDisposition */ |
300 /* Predefined constants for ContentTypes and parameters for ContentType and ContentDisposition */ |
279 _LIT(KFSMailContentTypeMultipartMixed, "multipart/mixed"); |
301 _LIT(KFSMailContentTypeMultipartMixed, "multipart/mixed"); |
280 _LIT(KFSMailContentTypeMultipartAlternative, "multipart/alternative"); |
302 _LIT(KFSMailContentTypeMultipartAlternative, "multipart/alternative"); |
281 _LIT(KFSMailContentTypeMultipartDigest, "multipart/digest"); |
303 _LIT(KFSMailContentTypeMultipartDigest, "multipart/digest"); |