MCenRepNotifyHandlerCallback Class Reference

class MCenRepNotifyHandlerCallback

Class provides a callback interface for handling the notifification events from the Central Repository. The Client derives a class from this interface and implements the HandleNotify-methods that interest it. An empty default implementation is provided for all of the methods. In debug build the default implementations print out a debug trace.

Public Member Functions
IMPORT_C voidHandleNotifyBinary(TUint32, const TDesC8 &)
IMPORT_C voidHandleNotifyError(TUint32, TInt, CCenRepNotifyHandler *)
IMPORT_C voidHandleNotifyGeneric(TUint32)
IMPORT_C voidHandleNotifyInt(TUint32, TInt)
IMPORT_C voidHandleNotifyReal(TUint32, TReal)
IMPORT_C voidHandleNotifyString(TUint32, const TDesC16 &)

Member Functions Documentation

HandleNotifyBinary(TUint32, const TDesC8 &)

IMPORT_C voidHandleNotifyBinary(TUint32aId,
const TDesC8 &aNewValue
)[virtual]

This callback method is used to notify the client about changes for binary value keys, i.e. key type is EBinaryKey.

capability

Dependent Capability required depends on implementation of override.

Parameters

TUint32 aIdId of the key that has changed.
const TDesC8 & aNewValueThe new value of the key.

HandleNotifyError(TUint32, TInt, CCenRepNotifyHandler *)

IMPORT_C voidHandleNotifyError(TUint32aId,
TIntaError,
CCenRepNotifyHandler *aHandler
)[virtual]

This callback method is used to notify the client about errors in the handler. Any error in handling causes the handler to stop handling any more notifications. Handling can be restarted with a call to aHandler->StartListeningL(), if the error is non-fatal. However, be careful to trap any errors from this call if this is done.

capability

Dependent Capability required depends on implementation of override.

Parameters

TUint32 aIdId of the key this instance listens to or if notifications for whole repository are listened, could also be KInvalidNotificationId.
TInt aErrorError code.
CCenRepNotifyHandler * aHandlerPointer to the handler instance. This pointer can be used to identify the handler or restart the listening.

HandleNotifyGeneric(TUint32)

IMPORT_C voidHandleNotifyGeneric(TUint32aId)[virtual]

This callback method is used to notify the client about changes in keys when the whole repository is listened for.

Note: It is not guaranteed that a notification will be received for all keys, if multiple keys are changed in rapid succession by multiple threads or when the whole repository is reset, therefore only listen for whole repository if this is not an issue.

capability

Dependent Capability required depends on implementation of override.

Parameters

TUint32 aIdId of the key that has changed. If multiple keys were changed by whole repository reset, value will be KInvalidNotificationId.

HandleNotifyInt(TUint32, TInt)

IMPORT_C voidHandleNotifyInt(TUint32aId,
TIntaNewValue
)[virtual]

This callback method is used to notify the client about changes for integer value keys, i.e. key type is EIntKey.

capability

Dependent Capability required depends on implementation of override.

Parameters

TUint32 aIdId of the key that has changed.
TInt aNewValueThe new value of the key.

HandleNotifyReal(TUint32, TReal)

IMPORT_C voidHandleNotifyReal(TUint32aId,
TRealaNewValue
)[virtual]

This callback method is used to notify the client about changes for real value keys, i.e. key type is ERealKey.

capability

Dependent Capability required depends on implementation of override.

Parameters

TUint32 aIdId of the key that has changed.
TReal aNewValueThe new value of the key.

HandleNotifyString(TUint32, const TDesC16 &)

IMPORT_C voidHandleNotifyString(TUint32aId,
const TDesC16 &aNewValue
)[virtual]

This callback method is used to notify the client about changes for string value keys, i.e. key type is EStringKey.

capability

Dependent Capability required depends on implementation of override.

Parameters

TUint32 aIdId of the key that has changed.
const TDesC16 & aNewValueThe new value of the key.