CApaAppListNotifier Class Reference

class CApaAppListNotifier : public CActive

CApaAppListNotifier is an active object which notifies the client when an application list is changed. Provides notification when applications are added, deleted or if the localisable data of an application is modified.

Clients can create instance of this class using NewL function which takes MApaAppListServObserver observer as one of the parameters. When application list is changed, CApaAppListNotifier will call HandleAppListEvent function of the provided observer.


//Implementation of observer interface class CAppListChangeObserver:public CBase, public MApaAppListServObserver { public: void HandleAppListEvent(TInt aEvent); CApaAppListNotifier* iNotifier; };

//This function is called by CApaAppListNotifier when an application list is changed void CAppListChangeObserver::HandleAppListEvent(TInt aEvent) { //Handle application list change event ... }

TInt E32Main() { ....

CAppListChangeObserver* obs=new(ELeave) CAppListChangeObserver(); CApaAppListNotifier *notif=CApaAppListNotifierNewL(obs, CActive::EPriorityStandard);

.... }

Inherits from

Constructor & Destructor Documentation

CApaAppListNotifier(MApaAppListServObserver &, TPriority)

CApaAppListNotifier(MApaAppListServObserver &aObserver,


MApaAppListServObserver & aObserver
TPriority aPriority



The destructor calls Cancel() and closes the session with the server.


Member Functions Documentation




voidDoCancel()[private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel().

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel().


NewL(MApaAppListServObserver *, TPriority)

IMPORT_C CApaAppListNotifier *NewL(MApaAppListServObserver *aObserver,

Allocates and constructs an application list change notifier.

It creates a session with the application architecture server (RApaLsSession), issues the notification request to the server and adds itself to the active scheduler.


MApaAppListServObserver * aObserverObserver whose HandleAppListEvent() function is called when application list is changed.
TPriority aPriorityThe active object priority.


TInt RunError(TIntaError)[private, virtual]


TInt aError


voidRunL()[private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

Member Data Documentation

RApaLsSession iLsSession

RApaLsSession iLsSession[private]

MApaAppListServObserver & iObserver

MApaAppListServObserver &iObserver[private]