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