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