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 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
Public Member Functions | |
---|---|
~CMsvOperationActiveSchedulerWait () | |
IMPORT_C CMsvOperationActiveSchedulerWait * | NewLC ( TInt ) |
IMPORT_C void | Start () |
Private Member Functions | |
---|---|
CMsvOperationActiveSchedulerWait ( TInt ) | |
void | DoCancel () |
void | RunL () |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Private Attributes | |
---|---|
CActiveSchedulerWait | iActiveSchedulerWait |
Inherited Attributes | |
---|---|
CActive::iStatus |
CMsvOperationActiveSchedulerWait | ( | TInt | aPriority | ) | [private] |
Constructor.
TInt aPriority | Active object priority |
IMPORT_C | ~CMsvOperationActiveSchedulerWait | ( | ) |
Destructor.
Any active request on the object is cancelled.
IMPORT_C CMsvOperationActiveSchedulerWait * | NewLC | ( | TInt | aPriority = EPriorityStandard | ) | [static] |
Allocates and constructs a new CMsvOperationActiveSchedulerWait object.
The new object is added to the active scheduler and left on the cleanup stack.
TInt aPriority = EPriorityStandard | Active object priority. It has a default value of EPriorityStandard. |
void | RunL | ( | ) | [private, virtual] |
Handles a request completion event.
The function stops the object waiting, and allows the program to resume execution after the Start() function call.
IMPORT_C void | Start | ( | ) |
Sets the object to be active, and wait until the request is completed.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.