|
|
|
To use the environment change notifier, an application should:
construct a CEnvironmentChangeNotifier object using its NewL() function, specifying the active object priority and a pointer to the callback function encapsulated in a TCallBack object. NewL() also adds this CEnvironmentChangeNotifier active object to the current active scheduler.
issue a request for change events by calling the Start() member function.
The callback function is called every time the request for change events completes. However, whenever a request completes,
CEnvironmentChangeNotifier always issues another request for change events before the call back function is invoked.
The first call to the callback function occurs immediately after the first call to Start(); this is because of the way the underlying change notifier service is implemented; the changes reported are all those defined by the TChanges enum.
To stop the environment change notifier:
call CEnvironmentChangeNotifier's Cancel() function; note that this is a member of the CActive base class.
delete the CEnvironmentChangeNotifier object.