![]() |
CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Job related functions. More...
This is a collection of routines which deals with printing jobs. The externally available API is to hide internal implementation details of caps_pp_document_desc
|
static |
Check if the job can be used
| [in] | job | The job to validate |
|
static |
Convert a job handle into an instance handle
| [in] | job | The job handle to convert |
| The | instance handle |
|
static |
Prepare a new job structure with initialized info
| [in] | job | The job to initialize |
This prepares the content to safely call job_destroy() on it at every state.
|
static |
Clean up all job related resources, invalidate its content and frees its memory
| [in] | job | The job to clean up |
|
static |
Create a new job structure, intended to forward it to the caller
|
static |
Retrieve the printing job and its parameter
| [in,out] | job | Where to store job's data |
| 0 | On success, job is now valid |
| -ENODATA | No job available |
| -ENODEV | pr_id is invalid |
| -EPERM | No permission to this printer and its jobs |
| -EIO | Failed to connect the CAPS universe service RPC |
| -EINVAL | Bad reply from the CAPS universe service RPC |
Okay, there is a job waiting for us at the printing coordinator. Let's get the job data itself and its printing parameters.
| int notifier_job_change | ( | void * | data, |
| caps_identifier | pr_id, | ||
| caps_identifier | job_id | ||
| ) |
Called by the DBUS interface, if the job state changes at the printing coordinator
| [in] | data | Pointer to anonymous data, defined when coord_connection_create() is called |
| [in] | pr_id | Dedicated printing provider ID the job status changes |
| [in] | job_id | Job ID the status changes |
This function is called whenever the job state changes at a printing coordinator. It means it gets called even if the job isn't for this running provider. So this routine must sort out all jobs dedicated for different printing providers.
Called-back when coord_notifiers_process() is called.