This callback is called once per job (even if printing has failed somehow).
Called when the job is "done" somehow, e.g.:
- if the last page was printed
- if print fails
- due to an external event (printer is gone for example)
- due to one of your callback functions returned an error condition (like -ENODEV for example)
- termination request recieved
- if the job has to be canceled
Printing can fail due to your own return values in Callback job_start(), or Callback page_setup(), Callback page_print() or Callback printer_monitor() or by failures detected somewhere else in the framework.
- parameter you get
- framework handle
- your private data hint
- you can expect as already done
- everything might working as expected, e.g. communication with the printing coordinator and the printer device
- take care when communicating with the printer. It is possible, it is already gone! You can call caps_drv_is_offline() to check, if it is alreay gone.
- what you can do
- everything to clean up from processing (freeing memory for example) and printing (inform the printer device the printing is done for example if possible).
- what you must do
- terminate printing (if not already done)
- everything else depends on your requirements
- values you should return
0
everything is okay, the framework can continue
-ENODEV
if something is really bad with your printer and the framework should terminate.