#include <mw/EPos_CPosLmOperation.h>
class CPosLmOperation : public CBase |
Public Member Functions | |
---|---|
virtual | ~CPosLmOperation() |
pure virtual void | ExecuteL() |
pure virtual void | NextStep(TRequestStatus &, TReal32 &) |
Protected Member Functions | |
---|---|
CPosLmOperation() |
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.
void | ExecuteL | ( | ) | [pure virtual] |
Synchronous execution of the operation.
When this function returns, the operation has finished.
This function is called when the operation is already complete
The operation has already been started incrementally using NextStep() .
void | NextStep | ( | 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().
Parameter | Description |
---|---|
aStatus | The 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. |
aProgress | Upon request completion is set to the progress of the operation. |