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

Constructor & Destructor Documentation

CDosEventListenerBase(RDosServer &)

IMPORT_C CDosEventListenerBase ( RDosServer & aServer )

Constructor.

Parameters

RDosServer & aServer A connected session to the DosServer.

CDosEventListenerBase()

IMPORT_C CDosEventListenerBase ( )

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 void GeneralEventL ( 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 & aEvent The event.
TAny * aParameter A pointer to the parameter.

HandleEventL(const TRegisterEvent &, HBufC8 *)

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

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

Parameters

const TRegisterEvent & aEvent The event.
HBufC8 * aParameter A pointer to the parameter.

OnError(TInt, TBool &)

IMPORT_C void OnError ( TInt aError,
TBool & aStopListening
) [virtual]

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

Parameters

TInt aError Symbian error code.
TBool & aStopListening Put this parameter as ETrue if you wish the Listener to stop listening for the event that caused the error.

RegisterAndListenL()

void RegisterAndListenL ( ) [private]

Register the events and start listening for them.

StartListeningL(TRegisterEvent *, TInt)

IMPORT_C void StartListeningL ( TRegisterEvent * aEventArray,
TInt aEventCount
)

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

Parameters

TRegisterEvent * aEventArray An array of event for registration.
TInt aEventCount Number of events in the array.

StartListeningL(TUint, TInt, TQueueType)

IMPORT_C void StartListeningL ( TUint aEvent,
TInt aParamSize = 0,
TQueueType aQueue = EQueue
)

It registers only one event.

Parameters

TUint aEvent Unique Id of the event.
TInt aParamSize = 0 Size of the parameter that the event carries.
TQueueType aQueue = EQueue Type of queue wished for the event.

Stop()

IMPORT_C void Stop ( )

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]