]> jfr.im git - irc/blitzed-org/libopm.git/commitdiff
Added note about the void * argument to the callback functions in the API documentation
authorstrtok <redacted>
Tue, 5 Nov 2002 23:03:55 +0000 (23:03 +0000)
committerstrtok <redacted>
Tue, 5 Nov 2002 23:03:55 +0000 (23:03 +0000)
doc/libopm-api.txt
src/test.c

index 912e901afcd47f065281eba7a46fc091a86e88cf..f185a9b1684da467ced49299991d4a01cad4d388 100644 (file)
@@ -241,11 +241,12 @@ OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *)
 
 
 
-OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_T)
+OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_T, void *)
 
    Parameters: OPM_T: Scanner to set callbacks on
                int: Callback type
                OPM_CALLBACK_T: Pointer to custom callback function
+               void *: Pointer to be passed back, this is generally NULL
 
    Return: OPM_ERR_T or OPM_SUCCESS on success
 
@@ -286,6 +287,7 @@ OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_T)
 
 
 
+
 void opm_cycle(OPM_T *)
 
    Parameters: OPM_T: Scanner to cycle
index 92f16d4e5320a738c9dca0d250f0be9518e772ec..b5b4bf44b7af9c570cacbd6f93a3cfdc843fe934 100644 (file)
@@ -60,11 +60,11 @@ int main(int argc, char **argv)
       remote  = opm_remote_create("127.0.0.1");
 
    /* Setup callbacks */
-   opm_callback(scanner, OPM_CALLBACK_OPENPROXY, &open_proxy, 0);
-   opm_callback(scanner, OPM_CALLBACK_NEGFAIL, &negotiation_failed, 0);
-   opm_callback(scanner, OPM_CALLBACK_TIMEOUT, &timeout, 0);
-   opm_callback(scanner, OPM_CALLBACK_END, &end, 0);
-   opm_callback(scanner, OPM_CALLBACK_ERROR, &handle_error, 0);
+   opm_callback(scanner, OPM_CALLBACK_OPENPROXY, &open_proxy, NULL);
+   opm_callback(scanner, OPM_CALLBACK_NEGFAIL, &negotiation_failed, NULL);
+   opm_callback(scanner, OPM_CALLBACK_TIMEOUT, &timeout, NULL);
+   opm_callback(scanner, OPM_CALLBACK_END, &end, NULL);
+   opm_callback(scanner, OPM_CALLBACK_ERROR, &handle_error, NULL);
 
 
    /* Setup the scanner configuration */