|
|
|
class MEikSrvNotifierBase2;
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.
Defined in MEikSrvNotifierBase2:
Cancel()Cancels an active notifier.ENotifierPriorityAbsoluteThe highest priority value. ENotifierPriorityHighThe third highest priority value. ENotifierPriorityLowThe fourth highest priority value. ENotifierPriorityLowestThe lowest priority value. ENotifierPriorityVHighThe second highest priority value. ENotifierPriorityVLowThe fifth highest priority value. HandleSystemEventL(TUid)Handles a screen change event.Info()constGets the notifier parameters.MEikSrvNotifierBase2()MEikSrvNotifierBase2_Reserved_2()Reserved for future use NotifierCapabilites()Gets notifier capabilities.RegisterL()Performs any initialisation that this notifier may require.Release()Frees all resources owned by this notifier.StartL(const TDesC8 &)Starts the notifier.StartL(const TDesC8 &,TInt,const RMessagePtr2 &)Starts the notifier.TNotifierInfoContains the notifier parameters.TNotifierPriorityDefines a set of notifier priorities. The use and application of these values is...UpdateL(const TDesC8 &)Updates a currently active notifier with new data.UpdateL(const TDesC8 &,TInt,const RMessagePtr2 &)Updates a currently active notifier with new data.iManager~MEikSrvNotifierBase2()virtual void Release()=0;
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.
virtual TNotifierInfo RegisterL()=0;
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 MEikSrvNotifierBase2::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 MEikSrvNotifierBase2::Info()const.
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.
|
virtual TNotifierInfo Info() const=0;
Gets the notifier parameters.
This is usually the same information as returned by MEikSrvNotifierBase2::RegisterL() but can be varied at run time.
|
virtual TPtrC8 StartL(const TDesC8 &aBuffer)=0;
Starts the notifier.
This is called as a result of a client-side call to RNotifier::StartNotifier(TUid,const TDesC8 &), 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.
|
|
virtual void StartL(const TDesC8 &aBuffer, TInt aReplySlot, const RMessagePtr2 &aMessage)=0;
Starts the notifier.
This is called as a result of a client-side call to the asynchronous function RNotifier::StartNotifierAndGetResponse(TRequestStatus &,TUid,const TDesC8 &,TDes8 &). 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.
|
virtual void Cancel()=0;
Cancels an active notifier.
This is called as a result of a client-side call to RNotifier::CancelNotifier(TUid).
An implementation should free any relevant resources and complete any outstanding messages, if relevant.
virtual TPtrC8 UpdateL(const TDesC8 &aBuffer)=0;
Updates a currently active notifier with new data.
This is called as a result of a client-side call to RNotifier::UpdateNotifier(TUid,const TDesC8 &,TDes8 &).
|
|
IMPORT_C virtual void UpdateL(const TDesC8 &aBuffer, TInt aReplySlot, const RMessagePtr2 &aMessage);
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(TRequestStatus &,TUid,const TDesC8 &,TDes8 &). 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.
|
private: IMPORT_C virtual void MEikSrvNotifierBase2_Reserved_2();
Reserved for future use
IMPORT_C virtual void HandleSystemEventL(TUid aEvent);
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 MEikSrvNotifierBase2::NotifierCapabilites() reports that the EScreenDeviceChangeSupported flag is set.
The default implementation is empty.
|
IMPORT_C virtual TInt NotifierCapabilites();
Gets notifier capabilities.
Calls the LAF implemented function.
|
class TNotifierInfo;
Contains the notifier parameters.
Defined in MEikSrvNotifierBase2::TNotifierInfo:
iChannelThe Uid that identifies the channel to be used by the notifier (e.g. the screen,...iPriorityThe notifier priority, typically chosen from the standard set.iUidThe Uid that identifies the notifier. MEikSrvNotifierBase2::TNotifierPriorityDefines a set of notifier priorities. The use and application of these values is...iUidTUid iUid;
The Uid that identifies the notifier.
iChannelTUid iChannel;
The Uid that identifies the channel to be used by the notifier (e.g. the screen, an LED etc)
iPriorityTInt iPriority;
The notifier priority, typically chosen from the standard set.
MEikSrvNotifierBase2::TNotifierPriorityDefines a set of notifier priorities. The use and application of these values is...TNotifierPriority
Defines a set of notifier priorities. The use and application of these values is implementation-dependent.
|
protected: MEikSrvNotifierManager * iManager;