Active object wrapper for Central Repository one-shot notification handling.
Central Repository Notification Handler API provides an easy-to-use implementation of a CActive-based wrapper for Central Repository single-shot notifications. In most cases Central Repository Notification Handler can automatically resubscribe to notifications and fetch the modified value from Central Repository. The API consist of the classes CCenRepNotifyHandler and MCenRepNotifyHandlerCallback. User of this class needs to implement relevant MCenRepNotifyHandlerCallback interface methods to receive notifications. Use of the Central Repository Notification Handler API needs access to Central Repository (centralrepository.h).
This is a two-phase constructor method that is used to create a new instance for listening to the changes in all keys in the repository.
Type specific callback methods of MCenRepNotifyHandlerCallback will not be used when notifying about changes in this case, only HandleNotifyGeneric() is used.
Parameters:
aCallback
Reference to a callback instance.
aSession
Reference to an existing repository session. Do not close this session until all CCenRepNotifyHandler instances referring to it have been deleted.
Returns:
A pointer to a new instance of the CCenRepNotifyHandler class.
This is a two-phase constructor method that is used to create a new instance for listening to the changes in all keys in the repository.
Leaves the constructed instance to cleanup stack.
Type specific callback methods of MCenRepNotifyHandlerCallback will not be used when notifying about changes in this case, only HandleNotifyGeneric() is used.
Parameters:
aCallback
Reference to a callback instance.
aSession
Reference to an existing repository session. Do not close this session until all CCenRepNotifyHandler instances referring to it have been deleted.
Returns:
A pointer to a new instance of the CCenRepNotifyHandler class.
When this method is called, the CCenRepNotifyHandler starts listening for notifications.
If it is already listening, nothing happens.
Leave:
KErrAlreadyExists if there is already a notification on same CRepository for this setting, or an error from IPC or server side resource allocation failure.
IMPORT_C void CCenRepNotifyHandler::StopListening
(
)
When this method is called, the CCenRepNotifyHandler stops listening for notifications.
If it is already stopped, nothing happens.
The documentation for this class was generated from the following file: