![]() |
CAPS Universe documentation
1.0.4
All you need to know to be successful
|
A command line tool to print documents. More...
Data Structures | |
| struct | doprint_info |
| Collection of data to make capsdoprint work. More... | |
Functions | |
| void | sig_handler (int sig) |
| static int | job_changed_notifier (void *data, caps_identifier pr_id, caps_identifier job_id, struct caps_cl_job_state *jstate, struct caps_job_progression *jprog) |
| static void | job_state_print (const struct caps_cl_job_state *job_state) |
| static void | job_progression_print (const struct caps_job_progression *job_prog) |
| static int | job_keep_track (struct doprint_info *info) |
| static int | get_first_available_printer (struct caps_cl_handle *instance, caps_identifier *id) |
| static int | print_document_file (struct doprint_info *info, const char *printer_device, const char *params, int report, const char *doc) |
| static int | print_document_stream (struct doprint_info *info, const char *printer_device, const char *params, int report, int fd) |
| static void | handle_nls (void) |
| static void | print_help (FILE *out) |
| int | main (int argc, char *argv[]) |
Variables | |
| static volatile sig_atomic_t | quit = 0 |
| static const char * | capsdoprint_states [] |
| static const struct caps_cl_notifier | notifiers |
| static struct option | long_options [] |
| void sig_handler | ( | int | sig | ) |
|
static |
Called when a job changes its state or progression info at the printing coordinator
| [in] | data | Our private data |
| [in] | pr_id | For this printer a job's state has changed somehow |
| [in] | job_id | This job's state has changed somehow |
| [in] | jstate | The job's new state (if not NULL) |
| [in] | jprog | The job's progression info (if not NULL) |
Is called when the process is in a caps_cl_notifiers_process() call.
|
static |
|
static |
|
static |
Keep track of the printing process
| [in] | info | Our local info collection |
| EXIT_SUCCESS | Job finished |
| EXIT_FAILURE | Job finished, but failed somehow |
This routine waits for job change notifications. Job change notifications are sent out:
|
static |
Retrieve ID of first available printer
| [in] | instance | The library instance handle |
| [in] | id | Pointer where to store the printer's ID |
| 0 | On success (*id is valid), |
| -ENODEV | No printer found |
| negative | Failed to retrieve the printer list from the coordinator |
|
static |
Print document from file
| [in] | info | Our local info collection |
| [in] | printer_device | Name of printing device (can be NULL if only one is known in the system) |
| [in] | params | Printing parameters (IPP style, space separated list of key/value pairs, can be NULL) |
| [in] | report | '1' if the printing progress should be reported |
| [in] | doc | The name of the document file to print |
| EXIT_SUCCESS | On success |
| EXIT_FAILURE | Else |
|
static |
Print document from a file descriptor
| [in] | info | Our local info collection |
| [in] | printer_device | Name of printing device (can be NULL if only one is known in the system) |
| [in] | params | Printing parameters (IPP style, space separated list of key/value pairs, can be NULL) |
| [in] | report | '1' if the printing progress should be reported |
| [in] | fd | The document's file descriptor |
| EXIT_SUCCESS | On success |
| EXIT_FAILURE | Else |
|
static |
|
static |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
|
static |
|
static |
Human translation of the binary job states
|
static |
|
static |
This parser uses a free argument: the file name. This isn't currently supported by the capscmdparser. Thus, we stay with getopt_long() for now.