Searching for a Specific High-Level Event
Sometimes you do not want to accept the next available high-level event
pending for your application. Instead, you might want to select one such event
from among all the high-level events in your application's high-level event
queue. For example, you might want to look for a return receipt for a
high-level event you previously posted before processing other high-level
events.
You can select a specific high-level event by calling the function
function is a filter function that you provide. Your filter function should
examine an event in your application's high-level event queue and determine if
that message is the kind of event you wish to receive. If it is, your filter
function returns TRUE. This indicates that your filter function does not want to inspect any more events. If the filter function finds an event of the desired
If your filter function returns FALSE for an event in the high-level the high-level event queue and executes your filter function. If the filter
function returns FALSE for all the high-level events in the queue, then Here's how you declare the filter function whose address you pass to
pascal Boolean aFilter (void * yourDataPtr,
HighLevelEventMsgPtr msgBuff,
const TargetID *sender)
The yourDataPtr parameter indicates the criteria your function should use to
search for a specific event. The msgBuff parameter contains a pointer to a
function for a high-level event waiting in the high-level event queue, the
compare the fields of this record to the information you pass in the
yourDataPtr parameter to determine if that event suits your needs. For
example, the yourDataPtr parameter might contain the signature of a return
receipt. You can test its value against the EventClass contained in the
theMsgEvent field of the high-level event message record.