]>
git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/job.h
2 * "$Id: job.h,v 1.37 2004/08/23 18:00:59 mike Exp $"
4 * Print job definitions for the Common UNIX Printing System (CUPS) scheduler.
6 * Copyright 1997-2004 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
29 #define JOB_BUFFER_SIZE 1024 /* Bytes for job status buffer */
33 * Job request structure...
36 typedef struct job_str
38 struct job_str
*next
; /* Next job in queue */
40 priority
; /* Job priority */
41 ipp_attribute_t
*state
; /* Job state */
42 ipp_attribute_t
*sheets
; /* job-media-sheets-completed */
43 time_t hold_until
; /* Hold expiration date/time */
44 char *username
; /* Printing user */
45 char *dest
; /* Destination printer or class */
46 cups_ptype_t dtype
; /* Destination type (class/remote bits) */
47 ipp_attribute_t
*job_sheets
; /* Job sheets (NULL if none) */
48 int num_files
; /* Number of files in job */
49 int current_file
; /* Current file in job */
50 mime_type_t
**filetypes
; /* File types */
51 int *compressions
; /* Compression status of each file */
52 ipp_t
*attrs
; /* Job attributes */
53 int pipe
; /* Status pipe for this job */
54 int cost
; /* Filtering cost */
55 int procs
[MAX_FILTERS
+ 2]; /* Process IDs, 0 terminated */
56 int status
; /* Status code from filters */
57 printer_t
*printer
; /* Printer this job is assigned to */
58 char *buffer
; /* Status buffer */
59 int bufused
; /* Amount of buffer in use */
60 int tries
; /* Number of tries for this job */
68 VAR
int JobHistory
VALUE(1); /* Preserve job history? */
69 VAR
int JobFiles
VALUE(0); /* Preserve job files? */
70 VAR
int MaxJobs
VALUE(0), /* Max number of jobs */
71 MaxJobsPerUser
VALUE(0), /* Max jobs per user */
72 MaxJobsPerPrinter
VALUE(0); /* Max jobs per printer */
73 VAR
int JobAutoPurge
VALUE(0); /* Automatically purge jobs */
74 VAR
int NumJobs
VALUE(0); /* Number of jobs in queue */
75 VAR job_t
*Jobs
VALUE(NULL
); /* List of current jobs */
76 VAR
int NextJobId
VALUE(1); /* Next job ID to use */
77 VAR
int FaxRetryLimit
VALUE(5), /* Max number of tries */
78 FaxRetryInterval
VALUE(300); /* Seconds between retries */
85 extern job_t
*AddJob(int priority
, const char *dest
);
86 extern void CancelJob(int id
, int purge
);
87 extern void CancelJobs(const char *dest
, const char *username
, int purge
);
88 extern void CheckJobs(void);
89 extern void CleanJobs(void);
90 extern void DeleteJob(int id
);
91 extern job_t
*FindJob(int id
);
92 extern void FreeAllJobs(void);
93 extern int GetPrinterJobCount(const char *dest
);
94 extern int GetUserJobCount(const char *username
);
95 extern void HoldJob(int id
);
96 extern void LoadAllJobs(void);
97 extern void MoveJob(int id
, const char *dest
);
98 extern void ReleaseJob(int id
);
99 extern void RestartJob(int id
);
100 extern void SaveJob(int id
);
101 extern void SetJobHoldUntil(int id
, const char *when
);
102 extern void SetJobPriority(int id
, int priority
);
103 extern void StartJob(int id
, printer_t
*printer
);
104 extern void StopAllJobs(void);
105 extern void StopJob(int id
, int force
);
106 extern void UpdateJob(job_t
*job
);
110 * End of "$Id: job.h,v 1.37 2004/08/23 18:00:59 mike Exp $".