CAPS Universe documentation  1.0.4
All you need to know to be successful
Data Structures | Enumerations

Definitions related dealing with print jobs. More...

Data Structures

struct  caps_job_progression
 Information collection for printing progression report. More...
 

Enumerations

enum  caps_printing_job_state {
  LIBCAPS_PJ_STATE_UNKNOWN = 0 ,
  LIBCAPS_PJ_STATE_RECEIVING ,
  LIBCAPS_PJ_STATE_QUEUED ,
  LIBCAPS_PJ_STATE_PREPARED ,
  LIBCAPS_PJ_STATE_PROCESSING ,
  LIBCAPS_PJ_STATE_PROCESSING_STOPPED ,
  LIBCAPS_PJ_STATE_CANCELED = 7 ,
  LIBCAPS_PJ_STATE_ABORTED = 8 ,
  LIBCAPS_PJ_STATE_COMPLETED = 9
}
 The processing states a job can be in. More...
 
enum  caps_printing_job_reason {
  LIBCAPS_PJ_REASON_NONE = 0 ,
  LIBCAPS_PJ_REASON_DATA_FORMAT ,
  LIBCAPS_PJ_REASON_DATA_CONTENT ,
  LIBCAPS_PJ_REASON_CANCELED_BY_DRIVER ,
  LIBCAPS_PJ_REASON_CANCELED_BY_USER ,
  LIBCAPS_PJ_REASON_CANCELED_BY_SYSTEM ,
  LIBCAPS_PJ_REASON_COMPLETED_SUCCESSFULLY
}
 The more detailed state description a printing job can be in. More...
 

Detailed Description

Each job has a state and maybe a reason why it is in this state. And maybe a descriptive message (refer caps_cl_job_state).

The states itself do mean:

When a client calls caps_cl_job_commit():

When the Printing Coordinator has accepted the print job:

When a printing provider has retrieved the print job via caps_pp_job_get(), works on it and - finally - finishes it somehow:

The LIBCAPS_PJ_STATE_PROCESSING_STOPPED state means, there is currently no progression in print job processing. This is the result of a temporarily problem like out of media for example. Processing can continue if the problem is solved. In this case it makes sense to retrieve the printer's state as well, to get an idea about the root cause.

The LIBCAPS_PJ_STATE_COMPLETED state means everything was fine and as expected and the print job was finished without any problems.

The LIBCAPS_PJ_STATE_CANCELED state means the client (or the system) has canceled the print job. No further processing happens.
Who has canceled the processing can be retrieved via the caps_printing_job_reason, which is LIBCAPS_PJ_REASON_CANCELED_BY_USER or LIBCAPS_PJ_REASON_CANCELED_BY_SYSTEM in this case.

The LIBCAPS_PJ_STATE_ABORTED state means the print job was aborted due to an unrecoverable failure when processing. No further processing happens.
Possible causes could be:

Enumeration Type Documentation

◆ caps_printing_job_state

Refer Print Job State Definitions for details.

Enumerator
LIBCAPS_PJ_STATE_UNKNOWN 

means not set yet

LIBCAPS_PJ_STATE_RECEIVING 

Job ID committed, job data is now to be received

LIBCAPS_PJ_STATE_QUEUED 

The printing data is complete and the job committed to the printing provider's queue

LIBCAPS_PJ_STATE_PREPARED 

The printing provider has retrieved the job ID, awaiting retrieving the printing job itself

LIBCAPS_PJ_STATE_PROCESSING 

The printing provider is processing the print job

LIBCAPS_PJ_STATE_PROCESSING_STOPPED 

The printing provider has stopped the print job processing

LIBCAPS_PJ_STATE_CANCELED 

The print job has been canceled

LIBCAPS_PJ_STATE_ABORTED 

The print job has been aborted

LIBCAPS_PJ_STATE_COMPLETED 

The print job is completed

◆ caps_printing_job_reason

Enumerator
LIBCAPS_PJ_REASON_NONE 

nothing special

LIBCAPS_PJ_REASON_DATA_FORMAT 

Document has unsupported MIME type

LIBCAPS_PJ_REASON_DATA_CONTENT 

Document has invalid content for its MIME type

LIBCAPS_PJ_REASON_CANCELED_BY_DRIVER 

Printer driver has some trouble printing the document

LIBCAPS_PJ_REASON_CANCELED_BY_USER 

job was canceled by the user

LIBCAPS_PJ_REASON_CANCELED_BY_SYSTEM 

job was canceled by the system

LIBCAPS_PJ_REASON_COMPLETED_SUCCESSFULLY 

job was successfully completed (and will now disappear from the list)