1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined (__IMAPCMDS_H__)
17 #define __IMAPCMDS_H__
19 #if !defined (__MSVSTD_HRH__)
23 class TImap4RenameFolder
24 /** Buffer for an IMAP folder name.
26 @see KIMAP4MTMRenameFolder
33 /** IMAP folder name. */
37 /** IMAP4-specific commands that can be issued through either
38 CImap4ClientMtm::InvokeAsyncFunctionL() or, in a few cases,
39 CImap4ClientMtm::InvokeSyncFunctionL().
41 These functions take an input message selection parameter
42 (@c const CMsvEntrySelection& @c aSelection) and an input/output buffer parameter
43 (TDes8& @c aParameter). The use of these parameters is command specific, and is
44 described for each command below.
46 The commands fall into a number of categories:
48 - Connect and logon to remote server:
50 - #KIMAP4MTMDisconnect
51 - Synchronise headers:
52 - #KIMAP4MTMCancelBackgroundSynchronise
53 - #KIMAP4MTMConnectAndSyncCompleteAfterConnect
54 - #KIMAP4MTMConnectAndSyncCompleteAfterDisconnect
55 - #KIMAP4MTMConnectAndSyncCompleteAfterFullSync
56 - #KIMAP4MTMConnectAndSynchronise
57 - #KIMAP4MTMFolderFullSync
59 - #KIMAP4MTMInboxNewSync
60 - #KIMAP4MTMSynchronise
61 - #KIMAP4MTMWaitForBackground
62 - Subscribe to mailboxes:
63 - #KIMAP4MTMLocalSubscribe
64 - #KIMAP4MTMLocalUnsubscribe
67 - #KIMAP4MTMPopulateAllMailWhenAlreadyConnected
68 - #KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected
69 - #KIMAP4MTMPopulateNewMailWhenAlreadyConnected
70 - #KIMAP4MTMConnectAndPopulateAllMailAndDisconnect
71 - #KIMAP4MTMConnectAndPopulateAllMailAndStayOnline
72 - #KIMAP4MTMConnectAndPopulateMailSelectionAndDisconnect
73 - #KIMAP4MTMConnectAndPopulateMailSelectionAndStayOnline
74 - #KIMAP4MTMConnectAndPopulateNewMailAndDisconnect
75 - #KIMAP4MTMConnectAndPopulateNewMailAndStayOnline
77 - #KIMAP4MTMCopyAllMailWhenAlreadyConnected
78 - #KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
79 - #KIMAP4MTMCopyNewMailWhenAlreadyConnected
80 - #KIMAP4MTMConnectAndCopyAllMailAndDisconnect
81 - #KIMAP4MTMConnectAndCopyAllMailAndStayOnline
82 - #KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
83 - #KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
84 - #KIMAP4MTMConnectAndCopyNewMailAndDisconnect
85 - #KIMAP4MTMConnectAndCopyNewMailAndStayOnline
87 - #KIMAP4MTMMoveAllMailWhenAlreadyConnected
88 - #KIMAP4MTMMoveMailSelectionWhenAlreadyConnected
89 - #KIMAP4MTMMoveNewMailWhenAlreadyConnected
90 - #KIMAP4MTMConnectAndMoveAllMailAndDisconnect
91 - #KIMAP4MTMConnectAndMoveAllMailAndStayOnline
92 - #KIMAP4MTMConnectAndMoveMailSelectionAndDisconnect
93 - #KIMAP4MTMConnectAndMoveMailSelectionAndStayOnline
94 - #KIMAP4MTMConnectAndMoveNewMailAndDisconnect
95 - #KIMAP4MTMConnectAndMoveNewMailAndStayOnline
97 - #KIMAP4MTMCreateForwardAsAttachmentEmailMessage
98 - #KIMAP4MTMCreateForwardEmailMessage
99 - #KIMAP4MTMCreateNewEmailMessage
100 - #KIMAP4MTMCreateReceiptEmailMessage
101 - #KIMAP4MTMCreateReplyEmailMessage
103 Note that CImEmailOperation is usually a more convenient way
107 - #KIMAP4MTMIsConnected
108 - Offline operations:
109 - #KIMAP4MTMCancelOffLineOperations
110 - #KIMAP4MTMUndeleteAll
113 - #KIMAP4MTMRenameFolder
115 - #KIMAP4MTMStartBatch
117 Note that when @c iServiceSelection is referred to in code examples for some
118 commands, this is assumed to be a CMsvEntrySelection that
119 contain the entry ID of an IMAP service.
121 @see CImap4ClientMtm::InvokeAsyncFunctionL()
122 @see CImap4ClientMtm::InvokeSyncFunctionL()
128 /** Tests if a specified service is connected.
130 This command is synchronous, and used from @c InvokeSyncFunctionL().
132 @c aSelection: @c aSelection[0] should contain the entry ID of the service
135 @c aParameter: a packaged TInt. On return, this is set to
136 KErrNone if the service is connected or KErrDisconnected if not.
140 TPckgBuf<TInt> parameter;
141 iClientMtm->InvokeSyncFunctionL(KIMAP4MTMIsConnected, *iServiceSelection, parameter);
142 if (parameter()==KErrNone)
144 _LIT(KConnStatus, "\n\n Connected to the service");
145 iConsole->Printf(KConnStatus);
149 KIMAP4MTMIsConnected = KMtmFirstFreeMtmFunctionId,
151 /** Connects to the specified IMAP service.
153 This makes a network connection and logs on the IMAP server specified
154 in the settings for the service.
156 @c aSelection: @c aSelection[0] should contain the entry ID of the service
159 @c aParameter: packages a pointer to an implementation of the connection observer
160 interface, MMsvImapConnectionObserver. Callbacks are made to this interface
161 to notify the client of the stages of connection.
163 Completion: KErrBusy if the device is already connected to the specified server.
168 iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMConnect, *iServiceSelection, parameter, iStatus);
173 /** Connects to the specified IMAP service, and starts a background synchronisation.
175 The call completes when the connection occurs and the synchronisation starts. See
176 CImap4ClientMtm for a description of a background synchronisation.
178 @c aSelection: @c aSelection[0] should contain the entry ID of the service
181 @c aParameter: packages a pointer to an implementation of the connection observer
182 interface, MMsvImapConnectionObserver. Callbacks are made to this interface
183 to notify the client of the stages of connection and synchronisation.
185 Completion: KErrBusy if the device is already connected to the specified server.
189 TPckg<MMsvImapConnectionObserver*> parameter(this);
190 iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMConnectAndSynchronise, *iServiceSelection, parameter, iStatus);
193 KIMAP4MTMConnectAndSynchronise,
195 /** Cancels a background synchronisation in progress.
197 @c aSelection: @c aSelection[0] should contain the entry ID of the service
200 @c aParameter: unused.
202 Completion: KErrCancel if a synchronisation was cancelled; KErrNone if no
203 synchronisation was taking place.
208 iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMCancelBackgroundSynchronise, *iServiceSelection, parameter, iStatus);
211 KIMAP4MTMCancelBackgroundSynchronise,
213 /** Ensures that the IMAP server will remain loaded ready for more commands.
215 If this is not set, then the Message Server can unload the IMAP server MTM
216 after a service is disconnected. It is more efficient if it stays loaded
217 if further use of the MTM is expected.
219 @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service.
221 @c aParameter: unused.
223 Completion: KErrNone.
227 /** Ends the effect of KIMAP4MTMStartBatch.
229 @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service.
231 @c aParameter: unused.
233 Completion: KErrNone.
237 /** Tests if the server is busy.
239 It can be used from either CImap4ClientMtm::InvokeAsyncFunctionL() or
240 CImap4ClientMtm::InvokeSyncFunctionL().
242 @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service.
244 @c aParameter: if the command is called from InvokeSyncFunctionL(), then on return a packaged
245 TInt holding the result.
247 Completion: This completes with either KErrNone (neither session is busy) or KErrServerBusy
252 /** Issues an IMAP SELECT command on the specified mailbox.
254 This is used to select an mailbox for the KIMAP4MTMSynchronise command.
256 Pre-condition: a connected service.
258 @c aSelection: @c aSelection[0] should contain the entry ID of the folder
261 @c aParameter: Unused.
263 Completion: KErrDisconnected if not connected.
267 /** Synchronises the current folder that is selected on the remote server.
269 Note that after a connection is made, the Inbox folder is selected by default.
271 Pre-condition: a connected service.
273 @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service.
275 @c aParameter: unused.
277 Completion: KErrDisconnected if not connected.
279 KIMAP4MTMSynchronise,
281 /** Synchronises the connected service's folder tree with the folders on the remote IMAP server.
283 This creates and deletes folder entries in the message store under the remote service as needed,
284 to match the mailboxes that exist on the remote server. Note that this step is done as part of
285 the normal service synchronisation operation.
287 Pre-condition: a connected service.
289 @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service.
291 @c aParameter: unused.
293 Completion: KErrDisconnected if not connected; KErrServerBusy if a
294 background synchronisation is already in progress.
298 /** Not supported. */
299 KIMAP4MTMReserved10, // SyncSubscription
301 /** Synchronises the specified service.
303 This is a foreground synchronisation, and completes when the synchronisation is done.
305 @c aSelection: @c aSelection[0] should contain the entry ID of the service
308 @c aParameter: unused.
310 Pre-condition: a connected service.
312 Completion: KErrDisconnected if not connected; KErrServerBusy if a
313 background synchronisation is already in progress.
317 /** Cancels any operations in progress and sends logout messages to server.
319 If CImImap4Settings::SetDeleteEmailsWhenDisconnecting() is set,
320 any messages marked as deleted while offline are deleted before logout.
322 Pre-condition: a connected service.
324 @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service.
326 @c aParameter: unused.
328 Completion: KErrDisconnected if not connected.
332 /** Sets the local subscription flag on a specified folder.
334 This sets the local subscription flag on the folder's index entry
335 (see TMsvEmailEntry::SetLocalSubscription()), and saves the changed entry
338 @c aSelection: @c aSelection[0] should contain the entry ID of the folder
341 @c aParameter: unused.
343 Completion: KErrNotSupported if the entry is not a folder; KErrNone on success.
345 KIMAP4MTMLocalSubscribe,
347 /** Clears the local subscription flag on the specified folder.
349 @c aSelection: @c aSelection[0] should contain the entry ID of the folder
352 @c aParameter: unused.
354 Completion: KErrNotSupported if the entry is not a folder; KErrNone on success.
356 KIMAP4MTMLocalUnsubscribe,
358 /** Not supported. */
359 KIMAP4MTMReserved15, // MakeRemoteMailboxesInvisible
360 /** Not supported. */
361 KIMAP4MTMReserved16, // MakeRemoteMailboxesVisible
363 /** Synchronises any messages received by the remote server Inbox since the
364 last synchronisation operation.
366 Messages that have been deleted from the remote Inbox are not deleted from
369 Pre-condition: a connected service.
371 @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service.
373 @c aParameter: unused.
375 Completion: KErrDisconnected if not connected; KErrServerBusy if a
376 background synchronisation is already in progress.
378 KIMAP4MTMInboxNewSync,
380 /** Selects and synchronises the specified folder.
382 Pre-condition: a connected service.
384 @c aSelection: @c aSelection[0] should contain the entry ID of the folder to synchronise.
386 @c aParameter: unused.
388 Completion: KErrDisconnected if not connected.
390 KIMAP4MTMFolderFullSync,
392 /** Completes only when a background synchronisation has finished.
394 This turns a background synchronisation into a foreground synchronisation.
396 @c aSelection: @c aSelection[0] should contain the entry ID of the service
399 @c aParameter: unused.
401 Completion: KErrNone when no background synchronisation is in progress.
406 iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMWaitForBackground, *iServiceSelection, parameter, iStatus);
409 KIMAP4MTMWaitForBackground,
411 /** Renames a specified folder.
413 @c aSelection: @c aSelection[0] should contain the entry ID of the folder to rename.
415 @c aParameter: the new name for the folder. This should be a packaged TImap4RenameFolder object.
417 Pre-conditions: a connected service.
419 Completion: KErrDisconnected if there is no connected service.
423 // rename folder, assumed to be identified in *selection[0], to "newname".
424 _LIT(KNewName, "newname");
425 TImap4RenameFolder newName;
426 newName.iNewName = KNewName;
427 TPckg<TImap4RenameFolder> name(newName);
428 iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMRenameFolder, *selection, name, iStatus);
431 KIMAP4MTMRenameFolder,
433 /** Undoes any offline delete operations pending on the specified entries.
435 @c aSelection: Entries on which to cancel offline delete operations.
437 @c aParameter: Unused.
439 Completion: KErrNone.
441 KIMAP4MTMUndeleteAll,
443 /** Cancels any offline operations pending on the specified entries.
445 If any item is a folder, then it cancels all operations queued on any item
446 in that folder. If an IMAP4 service ID is given, then it cancels any Copy()
447 or MoveFromLocal() operations that are queued. A message can not have its
448 pending operations cancelled individually.
450 @c aSelection: Entries on which to cancel offline operations.
452 @c aParameter: Unused.
454 Completion: KErrNone.
456 KIMAP4MTMCancelOffLineOperations,
458 /** Fetches the specified messages from the remote server to the mirror.
460 @c aSelection: Messages to fetch.
462 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
463 specifying the message parts to fetch and size limits on what is fetched.
468 /** Not supported. */
469 KIMAP4MTMSyncSubscription,
471 /** Connect and synchronise the specified service, and complete after connection.
473 The operation completes when the connection part completes. The synchronisation
474 is done in the background.
476 The command has the same functionality as KIMAP4MTMConnectAndSynchronise.
478 @c aSelection: @c aSelection[0] should contain the entry ID of the service
481 @c aParameter: packages a pointer to an implementation of the connection observer
482 interface, MMsvImapConnectionObserver. Callbacks are made to this interface
483 to notify the client of the stages of connection and synchronisation.
485 Completion: KErrBusy if a connected session already exists.
487 KIMAP4MTMConnectAndSyncCompleteAfterConnect,
489 /** Connect and synchronise the specified service, and complete after synchronisation.
491 This is similar to KIMAP4MTMConnectAndSynchronise, except that the operation
492 does not complete until synchronisation is complete.
494 @c aSelection: @c aSelection[0] should contain the entry ID of the service
497 @c aParameter: packages a pointer to an implementation of the connection observer
498 interface, MMsvImapConnectionObserver. Callbacks are made to this interface
499 to notify the client of the stages of connection and synchronisation.
501 Completion: KErrBusy if a connected session already exists.
503 KIMAP4MTMConnectAndSyncCompleteAfterFullSync,
505 /** Connect and synchronise the specified service, and complete after disconnection.
507 Unlike the other synchronisation commands, this command does not complete
508 after either connection or synchronisation. Instead, after the initial synchronisation
509 is complete, it periodically resynchronises the Inbox until the service is disconnected.
510 CImImap4Settings::SyncRate() sets the refresh period.
512 Disconnection can occur because the network connection is closed, either through
513 user action, or because a networking timeout occurs on the socket.
515 @c aSelection: @c aSelection[0] should contain the entry ID of the service
518 @c aParameter: packages a pointer to an implementation of the connection
519 observer interface, MMsvImapConnectionObserver. Callbacks are made to this
520 interface to notify the client of the stages of connection and
523 Completion: KErrBusy if a connected session already exists.
525 KIMAP4MTMConnectAndSyncCompleteAfterDisconnect,
527 /** Not supported. */
528 KIMAP4MTMCancelSendOnNextConnection,
530 /** Copy any new messages from a specified folder to another folder,
531 assuming a new connection does not need to be made.
533 This is used after message headers have been synchronised. Any messages marked
534 as new are populated in the mirror, and then copied to the specified destination folder.
536 Pre-condition: a connected service.
538 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
539 @c aSelection[1] should contain the entry ID of the folder from which
542 @c aParameter: packaged TImImap4GetMailInfo object.
543 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
544 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
545 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
546 the entire message is always fetched.
548 Completion: note if there are no new entries, then KErrNone, and progress
549 information is a null descriptor.
551 KIMAP4MTMCopyNewMailWhenAlreadyConnected,
553 /** Connect to a specified service, copy any new messages from
554 a specified folder into another folder, and stay connected.
556 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
557 @c aSelection[1] should contain the entry ID of the folder containing
558 the messages to copy.
560 @c aParameter: packaged TImImap4GetMailInfo object.
561 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
562 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
563 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
564 the entire message is always fetched.
566 Completion: note if there are no new entries, then KErrNone, and progress
567 information is a null descriptor.
569 KIMAP4MTMConnectAndCopyNewMailAndStayOnline,
571 /** Connect to a specified service, copy any new messages from
572 a specified folder into another folder, and disconnect afterwards.
574 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
575 @c aSelection[1] should contain the entry ID of the folder containing
576 the messages to copy.
578 @c aParameter: packaged TImImap4GetMailInfo object.
579 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
580 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
581 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
582 the entire message is always fetched.
584 Completion: note if there are no new entries, then KErrNone, and progress
585 information is a null descriptor.
587 KIMAP4MTMConnectAndCopyNewMailAndDisconnect,
589 /** Move any new messages from a specified folder to another folder,
590 assuming a new connection does not need to be made.
592 This is used after message headers have been synchronised. Any messages marked
593 as new are populated in the mirror, and then moved to the specified destination folder.
595 Pre-condition: a connected service.
597 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
598 @c aSelection[1] should contain the entry ID of the folder from which
601 @c aParameter: packaged TImImap4GetMailInfo object.
602 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
603 move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
604 are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
605 the entire message is always fetched.
607 Completion: note if there are no new entries, then KErrNone, and progress
608 information is a null descriptor.
610 KIMAP4MTMMoveNewMailWhenAlreadyConnected,
612 /** Connect to a specified service, move any new messages from
613 a specified folder into another folder, and stay connected.
615 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
616 @c aSelection[1] should contain the entry ID of the folder containing
617 the messages to move.
619 @c aParameter: packaged TImImap4GetMailInfo object.
620 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
621 move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
622 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
623 the entire message is always fetched.
625 Completion: note if there are no new entries, then KErrNone, and progress
626 information is a null descriptor.
628 KIMAP4MTMConnectAndMoveNewMailAndStayOnline,
630 /** Connect to a specified service, move any new messages from
631 a specified folder into another folder, and disconnect afterwards.
633 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
634 @c aSelection[1] should contain the entry ID of the folder containing
635 the messages to move.
637 @c aParameter: packaged TImImap4GetMailInfo object.
638 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
639 move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
640 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
641 the entire message is always fetched.
643 Completion: note if there are no new entries, then KErrNone, and progress
644 information is a null descriptor.
646 KIMAP4MTMConnectAndMoveNewMailAndDisconnect,
648 /** Copy the specified messages to another folder, assuming a new connection
649 does not need to be made.
651 The specified messages are populated in the mirror, and then copied to
652 the specified destination folder.
654 Pre-condition: a connected service.
656 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
657 followed by the IDs of the messages to copy.
659 @c aParameter: packaged TImImap4GetMailInfo object.
660 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
661 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
662 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
663 the entire message is always fetched.
665 Completion: note if there are no entries to copy, then KErrNone, and progress
666 information is a null descriptor.
668 KIMAP4MTMCopyMailSelectionWhenAlreadyConnected,
670 /** Connect to a specified service, copy the specified messages to another
671 folder, and stay connected.
673 The specified messages are populated in the mirror, and then copied to
674 the specified destination folder.
676 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
677 followed by the IDs of the messages to copy.
679 @c aParameter: packaged TImImap4GetMailInfo object.
680 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
681 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
682 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
683 the entire message is always fetched.
685 Completion: note if there are no entries to copy, then KErrNone, and progress
686 information is a null descriptor.
688 KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline,
690 /** Connect to a specified service, copy the specified messages to another
691 folder, and disconnect afterwards.
693 The specified messages are populated in the mirror, and then copied to
694 the specified destination folder.
696 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
697 followed by the IDs of the messages to copy.
699 @c aParameter: packaged TImImap4GetMailInfo object.
700 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
701 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
702 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
703 the entire message is always fetched.
705 Completion: note if there are no entries to copy, then KErrNone, and progress
706 information is a null descriptor.
708 KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect,
710 /** Move the specified messages to another folder, assuming a new connection
711 does not need to be made.
713 Pre-condition: a connected service.
715 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
716 followed by the IDs of the messages to move.
718 @c aParameter: packaged TImImap4GetMailInfo object.
719 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
720 move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
721 are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
722 the entire message is always fetched.
724 Completion: note if there are no entries to move, then KErrNone, and progress
725 information is a null descriptor.
727 KIMAP4MTMMoveMailSelectionWhenAlreadyConnected,
729 /** Connect to a specified service, move the specified messages to another
730 folder, and stay connected.
732 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
733 followed by the IDs of the messages to move.
735 @c aParameter: packaged TImImap4GetMailInfo object.
736 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
737 move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
738 are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
739 the entire message is always fetched.
741 Completion: note if there are no entries to move, then KErrNone, and progress
742 information is a null descriptor.
744 KIMAP4MTMConnectAndMoveMailSelectionAndStayOnline,
746 /** Connect to a specified service, move the specified messages to another
747 folder, and disconnect afterwards.
749 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
750 followed by the IDs of the messages to move.
752 @c aParameter: packaged TImImap4GetMailInfo object.
753 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
754 move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
755 are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
756 the entire message is always fetched.
758 Completion: note if there are no entries to move, then KErrNone, and progress
759 information is a null descriptor.
761 KIMAP4MTMConnectAndMoveMailSelectionAndDisconnect,
763 /** Copy all messages from the current service, assuming a new connection does
766 Pre-condition: a connected service.
768 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
769 @c aSelection[1] should contain the entry ID of the folder from which
772 @c aParameter: packaged TImImap4GetMailInfo object.
773 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
774 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
775 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
776 the entire message is always fetched.
778 Completion: note if there are no entries to copy, then KErrNone, and progress
779 information is a null descriptor.
781 KIMAP4MTMCopyAllMailWhenAlreadyConnected,
783 /** Connect to a specified service, copy all messages from the current service,
786 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
787 @c aSelection[1] should contain the entry ID of the folder from which
790 @c aParameter: packaged TImImap4GetMailInfo object.
791 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
792 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
793 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
794 the entire message is always fetched.
796 Completion: note if there are no entries to copy, then KErrNone, and progress
797 information is a null descriptor.
799 KIMAP4MTMConnectAndCopyAllMailAndStayOnline,
801 /** Connect to a specified service, copy all messages from the current service,
802 and disconnect afterwards.
804 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
805 @c aSelection[1] should contain the entry ID of the folder from which
808 @c aParameter: packaged TImImap4GetMailInfo object.
809 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
810 copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
811 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
812 the entire message is always fetched.
814 Completion: note if there are no entries to copy, then KErrNone, and progress
815 information is a null descriptor.
817 KIMAP4MTMConnectAndCopyAllMailAndDisconnect,
819 /** Move all messages from the specified folder, assuming a new connection does
822 Pre-condition: a connected service.
824 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
825 @c aSelection[1] should contain the entry ID of the folder from which
828 @c aParameter: packaged TImImap4GetMailInfo object.
829 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
830 move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
831 are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
832 the entire message is always fetched.
834 Completion: note if there are no entries to move, then KErrNone, and progress
835 information is a null descriptor.
837 KIMAP4MTMMoveAllMailWhenAlreadyConnected,
839 /** Connect to a specified service, move all messages from
840 a specified folder into another folder, and stay connected.
842 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
843 @c aSelection[1] should contain the entry ID of the folder containing
844 the messages to move.
846 @c aParameter: packaged TImImap4GetMailInfo object.
847 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
848 move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
849 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
850 the entire message is always fetched.
852 Completion: note if there are no new entries, then KErrNone, and progress
853 information is a null descriptor.
855 KIMAP4MTMConnectAndMoveAllMailAndStayOnline,
857 /** Connect to a specified service, move all messages from
858 a specified folder into another folder, and disconnect afterwards.
860 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
861 @c aSelection[1] should contain the entry ID of the folder containing
862 the messages to move.
864 @c aParameter: packaged TImImap4GetMailInfo object.
865 TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to
866 move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize
867 are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored:
868 the entire message is always fetched.
870 Completion: note if there are no new entries, then KErrNone, and progress
871 information is a null descriptor.
873 KIMAP4MTMConnectAndMoveAllMailAndDisconnect,
875 /** Populate the specified messages, assuming a new connection does not need to be made.
877 Pre-condition: a connected service.
879 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
880 followed by the IDs of the messages to populate.
882 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
883 specifying the message parts to fetch and size limits on what is fetched.
885 Completion: note if there are no entries to populate, then KErrNone, and progress
886 information is a null descriptor.
888 KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected,
890 /** Connect to a specified service, populate the specified messages,
893 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
894 followed by the IDs of the messages to populate.
896 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
897 specifying the message parts to fetch and size limits on what is fetched.
899 Completion: note if there are no entries to populate, then KErrNone, and progress
900 information is a null descriptor.
902 KIMAP4MTMConnectAndPopulateMailSelectionAndStayOnline,
904 /** Connect to a specified service, populate the specified messages,
905 and disconnect afterwards.
907 @c aSelection: @c aSelection[0] should contain the entry ID of the service,
908 followed by the IDs of the messages to populate.
910 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
911 specifying the message parts to fetch and size limits on what is fetched.
913 Completion: note if there are no entries to populate, then KErrNone, and progress
914 information is a null descriptor.
916 KIMAP4MTMConnectAndPopulateMailSelectionAndDisconnect,
918 /** Populate the new messages in a specified folder, assuming a new connection does
921 Pre-condition: a connected service.
923 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
924 @c aSelection[1] should contain the entry ID of the folder containing
925 the messages to populate.
927 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
928 specifying the message parts to fetch and size limits on what is fetched.
930 Completion: note if there are no entries to populate, then KErrNone, and progress
931 information is a null descriptor.
933 KIMAP4MTMPopulateNewMailWhenAlreadyConnected,
935 /** Populate all messages in a specified folder, assuming a new connection does
938 Pre-condition: a connected service.
940 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
941 @c aSelection[1] should contain the entry ID of the folder containing
942 the messages to populate.
944 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
945 specifying the message parts to fetch and size limits on what is fetched.
947 Completion: note if there are no entries to populate, then KErrNone, and progress
948 information is a null descriptor.
950 KIMAP4MTMPopulateAllMailWhenAlreadyConnected,
952 /** Connect to a specified service, populate the new messages in a specified
953 folder, and stay connected.
955 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
956 @c aSelection[1] should contain the entry ID of the folder containing
957 the messages to populate.
959 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
960 specifying the message parts to fetch and size limits on what is fetched.
962 Completion: note if there are no entries to populate, then KErrNone, and progress
963 information is a null descriptor.
965 KIMAP4MTMConnectAndPopulateNewMailAndStayOnline,
967 /** Connect to a specified service, populate the new messages in a specified
968 folder, and disconnect afterwards.
970 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
971 @c aSelection[1] should contain the entry ID of the folder containing
972 the messages to populate.
974 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
975 specifying the message parts to fetch and size limits on what is fetched.
977 Completion: note if there are no entries to populate, then KErrNone, and progress
978 information is a null descriptor.
980 KIMAP4MTMConnectAndPopulateNewMailAndDisconnect,
982 /** Connect to a specified service, populate all messages in a specified
983 folder, and stay connected.
985 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
986 @c aSelection[1] should contain the entry ID of the folder containing
987 the messages to populate.
989 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
990 specifying the message parts to fetch and size limits on what is fetched.
992 Completion: note if there are no entries to populate, then KErrNone, and progress
993 information is a null descriptor.
995 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline,
997 /** Connect to a specified service, populate all messages in a specified
998 folder, and disconnect afterwards.
1000 @c aSelection: @c aSelection[0] should contain the entry ID of the service;
1001 @c aSelection[1] should contain the entry ID of the folder containing
1002 the messages to populate.
1004 @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo
1005 specifying the message parts to fetch and size limits on what is fetched.
1007 Completion: note if there are no entries to populate, then KErrNone, and progress
1008 information is a null descriptor.
1010 KIMAP4MTMConnectAndPopulateAllMailAndDisconnect,
1012 /** Creates a new email message.
1014 @c aSelection: @c aSelection[0] should contain the entry ID of the folder in
1015 which to create the message.
1017 @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying
1018 message creation flags and message type.
1020 The operation object returned is a CImEmailOperation. Final progress information
1021 from this contains the ID of the newly created message.
1023 KIMAP4MTMCreateNewEmailMessage,
1025 /** Creates a new reply message.
1027 @c aSelection: @c aSelection[0] should contain the entry ID of the folder in
1028 which to create the message; @c aSelection[1] should contain the entry ID
1029 of the message to which to create a reply.
1031 @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying
1032 message creation flags and message type.
1034 The operation object returned is a CImEmailOperation. Final progress information
1035 from this contains the ID of the newly created message.
1037 KIMAP4MTMCreateReplyEmailMessage,
1039 /** Creates a new forwarded message.
1041 @c aSelection: @c aSelection[0] should contain the entry ID of the folder in
1042 which to create the message; @c aSelection[1] should contain the entry ID
1043 of the message to forward.
1045 @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying
1046 message creation flags and message type.
1048 The operation object returned is a CImEmailOperation. Final progress information
1049 from this contains the ID of the newly created message.
1051 KIMAP4MTMCreateForwardEmailMessage,
1053 /** Creates a new forwarded message, with the original message as an attachment.
1055 @c aSelection: @c aSelection[0] should contain the entry ID of the folder in
1056 which to create the message; @c aSelection[1] should contain the entry ID
1057 of the message to forward.
1059 @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying
1060 message creation flags and message type.
1062 The operation object returned is a CImEmailOperation. Final progress information
1063 from this contains the ID of the newly created message.
1065 KIMAP4MTMCreateForwardAsAttachmentEmailMessage,
1067 /** Creates a new message-receipt message.
1069 @c aSelection: @c aSelection[0] should contain the entry ID of the folder in
1070 which to create the message; @c aSelection[1] should contain the entry ID
1071 of the original message for which the receipt is required.
1073 @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying
1074 message creation flags and message type.
1076 The operation object returned is a CImEmailOperation. Final progress information
1077 from this contains the ID of the newly created message.
1079 KIMAP4MTMCreateReceiptEmailMessage