CDosEventListenerBase Class Reference

class CDosEventListenerBase : public CBase

This class provides with services to listen for events. The class is intended for derivation. The derived class should override all the events that its objects are going to register to.

Inherits from

  • CDosEventListenerBase

Constructor & Destructor Documentation

CDosEventListenerBase(RDosServer &)

IMPORT_CCDosEventListenerBase(RDosServer &aServer)

Constructor.

Parameters

RDosServer & aServerA connected session to the DosServer.

CDosEventListenerBase()

IMPORT_CCDosEventListenerBase()

Constructor. It creates the sessions to the DosServer.

~CDosEventListenerBase()

IMPORT_C~CDosEventListenerBase()

Destructor.

Member Functions Documentation

DosServer()

const RDosServer &DosServer()const [inline]

Returns the session with the DosServer.

GeneralEventL(const TRegisterEvent &, TAny *)

IMPORT_C voidGeneralEventL(const TRegisterEvent &aEvent,
TAny *aParameter
)[protected, virtual]

This a raw event that is intended for expansion of the event functionality by licensees.

Parameters

const TRegisterEvent & aEventThe event.
TAny * aParameterA pointer to the parameter.

HandleEventL(const TRegisterEvent &, HBufC8 *)

voidHandleEventL(const TRegisterEvent &aEvent,
HBufC8 *aParameter
)[private]

This function handles the raw event and calls one of the "event functions".

Parameters

const TRegisterEvent & aEventThe event.
HBufC8 * aParameterA pointer to the parameter.

OnError(TInt, TBool &)

IMPORT_C voidOnError(TIntaError,
TBool &aStopListening
)[virtual]

The function gets called whenever an error occurs and it can be overrided by the derived class.

Parameters

TInt aErrorSymbian error code.
TBool & aStopListeningPut this parameter as ETrue if you wish the Listener to stop listening for the event that caused the error.

RegisterAndListenL()

voidRegisterAndListenL()[private]

Register the events and start listening for them.

StartListeningL(TRegisterEvent *, TInt)

IMPORT_C voidStartListeningL(TRegisterEvent *aEventArray,
TIntaEventCount
)

It registers the object to all the events contained in aEventArray.

Parameters

TRegisterEvent * aEventArrayAn array of event for registration.
TInt aEventCountNumber of events in the array.

StartListeningL(TUint, TInt, TQueueType)

IMPORT_C voidStartListeningL(TUintaEvent,
TIntaParamSize = 0,
TQueueTypeaQueue = EQueue
)

It registers only one event.

Parameters

TUint aEventUnique Id of the event.
TInt aParamSize = 0Size of the parameter that the event carries.
TQueueType aQueue = EQueueType of queue wished for the event.

Stop()

IMPORT_C voidStop()

Stops the listening.

Member Data Documentation

RDosServer iDosServer

RDosServer iDosServer[private]

TRegisterEvent * iEventList

TRegisterEvent *iEventList[private]

TInt iNotifierCount

TInt iNotifierCount[private]

TSglQueIter< CDosEventNotifier > iNotifierIter

TSglQueIter< CDosEventNotifier >iNotifierIter[private]

TSglQue< CDosEventNotifier > iNotifierList

TSglQue< CDosEventNotifier >iNotifierList[private]

TBool iOwnServer

TBool iOwnServer[private]