Function to loop over all pages of a document.
More...
- Copyright
- GNU General Public License 2 or later
- Author
- Jürgen Borleis
- Warning
- Use as experimental
◆ caps_drv_all_pages_done()
static bool caps_drv_all_pages_done |
( |
struct caps_drv * |
cdrv | ) |
|
|
static |
Check if the whole document is done
- Parameters
-
[in,out] | cdrv | All required information about the current print job |
- Return values
-
true | All pages are printed, job is done |
false | Still pages to be printed |
When quit signals a SIGTERM event, it returns true as well.
◆ caps_drv_printer_state_loop()
static int caps_drv_printer_state_loop |
( |
struct caps_drv * |
cdrv | ) |
|
|
static |
Handle printer states while printing
- Parameters
-
[in,out] | cdrv | All required information about the current print job |
- Return values
-
0 | Continue printing |
-ENODEV | Printer device is gone, terminate |
-EINVAL | FIXME |
As long as we need to wait for a busy printer (due to an failure like out of paper), we mark the job as stopped as well.
◆ caps_drv_page_loop()
int caps_drv_page_loop |
( |
struct caps_drv * |
cdrv | ) |
|
Loop over all pages to be print of the current document, deal with the printer and possible errors
- Parameters
-
[in,out] | cdrv | All required information about the current print job |
- Return values
-
- Note
- job_data can be NULL for the special usecase of an injected job
-
We set the job's final state here to "aborted" if we receive a termination signal. Other routines do not need to do so.