![]() |
CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Declaration of the callbacks. More...
Data Fields | |
| int(* | idx_process )(void *anonymous_data, unsigned index_no) |
| int(* | idx_is_ready )(void *anonymous_data, unsigned index_no) |
| int(* | idx_send )(void *anonymous_data, unsigned index_no) |
Your idx_process() is called to process something with index index_no. For each index it is called only once.
Your idx_is_ready() is called to check if processing of index_no is finished.
Your idx_send() is called to send the processing result of index_no to the printer. It is called only if your idx_is_ready() has reported back a true for this index.
| int(* idx_process) (void *anonymous_data, unsigned index_no) |
Process the index index_no and return:
0 on success, e.g. processing was successful and should be continued-EINVAL if index_no is invalid. In this case everything gets stopped, because this seems an internal programming error-ENODATA if the data index_no points to cannot be processed, but processing further indices should still be done-ECANCELED if processing should be stopped right now (something like "panic") | int(* idx_is_ready) (void *anonymous_data, unsigned index_no) |
Check, if the index index_no is finished and return:
0 (e.g. false) if index_no isn't finished, yet1 (e.g. true) if index_no is finished | int(* idx_send) (void *anonymous_data, unsigned index_no) |
Send the index index_no to the printer and return:
0 on success, e.g. sending was successful and processing should be continued-EINVAL if index_no is bad. In this case everything gets stopped, because this seems an internal programming error-ENODATA if the data index_no points to cannot be sent, but processing should continue-ECANCELED if everything should be stopped right now (something like "panic")