CAsyncCallBack Class Reference

class CAsyncCallBack : public CAsyncOneShot

An active object that performs its processing through an associated call back function, and which is only performed once.

Inherits from

Constructor & Destructor Documentation

CAsyncCallBack(TInt)

IMPORT_CCAsyncCallBack(TIntaPriority)

Constructor taking a priority value.

Specifically, the constructor sets this active object's priority value through a call to the base class constructor in its ctor list.

No call back is set, which means that it must be set subsequently through a call to the Set() function.

CAsyncCallBack::Set

Parameters

TInt aPriorityThe active object priority value. CActive::TPriority defines a standard set of priorities.

CAsyncCallBack(const TCallBack &, TInt)

IMPORT_CCAsyncCallBack(const TCallBack &aCallBack,
TIntaPriority
)

Constructor taking a priority value and a callback.

Specifically, the constructor:

1. sets this active object's priority value through a call to the base class constructor in its ctor list

2. sets the callback; the function encapsulated by the callback is called when this active object is scheduled to run.

Parameters

const TCallBack & aCallBackA reference to a callback object encapsulating a function which is called when this active object is ready to run. The constructor takes a copy of this callback object, which means that it can be safely discarded after construction.
TInt aPriorityThe active object priority value.

~CAsyncCallBack()

IMPORT_C~CAsyncCallBack()[virtual]

Destructor.

Member Functions Documentation

CallBack()

IMPORT_C voidCallBack()

Queues this active object to be run, if it is not already queued.

RunL()

voidRunL()[protected, virtual]

Calls the callback function.

TCallBack::CallBack

Set(const TCallBack &)

IMPORT_C voidSet(const TCallBack &aCallBack)

Sets the call back.

panic
E32USER-CBase 1 if the active object is currently active.

Parameters

const TCallBack & aCallBackA reference to a callback object encapsulating a function which is called when this active object is ready to run.

Member Data Documentation

TCallBack iCallBack

TCallBack iCallBack[protected]

The callback object that encapsulates the callback function.