Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <POPCMTM.H>
Link against: imcm.lib

Class CImPOP3GetMail

class CImPOP3GetMail : public CMsvOperation;

Description

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(TInt,const CMsvEntrySelection &,TDes8 &,TRequestStatus &) when a suitable get command is requested.

Derivation

Members

Defined in CImPOP3GetMail:

Inherited from CActive:

Inherited from CBase:

Inherited from CMsvOperation:


Construction and destruction


~CImPOP3GetMail()

IMPORT_C ~CImPOP3GetMail();

Description

Destructor.

[Top]


Member functions


GetMailL(CPop3ClientMtm &,TRequestStatus &,const CMsvEntrySelection &,TDes8 &,TImPOP3GetMailType)

IMPORT_C CMsvOperation* GetMailL(CPop3ClientMtm &aPop3ClientMtm, TRequestStatus &aObserverRequestStatus, const CMsvEntrySelection &aMsvEntrySelection, TDes8 &aPop3GetMailInfo, TImPOP3GetMailType aPOP3GetMailType);

Description

Creates and begins a new POP3 get mail operation.

Parameters

CPop3ClientMtm &aPop3ClientMtm

A reference to the POP3 Client MTM that wants to perform the Get Mail operation.

TRequestStatus &aObserverRequestStatus

The status to be completed when the get mail operation has completed.

const CMsvEntrySelection &aMsvEntrySelection

A selection of messages that need to be copied/moved to a local folder. The first entry in this selection MUST be the service.

TDes8 &aPop3GetMailInfo

A packaged TImPop3GetMailInfo object, which sets the maximum message size and the destination folder ID.

CImPOP3GetMail::TImPOP3GetMailType aPOP3GetMailType

Type of operation to perform

Return value

CMsvOperation *

The new CImPOP3GetMail object through which the get operation can be controlled.


FinalProgress()

IMPORT_C virtual const TDesC8& FinalProgress();

Description

Gets information about a completed operation.

Return value

const TDesC8 &

Packaged TPop3Progress holding progress information.

See also:


DoCancel()

virtual void DoCancel();

Description

Implements cancellation of an outstanding request.

This function is called as part of the active object's CActive::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.

CImPOP3GetMail::DoCancel() must not wait for event completion; this is handled by CActive::Cancel().

See also:


RunL()

virtual void RunL();

Description

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 CImPOP3GetMail::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)

CImPOP3GetMail::RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls CActive::RunError(TInt) 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 CImPOP3GetMail::RunL() or CActive::RunError(TInt) functions.

See also:


ProgressL()

virtual const TDesC8& ProgressL();

Description

Gets information on the progress of the operation.

Return value

const TDesC8 &

Packaged TPop3Progress holding progress information.

See also:

[Top]


Member enumerations


Enum TImPOP3GetMailType

TImPOP3GetMailType

Description

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.