CMsvCompletedOperation Class Reference

#include <mw/msvapi.h>

class CMsvCompletedOperation : public CMsvOperation, public CMsvOperation

Detailed Description

Utility to create a messaging operation object for an operation that has already completed.

This utility is useful, for example, for writers of MTMs, where the API requires that an asynchronous operation is returned, but where in reality, the operation has performed synchronously. It allows the program to construct an operation object for which the operation is already completed, with the progress information and error code set.

Constructor & Destructor Documentation

~CMsvCompletedOperation ( )

IMPORT_C~CMsvCompletedOperation()

Destructor.

Any active request on the object is cancelled.

Member Function Documentation

FinalProgress ( )

const TDesC8 &FinalProgress()[virtual]

Reimplemented from CMsvOperation::FinalProgress()

Gets information about a completed operation.

See also: CMsvOperation::FinalProgress()

Return Value
Descriptor holding progress information.

NewL ( CMsvSession &, TUid, const TDesC8 &, TMsvId, TRequestStatus &, TInt )

IMPORT_C CMsvCompletedOperation *NewL(CMsvSession &aMsvSession,
TUidaMtm,
const TDesC8 &aProgress,
TMsvIdaService,
TRequestStatus &aObserverRequestStatus,
TIntaErr =  KErrNone
)[static]

Allocates and constructs a new CMsvCompletedOperation object.

The new object is added to the active scheduler and its asynchronous request immediately set to complete.

Parameters
aMsvSessionMessage Server session to use
aMtmThe UID of the MTM associated with the operation.
aProgressOperation progress information buffer. This is copied by the object.
aServiceThe ID of the service that is associated with this operation.
aObserverRequestStatusRequest status of the operation observer. This observer is signalled that the operation is complete.
aErrError code with which to complete the request. Use KErrNone to indicate that the operation completed successfully.
Return Value
New CMsvOperationActiveSchedulerWait object
Leave Codes
KErrNoMemory

ProgressL ( )

const TDesC8 &ProgressL()[virtual]

Reimplemented from CMsvOperation::ProgressL()

Gets information on the progress of the operation.

For a CMsvCompletedOperation, the progress information returned by ProgressL() and FinalProgress() is the same, and is the progress information set in the NewL() function.

See also: CMsvOperation::ProgressL()

Return Value
Descriptor holding progress information.