Watcher Framework Overview

This section provides an overview of the functionality and the architecture of the Watcher Framework component.

Purpose

The Watcher Framework is a lightweight framework used to launch watchers.

Watcher processes are launched when a device starts and execute until the device is switched-off. They watch for incoming messages and handle them as appropriate. For example an SMS Watcher waits for incoming SMS messages and delivers them to the Message Store.

Architecture

The Watcher Framework consists of an executable, watcher.exe, that is started when the device boots. The start method depends on the UI family. The framework automatically loads each watcher plug-in DLL in z:\system\libs\watchers.

Note: The Watcher Framework loads plug-ins only from ROM.

Because the watchers are started during system start-up it is important that they start quickly.

After the watcher framework has constructed all the watchers it starts an active scheduler which remains active while the phone is switched on.

The watcher executable is has the capabilities necessary for write-access to the Messaging Outbox folder. For instance, to update a delivery report, it may require an entry in the Outbox to be updated.

Figure 1. Watcher Framework architecture

A watcher plug-in typically make requests to another subsystem such that they are completed when an external event (an SMS) being received occurs. When a watcher has completed processing the request it waits for the next event.

API summary

The CWatcherLog class logs the watcher operations.

Limitation

Support for starting and stopping watchers dynamically is not provided. This limitation makes watchers unsuitable for operations such as listening for messages transported through infrared (IR) because the IR port is not normally active.

Related information
WAP Stack