132 * @return asynchronous request id |
124 * @return asynchronous request id |
133 */ |
125 */ |
134 IMPORT_C TInt RefreshNowL( MFSMailRequestObserver& aOperationObserver ); |
126 IMPORT_C TInt RefreshNowL( MFSMailRequestObserver& aOperationObserver ); |
135 |
127 |
136 IMPORT_C TInt RefreshNowL( ); |
128 IMPORT_C TInt RefreshNowL( ); |
137 |
129 |
138 /** |
130 /** |
139 * cancels all ongoing synchronizations in this mailbox regardless |
131 * creates into this mailbox new draft email |
140 * of initiator, by user or by plugin itself |
|
141 * |
|
142 */ |
|
143 IMPORT_C void CancelSyncL(); |
|
144 |
|
145 /** |
|
146 * creates into this mailbox new draft email |
|
147 * |
132 * |
148 * @return new draft email object, ownership is transferred to user |
133 * @return new draft email object, ownership is transferred to user |
149 */ |
134 */ |
150 IMPORT_C CFSMailMessage* CreateMessageToSend( ); |
135 IMPORT_C CFSMailMessage* CreateMessageToSend( ); |
151 |
136 |
152 // <qmail> |
137 // <qmail> |
153 /** |
138 /** |
154 * Creates a new draft email into this mailbox asynchronously. When the operation |
139 * Creates a new draft email into this mailbox asynchronously. When the operation |
155 * finishes, RequestResponseL is called on the observer and the created message is |
140 * finishes, RequestResponseL is called on the observer and the created message is |
156 * passed along with the TFSProgress data. UI should not use this method directly |
141 * passed along with the TFSProgress data. UI should not use this method directly |
157 * but via an NmMessageCreationOperation-derived object. |
142 * but via an NmMessageCreationOperation-derived object. |
158 * |
143 * |
159 * @param aOperationObserver Observer for the operation |
144 * @param aOperationObserver Observer for the operation |
160 * |
145 * |
161 * @return id of the request, KErrFSMailPluginNotSupported if the protocol plugin this |
146 * @return id of the request, KErrFSMailPluginNotSupported if the protocol plugin this |
162 * instance is attached to does not support the async method. |
147 * instance is attached to does not support the async method. |
163 */ |
148 */ |
164 IMPORT_C TInt CreateMessageToSendL( MFSMailRequestObserver& aOperationObserver ); |
149 IMPORT_C TInt CreateMessageToSendL( MFSMailRequestObserver& aOperationObserver ); |
165 // </qmail> |
150 // </qmail> |
166 |
151 |
167 // <qmail> |
152 // <qmail> |
168 /** |
153 /** |
169 * update message flags |
154 * update message flags |
170 * |
155 * |
171 * ownership of message pointers is transferred |
156 * ownership of message pointers is transferred |
172 * |
157 * |
173 */ |
158 */ |
174 IMPORT_C int UpdateMessageFlagsL( |
159 IMPORT_C int UpdateMessageFlagsL( |
175 const TFSMailMsgId aMailboxId, |
160 const TFSMailMsgId aMailboxId, |
176 RPointerArray<CFSMailMessage> &messages, |
161 RPointerArray<CFSMailMessage> &messages, |
177 MFSMailRequestObserver& aOperationObserver ); |
162 MFSMailRequestObserver& aOperationObserver ); |
178 // </qmail> |
163 // </qmail> |
179 |
164 |
180 /** |
165 /** |
181 * creates into this mailbox new draft email to be forwarded |
166 * creates into this mailbox new draft email to be forwarded |
182 * |
167 * |
183 * @param aOriginalMessageId message id of the original message to be forwarded |
168 * @param aOriginalMessageId message id of the original message to be forwarded |
184 * @param aHeaderDescriptor user can give quote headers data to plugin as |
169 * @param aHeaderDescriptor user can give quote headers data to plugin as |
185 * parameter if needed |
170 * parameter if needed |
186 * |
171 * |
187 * @return new draft email object, ownership is transferred to user |
172 * @return new draft email object, ownership is transferred to user |
188 */ |
173 */ |
189 IMPORT_C CFSMailMessage* CreateForwardMessage( const TFSMailMsgId aOriginalMessageId, |
174 IMPORT_C CFSMailMessage* CreateForwardMessage( const TFSMailMsgId aOriginalMessageId, |
190 const TDesC& aHeaderDescriptor = KNullDesC ); |
175 const TDesC& aHeaderDescriptor = KNullDesC ); |
191 |
176 |
192 // <qmail> |
177 // <qmail> |
193 /** |
178 /** |
194 * creates into this mailbox new draft email to be forwarded asynchronously |
179 * creates into this mailbox new draft email to be forwarded asynchronously |
195 * When the operation finishes, RequestResponseL is called on the observer and |
180 * When the operation finishes, RequestResponseL is called on the observer and |
196 * the created message is passed along with the TFSProgress data. |
181 * the created message is passed along with the TFSProgress data. |
197 * |
182 * |
198 * @param aOriginalMessageId message id of the original message to be forwarded |
183 * @param aOriginalMessageId message id of the original message to be forwarded |
199 * @param aOperationObserver Observer for the operation |
184 * @param aOperationObserver Observer for the operation |
200 * @param aHeaderDescriptor user can give quote headers data to plugin as |
185 * @param aHeaderDescriptor user can give quote headers data to plugin as |
201 * parameter if needed |
186 * parameter if needed |
202 * |
187 * |
203 * @return id of the request |
188 * @return id of the request |
204 */ |
189 */ |
205 IMPORT_C TInt CreateForwardMessageL( const TFSMailMsgId aOriginalMessageId, |
190 IMPORT_C TInt CreateForwardMessageL( const TFSMailMsgId aOriginalMessageId, |
206 MFSMailRequestObserver& aOperationObserver, |
191 MFSMailRequestObserver& aOperationObserver, |
207 const TDesC& aHeaderDescriptor = KNullDesC ); |
192 const TDesC& aHeaderDescriptor = KNullDesC ); |
208 // </qmail> |
193 // </qmail> |
209 |
194 |
210 /** |
195 /** |
211 * creates into this mailbox new email for reply |
196 * creates into this mailbox new email for reply |
212 * |
197 * |
213 * @param aOriginalMessageId id of the original message to be replied |
198 * @param aOriginalMessageId id of the original message to be replied |
259 |
244 |
260 /** |
245 /** |
261 * List subfolders of given folder. |
246 * List subfolders of given folder. |
262 * Only direct subfolders of given folder are returned. |
247 * Only direct subfolders of given folder are returned. |
263 * |
248 * |
264 * folder data : |
249 * folder data : |
265 * - folder id |
250 * - folder id |
266 * - folder name |
251 * - folder name |
267 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
252 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other |
268 * - message count |
253 * - message count |
269 * - unread message count |
254 * - unread message count |
270 * - mailbox id |
255 * - mailbox id |
271 * - parent folder |
256 * - parent folder |
272 * - subfolder count |
257 * - subfolder count |
273 * |
258 * |
274 * @param aFolderId defines parent folder id. TFSMailId::NullId() for root level list. |
259 * @param aFolderId defines parent folder id. TFSMailId::NullId() for root level list. |
275 * @param aFolderList plugin writes results in this array owned by user |
260 * @param aFolderList plugin writes results in this array owned by user |
276 */ |
261 */ |
277 IMPORT_C void ListFolders( const TFSMailMsgId aFolderId, RPointerArray<CFSMailFolder>& aFolderList); |
262 IMPORT_C void ListFolders( const TFSMailMsgId aFolderId, RPointerArray<CFSMailFolder>& aFolderList); |
278 |
263 |
279 /** |
264 /** |
280 * List all subfolders of mailbox. |
265 * List all subfolders of mailbox. |
281 * |
266 * |
282 * folder data : |
267 * folder data : |
283 * - folder id |
268 * - folder id |
284 * - folder name |
269 * - folder name |
285 * - folder type ; Inbox, Outbox, Sent Items, Drafts, Deleted Items, Other |
270 * - folder type ; Inbox, Outbox, Sent Items, Drafts, Deleted Items, Other |
286 * - message count |
271 * - message count |
287 * - unread message count |
272 * - unread message count |
288 * - mailbox id |
273 * - mailbox id |
289 * - parent folder |
274 * - parent folder |
290 * - subfolder count |
275 * - subfolder count |
291 * |
276 * |
292 * @return results in this array owned by this object, caller must determine |
277 * @return results in this array owned by this object, caller must determine |
293 * tree structure by examining parent id of each returned folder. |
278 * tree structure by examining parent id of each returned folder. |
294 */ |
279 */ |
295 IMPORT_C RPointerArray<CFSMailFolder>& ListFolders( ); |
280 IMPORT_C RPointerArray<CFSMailFolder>& ListFolders( ); |
296 |
281 |
297 /** |
282 /** |
298 * Standard folder id accessor. |
283 * Standard folder id accessor. |
299 * |
284 * |
300 * @param aFolderType defines folder type |
285 * @param aFolderType defines folder type |
301 * @return standard folder id |
286 * @return standard folder id |
302 */ |
287 */ |
303 IMPORT_C TFSMailMsgId GetStandardFolderId( const TFSFolderType aFolderType ); |
288 IMPORT_C TFSMailMsgId GetStandardFolderId( const TFSFolderType aFolderType ); |
304 |
|
305 |
|
306 /** |
|
307 * Branding id accessor for this mailbox. This function is used by Branding Manager |
|
308 * to associate mailbox to a branding definition. |
|
309 * |
|
310 * @return branding id |
|
311 */ |
|
312 IMPORT_C TDesC& GetBrandingIdL( ); |
|
313 |
|
314 |
289 |
315 /** |
290 /** |
316 * Moves a messages between folders. |
291 * Moves a messages between folders. |
317 * |
292 * |
318 * @param aMessageIds ids of the messages to be transferred |
293 * @param aMessageIds ids of the messages to be transferred |
319 * @param aSourceFolderId source folder id |
294 * @param aSourceFolderId source folder id |
320 * @param aDestinationFolderId destination folder id |
295 * @param aDestinationFolderId destination folder id |
321 */ |
296 */ |
322 IMPORT_C void MoveMessagesL( const RArray<TFSMailMsgId>& aMessageIds, |
297 IMPORT_C void MoveMessagesL( const RArray<TFSMailMsgId>& aMessageIds, |
323 const TFSMailMsgId aSourceFolderId, |
298 const TFSMailMsgId aSourceFolderId, |
324 const TFSMailMsgId aDestinationFolderId ); |
299 const TFSMailMsgId aDestinationFolderId ); |
325 |
300 |
326 /** |
301 /** |
327 * Moves a messages between folders. Async version. |
302 * Moves a messages between folders. Async version. |
328 * |
303 * |
329 * @param MFSMailRequestObserver& aOperationObserver for callback |
304 * @param MFSMailRequestObserver& aOperationObserver for callback |
330 * @param aMessageIds ids of the messages to be transferred |
305 * @param aMessageIds ids of the messages to be transferred |
331 * @param aSourceFolderId source folder id |
306 * @param aSourceFolderId source folder id |
332 * @param aDestinationFolderId destination folder id |
307 * @param aDestinationFolderId destination folder id |
333 */ |
308 */ |
334 IMPORT_C TInt MoveMessagesL( MFSMailRequestObserver& aOperationObserver, |
309 IMPORT_C TInt MoveMessagesL( MFSMailRequestObserver& aOperationObserver, |
335 const RArray<TFSMailMsgId>& aMessageIds, |
310 const RArray<TFSMailMsgId>& aMessageIds, |
336 const TFSMailMsgId aSourceFolderId, |
311 const TFSMailMsgId aSourceFolderId, |
337 const TFSMailMsgId aDestinationFolderId ); |
312 const TFSMailMsgId aDestinationFolderId ); |
338 /** |
313 /** |
339 * Copies a messages from one folder to another folder. |
314 * Copies a messages from one folder to another folder. |
340 * including the properties, content, and all attachments. |
315 * including the properties, content, and all attachments. |
341 * (note only works if the store is in an authenticated state, |
316 * (note only works if the store is in an authenticated state, |
342 * otherwise this function leaves with KErrNotReady) |
317 * otherwise this function leaves with KErrNotReady) |
343 * |
318 * |
344 * @param aMessageIds ids of the messages to be copied |
319 * @param aMessageIds ids of the messages to be copied |
345 * @param aCopiedMessages table containing (new) ids of the copied messages |
320 * @param aCopiedMessages table containing (new) ids of the copied messages |
346 * owned by user |
321 * owned by user |
347 * @param aSourceFolderId source folder id |
322 * @param aSourceFolderId source folder id |
348 * @param aDestinationFolderId destination folder id |
323 * @param aDestinationFolderId destination folder id |
349 */ |
324 */ |
350 IMPORT_C void CopyMessagesL( const RArray<TFSMailMsgId>& aMessageIds, |
325 IMPORT_C void CopyMessagesL( const RArray<TFSMailMsgId>& aMessageIds, |
351 RArray<TFSMailMsgId>& aCopiedMessages, |
326 RArray<TFSMailMsgId>& aCopiedMessages, |
352 const TFSMailMsgId aSourceFolderId, |
327 const TFSMailMsgId aSourceFolderId, |
353 const TFSMailMsgId aDestinationFolderId ); |
328 const TFSMailMsgId aDestinationFolderId ); |
354 |
329 |
355 /** |
330 /** |
356 * Asyncronous call for starting search for given string. Only one search can be |
331 * Asyncronous call for starting search for given string. Only one search can be |
357 * performed at a time. |
332 * performed at a time. |
358 * |
333 * |
359 * This function will search for message's containing the given search string. |
334 * This function will search for message's containing the given search string. |
360 * The search will be performed on the all message fields: To, Cc, Bcc, subject, body. |
335 * The search will be performed on the all message fields: To, Cc, Bcc, subject, body. |
361 * The search client will be notified of each found message, |
336 * The search client will be notified of each found message, |
362 * and upon completion of the search. Only one search can be performed at a time. |
337 * and upon completion of the search. Only one search can be performed at a time. |
363 * |
338 * |
364 * To change the sort order in the search result, use the same search string in the |
339 * To change the sort order in the search result, use the same search string in the |
365 * but change the aSortCriteria parameter. The store "caches" the search |
340 * but change the aSortCriteria parameter. The store "caches" the search |
366 * results generated by the same search string. |
341 * results generated by the same search string. |
367 * |
342 * |
368 * The function will leave with KErrInUse if a search is already in progress. |
343 * The function will leave with KErrInUse if a search is already in progress. |
369 * |
344 * |
370 * note only works if the store is in an authenticated state, |
345 * note only works if the store is in an authenticated state, |
371 * otherwise this function leaves with KErrNotReady |
346 * otherwise this function leaves with KErrNotReady |
372 * |
347 * |
373 * @param aSearchStrings text strings that will be searched from different message fields. |
348 * @param aSearchStrings text strings that will be searched from different message fields. |
374 * @param aSortCriteria sort criteria for the results |
349 * @param aSortCriteria sort criteria for the results |
375 * @param aSortCriteria sort criteria for the results |
350 * @param aSortCriteria sort criteria for the results |
376 * @param aFolderIds user can give list of folders to be searched |
351 * @param aFolderIds user can give list of folders to be searched |
377 */ |
352 */ |
378 IMPORT_C void SearchL( const RPointerArray<TDesC>& aSearchStrings, |
353 IMPORT_C void SearchL( const RPointerArray<TDesC>& aSearchStrings, |
379 const TFSMailSortCriteria& aSortCriteria, |
354 const TFSMailSortCriteria& aSortCriteria, |
380 MFSMailBoxSearchObserver& aSearchObserver ); |
355 MFSMailBoxSearchObserver& aSearchObserver ); |
381 |
356 |
382 /** |
357 /** |
383 * Cancels current search. Does nothing if there is not any search ongoing. |
358 * Cancels current search. Does nothing if there is not any search ongoing. |
384 * The search client will not be called back after this function is called. |
359 * The search client will not be called back after this function is called. |
385 * |
360 * |
386 * note CancelSearch() method does NOT clear the search result cached in the store. |
361 * note CancelSearch() method does NOT clear the search result cached in the store. |
387 * A different sort order can be used for the same search string, and the |
362 * A different sort order can be used for the same search string, and the |
388 * cache will be utilized. Only by using a different search string can the |
363 * cache will be utilized. Only by using a different search string can the |
389 * cache be cleaned. |
364 * cache be cleaned. |
390 */ |
365 */ |
391 IMPORT_C void CancelSearch(); |
366 IMPORT_C void CancelSearch(); |
392 |
367 |
393 /** |
368 /** |
394 * Inform the store to clean up its cache for search results. |
369 * Inform the store to clean up its cache for search results. |
395 * |
370 * |
396 * This method cancels the the ongoing search (if exists), and then clean ups store's cache. |
371 * This method cancels the the ongoing search (if exists), and then clean ups store's cache. |
397 * |
372 * |
398 * This function should be called by the UI when search results are no longer in display. |
373 * This function should be called by the UI when search results are no longer in display. |
399 */ |
374 */ |
400 IMPORT_C void ClearSearchResultCache(); |
375 IMPORT_C void ClearSearchResultCache(); |
|
376 |
401 |
377 |
402 /** |
378 /** |
403 * DEPRECATED |
379 * DEPRECATED |
404 * |
380 * |
405 * @param aFolderId... |
381 * @param aFolderId... |
406 * @param aObserver observer |
382 * @param aObserver observer |
407 */ |
383 */ |
408 IMPORT_C void AddObserver(const TFSMailMsgId aFolderId, MFSMailEventObserver& aObserver); |
384 IMPORT_C void AddObserver(const TFSMailMsgId aFolderId, MFSMailEventObserver& aObserver); |
409 |
385 |
410 /** |
386 /** |
411 * Returns the current synchronizing state of this mailbox. |
387 * Returns the current synchronizing state of this mailbox. |
412 * |
388 * |