class CActiveScheduler : public CBase |
Controls the handling of asynchronous requests as represented by active objects.
An active scheduler is used to schedule the sequence in which active object request completion events are handled by a single event-handling thread.
An active scheduler can be instantiated and used directly if either:
the RunL() function of all of its active objects is guaranteed not to leave, or
each of its active objects implements a suitable RunError() function to provide suitable cleanup
If any of the active scheduler's active objects does not provide a RunError() function, then a CActiveScheduler derived class must be defined and an implementation of the Error() function provided to perform the cleanup required.
There is one active scheduler per thread and the static functions provided by the class always refer to the current active scheduler.
Public Member Functions | |
---|---|
CActiveScheduler() | |
~CActiveScheduler() | |
IMPORT_C void | Add(CActive *) |
IMPORT_C CActiveScheduler * | Current() |
IMPORT_C void | Error(TInt) |
IMPORT_C void | Halt(TInt) |
IMPORT_C void | Install(CActiveScheduler *) |
IMPORT_C CActiveScheduler * | Replace(CActiveScheduler *) |
IMPORT_C TBool | RunIfReady(TInt &, TInt) |
IMPORT_C TInt | StackDepth() |
IMPORT_C void | Start() |
IMPORT_C void | Stop() |
IMPORT_C void | WaitForAnyRequest() |
Protected Member Functions | |
---|---|
IMPORT_C TInt | Extension_(TUint, TAny *&, TAny *) |
TInt | Level() |
Private Member Functions | |
---|---|
void | DoRunL(TLoopOwner *const volatile &, CActive *volatile &, TCleanupBundle *) |
IMPORT_C void | OnStarting() |
IMPORT_C void | OnStopping() |
IMPORT_C void | Reserved_1() |
IMPORT_C void | Reserved_2() |
void | Run(TLoopOwner *const volatile &) |
void | Start(TLoopOwner *) |
Public Member Type Definitions | |
---|---|
typedef | TLoop * TLoopOwner |
Private Attributes | |
---|---|
TPriQue< CActive > | iActiveQ |
TAny * | iSpare |
TLoop * | iStack |
void | DoRunL | ( | TLoopOwner *const volatile & | aLoop, |
CActive *volatile & | aCurrentObj, | |||
TCleanupBundle * | aCleanupBundle | |||
) | [private] |
TLoopOwner *const volatile & aLoop | |
CActive *volatile & aCurrentObj | |
TCleanupBundle * aCleanupBundle |
IMPORT_C TInt | Extension_ | ( | TUint | aExtensionId, |
TAny *& | a0, | |||
TAny * | a1 | |||
) | [protected, virtual] |
IMPORT_C void | Install | ( | CActiveScheduler * | aScheduler | ) | [static] |
CActiveScheduler * aScheduler |
TInt | Level | ( | ) | const [protected, inline] |
Use the StackDepth() function instead.
Gets the scheduler's level of nestedness.
The level of nestedness.
IMPORT_C CActiveScheduler * | Replace | ( | CActiveScheduler * | aNewActiveScheduler | ) | [static] |
CActiveScheduler * aNewActiveScheduler |
void | Run | ( | TLoopOwner *const volatile & | aLoop | ) | [private] |
TLoopOwner *const volatile & aLoop |