Skip to content

Commit

Permalink
Initial work on job processing improvement (Issue #266)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Mar 11, 2023
1 parent f595807 commit 16b4a5a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pappl/job-accessors.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ static const char * const pappl_jreasons[] =
"processing-to-stop-point",
"queued-in-device",
"warnings-detected",
"job-hold-until-specified"
"job-hold-until-specified",
"job-canceled-after-timeout",
"job-fetchable",
"job-suspended-for-approval"
};


Expand Down
28 changes: 28 additions & 0 deletions pappl/job-process.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,34 @@ _papplJobProcessRaster(
}


//
// 'pappJobStart()' - Resume processing of a job.
//

void
pappJobStart(pappl_job_t *job, // I - Job
pappl_jreason_t remove) // I - Reasons to remove from "job-state-reasons"
{
// TODO: Implement papplJobStart
(void)job;
(void)remove;
}


//
// 'pappJobStop()' - Temporarily stop processing of a job.
//

void
pappJobStop(pappl_job_t *job, // I - Job
pappl_jreason_t add) // I - Reasons to add to "job-state-reasons"
{
// TODO: Implement papplJobStop
(void)job;
(void)add;
}


//
// 'cups_cspace_string()' - Get a string corresponding to a cupsColorSpace enum value.
//
Expand Down
8 changes: 7 additions & 1 deletion pappl/job.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ enum pappl_jreason_e // IPP "job-state-reasons" bit values
PAPPL_JREASON_PROCESSING_TO_STOP_POINT = 0x00080000, // 'processing-to-stop-point'
PAPPL_JREASON_QUEUED_IN_DEVICE = 0x00100000, // 'queued-in-device'
PAPPL_JREASON_WARNINGS_DETECTED = 0x00200000, // 'warnings-detected'
PAPPL_JREASON_JOB_HOLD_UNTIL_SPECIFIED = 0x00400000 // 'job-hold-until-specified'
PAPPL_JREASON_JOB_HOLD_UNTIL_SPECIFIED = 0x00400000, // 'job-hold-until-specified'
PAPPL_JREASON_JOB_CANCELED_AFTER_TIMEOUT = 0x00800000,// 'job-canceled-after-timeout'
PAPPL_JREASON_JOB_FETCHABLE = 0x01000000, // 'job-fetchable'
PAPPL_JREASON_JOB_SUSPENDED_FOR_APPROVAL = 0x02000000 // 'job-suspended-for-approval'

};
typedef unsigned int pappl_jreason_t; // Bitfield for IPP "job-state-reasons" values

Expand Down Expand Up @@ -92,6 +96,8 @@ extern void papplJobSetImpressions(pappl_job_t *job, int impressions) _PAPPL_PU
extern void papplJobSetImpressionsCompleted(pappl_job_t *job, int add) _PAPPL_PUBLIC;
extern void papplJobSetMessage(pappl_job_t *job, const char *message, ...) _PAPPL_PUBLIC _PAPPL_FORMAT(2,3);
extern void papplJobSetReasons(pappl_job_t *job, pappl_jreason_t add, pappl_jreason_t remove) _PAPPL_PUBLIC;
extern void pappJobStart(pappl_job_t *job, pappl_jreason_t remove) _PAPPL_PUBLIC;
extern void pappJobStop(pappl_job_t *job, pappl_jreason_t add) _PAPPL_PUBLIC;


# ifdef __cplusplus
Expand Down

0 comments on commit 16b4a5a

Please sign in to comment.