Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <MSVAPI.H>
Link against: msgs.lib
Link against: msgs_autoshutdown.lib

Class CMsvSendOperation

class CMsvSendOperation : public CMsvOperation;

Description

Utility to create an operation containing a sending operation which may be used to retrieve a standard progress structure.

This class is intended to be derived from. The derived class must define the CMsvSendOperation::TranslateProgress(const TDesC8 &) member function. This function is responsible for translating the native progress of the given mtm into the standard progress structure, CMsvSendOperation::TSendOperationProgress.

Derivation

Members

Defined in CMsvSendOperation:

Inherited from CActive:

Inherited from CBase:

Inherited from CMsvOperation:


Construction and destruction


~CMsvSendOperation()

IMPORT_C virtual ~CMsvSendOperation();

Description

Destructor.

Any active request on the object is cancelled.


CMsvSendOperation(CMsvSession &,TRequestStatus &)

protected: IMPORT_C CMsvSendOperation(CMsvSession &aMsvSession, TRequestStatus &aObserverRequestStatus);

Description

Constructor.

Parameters

CMsvSession &aMsvSession

TRequestStatus &aObserverRequestStatus

Request status of the operation observer. This

Leave codes

KErrNoMemory

[Top]


Member functions


ProgressL()

IMPORT_C virtual const TDesC8& ProgressL();

Description

Gets progress information about the current send operation

Returns the translated progress for the current send operation. Calls the underlying ProgressL function to obtain the native progress then calls TranslateProgressL to translate the native progress into standard send progress.

Return value

const TDesC8 &

Descriptor holding progress information


FinalProgress()

IMPORT_C virtual const TDesC8& FinalProgress();

Description

Gets information about a completed operation.

Returns the translated progress for the current send operation. Calls the sending operation's FinalProgress function to obtain the native progress then calls TranslateProgressL to translate the native progress into standard send progress.

Return value

const TDesC8 &

Descriptor holding progress information


Start(CMsvOperation *)

IMPORT_C void Start(CMsvOperation *aOperation);

Description

Takes ownership of a CMsvOperation object that is set to complete iStatus of this object. This implementation does not leave.

Parameters

CMsvOperation *aOperation


DoCancel()

private: IMPORT_C virtual void DoCancel();

Description

Called when this operation is cancelled and is active. It in turn cancels the sending operation and completes iObserverRequestStatus with KErrCancel.


RunL()

private: IMPORT_C virtual void RunL();

Description

Called on completion of sending operation. Completes iObserverRequestStatus with the sending operation's status. This RunL does not leave.


TranslateProgress(const TDesC8 &)

private: virtual const TDesC8& TranslateProgress(const TDesC8 &aProgress)=0;

Description

Translates the progress from sending operation's progress into CMsvSendOperation::TSendOperationProgress.

This member function must be defined by derived classes. Must not leave.

Parameters

const TDesC8 &aProgress

Return value

const TDesC8 &

Descriptor holding progress information.

See also:

[Top]


Member classes


Class TSendOperationProgress

class TSendOperationProgress;

Description

Send progress.

Structure holding send progress. For mtms unable to provide detailed progress information, iProgressMax and iProgress must be zeroed. This will then allow the client to check for this case and display a busy status dialog as opposed to a progress dialog. If the mtm is capable of detailed progress, iProgressMax should be set to the total number of units to be sent and iProgress the number of units sent.

Members

Defined in CMsvSendOperation::TSendOperationProgress:

See also:

Member data


iState

TSendOperationState iState;

Description


iError

TInt iError;

Description


iProgressMax

TInt iProgressMax;

Description


iProgress

TInt iProgress;

Description

[Top]


Member enumerations


Enum TSendOperationState

TSendOperationState

Description

Send progress state.

See also:

ESendStateInPreparation

ESendStateWaitingToSend

ESendStateConnecting

ESendStateSending

ESendStateDone

ESendStateFailed

[Top]


Member data


iProgress

protected: TPckgBuf< TSendOperationProgress > iProgress;

Description

The progress that is associated with this operation.

The TranslateProgress defined by derived classes must populate and return this progress structure.

See also:


iOperation

protected: CMsvOperation * iOperation;

Description

The sending operation.

Assigned when ConstructL is called