]> git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/conf.h
Merge changes from CUPS trunk, r7566.
[thirdparty/cups.git] / scheduler / conf.h
1 /*
2 * "$Id: conf.h 6649 2007-07-11 21:46:42Z mike $"
3 *
4 * Configuration file definitions for the Common UNIX Printing System (CUPS)
5 * scheduler.
6 *
7 * Copyright 2007 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
41 /*
42 * Printcap formats...
43 */
44
45 #define PRINTCAP_BSD 0 /* Berkeley LPD format */
46 #define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
47
48
49 /*
50 * Globals...
51 */
52
53 VAR char *ConfigurationFile VALUE(NULL),
54 /* Configuration file to use */
55 *ServerName VALUE(NULL),
56 /* FQDN for server */
57 *ServerAdmin VALUE(NULL),
58 /* Administrator's email */
59 *ServerRoot VALUE(NULL),
60 /* Root directory for scheduler */
61 *ServerBin VALUE(NULL),
62 /* Root directory for binaries */
63 *StateDir VALUE(NULL),
64 /* Root directory for state data */
65 *RequestRoot VALUE(NULL),
66 /* Directory for request files */
67 *DocumentRoot VALUE(NULL);
68 /* Root directory for documents */
69 VAR int ServerNameIsIP VALUE(0);
70 VAR int NumSystemGroups VALUE(0);
71 /* Number of system group names */
72 VAR char *SystemGroups[MAX_SYSTEM_GROUPS]
73 VALUE({0});
74 /* System group names */
75 VAR gid_t SystemGroupIDs[MAX_SYSTEM_GROUPS]
76 VALUE({0});
77 /* System group IDs */
78 VAR char *AccessLog VALUE(NULL),
79 /* Access log filename */
80 *ErrorLog VALUE(NULL),
81 /* Error log filename */
82 *PageLog VALUE(NULL),
83 /* Page log filename */
84 *CacheDir VALUE(NULL),
85 /* Cache file directory */
86 *DataDir VALUE(NULL),
87 /* Data file directory */
88 *DefaultLanguage VALUE(NULL),
89 /* Default language encoding */
90 *DefaultCharset VALUE(NULL),
91 /* Default charset */
92 *DefaultLocale VALUE(NULL),
93 /* Default locale */
94 *ErrorPolicy VALUE(NULL),
95 /* Default printer-error-policy */
96 *RIPCache VALUE(NULL),
97 /* Amount of memory for RIPs */
98 *TempDir VALUE(NULL),
99 /* Temporary directory */
100 *Printcap VALUE(NULL),
101 /* Printcap file */
102 *PrintcapGUI VALUE(NULL),
103 /* GUI program to use for IRIX */
104 *FontPath VALUE(NULL),
105 /* Font search path */
106 *RemoteRoot VALUE(NULL),
107 /* Remote root user */
108 *Classification VALUE(NULL);
109 /* Classification of system */
110 #ifdef HAVE_GSSAPI
111 VAR char *GSSServiceName VALUE(NULL);
112 /* GSS service name */
113 VAR char *Krb5Keytab VALUE(NULL);
114 /* Kerberos Keytab */
115 #endif /* HAVE_GSSAPI */
116 VAR uid_t User VALUE(1);
117 /* User ID for server */
118 VAR gid_t Group VALUE(0);
119 /* Group ID for server */
120 VAR int ClassifyOverride VALUE(0),
121 /* Allow overrides? */
122 ConfigFilePerm VALUE(0640),
123 /* Permissions for config files */
124 LogFilePerm VALUE(0644),
125 /* Permissions for log files */
126 LogLevel VALUE(CUPSD_LOG_ERROR),
127 /* Log level */
128 MaxClients VALUE(0),
129 /* Maximum number of clients */
130 MaxClientsPerHost VALUE(0),
131 /* Maximum number of clients per host */
132 MaxCopies VALUE(CUPS_DEFAULT_MAX_COPIES),
133 /* Maximum number of copies per job */
134 MaxLogSize VALUE(1024 * 1024),
135 /* Maximum size of log files */
136 MaxPrinterHistory VALUE(10),
137 /* Maximum printer state history */
138 MaxRequestSize VALUE(0),
139 /* Maximum size of IPP requests */
140 HostNameLookups VALUE(FALSE),
141 /* Do we do reverse lookups? */
142 Timeout VALUE(DEFAULT_TIMEOUT),
143 /* Timeout during requests */
144 KeepAlive VALUE(TRUE),
145 /* Support the Keep-Alive option? */
146 KeepAliveTimeout VALUE(DEFAULT_KEEPALIVE),
147 /* Timeout between requests */
148 ImplicitClasses VALUE(TRUE),
149 /* Are classes implicitly created? */
150 ImplicitAnyClasses VALUE(FALSE),
151 /* Create AnyPrinter classes? */
152 HideImplicitMembers VALUE(TRUE),
153 /* Hide implicit class members? */
154 FileDevice VALUE(FALSE),
155 /* Allow file: devices? */
156 FilterLimit VALUE(0),
157 /* Max filter cost at any time */
158 FilterLevel VALUE(0),
159 /* Current filter level */
160 FilterNice VALUE(0),
161 /* Nice value for filters */
162 ReloadTimeout VALUE(0),
163 /* Timeout before reload from SIGHUP */
164 RootCertDuration VALUE(300),
165 /* Root certificate update interval */
166 RunUser VALUE(0),
167 /* User to run as, used for files */
168 PrintcapFormat VALUE(PRINTCAP_BSD),
169 /* Format of printcap file? */
170 DefaultShared VALUE(TRUE);
171 /* Share printers by default? */
172 VAR cups_file_t *AccessFile VALUE(NULL),
173 /* Access log file */
174 *ErrorFile VALUE(NULL),
175 /* Error log file */
176 *PageFile VALUE(NULL);
177 /* Page log file */
178 VAR mime_t *MimeDatabase VALUE(NULL);
179 /* MIME type database */
180 VAR int NumMimeTypes VALUE(0);
181 /* Number of MIME types */
182 VAR const char **MimeTypes VALUE(NULL);
183 /* Array of MIME types */
184
185 #ifdef HAVE_SSL
186 VAR char *ServerCertificate VALUE(NULL);
187 /* Server certificate file */
188 # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
189 VAR char *ServerKey VALUE(NULL);
190 /* Server key file */
191 # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
192 #endif /* HAVE_SSL */
193
194 #ifdef HAVE_LAUNCHD
195 VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
196 /* Time after which an idle cupsd will exit */
197 VAR char *LaunchdConf VALUE(NULL);
198 /* launchd(8) configuration file */
199 #endif /* HAVE_LAUNCHD */
200
201 #ifdef __APPLE__
202 VAR int AppleQuotas VALUE(TRUE);
203 /* Use Apple PrintService Quotas instead of CUPS quotas */
204 #endif /* __APPLE__ */
205
206 #ifdef HAVE_AUTHORIZATION_H
207 VAR char *SystemGroupAuthKey VALUE(NULL);
208 /* System group auth key */
209 #endif /* HAVE_AUTHORIZATION_H */
210
211
212 /*
213 * Prototypes...
214 */
215
216 extern int cupsdCheckPermissions(const char *filename,
217 const char *suffix, int mode,
218 int user, int group, int is_dir,
219 int create_dir);
220 extern char *cupsdGetDateTime(time_t t);
221 #ifdef HAVE_GSSAPI
222 extern int cupsdLogGSSMessage(int level, int major_status,
223 int minor_status,
224 const char *message, ...);
225 #endif /* HAVE_GSSAPI */
226 extern int cupsdLogMessage(int level, const char *message, ...)
227 #ifdef __GNUC__
228 __attribute__ ((__format__ (__printf__, 2, 3)))
229 #endif /* __GNUC__ */
230 ;
231 extern int cupsdLogPage(cupsd_job_t *job, const char *page);
232 extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
233 extern int cupsdReadConfiguration(void);
234
235
236 /*
237 * End of "$Id: conf.h 6649 2007-07-11 21:46:42Z mike $".
238 */