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