CPosLmOperation Class Reference

class CPosLmOperation : public CBase

Base class for handles to landmark operations.

Long running operations in the Landmarks API returns an object of this class so that the client can run it incrementally and check the progress of the operation.

The operation must explicitly be run by the client. The operation can be run incrementally by calling NextStep until it does not return the status KPosLmOperationNotComplete. Alternately the operation can be run synchronously by calling ExecuteL .

ExecuteAndDeleteLD can be used to handle the operation object if it is run in synchronous mode.

eposlandmarks.lib S60 3.0

Inherits from

Constructor & Destructor Documentation

CPosLmOperation()

IMPORT_CCPosLmOperation()[protected]

CPosLmOperation(const CPosLmOperation &)

CPosLmOperation(const CPosLmOperation &)[private]

Parameters

const CPosLmOperation &

~CPosLmOperation()

IMPORT_C~CPosLmOperation()[virtual]

Destructor.

Member Functions Documentation

ExecuteL()

voidExecuteL()[pure virtual]

Synchronous execution of the operation.

When this function returns, the operation has finished.

panic

"Landmarks Client"-EPosInvalidOperationMode
  1. This function is called when the operation is already complete

  2. The operation has already been started incrementally using NextStep() .

NextStep(TRequestStatus &, TReal32 &)

voidNextStep(TRequestStatus &aStatus,
TReal32 &aProgress
)[pure virtual]

Incremental execution of the operation.

The client should use an active object and call this function until it does not complete with status KPosLmOperationNotComplete.

When the operation has finished, this function will complete with status KErrNone if the operation was successful, or an error code if some error was encountered.

This function also returns a progress of the operation. Progress is a floating point number in the interval [0.0,1.0]. 0.0 indicates that the operation has not started and 1.0 indicates that the operation has completed.

Note that this function is asynchronous which means that status and progress may not be set when the function returns. They are only guaranteed to be set when the request is completed.

The only way to cancel an operation is to delete the operation object. This will also cancel any outstanding request to NextStep().

panic

"Landmarks Client"-EPosInvalidOperationMode The function is called when the operation is already complete.

Parameters

TRequestStatus & aStatusThe request status. Upon request completion contains step status:KPosLmOperationNotComplete if the step has completed but more steps are needed before the operation will be completed.KErrNone if the operation has finished successfully.An error code if the operation has failed.
TReal32 & aProgressUpon request completion is set to the progress of the operation.

operator=(const CPosLmOperation &)

CPosLmOperation &operator=(const CPosLmOperation &)[private]

Parameters

const CPosLmOperation &