Location:
e32base.h
Link against: euser.lib
CIdle
Supported from 5.0
An active object that performs low-priority processing when no higher-priority active objects are ready to run.
An idle time active object together with its associated callback function may be used to implement potentially long running background tasks, such as spreadsheet recalculation and word processor repagination.
|
Defined in CIdle
:
New()
, NewL()
, Start()
, ~CIdle()
Inherited from CActive
:
Cancel()
,
Deque()
,
DoCancel()
,
EPriorityHigh
,
EPriorityIdle
,
EPriorityLow
,
EPriorityStandard
,
EPriorityUserInput
,
IsActive()
,
IsAdded()
,
Priority()
,
RunError()
,
RunL()
,
SetActive()
,
SetPriority()
,
TPriority
,
iStatus
Inherited from CBase
:
operator new()
static CIdle* New(TInt aPriority);
Allocates and initialises an Idle time active object and adds it to the active scheduler.
|
|
static CIdle* NewL(TInt aPriority);
Allocates and initialises an Idle time active object and adds it to the active scheduler. The function leaves on failure.
|
|
~CIdle();
Frees resources prior to destruction. Specifically, it cancels any outstanding request.
void Start(TCallBack aCallBack);
Starts the background task.
The background task is encapsulated in the callback. The function represented by this callback is called every time this Idle time active object is scheduled to run.
The callback function should be structured to perform a background task in many increments, i.e. it should voluntarily relinquish control (i.e. return) after a suitable time interval to allow other, higher priority events to be handled.
If the callback function has further work to do, it should return a true value. This ensures that the active object is scheduled to run again later.
Once the callback function has finally completed its work, it should return a false value. The active object is then no longer scheduled to run.
|