Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32base.h
Link against: euser.lib

Class CAsyncCallBack

class CAsyncCallBack : public CAsyncOneShot;

Description

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

Derivation

Members

Defined in CAsyncCallBack:
CAsyncCallBack(), CAsyncCallBack(), CallBack(), RunL(), Set(), iCallBack, ~CAsyncCallBack()

Inherited from CActive:
Cancel(), Deque(), EPriorityHigh, EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, Extension_(), IsActive(), IsAdded(), Priority(), RunError(), SetActive(), SetPriority(), TPriority, iStatus

Inherited from CAsyncOneShot:
Call(), DoCancel(), Thread()

Inherited from CBase:
Delete(), operator new()


Construction and destruction


CAsyncCallBack()

IMPORT_C CAsyncCallBack(TInt aPriority);

Description

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.

Parameters

TInt aPriority

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


CAsyncCallBack()

IMPORT_C CAsyncCallBack(const TCallBack &aCallBack, TInt aPriority);

Description

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 &aCallBack

A 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 aPriority

The active object priority value.


~CAsyncCallBack()

virtual IMPORT_C ~CAsyncCallBack();

Description

Destructor.

[Top]


Member functions


Set()

IMPORT_C void Set(const TCallBack &aCallBack);

Description

Sets the call back.

Parameters

const TCallBack &aCallBack

A reference to a callback object encapsulating a function which is called when this active object is ready to run.

Panic codes

E32USER-CBase

1 if the active object is currently active.


CallBack()

IMPORT_C void CallBack();

Description

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


RunL()

protected: virtual void RunL();

Description

Calls the callback function.

[Top]


Member data


iCallBack

protected: TCallBack iCallBack;

Description

The callback object that encapsulates the callback function.