Capability required depends on platform security of the repository.
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 consists of the classes CCenRepNotifyHandler and MCenRepNotifyHandlerCallback. The user of this class needs to implement relevant MCenRepNotifyHandlerCallback interface methods to receive notifications. The user of Central Repository Notification Handler API needs access to Central Repository (centralrepository.h).
void CMyCenRepNotifyTest::HandleNotifyString(TUint32 aId, const TDesC16& aNewValue)
{
RDebug::Print(_L("Key %d changed, new value: %S"), aId, &aNewValue);
}
|
Public Types |
enum | TCenRepKeyType { EIntKey,
ERealKey,
EStringKey,
EBinaryKey
} |
| Defines different key types. More...
|
Public Member Functions |
IMPORT_C void | StartListeningL () |
| When this method is called, the CCenRepNotifyHandler starts listening for notifications.
|
IMPORT_C void | StopListening () |
| When this method is called, the CCenRepNotifyHandler stops listening for notifications.
|
virtual IMPORT_C | ~CCenRepNotifyHandler () |
| Destructor.
|
Static Public Member Functions |
static IMPORT_C CCenRepNotifyHandler * | NewL (MCenRepNotifyHandlerCallback &aCallback, CRepository &aSession, TCenRepKeyType aKeyType, TUint32 aId) |
| This is a two-phase constructor method that is used to create a new instance for listening to the changes in a single key.
|
static IMPORT_C CCenRepNotifyHandler * | NewL (MCenRepNotifyHandlerCallback &aCallback, CRepository &aSession) |
| 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.
|
static IMPORT_C CCenRepNotifyHandler * | NewLC (MCenRepNotifyHandlerCallback &aCallback, CRepository &aSession, TCenRepKeyType aKeyType, TUint32 aId) |
| This is a two-phase constructor method that is used to create a new instance for listening to the changes in a single key.
|
static IMPORT_C CCenRepNotifyHandler * | NewLC (MCenRepNotifyHandlerCallback &aCallback, CRepository &aSession) |
| 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.
|
Protected Member Functions |
void | RunL () |
| Implements CActive.
|
TInt | RunError (TInt aError) |
| Implements CActive.
|
void | DoCancel () |
| Implements CActive.
|