Installs a standard event handler for an ODS application.
SRV_HANDLE_PROC srv_handle (
SRV_SERVER * server,
DBINT event,
SRV_HANDLE_PROC handler );
where
This function should be defined as returning an int and taking a single parameter. This parameter should be defined as SRV_SERVER * when event is one of the following:
and should be defined as SRV_PROC * when event is one of the following:
This function must return one of the following values:
Return value | Description |
---|---|
SRV_CONTINUE | Continue normal processing |
SRV_DISCONNECT | Fires a disconnect event to close the client connection |
SRV_EXIT | Fires a disconnect event to close the client connection |
A pointer to the previously defined event-handling function.
When an event occurs, ODS calls the following functions in this order:
Each ODS event has a default standard event handler which returns SRV_CONTINUE. Installing a standard event handler with srv_handle replaces the default handler with one supplied by the application.
You can install standard event handlers dynamically. The new standard event handler is called when the next event occurs. An ODS application can have one standard event handler for each event. Open Data Services will automatically remove the event handler when necessary; your program should not attempt to do this.
This entry | For information about |
---|---|
srv_event | Adding an event request |
srv_pre_handle | Installing a pre-event handler. |
srv_post_handle | Installing a post-event handler. |