Purpose
Register a callback function that is invoked when the availability of a type of event changes state. Calling this function also causes the callback to be invoked immediately to report the event type's current state of availability.
Syntax
#include "spd.h" SPD_errorTP SPD_MonitorEventState( SPD_eventTypeTP eventType, SPD_eventStateCallbackTP callback, SPD_passbackTP passback );
Description
eventType
is the type of event whose availability is to be monitored. See 8.1 for the list of possible types.
callback
is the name of the function that is invoked when an event state change is detected, for example, when the source of the event type goes online or offline. See 8.2 for a description of the callback function. Specify NULL to turn off event state reporting for the event type for this client.
passback
is a value passed to the callback function when it is invoked.
Return Value
The return value indicates whether an error occurred, as follows:
Return | Indication |
SPD_normalCN | No error |
SPD_notInitializedCN | SPD_InitClient not called |
SPD_badTypeCN | Bad eventType parameter |
SPD_commFailureCN | Communications problem |
See Also
Use of this function is illustrated in 6.8.