MNotifierBase2 Class Reference

class MNotifierBase2

Interface to a plug-in server side notifier for the text window server.

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

Note that the text window server is not used in production ROMs. It is used when testing low level code.

Nested Classes and Structures

Public Member Functions
voidCancel()
TNotifierInfo Info()
TNotifierInfo RegisterL()
voidRelease()
voidSetManager(MNotifierManager *)
TPtrC8 StartL(const TDesC8 &)
voidStartL(const TDesC8 &, TInt, const RMessagePtr2 &)
TPtrC8 UpdateL(const TDesC8 &)
Public Member Enumerations
enumTNotifierPriority {
ENotifierPriorityAbsolute = 500, ENotifierPriorityVHigh = 400, ENotifierPriorityHigh = 300, ENotifierPriorityLow = 200, ENotifierPriorityVLow = 100, ENotifierPriorityLowest = 0
}
Protected Attributes
MNotifierManager *iManager
Private Attributes
TInt iNotBSpare

Member Functions 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.

RNotifier::CancelNotifier

Info()

TNotifierInfo Info()const [pure virtual]

Gets the notifier parameters.

This is the same information as returned by RegisterL(), although the returned values may be varied at run-time.

RegisterL()

TNotifierInfo RegisterL()[pure virtual]

Performs any initialisation that this notifier may require.

The function is called when the notifier is first loaded, i.e. when the plug-in DLL is loaded. It is called only once.

As a minimum, the implementation should return a TNotifierInfo instance describing the notifier parameters. A good implementation would be to set up a TNotifierInfo as 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.

MNotifierBase2::Info

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, the implementation should delete this object (i.e. delete this;).

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

SetManager(MNotifierManager *)

voidSetManager(MNotifierManager *aManager)

Sets the notifier manager.

Parameters

MNotifierManager * aManagerA pointer to the notifier manager.

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 wait for a notifier to complete before returning from this function unless the notifier is likely to finish implementing its functionality immediately.

RNotifier::StartNotifier

Parameters

const TDesC8 & aBufferData that can be passed from the client-side. 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,

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

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

RNotifier::StartNotifierAndGetResponse

Parameters

const TDesC8 & aBufferData that can be passed from the client-side. The format and meaning of any data is implementation dependent.
TInt aReplySlotThe offset within the message arguments 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.
const RMessagePtr2 & 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().

RNotifier::UpdateNotifier

Parameters

const TDesC8 & aBufferData that can be passed from the client-side. The format and meaning of any data is implementation dependent.

Member Enumerations Documentation

Enum TNotifierPriority

Defines a set of notifier priorities. The use and application of these values is implementation dependent. ENotifierPriorityAbsolute defines the highest priority value; subsequent enum values define decreasing priority values.

Enumerators

ENotifierPriorityAbsolute = 500
ENotifierPriorityVHigh = 400
ENotifierPriorityHigh = 300
ENotifierPriorityLow = 200
ENotifierPriorityVLow = 100
ENotifierPriorityLowest = 0

Member Data Documentation

MNotifierManager * iManager

MNotifierManager *iManager[protected]

TInt iNotBSpare

TInt iNotBSpare[private]