]> git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/conf.h
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / conf.h
1 /*
2 * "$Id: conf.h 6490 2007-04-30 18:09:30Z mike $"
3 *
4 * Configuration file definitions for the Common UNIX Printing System (CUPS)
5 * scheduler.
6 *
7 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
8 *
9 * These coded instructions, statements, and computer programs are the
10 * property of Easy Software Products and are protected by Federal
11 * copyright law. Distribution and use rights are outlined in the file
12 * "LICENSE.txt" which should have been included with this file. If this
13 * file is missing or damaged please contact Easy Software Products
14 * at:
15 *
16 * Attn: CUPS Licensing Information
17 * Easy Software Products
18 * 44141 Airport View Drive, Suite 204
19 * Hollywood, Maryland 20636 USA
20 *
21 * Voice: (301) 373-9600
22 * EMail: cups-info@cups.org
23 * WWW: http://www.cups.org
24 */
25
26
27 /*
28 * Log levels...
29 */
30
31 typedef enum
32 {
33 CUPSD_LOG_ATTR = -3, /* Used internally for attributes */
34 CUPSD_LOG_STATE, /* Used internally for state-reasons */
35 CUPSD_LOG_PAGE, /* Used internally for page logging */
36 CUPSD_LOG_NONE,
37 CUPSD_LOG_EMERG, /* Emergency issues */
38 CUPSD_LOG_ALERT, /* Something bad happened that needs attention */
39 CUPSD_LOG_CRIT, /* Critical error but server continues */
40 CUPSD_LOG_ERROR, /* Error condition */
41 CUPSD_LOG_WARN, /* Warning */
42 CUPSD_LOG_NOTICE, /* Normal condition that needs logging */
43 CUPSD_LOG_INFO, /* General information */
44 CUPSD_LOG_DEBUG, /* General debugging */
45 CUPSD_LOG_DEBUG2 /* Detailed debugging */
46 } cupsd_loglevel_t;
47
48
49 /*
50 * Printcap formats...
51 */
52
53 #define PRINTCAP_BSD 0 /* Berkeley LPD format */
54 #define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
55
56
57 /*
58 * Globals...
59 */
60
61 VAR char *ConfigurationFile VALUE(NULL),
62 /* Configuration file to use */
63 *ServerName VALUE(NULL),
64 /* FQDN for server */
65 *ServerAdmin VALUE(NULL),
66 /* Administrator's email */
67 *ServerRoot VALUE(NULL),
68 /* Root directory for scheduler */
69 *ServerBin VALUE(NULL),
70 /* Root directory for binaries */
71 *StateDir VALUE(NULL),
72 /* Root directory for state data */
73 *RequestRoot VALUE(NULL),
74 /* Directory for request files */
75 *DocumentRoot VALUE(NULL);
76 /* Root directory for documents */
77 VAR int ServerNameIsIP VALUE(0);
78 VAR int NumSystemGroups VALUE(0);
79 /* Number of system group names */
80 VAR char *SystemGroups[MAX_SYSTEM_GROUPS];
81 /* System group names */
82 VAR gid_t SystemGroupIDs[MAX_SYSTEM_GROUPS];
83 /* System group IDs */
84 VAR char *AccessLog VALUE(NULL),
85 /* Access log filename */
86 *ErrorLog VALUE(NULL),
87 /* Error log filename */
88 *PageLog VALUE(NULL),
89 /* Page log filename */
90 *CacheDir VALUE(NULL),
91 /* Cache file directory */
92 *DataDir VALUE(NULL),
93 /* Data file directory */
94 *DefaultLanguage VALUE(NULL),
95 /* Default language encoding */
96 *DefaultCharset VALUE(NULL),
97 /* Default charset */
98 *DefaultLocale VALUE(NULL),
99 /* Default locale */
100 *ErrorPolicy VALUE(NULL),
101 /* Default printer-error-policy */
102 *RIPCache VALUE(NULL),
103 /* Amount of memory for RIPs */
104 *TempDir VALUE(NULL),
105 /* Temporary directory */
106 *Printcap VALUE(NULL),
107 /* Printcap file */
108 *PrintcapGUI VALUE(NULL),
109 /* GUI program to use for IRIX */
110 *FontPath VALUE(NULL),
111 /* Font search path */
112 *RemoteRoot VALUE(NULL),
113 /* Remote root user */
114 *Classification VALUE(NULL);
115 /* Classification of system */
116 #ifdef HAVE_GSSAPI
117 VAR char *GSSServiceName VALUE(NULL);
118 /* GSS service name */
119 VAR char *Krb5Keytab VALUE(NULL);
120 /* Kerberos Keytab */
121 #endif /* HAVE_GSSAPI */
122 VAR uid_t User VALUE(1);
123 /* User ID for server */
124 VAR gid_t Group VALUE(0);
125 /* Group ID for server */
126 VAR int ClassifyOverride VALUE(0),
127 /* Allow overrides? */
128 ConfigFilePerm VALUE(0640),
129 /* Permissions for config files */
130 LogFilePerm VALUE(0644),
131 /* Permissions for log files */
132 LogLevel VALUE(CUPSD_LOG_ERROR),
133 /* Log level */
134 MaxClients VALUE(0),
135 /* Maximum number of clients */
136 MaxClientsPerHost VALUE(0),
137 /* Maximum number of clients per host */
138 MaxCopies VALUE(CUPS_DEFAULT_MAX_COPIES),
139 /* Maximum number of copies per job */
140 MaxLogSize VALUE(1024 * 1024),
141 /* Maximum size of log files */
142 MaxPrinterHistory VALUE(10),
143 /* Maximum printer state history */
144 MaxRequestSize VALUE(0),
145 /* Maximum size of IPP requests */
146 HostNameLookups VALUE(FALSE),
147 /* Do we do reverse lookups? */
148 Timeout VALUE(DEFAULT_TIMEOUT),
149 /* Timeout during requests */
150 KeepAlive VALUE(TRUE),
151 /* Support the Keep-Alive option? */
152 KeepAliveTimeout VALUE(DEFAULT_KEEPALIVE),
153 /* Timeout between requests */
154 ImplicitClasses VALUE(TRUE),
155 /* Are classes implicitly created? */
156 ImplicitAnyClasses VALUE(FALSE),
157 /* Create AnyPrinter classes? */
158 HideImplicitMembers VALUE(TRUE),
159 /* Hide implicit class members? */
160 FileDevice VALUE(FALSE),
161 /* Allow file: devices? */
162 FilterLimit VALUE(0),
163 /* Max filter cost at any time */
164 FilterLevel VALUE(0),
165 /* Current filter level */
166 FilterNice VALUE(0),
167 /* Nice value for filters */
168 ReloadTimeout VALUE(0),
169 /* Timeout before reload from SIGHUP */
170 RootCertDuration VALUE(300),
171 /* Root certificate update interval */
172 RunUser, /* User to run as, used for files */
173 PrintcapFormat VALUE(PRINTCAP_BSD),
174 /* Format of printcap file? */
175 DefaultShared VALUE(TRUE);
176 /* Share printers by default? */
177 VAR cups_file_t *AccessFile VALUE(NULL),
178 /* Access log file */
179 *ErrorFile VALUE(NULL),
180 /* Error log file */
181 *PageFile VALUE(NULL);
182 /* Page log file */
183 VAR mime_t *MimeDatabase VALUE(NULL);
184 /* MIME type database */
185 VAR int NumMimeTypes VALUE(0);
186 /* Number of MIME types */
187 VAR const char **MimeTypes VALUE(NULL);
188 /* Array of MIME types */
189
190 #ifdef HAVE_SSL
191 VAR char *ServerCertificate VALUE(NULL);
192 /* Server certificate file */
193 # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
194 VAR char *ServerKey VALUE(NULL);
195 /* Server key file */
196 # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
197 #endif /* HAVE_SSL */
198
199 #ifdef HAVE_LAUNCHD
200 VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
201 /* Time after which an idle cupsd will exit */
202 VAR char *LaunchdConf VALUE(NULL);
203 /* launchd(8) configuration file */
204 #endif /* HAVE_LAUNCHD */
205
206 #ifdef __APPLE__
207 VAR int AppleQuotas VALUE(TRUE);
208 /* Use Apple PrintService Quotas instead of CUPS quotas */
209 #endif /* __APPLE__ */
210
211 #ifdef HAVE_AUTHORIZATION_H
212 VAR char *SystemGroupAuthKey VALUE(NULL);
213 /* System group auth key */
214 #endif /* HAVE_AUTHORIZATION_H */
215
216
217 /*
218 * Prototypes...
219 */
220
221 extern int cupsdCheckPermissions(const char *filename,
222 const char *suffix, int mode,
223 int user, int group, int is_dir,
224 int create_dir);
225 extern char *cupsdGetDateTime(time_t t);
226 #ifdef HAVE_GSSAPI
227 extern int cupsdLogGSSMessage(int level, int major_status,
228 int minor_status,
229 const char *message, ...);
230 #endif /* HAVE_GSSAPI */
231 extern int cupsdLogMessage(int level, const char *message, ...)
232 #ifdef __GNUC__
233 __attribute__ ((__format__ (__printf__, 2, 3)))
234 #endif /* __GNUC__ */
235 ;
236 extern int cupsdLogPage(cupsd_job_t *job, const char *page);
237 extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
238 extern int cupsdReadConfiguration(void);
239
240
241 /*
242 * End of "$Id: conf.h 6490 2007-04-30 18:09:30Z mike $".
243 */