Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: 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 TranslateProgress() 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:
CMsvSendOperation(), DoCancel(), ESendStateConnecting, ESendStateDone, ESendStateFailed, ESendStateInPreparation, ESendStateSending, ESendStateWaitingToSend, FinalProgress(), ProgressL(), RunL(), Start(), TSendOperationProgress, TSendOperationState, TranslateProgress(), iOperation, iProgress, ~CMsvSendOperation()

Inherited from CActive:
Cancel(), Deque(), EPriorityHigh, EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, IsActive(), IsAdded(), Priority(), RunError(), SetActive(), SetPriority(), TPriority, iStatus

Inherited from CBase:
Delete(), operator new()

Inherited from CMsvOperation:
Extension_(), Id(), Mtm(), Service(), SystemProgress(), iMsvSession, iMtm, iObserverRequestStatus, iService


Construction and destruction


~CMsvSendOperation()

virtual IMPORT_C ~CMsvSendOperation();

Description

Destructor.

Any active request on the object is cancelled.


CMsvSendOperation()

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()

virtual IMPORT_C 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()

virtual IMPORT_C 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()

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: virtual IMPORT_C 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: virtual IMPORT_C void RunL();

Description

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


TranslateProgress()

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

Description

Translates the progress from sending operation's progress into 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:
iError, iProgress, iProgressMax, iState

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