![]() |
CAPS Universe documentation
1.0.4
All you need to know to be successful
|
A simple printing provider demo, emulating some kind of printers. More...
Macros | |
| #define | PAGES_TO_PRINT 10 |
Functions | |
| static void | simulate_printing (struct caps_pp_handle *instance, struct caps_pp_document_desc *job) |
| static int | process_job (struct caps_pp_handle *instance, struct caps_pp_document_desc *job) |
| void | sig_handler (int sig) |
| static void | shutdown_service (struct caps_pp_handle *instance) |
| static void | setup_run_time_info (struct caps_pp_handle *instance) |
| static int | base_printer_info_implant (struct caps_pp_handle *instance) |
| static int | emul_printer_cb (const struct caps_arg_parser *parser, const char *value) |
| static int | emul_crash_cb (const struct caps_arg_parser *parser, const char *value) |
| int | main (int argc, char *argv[]) |
Variables | |
| static int | emul_crash = 0 |
| static const struct caps_ppd_resolution | supported_resolutions [] |
| static const struct caps_ppd_media_margins | media_margins |
| static const struct caps_ppd_media_size | media_coverage |
| static const struct caps_ppd_base | printers [] |
| static volatile sig_atomic_t | quit = 0 |
| static int | warm_up_wait |
| unsigned | print_wait |
| static int | paper_empty |
| static int | paper_jam |
| static size_t | emul_printer = 1 |
| static const struct caps_arg_parameter | test_provider_argument [] |
| static struct caps_arg_parser | test_provider_parser [2] |
| static char * | mime_format [3] |
| static const struct caps_supported_mime_list | mime_list |
This application is mostly intended for testing purposes. Don't use it as a template for your own driver. Use the example in libcapsraster or - much better - the skeleton from the libcapsdriver instead.
| #define PAGES_TO_PRINT 10 |
|
static |
Simulate the printing of PAGES_TO_PRINT pages
| [in] | instance | Our insance handle to communicate with the printing provider |
| [in,out] | job | The job to print |
Prints PAGES_TO_PRINT pages (full duplex), with a pause of print_wait ms each
|
static |
Simulate the printing of a document
| [in] | instance | Our insance handle to communicate with the printing provider |
| [in,out] | job | The job to print |
| void sig_handler | ( | int | sig | ) |
|
static |
|
static |
|
static |
Setup some fake information to make the coordinator happy while testing
|
static |
Command line parser callback for the --printer keyword
| [in] | parser | Our own parser |
| [in] | value | The parameter's value |
|
static |
Command line parser callback for the --crash keyword
| [in] | parser | Our own parser |
| [in] | value | The parameter's value |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
|
static |
The printer should simulate a crash while printing.
This crash should test, if the printing coordinator cleans up the related resources and notifies clients.
|
static |
|
static |
|
static |
|
static |
Some emulated printers for testing purposes
|
static |
|
static |
| unsigned print_wait |
|
static |
|
static |
|
static |
The printer to emulate. Refer the printers table for details
|
static |
This test provider has one additional optional parameter.
|
static |
The application's argument parser
|
static |
The document formats we 'emulate'
|
static |
Emulated list of supported MIME formats of this provider