Programming Guide |
Install a C Web event hook function
int sm_web_set_onevent(char *handler);
handler
- The name of the Web event handler. If
handler
is the null pointer or the null string, the Web event handler is uninstalled. Otherwise, it must be the name of a C function installed in the prototyped function list.
- 0 The Web event hook function was installed or uninstalled.
- -1
handler
is not in the list of installed prototyped C functions.
handler is called after processing has completed for each request. The prototype of this function is:
void
handler(char
*command, char
*path_info, char
*arg,
int
elapsed_time);
This function is passed the following parameters:
command
- A string containing the web command that was processed. It will be either
"GET"
or"POST"
.path_info
- This is the value of
PATH_INFO
in the CGI request.arg
- The query string for GET and the form name for POST.
elapsed_time
- This is the elapsed time for the
Web
command in milliseconds.