![]() |
CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Report printing provider's state. More...
Functions | |
| int | caps_pp_state_update (struct caps_pp_handle *instance, enum caps_printing_provider_state state, enum caps_printing_provider_reason reason, const char *message) |
Talk to the printing coordinator to inform it about the state of a printing device or the printing provider/driver itself
If you have retrieved a new job and "starting the engines":
If you start to process the print job:
If you have finished the last print job:
If you miss media to print on:
If your devices detects some media jam:
Sometimes the attention of the user is required. The printing provider still works as expected, but announces the need for attention with the LIBCAPS_PP_REASON_ATTENTION reason. Since this reason requires an explaining message, for a user attention both is required.
Example: the printer device is low on ink/toner
This attention can be combined with all other activity unless the reason is used otherwise.
Example: the printer device is out of ink/toner and cannot continue
| int caps_pp_state_update | ( | struct caps_pp_handle * | instance, |
| enum caps_printing_provider_state | state, | ||
| enum caps_printing_provider_reason | reason, | ||
| const char * | message | ||
| ) |
Update the printing provider's/driver's state to inform clients
| [in] | instance | Provider instance |
| [in] | state | The printer's new state |
| [in] | reason | The new reason for this state |
| [in] | message | An optional message (can be NULL, read precondition below) |
| 0 | on success |
| -ENODEV | Printer is already gone (should not happen, maybe related to -EPERM) |
| -EPERM | Calling provider isn't the owner of this printer or print job |
This call is a simple 'report' type. It is for information only (e.g. printer is idle for example). Refer Printer State Definitions for state details.
message should be in plain english, but you should mark it as a translateable string if it is very special. This function tries to translate this message into the local language first by using the printing provider's NLS domain and then by it's own NLS domain (if it is a common sentence shared by all printing providers for example).Refer Common Printer State Messages already translated messages.
state must be valid reason is LIBCAPS_PP_REASON_ATTENTION a detailed message must provided The communication with the printing coordinator:
The full call stack: