104 * If GoOnlineL has effect on other mailboxes of the |
105 * If GoOnlineL has effect on other mailboxes of the |
105 * same plugin then this function has effect on those |
106 * same plugin then this function has effect on those |
106 * mailboxes also. |
107 * mailboxes also. |
107 * |
108 * |
108 * @param aMailBoxId mailbox id request is accessed to |
109 * @param aMailBoxId mailbox id request is accessed to |
109 */ |
110 */ |
110 virtual void GoOfflineL( const TFSMailMsgId& aMailBoxId ) = 0; |
111 virtual void GoOfflineL( const TFSMailMsgId& aMailBoxId ) = 0; |
111 |
112 |
112 /** |
113 /** |
113 * Forces synchronization of mailbox. This can be called |
114 * Forces synchronization of mailbox. This can be called |
114 * whether the mailbox is currently offline or online. In |
115 * whether the mailbox is currently offline or online. In |
115 * case the mailbox is offline in the beginning, connection |
116 * case the mailbox is offline in the beginning, connection |
116 * is made up for the time of the synchronization. |
117 * is made up for the time of the synchronization. |
117 * |
118 * |
118 * All collections (mail etc.) supported by the plugin and |
119 * All collections (mail etc.) supported by the plugin and |
119 * enabled by user settings are synchronized. |
120 * enabled by user settings are synchronized. |
120 * |
121 * |
121 * This is an asynchronous operation and the request id |
122 * This is an asynchronous operation and the request id |
122 * is returned for cancelling purpose. |
123 * is returned for cancelling purpose. |
123 * |
124 * |
124 * Observer is given as a parameter to enable callbacks |
125 * Observer is given as a parameter to enable callbacks |
125 * related to this operation. Alternatively user can use |
126 * related to this operation. Alternatively user can use |
126 * empty implementation of the observer function and rely |
127 * empty implementation of the observer function and rely |
127 * only on events. Notice that the event system is not as |
128 * only on events. Notice that the event system is not as |
128 * comprehensive as the observing way do this. |
129 * comprehensive as the observing way do this. |
130 * @param aMailBoxId defines mailbox |
131 * @param aMailBoxId defines mailbox |
131 * @param aOperationObserver is client provided observer that |
132 * @param aOperationObserver is client provided observer that |
132 * will receive progress notifications during the operation. |
133 * will receive progress notifications during the operation. |
133 * @param aRequestId identifies asynchronous request if parallel |
134 * @param aRequestId identifies asynchronous request if parallel |
134 * requests exist |
135 * requests exist |
135 */ |
136 */ |
136 virtual void RefreshNowL( const TFSMailMsgId& aMailBoxId, |
137 virtual void RefreshNowL( const TFSMailMsgId& aMailBoxId, |
137 MFSMailRequestObserver& aOperationObserver, |
138 MFSMailRequestObserver& aOperationObserver, |
138 TInt aRequestId ) = 0; |
139 TInt aRequestId ) = 0; |
139 |
140 |
140 /** |
141 /** |
141 * Returns last synchronization operation status. |
142 * Returns last synchronization operation status. |
142 * |
143 * |
143 * @param aMailBoxId mailbox id |
144 * @param aMailBoxId mailbox id |
144 * |
145 * |
145 * @return last sync operation status |
146 * @return last sync operation status |
146 * |
147 * |
147 */ |
148 */ |
148 virtual const TFSProgress GetLastSyncStatusL( const TFSMailMsgId& aMailBoxId ) = 0; |
149 virtual const TFSProgress GetLastSyncStatusL( const TFSMailMsgId& aMailBoxId ) = 0; |
149 |
150 |
150 /** |
151 /** |
151 * cancels all ongoing synchronizations in given mailbox regardless if initiated |
152 * cancels all ongoing synchronizations in given mailbox regardless if initiated |
152 * by email framework or plugin itself |
153 * by email framework or plugin itself |
153 * |
154 * |
154 * @return error code |
155 * @return error code |
155 */ |
156 */ |
156 virtual TInt CancelSyncL( const TFSMailMsgId& aMailBoxId ) = 0; |
157 virtual TInt CancelSyncL( const TFSMailMsgId& aMailBoxId ) = 0; |
157 |
158 |
158 /** |
159 /** |
159 * Returns the current synchronization state of mailbox. |
160 * Returns the current synchronization state of mailbox. |
163 * @return mailbox synchronizing state data structure |
164 * @return mailbox synchronizing state data structure |
164 */ |
165 */ |
165 virtual TSSMailSyncState CurrentSyncState( const TFSMailMsgId& aMailboxId ) = 0; |
166 virtual TSSMailSyncState CurrentSyncState( const TFSMailMsgId& aMailboxId ) = 0; |
166 |
167 |
167 /** |
168 /** |
168 * returns mailbox online status |
169 * returns mailbox online status |
169 * |
170 * |
170 * @param aMailboxId id of target mailbox |
171 * @param aMailboxId id of target mailbox |
171 * |
172 * |
172 * @return online / offline |
173 * @return online / offline |
173 */ |
174 */ |
174 virtual TFSMailBoxStatus GetMailBoxStatus( const TFSMailMsgId& aMailBoxId ) = 0; |
175 virtual TFSMailBoxStatus GetMailBoxStatus( const TFSMailMsgId& aMailBoxId ) = 0; |
175 |
176 |
176 /** |
177 /** |
177 * checks if mailbox supports given capability |
178 * checks if mailbox supports given capability |
178 * |
179 * |
179 * @param aCapability capability to be checked |
180 * @param aCapability capability to be checked |
180 * @param aMailBoxId id of the target mailbox |
181 * @param aMailBoxId id of the target mailbox |
181 * |
182 * |
182 * @return true/false |
183 * @return true/false |
183 */ |
184 */ |
184 virtual TBool MailboxHasCapabilityL( TFSMailBoxCapabilities aCapability, |
185 virtual TBool MailboxHasCapabilityL( TFSMailBoxCapabilities aCapability, |
185 TFSMailMsgId aMailBoxId ) = 0; |
186 TFSMailMsgId aMailBoxId ) = 0; |
186 |
187 |
187 /** |
188 /** |
188 * lists existing mailboxes contained by plugin |
189 * lists existing mailboxes contained by plugin |
189 * |
190 * |
190 * @param aMailBoxes plugin writes list of existing mailboxes into this |
191 * @param aMailBoxes plugin writes list of existing mailboxes into this |
191 * table owned by user |
192 * table owned by user |
192 * to this table owned by framework |
193 * to this table owned by framework |
193 */ |
194 */ |
194 virtual void ListMailBoxesL( RArray<TFSMailMsgId>& aMailboxes) = 0; |
195 virtual void ListMailBoxesL( RArray<TFSMailMsgId>& aMailboxes) = 0; |
195 |
196 |
196 /** |
197 /** |
197 * returns email mailbox object related to given mailbox id |
198 * returns email mailbox object related to given mailbox id |
198 * mailbox data set by plugin : |
199 * mailbox data set by plugin : |
199 * - mailbox id |
200 * - mailbox id |
200 * - mailbox name |
201 * - mailbox name |
201 * - branding id |
202 * - branding id |
202 * - mailbox capabilities |
203 * - mailbox capabilities |
203 * |
204 * |
204 * @param aMailBoxId mailbox id |
205 * @param aMailBoxId mailbox id |
205 * |
206 * |
206 * @return mailBox object ( CFSMailBox ) to be owned by user |
207 * @return mailBox object ( CFSMailBox ) to be owned by user |
207 */ |
208 */ |
208 virtual CFSMailBox* GetMailBoxByUidL( const TFSMailMsgId& aMailBoxId) = 0; |
209 virtual CFSMailBox* GetMailBoxByUidL( const TFSMailMsgId& aMailBoxId) = 0; |
209 |
210 |
210 /** |
211 /** |
211 * removes mailbox |
212 * removes mailbox |
212 * |
213 * |
213 * @param aMailBoxId id of the mailbox to be removed |
214 * @param aMailBoxId id of the mailbox to be removed |
214 * @param aOperationObserver is FW provided observer that should be |
215 * @param aOperationObserver is FW provided observer that should be |
215 * used to report progress notifications during the operation. |
216 * used to report progress notifications during the operation. |
216 * @param aRequestId asynchronous request id |
217 * @param aRequestId asynchronous request id |
217 */ |
218 */ |
218 virtual void DeleteMailBoxByUidL( const TFSMailMsgId& aMailBoxId, |
219 virtual void DeleteMailBoxByUidL( const TFSMailMsgId& aMailBoxId, |
219 MFSMailRequestObserver& aOperationObserver, |
220 MFSMailRequestObserver& aOperationObserver, |
220 const TInt aRequestId ) = 0; |
221 const TInt aRequestId ) = 0; |
221 |
222 |
222 /** |
223 /** |
223 * Returns branding id of this mailbox. |
224 * Returns branding id of this mailbox. |
224 * This function is used by Branding Manager to associate mailbox to a branding |
225 * This function is used by Branding Manager to associate mailbox to a branding |
225 * definition. Plugin should return incoming mail server associated with this mailbox. |
226 * definition. Plugin should return incoming mail server associated with this mailbox. |
268 virtual TInt GetConnectionId( TFSMailMsgId aMailBoxId, TUint32& aConnectionId ); |
269 virtual TInt GetConnectionId( TFSMailMsgId aMailBoxId, TUint32& aConnectionId ); |
269 |
270 |
270 /** |
271 /** |
271 * checks from plugin if connection is allowed when roaming |
272 * checks from plugin if connection is allowed when roaming |
272 * |
273 * |
273 * @param aConnectionAllowed |
274 * @param aConnectionAllowed |
274 * @return KErrNone or error code |
275 * @return KErrNone or error code |
275 */ |
276 */ |
276 virtual TInt IsConnectionAllowedWhenRoaming( TFSMailMsgId aMailBoxId, TBool& aConnectionAllowed ); |
277 virtual TInt IsConnectionAllowedWhenRoaming( TFSMailMsgId aMailBoxId, TBool& aConnectionAllowed ); |
|
278 |
|
279 |
|
280 /** |
|
281 * Reads email from file stream and converts it to class CFSMailMessage |
|
282 * |
|
283 * @param aMailBoxId mailbox where email exists |
|
284 * @param aFile input file given by user |
|
285 * @return CFSMailMessage |
|
286 */ |
|
287 virtual CFSMailMessage* CreateMessageFromFileL( const TFSMailMsgId /*aMailboxId*/, |
|
288 const RFile& /*aFile*/ ) |
|
289 { return NULL; }; |
277 |
290 |
278 /** |
291 /** |
279 * Moves a messages between the given folders. |
292 * Moves a messages between the given folders. |
280 * |
293 * |
281 * @param aMailBoxId id of the target mailbox |
294 * @param aMailBoxId id of the target mailbox |
282 * @param aMessageIds ids of the messages to be transferred owned by user |
295 * @param aMessageIds ids of the messages to be transferred owned by user |
283 * @param aSourceFolderId source folder id |
296 * @param aSourceFolderId source folder id |
284 * @param aDestinationFolderId destination folder id |
297 * @param aDestinationFolderId destination folder id |
285 * |
298 * |
286 */ |
299 */ |
287 virtual void MoveMessagesL( const TFSMailMsgId& aMailBoxId, |
300 virtual void MoveMessagesL( const TFSMailMsgId& aMailBoxId, |
288 const RArray<TFSMailMsgId>& aMessageIds, |
301 const RArray<TFSMailMsgId>& aMessageIds, |
289 const TFSMailMsgId& aSourceFolderId, |
302 const TFSMailMsgId& aSourceFolderId, |
290 const TFSMailMsgId& aDestinationFolderId ) = 0; |
303 const TFSMailMsgId& aDestinationFolderId ) = 0; |
291 |
304 |
|
305 /** |
|
306 * Moves a messages between the given folders. Async version. |
|
307 * @param aMailBoxId id of the target mailbox |
|
308 * @param aMessageIds ids of the messages to be transferred owned by user |
|
309 * @param aSourceFolderId source folder id |
|
310 * @param aDestinationFolderId destination folder id |
|
311 */ |
|
312 virtual TInt MoveMessagesL( const TFSMailMsgId& /*aMailBoxId*/, |
|
313 const RArray<TFSMailMsgId>& /*aMessageIds*/, |
|
314 const TFSMailMsgId& /*aSourceFolderId*/, |
|
315 const TFSMailMsgId& /*aDestinationFolderId*/, |
|
316 MFSMailRequestObserver& /*aOperationObserver*/, |
|
317 TInt /*aRequestId*/ ){return KErrNotSupported;} |
|
318 |
292 /** |
319 /** |
293 * Copies a messages from folder to another. |
320 * Copies a messages from folder to another. |
294 * This function copies a messages to the given folder, |
321 * This function copies a messages to the given folder, |
295 * including the properties, content, and all attachments. |
322 * including the properties, content, and all attachments. |
296 * (note Only works if the store is in an authenticated state, |
323 * (note Only works if the store is in an authenticated state, |
297 * otherwise this function leaves with KErrNotReady) |
324 * otherwise this function leaves with KErrNotReady) |
298 * |
325 * |
299 * @param aMailBoxId target mailbox id |
326 * @param aMailBoxId target mailbox id |
300 * @param aMessageIds ids of the messages to be copied |
327 * @param aMessageIds ids of the messages to be copied |
301 * @param aNewMessages ids of the copied new messages owned by user |
328 * @param aNewMessages ids of the copied new messages owned by user |
302 * @param aSourceFolderId source folder id |
329 * @param aSourceFolderId source folder id |
303 * @param aDestinationFolderId destination folder id |
330 * @param aDestinationFolderId destination folder id |
304 */ |
331 */ |
305 virtual void CopyMessagesL( const TFSMailMsgId& aMailBoxId, |
332 virtual void CopyMessagesL( const TFSMailMsgId& aMailBoxId, |
306 const RArray<TFSMailMsgId>& aMessageIds, |
333 const RArray<TFSMailMsgId>& aMessageIds, |
307 RArray<TFSMailMsgId>& aNewMessages, |
334 RArray<TFSMailMsgId>& aNewMessages, |
308 const TFSMailMsgId& aSourceFolderId, |
335 const TFSMailMsgId& aSourceFolderId, |
309 const TFSMailMsgId& aDestinationFolderId ) = 0; |
336 const TFSMailMsgId& aDestinationFolderId ) = 0; |
332 * not contain a name at all then a KNullDesC is found in place of |
359 * not contain a name at all then a KNullDesC is found in place of |
333 * the name. |
360 * the name. |
334 * |
361 * |
335 * The function will leave with KErrNotFound if a mailbox with |
362 * The function will leave with KErrNotFound if a mailbox with |
336 * given id is not found. |
363 * given id is not found. |
337 * |
364 * |
338 * @param aMailBoxId target mailbox id |
365 * @param aMailBoxId target mailbox id |
339 * @param aNewMruList Array of descriptors containing MRUs. |
366 * @param aNewMruList Array of descriptors containing MRUs. |
340 * Empty if no entries are found. |
367 * Empty if no entries are found. |
341 */ |
368 */ |
342 virtual void SetMrusL( const TFSMailMsgId& aMailBoxId, |
369 virtual void SetMrusL( const TFSMailMsgId& aMailBoxId, |
343 MDesCArray* aNewMruList ) = 0; |
370 MDesCArray* aNewMruList ) = 0; |
344 |
371 |
345 /** FOLDER HANDLING API */ |
372 /** FOLDER HANDLING API */ |
346 /** |
373 /** |
347 * returns email folder object related to given folder id |
374 * returns email folder object related to given folder id |
348 * folder data set by plugin : |
375 * folder data set by plugin : |
349 * - folder id |
376 * - folder id |
350 * - folder name |
377 * - folder name |
351 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
378 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
352 * - message count |
379 * - message count |
353 * - unread message count |
380 * - unread message count |
354 * - mailbox id |
381 * - mailbox id |
355 * - parent folder |
382 * - parent folder |
356 * |
383 * |
357 * @param aMailBoxId id of mailbox containing folder |
384 * @param aMailBoxId id of mailbox containing folder |
358 * @param aFolderId folder id |
385 * @param aFolderId folder id |
359 * |
386 * |
360 * @return folder object (CFSMailFolder) to be owned by user |
387 * @return folder object (CFSMailFolder) to be owned by user |
361 */ |
388 */ |
362 virtual CFSMailFolder* GetFolderByUidL( const TFSMailMsgId& aMailBoxId, |
389 virtual CFSMailFolder* GetFolderByUidL( const TFSMailMsgId& aMailBoxId, |
363 const TFSMailMsgId& aFolderId ) = 0; |
390 const TFSMailMsgId& aFolderId ) = 0; |
364 |
391 |
365 /** |
392 /** |
366 * create new folder |
393 * create new folder |
367 * |
394 * |
368 * @param aMailBoxId id of the mailbox where folder is created |
395 * @param aMailBoxId id of the mailbox where folder is created |
369 * @param aFolderId id of the parent folder where folder is created |
396 * @param aFolderId id of the parent folder where folder is created |
370 * @param aFolderName name of the new folder |
397 * @param aFolderName name of the new folder |
371 * @param aSync defines if new folder is local only (false) |
398 * @param aSync defines if new folder is local only (false) |
372 * or if it also should sync to server (true) |
399 * or if it also should sync to server (true) |
373 * |
400 * |
374 * @return new folder object CFSMailFolder to be owned by user |
401 * @return new folder object CFSMailFolder to be owned by user |
375 */ |
402 */ |
376 virtual CFSMailFolder* CreateFolderL( const TFSMailMsgId& aMailBoxId, |
403 virtual CFSMailFolder* CreateFolderL( const TFSMailMsgId& aMailBoxId, |
377 const TFSMailMsgId& aParentFolderId, |
404 const TFSMailMsgId& aParentFolderId, |
378 const TDesC& aFolderName, |
405 const TDesC& aFolderName, |
379 const TBool aSync ) = 0; |
406 const TBool aSync ) = 0; |
380 |
407 |
381 /** |
408 /** |
385 * @param aFolderId defines id of the folder to be deleted |
412 * @param aFolderId defines id of the folder to be deleted |
386 */ |
413 */ |
387 virtual void DeleteFolderByUidL( const TFSMailMsgId& aMailBoxId, |
414 virtual void DeleteFolderByUidL( const TFSMailMsgId& aMailBoxId, |
388 const TFSMailMsgId& aFolderId) = 0; |
415 const TFSMailMsgId& aFolderId) = 0; |
389 |
416 |
390 /** |
417 /** |
391 * Lists subfolders of given folder. |
418 * Lists subfolders of given folder. |
392 * Only direct subfolders of given folder are returned. |
419 * Only direct subfolders of given folder are returned. |
393 * Folder data : |
420 * Folder data : |
394 * - folder id |
|
395 * - folder name |
|
396 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
|
397 * - message count |
|
398 * - unread message count |
|
399 * - mailbox id |
|
400 * - parent folder |
|
401 * - subfolder count |
|
402 * |
|
403 * @param aMailBoxId id of the mailbox where parent folder is located |
|
404 * @param aFolderId parent folder id. TFSMailId::NullId() for root level list. |
|
405 * @param aFolderList plugin writes results in this array owned by user |
|
406 */ |
|
407 virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId, |
|
408 const TFSMailMsgId& aParentFolderId, |
|
409 RPointerArray<CFSMailFolder>& aFolderList) = 0; |
|
410 |
|
411 /** |
|
412 * List all subfolders of given mailbox. |
|
413 * folder data : |
|
414 * - folder id |
421 * - folder id |
415 * - folder name |
422 * - folder name |
416 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
423 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
417 * - message count |
424 * - message count |
418 * - unread message count |
425 * - unread message count |
419 * - mailbox id |
426 * - mailbox id |
420 * - parent folder |
427 * - parent folder |
421 * - subfolder count |
428 * - subfolder count |
422 * |
429 * |
|
430 * @param aMailBoxId id of the mailbox where parent folder is located |
|
431 * @param aFolderId parent folder id. TFSMailId::NullId() for root level list. |
|
432 * @param aFolderList plugin writes results in this array owned by user |
|
433 */ |
|
434 virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId, |
|
435 const TFSMailMsgId& aParentFolderId, |
|
436 RPointerArray<CFSMailFolder>& aFolderList) = 0; |
|
437 |
|
438 /** |
|
439 * List all subfolders of given mailbox. |
|
440 * folder data : |
|
441 * - folder id |
|
442 * - folder name |
|
443 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
|
444 * - message count |
|
445 * - unread message count |
|
446 * - mailbox id |
|
447 * - parent folder |
|
448 * - subfolder count |
|
449 * |
423 * @param aMailBoxId mailbox id |
450 * @param aMailBoxId mailbox id |
424 * @param aFolderList plugin writes results in this array owned by user. |
451 * @param aFolderList plugin writes results in this array owned by user. |
425 * Caller must determine tree structure by examining parent id of each |
452 * Caller must determine tree structure by examining parent id of each |
426 * returned folder. |
453 * returned folder. |
427 */ |
454 */ |
428 virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId, |
455 virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId, |
429 RPointerArray<CFSMailFolder>& aFolderList) = 0; |
456 RPointerArray<CFSMailFolder>& aFolderList) = 0; |
430 |
457 |
431 /** |
458 /** |
432 * returns folder id of given standard folder |
459 * returns folder id of given standard folder |
433 * |
460 * |
434 * @param aMailBoxId id of the mailbox where folder is located |
461 * @param aMailBoxId id of the mailbox where folder is located |
435 * @param aFolderType folder type |
462 * @param aFolderType folder type |
436 * |
463 * |
437 * return folder id |
464 * return folder id |
438 */ |
465 */ |
439 virtual TFSMailMsgId GetStandardFolderIdL( const TFSMailMsgId& aMailBoxId, |
466 virtual TFSMailMsgId GetStandardFolderIdL( const TFSMailMsgId& aMailBoxId, |
440 const TFSFolderType aFolderType ) = 0; |
467 const TFSFolderType aFolderType ) = 0; |
441 |
468 |
442 /** MESSAGE FETCH AND STORE */ |
469 /** MESSAGE FETCH AND STORE */ |
443 /** |
470 /** |
444 * List messages contained by given folder. |
471 * List messages contained by given folder. |
445 * Returns email list iterator to user. |
472 * Returns email list iterator to user. |
446 * |
473 * |
447 * @param aMailBoxId id of the mailbox where parent folder is located |
474 * @param aMailBoxId id of the mailbox where parent folder is located |
448 * @param aFolderId folder id of given folder |
475 * @param aFolderId folder id of given folder |
449 * @param aDetails defines which message details are included in messages |
476 * @param aDetails defines which message details are included in messages |
450 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
477 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
451 * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date. |
478 * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date. |
452 * The rest would be retreived when needed but date is needed to build the list. |
479 * The rest would be retreived when needed but date is needed to build the list. |
453 * EFSMsgDataSubject -> Like above but when sorting by subject |
480 * EFSMsgDataSubject -> Like above but when sorting by subject |
454 * EFSMsgDataSender -> Likewise for sender address. |
481 * EFSMsgDataSender -> Likewise for sender address. |
455 * EFSMsgDataEnvelope, EFSMsgDataStructure -> email content type is returned by plugin |
482 * EFSMsgDataEnvelope, EFSMsgDataStructure -> email content type is returned by plugin |
456 * @param aSorting describes requested sort criteria (owned by user). |
483 * @param aSorting describes requested sort criteria (owned by user). |
457 * First item in array is primary sort criteria. |
484 * First item in array is primary sort criteria. |
458 * |
485 * |
459 * @return Email list iterator, ownership is transferred to user. |
486 * @return Email list iterator, ownership is transferred to user. |
460 */ |
487 */ |
461 virtual MFSMailIterator* ListMessagesL( const TFSMailMsgId& aMailBoxId, |
488 virtual MFSMailIterator* ListMessagesL( const TFSMailMsgId& aMailBoxId, |
462 const TFSMailMsgId& aFolderId, |
489 const TFSMailMsgId& aFolderId, |
463 const TFSMailDetails aDetails, |
490 const TFSMailDetails aDetails, |
464 const RArray<TFSMailSortCriteria>& aSorting ) = 0; |
491 const RArray<TFSMailSortCriteria>& aSorting ) = 0; |
465 |
492 |
466 /** |
493 /** |
467 * returns email object related to given message id |
494 * returns email object related to given message id |
468 * |
495 * |
469 * message info set by plugin : |
496 * message info set by plugin : |
470 * - message id |
497 * - message id |
471 * - mailbox |
498 * - mailbox |
472 * - parent folder |
499 * - parent folder |
473 * - message size |
500 * - message size |
474 * - the rest is defined by message attributes ; |
501 * - the rest is defined by message attributes ; |
475 * @param aMailBoxId id of the mailbox containing email |
502 * @param aMailBoxId id of the mailbox containing email |
476 * @param aFolderId parent folder id containing email |
503 * @param aFolderId parent folder id containing email |
477 * @param aMessageId email message id |
504 * @param aMessageId email message id |
478 * |
505 * |
479 * @param aDetails defines which message parts are included in message |
506 * @param aDetails defines which message parts are included in message |
480 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
507 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
481 * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date. |
508 * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date. |
482 * The rest would be retreived when needed but date is needed to build the list. |
509 * The rest would be retreived when needed but date is needed to build the list. |
483 * EFSMsgDataSubject -> Like above but when sorting by subject |
510 * EFSMsgDataSubject -> Like above but when sorting by subject |
484 * EFSMsgDataSender -> Likewise for sender address. |
511 * EFSMsgDataSender -> Likewise for sender address. |
485 * EFSMsgDataEnvelope, EFSMsgDataStructure -> |
512 * EFSMsgDataEnvelope, EFSMsgDataStructure -> |
486 * email content type is evaluated and returned by plugin |
513 * email content type is evaluated and returned by plugin |
487 * |
514 * |
488 * @return email object (CFSMailMessage), ownership is transferred to user |
515 * @return email object (CFSMailMessage), ownership is transferred to user |
489 */ |
516 */ |
490 virtual CFSMailMessage* GetMessageByUidL( const TFSMailMsgId& aMailBoxId, |
517 virtual CFSMailMessage* GetMessageByUidL( const TFSMailMsgId& aMailBoxId, |
491 const TFSMailMsgId& aParentFolderId, |
518 const TFSMailMsgId& aParentFolderId, |
492 const TFSMailMsgId& aMessageId, |
519 const TFSMailMsgId& aMessageId, |
493 const TFSMailDetails aDetails) = 0; |
520 const TFSMailDetails aDetails) = 0; |
494 |
521 |
495 /** |
522 /** |
563 MFSMailRequestObserver& aOperationObserver, |
590 MFSMailRequestObserver& aOperationObserver, |
564 const TInt aRequestId, |
591 const TInt aRequestId, |
565 const TDesC& aHeaderDescriptor = KNullDesC ); |
592 const TDesC& aHeaderDescriptor = KNullDesC ); |
566 // </qmail> |
593 // </qmail> |
567 |
594 |
568 /** |
595 /** |
569 * creates new email template to drafts folder to be replied |
596 * creates new email template to drafts folder to be replied |
570 * |
597 * |
571 * @param aMailBoxId id of the mailbox where new email is created |
598 * @param aMailBoxId id of the mailbox where new email is created |
572 * @param aOriginalMessageId id of original email,which is replied to |
599 * @param aOriginalMessageId id of original email,which is replied to |
573 * @param aReplyToAll true if reply to all is wanted |
600 * @param aReplyToAll true if reply to all is wanted |
574 * @param aHeaderDescriptor user can give quote headers data to plugin as |
601 * @param aHeaderDescriptor user can give quote headers data to plugin as |
575 * parameter if needed |
602 * parameter if needed |
576 * |
603 * |
577 * @return email object to be modified by user, ownership is transferred to user |
604 * @return email object to be modified by user, ownership is transferred to user |
578 */ |
605 */ |
579 virtual CFSMailMessage* CreateReplyMessageL( const TFSMailMsgId& aMailBoxId, |
606 virtual CFSMailMessage* CreateReplyMessageL( const TFSMailMsgId& aMailBoxId, |
580 const TFSMailMsgId& aOriginalMessageId, |
607 const TFSMailMsgId& aOriginalMessageId, |
581 const TBool aReplyToAll, |
608 const TBool aReplyToAll, |
582 const TDesC& aHeaderDescriptor = KNullDesC) = 0; |
609 const TDesC& aHeaderDescriptor = KNullDesC) = 0; |
583 |
610 |
630 const TInt aRequestId ) = 0; |
657 const TInt aRequestId ) = 0; |
631 // </qmail> |
658 // </qmail> |
632 |
659 |
633 /** |
660 /** |
634 * starts email fetching from email server |
661 * starts email fetching from email server |
635 * |
662 * |
636 * @param aMailBoxId id of the mailbox where email is located |
663 * @param aMailBoxId id of the mailbox where email is located |
637 * @param aFolderId id of the parent folder containing email |
664 * @param aFolderId id of the parent folder containing email |
638 * @param aMessageIds ids of email to be fetched |
665 * @param aMessageIds ids of email to be fetched |
639 * @param aDetails defines which details are included in email |
666 * @param aDetails defines which details are included in email |
640 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
667 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
641 * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date. |
668 * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date. |
642 * The rest would be retreived when needed but date is needed to build the list. |
669 * The rest would be retreived when needed but date is needed to build the list. |
643 * EFSMsgDataSubject -> Like above but when sorting by subject |
670 * EFSMsgDataSubject -> Like above but when sorting by subject |
644 * EFSMsgDataSender -> Likewise for sender address. |
671 * EFSMsgDataSender -> Likewise for sender address. |
645 * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least. |
672 * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least. |
646 * EFSMsgDataStructure -> the part structure including mime type, size and name headers. |
673 * EFSMsgDataStructure -> the part structure including mime type, size and name headers. |
647 * |
674 * |
648 * @param aObserver observer (callback medhod), which plugin calls to pass progress |
675 * @param aObserver observer (callback medhod), which plugin calls to pass progress |
649 * events to user (like fetching has completed) |
676 * events to user (like fetching has completed) |
650 * @param aRequestId asynchronous request id |
677 * @param aRequestId asynchronous request id |
651 */ |
678 */ |
652 virtual void FetchMessagesL( const TFSMailMsgId& aMailBoxId, |
679 virtual void FetchMessagesL( const TFSMailMsgId& aMailBoxId, |
653 const TFSMailMsgId& aParentFolderId, |
680 const TFSMailMsgId& aParentFolderId, |
654 const RArray<TFSMailMsgId>& aMessageIds, |
681 const RArray<TFSMailMsgId>& aMessageIds, |
655 TFSMailDetails aDetails, |
682 TFSMailDetails aDetails, |
656 MFSMailRequestObserver& aObserver, |
683 MFSMailRequestObserver& aObserver, |
657 TInt aRequestId) = 0; |
684 TInt aRequestId) = 0; |
658 |
685 |
659 /** |
686 /** |
660 * starts email parts fetching from email server |
687 * starts email parts fetching from email server |
661 * |
688 * |
662 * @param aMailBoxId id of the mailbox where email is located |
689 * @param aMailBoxId id of the mailbox where email is located |
663 * @param aFolderId id of the parent folder containing email |
690 * @param aFolderId id of the parent folder containing email |
664 * @param aMessagePartIds part ids of email parts, which are to be fetched |
691 * @param aMessagePartIds part ids of email parts, which are to be fetched |
665 * @param aOperationObserver observer that plugin uses to report |
692 * @param aOperationObserver observer that plugin uses to report |
666 * progress notifications during the operation. |
693 * progress notifications during the operation. |
675 const TFSMailMsgId& aMessageId, |
702 const TFSMailMsgId& aMessageId, |
676 const RArray<TFSMailMsgId>& aMessagePartIds, |
703 const RArray<TFSMailMsgId>& aMessagePartIds, |
677 MFSMailRequestObserver& aOperationObserver, |
704 MFSMailRequestObserver& aOperationObserver, |
678 const TInt aRequestId, |
705 const TInt aRequestId, |
679 const TUint aPreferredByteCount) = 0; |
706 const TUint aPreferredByteCount) = 0; |
680 |
707 |
681 |
708 |
682 /* reads email objects from plugin store |
709 /* reads email objects from plugin store |
683 * |
710 * |
684 * @param aMailBoxId id of the mailbox where email are located |
711 * @param aMailBoxId id of the mailbox where email are located |
685 * @param aParentFolderId parent folder id containing emails |
712 * @param aParentFolderId parent folder id containing emails |
686 * @param aMessageIds ids of emails to be read from plugin store |
713 * @param aMessageIds ids of emails to be read from plugin store |
687 * @param aMessageList plugin writes results into this table owned by user |
714 * @param aMessageList plugin writes results into this table owned by user |
688 * @param aDetails defines which email details are included in each email object |
715 * @param aDetails defines which email details are included in each email object |
689 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
716 * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID. |
690 * EFSMsgDataDate -> Get received date only. To be used when showing |
717 * EFSMsgDataDate -> Get received date only. To be used when showing |
691 * messages sorted by date. The rest would be retreived when needed but |
718 * messages sorted by date. The rest would be retreived when needed but |
692 * date is needed to build the list. |
719 * date is needed to build the list. |
693 * EFSMsgDataSubject -> Like above but when sorting by subject |
720 * EFSMsgDataSubject -> Like above but when sorting by subject |
694 * EFSMsgDataSender -> Likewise for sender address. |
721 * EFSMsgDataSender -> Likewise for sender address. |
695 * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least. |
722 * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least. |
696 * EFSMsgDataStructure -> the part structure including mime type, |
723 * EFSMsgDataStructure -> the part structure including mime type, |
697 * size and name headers. |
724 * size and name headers. |
698 */ |
725 */ |
699 virtual void GetMessagesL( const TFSMailMsgId& aMailBoxId, |
726 virtual void GetMessagesL( const TFSMailMsgId& aMailBoxId, |
700 const TFSMailMsgId& aParentFolderId, |
727 const TFSMailMsgId& aParentFolderId, |
701 const RArray<TFSMailMsgId>& aMessageIds, |
728 const RArray<TFSMailMsgId>& aMessageIds, |
702 RPointerArray<CFSMailMessage>& aMessageList, |
729 RPointerArray<CFSMailMessage>& aMessageList, |
703 const TFSMailDetails aDetails ) = 0; |
730 const TFSMailDetails aDetails ) = 0; |
704 |
731 |
705 /** |
732 /** |
706 * Returns child part objects for given email part. Ownership of objects |
733 * Returns child part objects for given email part. Ownership of objects |
707 * is transferred to user. |
734 * is transferred to user. |
708 * |
735 * |
709 * @param aMailBoxId id of the mailbox where email is located |
736 * @param aMailBoxId id of the mailbox where email is located |
718 const TFSMailMsgId& aParentId, |
745 const TFSMailMsgId& aParentId, |
719 RPointerArray<CFSMailMessagePart>& aParts) = 0; |
746 RPointerArray<CFSMailMessagePart>& aParts) = 0; |
720 |
747 |
721 /** |
748 /** |
722 * Creates and adds a new child part to given email part. |
749 * Creates and adds a new child part to given email part. |
723 * |
750 * |
724 * @param aMailBoxId id of the mailbox where email is located |
751 * @param aMailBoxId id of the mailbox where email is located |
725 * @param aParentFolderId id of the parent folder where email is located |
752 * @param aParentFolderId id of the parent folder where email is located |
726 * @param aMessageId id of the email email belongs to |
753 * @param aMessageId id of the email email belongs to |
727 * @param aParentPartId id of the parent part of the new part |
754 * @param aParentPartId id of the parent part of the new part |
728 * @param aInsertBefore id of existing part that new part should precede. |
755 * @param aInsertBefore id of existing part that new part should precede. |
729 * If aInsertBefore is NULL id then new part is added as last. |
756 * If aInsertBefore is NULL id then new part is added as last. |
730 * @param aContentType content type of the new message part |
757 * @param aContentType content type of the new message part |
731 * |
758 * |
732 * return new child part object, ownership is transferred to user |
759 * return new child part object, ownership is transferred to user |
733 */ |
760 */ |
734 virtual CFSMailMessagePart* NewChildPartL( const TFSMailMsgId& aMailBoxId, |
761 virtual CFSMailMessagePart* NewChildPartL( const TFSMailMsgId& aMailBoxId, |
735 const TFSMailMsgId& aParentFolderId, |
762 const TFSMailMsgId& aParentFolderId, |
736 const TFSMailMsgId& aMessageId, |
763 const TFSMailMsgId& aMessageId, |
737 const TFSMailMsgId& aParentPartId, |
764 const TFSMailMsgId& aParentPartId, |
738 const TFSMailMsgId& aInsertBefore, |
765 const TFSMailMsgId& aInsertBefore, |
739 const TDesC& aContentType) = 0; |
766 const TDesC& aContentType) = 0; |
740 |
767 |
741 /** |
768 /** |
742 * Creates and adds a new child part from file to given email part. |
769 * Creates and adds a new child part from file to given email part. |
743 * |
770 * |
744 * @param aMailBoxId id of the mailbox where parent part is located |
771 * @param aMailBoxId id of the mailbox where parent part is located |
745 * @param aParentFolderId id of the parent folder where email is located |
772 * @param aParentFolderId id of the parent folder where email is located |
746 * @param aMessageId id of the email parent part belongs to |
773 * @param aMessageId id of the email parent part belongs to |
747 * @param aParentPartId id of the parent part of the new part |
774 * @param aParentPartId id of the parent part of the new part |
748 * @param aInsertBefore id of existing part that new part should precede. |
775 * @param aInsertBefore id of existing part that new part should precede. |
749 * If aInsertBefore is NULL id then new part is added as last. |
776 * If aInsertBefore is NULL id then new part is added as last. |
750 * @param aContentType content type of the new message part |
777 * @param aContentType content type of the new message part |
751 * @param aFilePath file containing new child part contents |
778 * @param aFilePath file containing new child part contents |
752 * |
779 * |
753 * return new child part object, ownership is transferred to user |
780 * return new child part object, ownership is transferred to user |
754 */ |
781 */ |
755 virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId, |
782 virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId, |
756 const TFSMailMsgId& aParentFolderId, |
783 const TFSMailMsgId& aParentFolderId, |
757 const TFSMailMsgId& aMessageId, |
784 const TFSMailMsgId& aMessageId, |
758 const TFSMailMsgId& aParentPartId, |
785 const TFSMailMsgId& aParentPartId, |
759 const TDesC& aContentType, |
786 const TDesC& aContentType, |
760 const TDesC& aFilePath) = 0; |
787 const TDesC& aFilePath) = 0; |
761 |
788 |
762 // <qmail> |
789 // <qmail> |
763 /** |
790 /** |
764 * Creates and adds a new child part from file to given email part. |
791 * Creates and adds a new child part from file to given email part. |
765 * |
792 * |
766 * @param aMailBoxId id of the mailbox where parent part is located |
793 * @param aMailBoxId id of the mailbox where parent part is located |
767 * @param aParentFolderId id of the parent folder where email is located |
794 * @param aParentFolderId id of the parent folder where email is located |
804 const TFSMailMsgId& aMessageId, |
833 const TFSMailMsgId& aMessageId, |
805 const TFSMailMsgId& aParentPartId, |
834 const TFSMailMsgId& aParentPartId, |
806 const TDesC& aContentType, |
835 const TDesC& aContentType, |
807 RFile& aFile ) = 0; |
836 RFile& aFile ) = 0; |
808 |
837 |
809 |
838 |
810 /** |
839 /** |
811 * Copies given email as new child part to given email part. |
840 * Copies given email as new child part to given email part. |
812 * |
841 * |
813 * @param aMailBoxId id of the mailbox where email is located |
842 * @param aMailBoxId id of the mailbox where email is located |
814 * @param aParentFolderId id of the parent folder where email is located |
843 * @param aParentFolderId id of the parent folder where email is located |
815 * @param aMessageId id of the email parent part belongs to |
844 * @param aMessageId id of the email parent part belongs to |
816 * @param aParentPartId id of the parent part of the new part |
845 * @param aParentPartId id of the parent part of the new part |
817 * @param aInsertBefore id of existing part that new part should precede. |
846 * @param aInsertBefore id of existing part that new part should precede. |
818 * If NULL id then new part is added as last. |
847 * If NULL id then new part is added as last. |
819 * @param aMessage id of the email that is copied as child part |
848 * @param aMessage id of the email that is copied as child part |
820 * |
849 * |
821 * return new child part object, ownership is transferred to user |
850 * return new child part object, ownership is transferred to user |
822 */ |
851 */ |
823 virtual CFSMailMessagePart* CopyMessageAsChildPartL( const TFSMailMsgId& aMailBoxId, |
852 virtual CFSMailMessagePart* CopyMessageAsChildPartL( const TFSMailMsgId& aMailBoxId, |
824 const TFSMailMsgId& aParentFolderId, |
853 const TFSMailMsgId& aParentFolderId, |
825 const TFSMailMsgId& aMessageId, |
854 const TFSMailMsgId& aMessageId, |
826 const TFSMailMsgId& aParentPartId, |
855 const TFSMailMsgId& aParentPartId, |
827 const TFSMailMsgId& aInsertBefore, |
856 const TFSMailMsgId& aInsertBefore, |
828 const CFSMailMessage& aMessage) = 0; |
857 const CFSMailMessage& aMessage) = 0; |
829 |
858 |
830 /** |
859 /** |
831 * Removes child part (and its children, if any) from given email part |
860 * Removes child part (and its children, if any) from given email part |
832 * |
861 * |
833 * @param aMailBoxId id of the mailbox where email is located |
862 * @param aMailBoxId id of the mailbox where email is located |
834 * @param aParentFolderId id of the parent folder where email is located |
863 * @param aParentFolderId id of the parent folder where email is located |
835 * @param aMessageId id of the email parent part belongs to |
864 * @param aMessageId id of the email parent part belongs to |
836 * @param aParentPartId id of the parent of the part |
865 * @param aParentPartId id of the parent of the part |
837 * @param aPartId id of the part to removed |
866 * @param aPartId id of the part to removed |
838 */ |
867 */ |
839 virtual void RemoveChildPartL( const TFSMailMsgId& aMailBoxId, |
868 virtual void RemoveChildPartL( const TFSMailMsgId& aMailBoxId, |
840 const TFSMailMsgId& aParentFolderId, |
869 const TFSMailMsgId& aParentFolderId, |
841 const TFSMailMsgId& aMessageId, |
870 const TFSMailMsgId& aMessageId, |
842 const TFSMailMsgId& aParentPartId, |
871 const TFSMailMsgId& aParentPartId, |
843 const TFSMailMsgId& aPartId) = 0; |
872 const TFSMailMsgId& aPartId) = 0; |
844 |
873 |
|
874 // <qmail> |
|
875 /** |
|
876 * Removes child part (and its children, if any) from given email part |
|
877 * |
|
878 * @param aMailBoxId id of the mailbox where email is located |
|
879 * @param aParentFolderId id of the parent folder where email is located |
|
880 * @param aMessageId id of the email parent part belongs to |
|
881 * @param aParentPartId id of the parent of the part |
|
882 * @param aPartId id of the part to removed |
|
883 * @param aOperationObserver Observer for the operation |
|
884 * @param aRequestId id of the operation |
|
885 */ |
|
886 virtual void RemoveChildPartL( const TFSMailMsgId& aMailBoxId, |
|
887 const TFSMailMsgId& aParentFolderId, |
|
888 const TFSMailMsgId& aMessageId, |
|
889 const TFSMailMsgId& aParentPartId, |
|
890 const TFSMailMsgId& aPartId, |
|
891 MFSMailRequestObserver& aOperationObserver, |
|
892 const TInt aRequestId); |
|
893 // </qmail> |
|
894 |
845 /** |
895 /** |
846 * Returns given message part. Ownership of object is transferred to caller. |
896 * Returns given message part. Ownership of object is transferred to caller. |
847 * |
897 * |
848 * @param aMailBoxId id of the mailbox where email is located |
898 * @param aMailBoxId id of the mailbox where email is located |
849 * @param aParentFolderId id of the parent folder where email is located |
899 * @param aParentFolderId id of the parent folder where email is located |
910 const TFSMailMsgId& aParentFolderId, |
960 const TFSMailMsgId& aParentFolderId, |
911 const TFSMailMsgId& aMessageId, |
961 const TFSMailMsgId& aMessageId, |
912 const TFSMailMsgId& aMessagePartId, |
962 const TFSMailMsgId& aMessagePartId, |
913 TDes& aBuffer, |
963 TDes& aBuffer, |
914 const TUint aStartOffset) = 0; |
964 const TUint aStartOffset) = 0; |
915 |
965 |
916 /** |
966 /** |
917 * stores email part content |
967 * stores email part content |
918 * |
968 * |
919 * @param aBuffer contain email part content |
969 * @param aBuffer contain email part content |
920 * @param aMailBoxId id of the mailbox where email is located |
970 * @param aMailBoxId id of the mailbox where email is located |
921 * @param aParentFolderId id of the parent folder where email is located |
971 * @param aParentFolderId id of the parent folder where email is located |
922 * @param aMessageId id of the email part belongs to |
972 * @param aMessageId id of the email part belongs to |
923 * @param aMessagePartId id of the message part |
973 * @param aMessagePartId id of the message part |
924 */ |
974 */ |
925 virtual void SetContentL( const TDesC& aBuffer, |
975 virtual void SetContentL( const TDesC& aBuffer, |
926 const TFSMailMsgId& aMailBoxId, |
976 const TFSMailMsgId& aMailBoxId, |
927 const TFSMailMsgId& aParentFolderId, |
977 const TFSMailMsgId& aParentFolderId, |
928 const TFSMailMsgId& aMessageId, |
978 const TFSMailMsgId& aMessageId, |
929 const TFSMailMsgId& aMessagePartId) = 0; |
979 const TFSMailMsgId& aMessagePartId) = 0; |
930 |
980 |
931 /** |
981 /** |
932 * Removes fetched contents of these parts. |
982 * Removes fetched contents of these parts. |
933 * |
983 * |
934 * @param aMailBoxId defines mailbox where message is located |
984 * @param aMailBoxId defines mailbox where message is located |
935 * @param aParentFolderId defines parent folder where message is located |
985 * @param aParentFolderId defines parent folder where message is located |
936 * @param aMessageId gives the id of the message that message part belongs to |
986 * @param aMessageId gives the id of the message that message part belongs to |
937 * @param aPartIds message part ids to be removed |
987 * @param aPartIds message part ids to be removed |
938 */ |
988 */ |
939 virtual void RemovePartContentL( const TFSMailMsgId& aMailBoxId, |
989 virtual void RemovePartContentL( const TFSMailMsgId& aMailBoxId, |
940 const TFSMailMsgId& aParentFolderId, |
990 const TFSMailMsgId& aParentFolderId, |
941 const TFSMailMsgId& aMessageId, |
991 const TFSMailMsgId& aMessageId, |
942 const RArray<TFSMailMsgId>& aPartIds) = 0; |
992 const RArray<TFSMailMsgId>& aPartIds) = 0; |
943 |
993 |
944 /** |
994 /** |
945 * Sets email part contents from given file. |
995 * Sets email part contents from given file. |
946 * Possible old contents are replaced. |
996 * Possible old contents are replaced. |
947 * |
997 * |
948 * @param aMailBoxId id of the mailbox where email is located |
998 * @param aMailBoxId id of the mailbox where email is located |
949 * @param aParentFolderId id of the parent folder where email is located |
999 * @param aParentFolderId id of the parent folder where email is located |
950 * @param aMessageId id of the email part belongs to |
1000 * @param aMessageId id of the email part belongs to |
951 * @param aMessagePartId id of the message part |
1001 * @param aMessagePartId id of the message part |
952 * @param aFilePath source file path |
1002 * @param aFilePath source file path |
1010 const TInt aRequestId ); |
1060 const TInt aRequestId ); |
1011 // </qmail> |
1061 // </qmail> |
1012 |
1062 |
1013 /** |
1063 /** |
1014 * Returns pending asynchronous request status, request is identified |
1064 * Returns pending asynchronous request status, request is identified |
1015 * by request id if parallel requests exists |
1065 * by request id if parallel requests exists |
1016 * |
1066 * |
1017 * @param aRequestId request id |
1067 * @param aRequestId request id |
1018 * |
1068 * |
1019 * @return pending request status |
1069 * @return pending request status |
1020 */ |
1070 */ |
1021 virtual TFSProgress StatusL( const TInt aRequestId ) = 0; |
1071 virtual TFSProgress StatusL( const TInt aRequestId ) = 0; |
1022 |
1072 |
1023 /** |
1073 /** |
1024 * cancels pending request |
1074 * cancels pending request |
1025 * |
1075 * |
1026 * @param aRequestId identifies request if parallel requests exists |
1076 * @param aRequestId identifies request if parallel requests exists |
1027 */ |
1077 */ |
1028 virtual void CancelL( const TInt aRequestId ) = 0; |
1078 virtual void CancelL( const TInt aRequestId ) = 0; |
1029 |
1079 |
1030 /** Search API */ |
1080 /** Search API */ |
1031 |
1081 |
1032 /** |
1082 /** |
1033 * Asyncronous call for starting search for given string. Only one search can be |
1083 * Asyncronous call for starting search for given string. Only one search can be |
1034 * performed at a time. |
1084 * performed at a time. |
1035 * |
1085 * |
1036 * |
1086 * |
1037 * This function will search for message's containing the given search string. |
1087 * This function will search for message's containing the given search string. |
1038 * The search will be performed on the all message fields: To, Cc, Bcc, subject, body. |
1088 * The search will be performed on the all message fields: To, Cc, Bcc, subject, body. |
1039 * The search client will be notified of each found message, |
1089 * The search client will be notified of each found message, |
1040 * and upon completion of the search. Only one search can be performed at a time. |
1090 * and upon completion of the search. Only one search can be performed at a time. |
1041 * |
1091 * |
1042 * To change the sort order in the search result, use the same search string in the |
1092 * To change the sort order in the search result, use the same search string in the |
1043 * but change the aSortCriteria parameter. The store "caches" the search |
1093 * but change the aSortCriteria parameter. The store "caches" the search |
1044 * results generated by the same search string. |
1094 * results generated by the same search string. |
1045 * |
1095 * |
1046 * The function will leave with KErrInUse if a search is already in progress. |
1096 * The function will leave with KErrInUse if a search is already in progress. |
1047 * |
1097 * |
1048 * /note Only works if the store is in an authenticated state, |
1098 * /note Only works if the store is in an authenticated state, |
1049 * otherwise this function leaves with KErrNotReady |
1099 * otherwise this function leaves with KErrNotReady |
1050 * |
1100 * |
1051 * @paran aMailBoxId id of the mailbox where messages are to be searched |
1101 * @paran aMailBoxId id of the mailbox where messages are to be searched |
1052 * @param aFolderIds list of folders where messages are to be searched |
1102 * @param aFolderIds list of folders where messages are to be searched |
1053 * global or folder specific search depends on the size of array is 0 or not. |
1103 * global or folder specific search depends on the size of array is 0 or not. |
1054 * @param aSearchStrings text strings that will be searched from different message fields. |
1104 * @param aSearchStrings text strings that will be searched from different message fields. |
1055 * @param aSortCriteria sort criteria for the results |
1105 * @param aSortCriteria sort criteria for the results |
1056 * @param aSearchObserver client observer that will be notified about search status. |
1106 * @param aSearchObserver client observer that will be notified about search status. |
1057 * |
1107 * |
1058 */ |
1108 */ |
1059 virtual void SearchL( const TFSMailMsgId& aMailBoxId, |
1109 virtual void SearchL( const TFSMailMsgId& aMailBoxId, |
1060 const RArray<TFSMailMsgId>& aFolderIds, |
1110 const RArray<TFSMailMsgId>& aFolderIds, |
1061 const RPointerArray<TDesC>& aSearchStrings, |
1111 const RPointerArray<TDesC>& aSearchStrings, |
1062 const TFSMailSortCriteria& aSortCriteria, |
1112 const TFSMailSortCriteria& aSortCriteria, |
1063 MFSMailBoxSearchObserver& aSearchObserver ) = 0; |
1113 MFSMailBoxSearchObserver& aSearchObserver ) = 0; |
1064 |
1114 |
1065 |
1115 |
1066 /** |
1116 /** |
1067 * Cancels current search. Does nothing if there is not any search. |
1117 * Cancels current search. Does nothing if there is not any search. |
1068 * The search client will not be called back after this function is called. |
1118 * The search client will not be called back after this function is called. |
1069 * |
1119 * |
1070 * \note CancelSearch() method does NOT clear the search result cached in the store. |
1120 * \note CancelSearch() method does NOT clear the search result cached in the store. |
1071 * A different sort order can be used for the same search string, and the |
1121 * A different sort order can be used for the same search string, and the |
1072 * cache will be utilized. Only by using a different search string can the |
1122 * cache will be utilized. Only by using a different search string can the |
1073 * cache be cleaned. |
1123 * cache be cleaned. |
1074 * |
1124 * |
1075 * @paran aMailBoxId id of the mailbox where the search should be cancelled |
1125 * @paran aMailBoxId id of the mailbox where the search should be cancelled |
1076 */ |
1126 */ |
1077 virtual void CancelSearch( const TFSMailMsgId& aMailBoxId ) = 0; |
1127 virtual void CancelSearch( const TFSMailMsgId& aMailBoxId ) = 0; |
1078 |
1128 |
1079 /** |
1129 /** |
1080 * Inform the store to clean up its cache for search results. |
1130 * Inform the store to clean up its cache for search results. |
1081 * |
1131 * |
1082 * This method cancels the the ongoing search (if exists), and then clean ups store's cache. |
1132 * This method cancels the the ongoing search (if exists), and then clean ups store's cache. |
1083 * |
1133 * |
1084 * This function should be called when search results are no longer in display. |
1134 * This function should be called when search results are no longer in display. |
1085 * |
1135 * |
1086 * @paran aMailBoxId id of the mailbox where the search cache should be cleared |
1136 * @paran aMailBoxId id of the mailbox where the search cache should be cleared |
1087 */ |
1137 */ |
1088 virtual void ClearSearchResultCache( const TFSMailMsgId& aMailBoxId ) = 0; |
1138 virtual void ClearSearchResultCache( const TFSMailMsgId& aMailBoxId ) = 0; |
1089 |
1139 |
1090 /** |
1140 /** |
1091 * Adds a new event observer. There can be several observers active at the same time. |
1141 * Adds a new event observer. There can be several observers active at the same time. |
1092 * Caller MUST call RemoveObserver before destroying given observer object. |
1142 * Caller MUST call RemoveObserver before destroying given observer object. |