class CImPOP3GetMail : public CMsvOperation |
Encapsulates an operation to copy/move POP3 emails from the remote inbox to any local folder.
Functionality is provided to:
1. copy/move any new emails
2. copy/move a selection of emails
3. copy/move all emails
4. in the Remote Inbox to a local folder.
There are three cases for copying/moving the emails from the Remote Inbox:
1. the user is connected to the account so just copy/move the emails
2. the user is not connected to the account so connect, copy/move the emails, and then disconnect
3. the user is not connected to the account so connect, copy/move the emails, and then stay online
Objects of this type are returned from CPop3ClientMtm::InvokeAsyncFunctionL() when a suitable get command is requested.
Public Member Functions | |
---|---|
~CImPOP3GetMail() | |
void | DoCancel() |
IMPORT_C const TDesC8 & | FinalProgress() |
IMPORT_C CMsvOperation * | GetMailL(CPop3ClientMtm &, TRequestStatus &, const CMsvEntrySelection &, TDes8 &, TImPOP3GetMailType) |
const TDesC8 & | ProgressL() |
void | RunL() |
Private Member Functions | |
---|---|
CImPOP3GetMail(CMsvSession &, TRequestStatus &, CPop3ClientMtm &, TImPOP3GetMailType) | |
void | ChangeStateL() |
void | Complete() |
void | ConnectToMailboxL() |
void | ConstructL(const CMsvEntrySelection &, TDes8 &) |
void | CopyMoveAllMessagesL(TBool) |
void | CopyMoveMessageSelectionL(TBool) |
void | CopyMoveNewMessagesL(TBool) |
void | DisconnectFromMailboxL() |
void | RequestComplete(TInt) |
void | ResetProgress() |
void | SelectAndChangeToNextStateL() |
void | SelectNextStateL() |
void | StoreProgressL() |
Private Member Enumerations | |
---|---|
enum | TImPOP3GetMailState { EConnectToMailbox, ECopyNewMessages, EMoveNewMessages, ECopyMessageSelection, EMoveMessageSelection, ECopyAllMessages, EMoveAllMessages, EDisconnectFromMailbox, EFinished } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus | |
CMsvOperation::iMsvSession | |
CMsvOperation::iMtm | |
CMsvOperation::iObserverRequestStatus | |
CMsvOperation::iService |
CImPOP3GetMail | ( | CMsvSession & | aMsvSession, |
TRequestStatus & | aObserverRequestStatus, | ||
CPop3ClientMtm & | aPop3ClientMtm, | ||
TImPOP3GetMailType | aPOP3GetMailType | ||
) | [private] |
CMsvSession & aMsvSession | |
TRequestStatus & aObserverRequestStatus | |
CPop3ClientMtm & aPop3ClientMtm | |
TImPOP3GetMailType aPOP3GetMailType |
void | ConstructL | ( | const CMsvEntrySelection & | aMsvEntrySelection, |
TDes8 & | aPop3GetMailInfo | |||
) | [private] |
const CMsvEntrySelection & aMsvEntrySelection | |
TDes8 & aPop3GetMailInfo |
void | CopyMoveMessageSelectionL | ( | TBool | aCopy | ) | [private] |
TBool aCopy |
void | DoCancel | ( | ) | [virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel().
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel().
IMPORT_C CMsvOperation * | GetMailL | ( | CPop3ClientMtm & | aPop3ClientMtm, |
TRequestStatus & | aObserverRequestStatus, | |||
const CMsvEntrySelection & | aMsvEntrySelection, | |||
TDes8 & | aPop3GetMailInfo, | |||
TImPOP3GetMailType | aPOP3GetMailType | |||
) |
CPop3ClientMtm & aPop3ClientMtm | |
TRequestStatus & aObserverRequestStatus | |
const CMsvEntrySelection & aMsvEntrySelection | |
TDes8 & aPop3GetMailInfo | |
TImPOP3GetMailType aPOP3GetMailType |
const TDesC8 & | ProgressL | ( | ) | [virtual] |
Gets information on the progress of the operation.
All operations on local entries share the same progress information format, which defined by TMsvLocalOperationProgress.
For MTM-specific operations, progress information can be extracted by calling CBaseUiMtm::GetProgress() or displayed by CBaseUiMtm::DisplayProgressSummary() on the appropriate User Interface MTM.
Requirements:
Derived classes should implement this function so that the client can check on the progress of the operation. The function should share an understanding of the format of the buffer with the implementations of CBaseUiMtm::GetProgress() and CBaseUiMtm::DisplayProgressSummary() in the User Interface MTM. The arguments of CBaseUiMtm::GetProgress() show some information that should be included where appropriate.
leave
KErrNotReady The operation has not yet been started: it has been queued for execution in the Message Server
Descriptor holding progress information. The maximum buffer size should be KMsvProgressBufferLength (defined in msvipc.h).
void | RunL | ( | ) | [virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::WaitForAnyRequest
TRAPD
EConnectToMailbox | |
ECopyNewMessages | |
EMoveNewMessages | |
ECopyMessageSelection | |
EMoveMessageSelection | |
ECopyAllMessages | |
EMoveAllMessages | |
EDisconnectFromMailbox | |
EFinished |
Defines types of get mail operation.
EConnectAndCopyNewMailAndStayOnline |
Connect and copy new mail and stay online. |
EConnectAndCopyNewMailAndDisconnect |
Connect and copy new mail and disconnect. |
EConnectAndMoveNewMailAndStayOnline |
Connect and move new mail and stay online. |
EConnectAndMoveNewMailAndDisconnect |
Connect and move new mail and disconnect. |
EConnectAndCopyMailSelectionAndStayOnline |
Connect and copy mail selection and stay online. |
EConnectAndCopyMailSelectionAndDisconnect |
Connect and copy mail selection and disconnect. |
EConnectAndMoveMailSelectionAndStayOnline |
Connect and move mail selection and stay online. |
EConnectAndMoveMailSelectionAndDisconnect |
Connect and move mail selection and disconnect. |
EConnectAndCopyAllMailAndStayOnline |
Connect and copy all mail and stay online. |
EConnectAndCopyAllMailAndDisconnect |
Connect and copy all mail and disconnect. |
EConnectAndMoveAllMailAndStayOnline |
Connect and move all mail and stay online. |
EConnectAndMoveAllMailAndDisconnect |
Connect and move all mail and disconnect. |
TPckgBuf< TImPop3GetMailInfo > | iPop3GetMailInfo | [private] |