Filter Containers

Using the SMS API, your application can manage the queries in a site database. In the SMS API, queries are represented as persistent machine filters in a filter container.

You manage persistent machine filters within a filter container by using the Filter Container functions. You handle persistent machine filters and their tokens by using the Filter functions.

Using the SmsOpenFilterContainer function, your application can open a filter container. When your application opens a filter container, the filter container is populated with persistent filters.

After a filter container has been opened, your application can read the contents of each filter in the filter container and the tokens within each filter.

After a filter container is opened, the order of the filters within that particular filter container is fixed. Using the SmsGetNextFilter function, your application can access the filters in the filter container sequentially. SmsGetNextFilter returns the handle to the next filter in the list of filters within a filter container. To start at the beginning of the list again, use SmsRewind to reset a filter container's internal filter index so that its filters can be reiterated.

Using the SmsGetFilterByID function, your application can access a particular filter by its identifier. The identifier uniquely identifies the filter. The identifier is an eight-character identifier that the SMS system assigns to the persistent filter (which represents a query).

The steps to create a persistent filter are the same as those for creating a transient machine filter, with the addition of two steps to:

After a machine filter is committed to a filter container, that filter becomes a persistent filter.

Currently, the SMS API does not support deletion of persistent filters from the site database.

For information about creating persistent filters (SMS queries), see General Steps for Using the SMS API to Manage Queries.