-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
+
void opm_cycle(OPM_T *)
Parameters: OPM_T: Scanner to cycle
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 */