Requesting Feature Notification

How to request notification of changes to a feature using RFeatureControl.

To request notification of changes to a feature using RFeatureControl, take the following steps.

To request notification of change to a single feature:

Step

Action

1

Implement the interface MFeatureObserver and its functions HandleNotifyChange() and HandleNotifyError(),

2

create an instance of your implementation,

3

construct an instance of CFeatureNotifier with an instance of your observer as argument of the constructor function,

4

call its NotifyRequest() function with the Uid of the feature as argument, and

5

destroy the CFeatureNotifier object.

To request notification of change to a single feature:

Step

Action

6

Create an instance of RFeatureUidArray,

7

append to it the Uids of the features,

8

create an instance of your implementation of MFeatureObserver,

9

construct an instance of CFeatureNotifier with an instance of your observer as argument of the constructor function,

10

call its NotifyRequest() function with a reference to the RFeatureUidArray as argument, and

11

destroy the CFeatureNotifier object.

NotifyRequest() returns:

  • KErrNone if the notification request was successfully added,

  • KAlreadyExists if the notification request already exists, and

  • otherwise returns an error code.