Sequence of Events

[This is preliminary documentation and subject to change.]

This overview describes how the various elements of Announcement Listener work in time sequence.

First, filters are installed on the client computer. A filter is an Automation server, which is an in-process server implemented as a DLL (dynamic link library) file. There are two filters that are installed as part of Broadcast Architecture. One for receiving announcements of upcoming file transfers and one for receiving enhancements for interactive television. Custom filters can be installed by the user by using the Annui.exe program.

When Annui.exe installs a filter it calls the DLLRegisterServer function, implemented by the filter to register the filter as a service. Once the filter is registered, Announcement listener will use it to match incoming announcements.

When an announcement arrives on a socket associated with an announcement address, Announcement Listener parses the announcement packet and puts the elements of the announcement in an Sdpblb object. Announcement Listener also creates an instance of the IBroadcastFilter object to hold the Sdlblb object. Announcement Listener checks that this announcement has not already been passed to the filters, and if not, it then hands that object to the filters. Each filter executes its own code to determine whether or not the announcement meets its criteria. The filter is called using the method IBroadcastFilter::Match.

If a filter returns a flag indicating it does not match, Announcement Listener asks the next filter in turn, until all the filters have been asked.

If a filter returns with the match flag set to true, Announcement Listener adds the announcement's unique identifier to a list, so that if the same announcement is rebroadcast later, Announcement Listener does not ask the filters again.

If a filter returns a flag indicating that it has found a match, the filter also returns a second flag that specifies whether Announcement Listener should schedule the launch of an application to receive the data at the expected time. In most cases, the filter makes this request. However, if the data is expected to arrive imminently, the filter can directly call an external process designed to receive the data. In this case, the filter sets the Schedule flag to "false," so that Announcement Listener does not schedule a future event. Because the match flag is true, Announcement Listener still treats the announcement as matched, and does not present the same announcement to the filters again.

If the Schedule flag is true, Announcement Listener calls another method in the filter called, IBroadcastFilter::GetDisposition. This method returns to Announcement Listener the information it needs to schedule a future task to receive the data. This information includes what application to launch, the working directory, the command line, and how far in advance of receipt of the data the application should be launched.

In this case, Announcement Listener provides the Task Scheduler with the announcement and the other information provided by GetDisposition. For more information, see Scheduling Data Reception.

After each announcement has been matched by a filter, or fails to be matched by any of the filters, the announcement is discarded.

Announcement Listener or the filter can take immediate action, such as starting file download if the file follows the announcement, or it can schedule an action using the Task Scheduler (a component of Windows 98).

Announcement Listener also accepts announcements that cancel a previous announcement.