]>
git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/job.h
2 * "$Id: job.h 5970 2006-09-19 20:11:08Z mike $"
4 * Print job definitions for the Common UNIX Printing System (CUPS) scheduler.
6 * Copyright 1997-2006 by Easy Software Products, all rights reserved.
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
26 * Job request structure...
29 typedef struct cupsd_job_s
32 priority
; /* Job priority */
33 ipp_jstate_t state_value
; /* Cached job-state */
34 char *username
; /* Printing user */
35 char *dest
; /* Destination printer or class */
36 cups_ptype_t dtype
; /* Destination type (class/remote bits) */
37 int num_files
; /* Number of files in job */
38 mime_type_t
**filetypes
; /* File types */
39 int *compressions
; /* Compression status of each file */
40 time_t access_time
; /* Last access time */
41 ipp_attribute_t
*sheets
; /* job-media-sheets-completed */
42 time_t hold_until
; /* Hold expiration date/time */
43 ipp_attribute_t
*state
; /* Job state */
44 ipp_attribute_t
*job_sheets
; /* Job sheets (NULL if none) */
45 int current_file
; /* Current file in job */
46 ipp_t
*attrs
; /* Job attributes */
47 int print_pipes
[2], /* Print data pipes */
48 back_pipes
[2], /* Backchannel pipes */
49 status_pipes
[2];/* Status pipes */
50 cupsd_statbuf_t
*status_buffer
; /* Status buffer for this job */
51 int cost
; /* Filtering cost */
52 int filters
[MAX_FILTERS
+ 1];
53 /* Filter process IDs, 0 terminated */
54 int backend
; /* Backend process ID */
55 int status
; /* Status code from filters */
56 cupsd_printer_t
*printer
; /* Printer this job is assigned to */
57 int tries
; /* Number of tries for this job */
65 VAR
int JobHistory
VALUE(1);
66 /* Preserve job history? */
67 VAR
int JobFiles
VALUE(0);
68 /* Preserve job files? */
69 VAR
int MaxJobs
VALUE(0),
70 /* Max number of jobs */
71 MaxActiveJobs
VALUE(0),
72 /* Max number of active jobs */
73 MaxJobsPerUser
VALUE(0),
74 /* Max jobs per user */
75 MaxJobsPerPrinter
VALUE(0);
76 /* Max jobs per printer */
77 VAR
int JobAutoPurge
VALUE(0);
78 /* Automatically purge jobs */
79 VAR cups_array_t
*Jobs
VALUE(NULL
),
80 /* List of current jobs */
81 *ActiveJobs
VALUE(NULL
);
82 /* List of active jobs */
83 VAR
int NextJobId
VALUE(1);
84 /* Next job ID to use */
85 VAR
int JobRetryLimit
VALUE(5),
86 /* Max number of tries */
87 JobRetryInterval
VALUE(300);
88 /* Seconds between retries */
95 extern cupsd_job_t
*cupsdAddJob(int priority
, const char *dest
);
96 extern void cupsdCancelJob(cupsd_job_t
*job
, int purge
,
97 ipp_jstate_t newstate
);
98 extern void cupsdCancelJobs(const char *dest
, const char *username
,
100 extern void cupsdCheckJobs(void);
101 extern void cupsdCleanJobs(void);
102 extern void cupsdDeleteJob(cupsd_job_t
*job
);
103 extern cupsd_job_t
*cupsdFindJob(int id
);
104 extern void cupsdFinishJob(cupsd_job_t
*job
);
105 extern void cupsdUnloadCompletedJobs(void);
106 extern void cupsdFreeAllJobs(void);
107 extern int cupsdGetPrinterJobCount(const char *dest
);
108 extern int cupsdGetUserJobCount(const char *username
);
109 extern void cupsdHoldJob(cupsd_job_t
*job
);
110 extern void cupsdLoadAllJobs(void);
111 extern void cupsdLoadJob(cupsd_job_t
*job
);
112 extern void cupsdMoveJob(cupsd_job_t
*job
, cupsd_printer_t
*p
);
113 extern void cupsdReleaseJob(cupsd_job_t
*job
);
114 extern void cupsdRestartJob(cupsd_job_t
*job
);
115 extern void cupsdSaveAllJobs(void);
116 extern void cupsdSaveJob(cupsd_job_t
*job
);
117 extern void cupsdSetJobHoldUntil(cupsd_job_t
*job
, const char *when
);
118 extern void cupsdSetJobPriority(cupsd_job_t
*job
, int priority
);
119 extern void cupsdStopAllJobs(int force
);
120 extern void cupsdStopJob(cupsd_job_t
*job
, int force
);
121 extern void cupsdUpdateJob(cupsd_job_t
*job
);
125 * End of "$Id: job.h 5970 2006-09-19 20:11:08Z mike $".