MEikSrvNotifierBase2 Class Reference

#include <mw/eiknotapi.h>

Link against: eiksrv.lib

class MEikSrvNotifierBase2

Nested Classes and Structures

Protected Attributes
MEikSrvNotifierManager *iManager
Public Member Enumerations
enumTNotifierPriority { ENotifierPriorityAbsolute, ENotifierPriorityVHigh, ENotifierPriorityHigh, ENotifierPriorityLow, ..., ENotifierPriorityLowest }
Public Member Functions
MEikSrvNotifierBase2()
virtual ~MEikSrvNotifierBase2()
pure virtual voidCancel()
virtual IMPORT_C voidHandleSystemEventL(TUid)
pure virtual TNotifierInfo Info()
virtual IMPORT_C TIntNotifierCapabilites()
pure virtual TNotifierInfo RegisterL()
pure virtual voidRelease()
voidSetManager(MEikSrvNotifierManager *)
pure virtual TPtrC8 StartL(const TDesC8 &)
pure virtual voidStartL(const TDesC8 &, TInt, const RMessagePtr2 &)
pure virtual TPtrC8 UpdateL(const TDesC8 &)
virtual IMPORT_C voidUpdateL(const TDesC8 &, TInt, const RMessagePtr2 &)

Detailed Description

Interface to a plug-in server side notifier.

Any number of MEikSrvNotifierBase2 objects can be included in a single DLL. All notifiers are loaded during device startup and are not destroyed until the Uikon server closes down.

All notifiers run in the uikon server thread so are able to directly access server side status panes but cannot call any functions on REikAppUiSession.

Member Attribute Documentation

iManager

MEikSrvNotifierManager *iManager[protected]

Member Enumeration Documentation

Enum TNotifierPriority

Defines a set of notifier priorities. The use and application of these values is implementation-dependent.

EnumeratorValueDescription
ENotifierPriorityAbsolute500

The highest priority value.

ENotifierPriorityVHigh400

The second highest priority value.

ENotifierPriorityHigh300

The third highest priority value.

ENotifierPriorityLow200

The fourth highest priority value.

ENotifierPriorityVLow100

The fifth highest priority value.

ENotifierPriorityLowest0

The lowest priority value.

Constructor & Destructor Documentation

MEikSrvNotifierBase2 ( )

IMPORT_CMEikSrvNotifierBase2()

~MEikSrvNotifierBase2 ( )

IMPORT_C~MEikSrvNotifierBase2()[virtual]

Member Function Documentation

Cancel ( )

voidCancel()[pure virtual]

Cancels an active notifier.

This is called as a result of a client-side call to RNotifier::CancelNotifier().

An implementation should free any relevant resources and complete any outstanding messages, if relevant.

HandleSystemEventL ( TUid )

IMPORT_C voidHandleSystemEventL(TUidaEvent)[virtual]

Handles a screen change event.

This function is called by the notifier manager, but only if the notifier can handle a change to the screen device, i.e. if a call to NotifierCapabilites() reports that the EScreenDeviceChangeSupported flag is set.

The default implementation is empty.

Parameters
aEventThe Uid representing the event.

Info ( )

TNotifierInfo Info()const [pure virtual]

Gets the notifier parameters.

This is usually the same information as returned by RegisterL() but can be varied at run time.

Return Value
Describes the parameters of the notifier.

NotifierCapabilites ( )

IMPORT_C TIntNotifierCapabilites()[virtual]

Gets notifier capabilities.

Calls the LAF implemented function.

See also: LafNotifierCapabilities::NotifierCapabilities()

RegisterL ( )

TNotifierInfo RegisterL()[pure virtual]

Performs any initialisation that this notifier may require.

The function is called when the notifier is loaded (when the plug-in DLL is loaded). It is called only once.

As a minimum, the function should return a TNotifierInfo instance describing the notifier parameters. A good implementation would be to set this into a data member, and then to return it. This is because the same information is returned by Info().

The function is safe to leave from, so it is possible, although rarely necessary, to allocate objects as you would normally do in a ConstructL() function as part of two-phase construction.

Return Value
Describes the parameters of the notifier.

Release ( )

voidRelease()[pure virtual]

Frees all resources owned by this notifier.

This function is called by the notifier framework when all resources allocated by notifiers should be freed. As a minimum, this function should delete this object (i.e. delete this;).

Note that it is important to implement this function correctly to avoid memory leaks.

SetManager ( MEikSrvNotifierManager * )

voidSetManager(MEikSrvNotifierManager *aManager)

StartL ( const TDesC8 & )

TPtrC8 StartL(const TDesC8 &aBuffer)[pure virtual]

Starts the notifier.

This is called as a result of a client-side call to RNotifier::StartNotifier(), which the client uses to start a notifier from which it does not expect a response.

The function is synchronous, but it should be implemented so that it completes as soon as possible, allowing the notifier framework to enforce its priority mechanism.

It is not possible to to wait for a notifier to complete before returning from this function unless the notifier is likely to finish implementing its functionality immediately.

Parameters
aBufferData that can be passed from the client-side. The format and meaning of any data is implementation dependent.
Return Value
A pointer descriptor representing data that may be returned. The format and meaning of any data is implementation dependent.

StartL ( const TDesC8 &, TInt, const RMessagePtr2 & )

voidStartL(const TDesC8 &aBuffer,
TIntaReplySlot,
const RMessagePtr2 &aMessage
)[pure virtual]

Starts the notifier.

This is called as a result of a client-side call to the asynchronous function RNotifier::StartNotifierAndGetResponse(). This means that the client is waiting, asynchronously, for the notifier to tell the client that it has finished its work.

It is important to return from this function as soon as possible, and derived classes may find it useful to take a copy of the reply-slot number and the RMessage object.

The implementation of a derived class must make sure that Complete() is called on the RMessage object when the notifier is deactivated.

This function may be called multiple times if more than one client starts the notifier.

Parameters
aBufferData that can be passed from the client-side. The format and meaning of any data is implementation dependent.
aReplySlotIdentifies which message argument to use for the reply. This message argument will refer to a modifiable descriptor, a TDes8 type, into which data can be returned. The format and meaning of any returned data is implementation dependent.
aMessageEncapsulates a client request.

UpdateL ( const TDesC8 & )

TPtrC8 UpdateL(const TDesC8 &aBuffer)[pure virtual]

Updates a currently active notifier with new data.

This is called as a result of a client-side call to RNotifier::UpdateNotifier().

Parameters
aBufferData that can be passed from the client-side. The format and meaning of any data is implementation dependent.
Return Value
A pointer descriptor representing data that may be returned. The format and meaning of any data is implementation dependent.

UpdateL ( const TDesC8 &, TInt, const RMessagePtr2 & )

IMPORT_C voidUpdateL(const TDesC8 &aBuffer,
TIntaReplySlot,
const RMessagePtr2 &aMessage
)[virtual]

Updates a currently active notifier with new data.

This is called as a result of a client-side call to the asynchronous function RNotifier::UpdateNotifierAndGetResponse(). This means that the client is waiting, asynchronously, for the notifier to tell the client that it has finished its work.

It is important to return from this function as soon as possible, and derived classes may find it useful to take a copy of the reply-slot number and the RMessage object.

The implementation of a derived class must make sure that Complete() is called on the RMessage object when the notifier is deactivated.

This function may be called multiple times if more than one client updates the notifier.

Parameters
aBufferData that can be passed from the client-side. The format and meaning of any data is implementation dependent.
aReplySlotIdentifies which message argument to use for the reply. This message argument will refer to a modifiable descriptor, a TDes8 type, into which data can be returned. The format and meaning of any returned data is implementation dependent.
aMessageEncapsulates a client request.