|
||
class CMsvOperationActiveSchedulerWait : public CActive;
Utility class used to wait until an asynchronous messaging operation has completed.
To use the class:
1. Create a new CMsvOperationActiveSchedulerWait object
2. Call the messaging function that returns the asynchronous operation. The operation observer parameter should be the iStatus word of the CMsvOperationActiveSchedulerWait object. This means that the CMsvOperationActiveSchedulerWait object will be signalled when the operation completes.
3. Call the CMsvOperationActiveSchedulerWait object's CMsvOperationActiveSchedulerWait::Start()
function. This sets the object to be active.
These steps cause the program to wait until the operation completes.
CMsvOperationActiveSchedulerWait* waiter=CMsvOperationActiveSchedulerWait::NewLC();
CMsvOperation* op = function_returning_opLC(waiter->iStatus);
waiter->Start();
CleanupStack::PopAndDestroy(2); // op, waiter
CBase
-
Base class for all classes to be instantiated on the heap.
CActive
-
The core class of the active object abstraction.
CMsvOperationActiveSchedulerWait
- Utility class used to wait until an asynchronous messaging operation has complet...
Defined in CMsvOperationActiveSchedulerWait
:
DoCancel()
Implements cancellation of an outstanding request.NewLC(TInt)
Allocates and constructs a new CMsvOperationActiveSchedulerWait object.RunL()
Handles a request completion event.Start()
Sets the object to be active, and wait until the request is completed. ~CMsvOperationActiveSchedulerWait()
Destructor.Inherited from CActive
:
CActive(TInt)
Constructs the active object with the specified priority.Cancel()
Cancels the wait for completion of an outstanding request.Deque()
Removes the active object from the active scheduler's list of active objects.EPriorityHigh
A priority higher than EPriorityUserInput.EPriorityIdle
A low priority, useful for active objects representing background processing.EPriorityLow
A priority higher than EPriorityIdle but lower than EPriorityStandard.EPriorityStandard
Most active objects will have this priority.EPriorityUserInput
A priority higher than EPriorityStandard; useful for active objects handling use...Extension_(TUint,TAny *&,TAny *)
Extension function IsActive()const
Determines whether the active object has a request outstanding.IsAdded()const
Determines whether the active object has been added to the active scheduler's li...Priority()const
Gets the priority of the active object.RunError(TInt)
Handles a leave occurring in the request completion event handler CActive::RunL(...SetActive()
Indicates that the active object has issued a request and that it is now outstan...SetPriority(TInt)
Sets the priority of the active object.TPriority
Defines standard priorities for active objects. iStatus
The request status associated with an asynchronous request.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C static CMsvOperationActiveSchedulerWait* NewLC(TInt aPriority=EPriorityStandard);
Allocates and constructs a new CMsvOperationActiveSchedulerWait object.
The new object is added to the active scheduler and left on the cleanup stack.
|
|
|
IMPORT_C ~CMsvOperationActiveSchedulerWait();
Destructor.
Any active request on the object is cancelled.
IMPORT_C void Start();
Sets the object to be active, and wait until the request is completed.
private: virtual void RunL();
Handles a request completion event.
The function stops the object waiting, and allows the program to resume execution after the CMsvOperationActiveSchedulerWait::Start()
function call.
CActive::RunL()
Handles an active object's request completion event.private: virtual void DoCancel();
Implements cancellation of an outstanding request.
CActive::DoCancel()
Implements cancellation of an outstanding request.