]> git.ipfire.org Git - thirdparty/cups.git/blame - scheduler/conf.h
Merge changes from CUPS trunk, r7566.
[thirdparty/cups.git] / scheduler / conf.h
CommitLineData
ef416fc2 1/*
bc44d920 2 * "$Id: conf.h 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 3 *
4 * Configuration file definitions for the Common UNIX Printing System (CUPS)
5 * scheduler.
6 *
bc44d920 7 * Copyright 2007 by Apple Inc.
7594b224 8 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
ef416fc2 9 *
10 * These coded instructions, statements, and computer programs are the
bc44d920 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/".
ef416fc2 15 */
16
17
18/*
19 * Log levels...
20 */
21
22typedef enum
23{
c9fc04c6
MS
24 CUPSD_LOG_PPD = -4, /* Used internally for PPD keywords */
25 CUPSD_LOG_ATTR, /* Used internally for attributes */
f7deaa1a 26 CUPSD_LOG_STATE, /* Used internally for state-reasons */
27 CUPSD_LOG_PAGE, /* Used internally for page logging */
ef416fc2 28 CUPSD_LOG_NONE,
f7deaa1a 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 */
ef416fc2 38} cupsd_loglevel_t;
39
40
41/*
42 * Printcap formats...
43 */
44
f7deaa1a 45#define PRINTCAP_BSD 0 /* Berkeley LPD format */
46#define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
ef416fc2 47
48
49/*
50 * Globals...
51 */
52
53VAR 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 */
8ca02f3c 69VAR int ServerNameIsIP VALUE(0);
ef416fc2 70VAR int NumSystemGroups VALUE(0);
71 /* Number of system group names */
ac884b6a
MS
72VAR char *SystemGroups[MAX_SYSTEM_GROUPS]
73 VALUE({0});
ef416fc2 74 /* System group names */
ac884b6a
MS
75VAR gid_t SystemGroupIDs[MAX_SYSTEM_GROUPS]
76 VALUE({0});
ef416fc2 77 /* System group IDs */
78VAR 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 */
323c5de1 94 *ErrorPolicy VALUE(NULL),
95 /* Default printer-error-policy */
ef416fc2 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 */
f7deaa1a 110#ifdef HAVE_GSSAPI
111VAR char *GSSServiceName VALUE(NULL);
112 /* GSS service name */
113VAR char *Krb5Keytab VALUE(NULL);
114 /* Kerberos Keytab */
115#endif /* HAVE_GSSAPI */
ef416fc2 116VAR uid_t User VALUE(1);
117 /* User ID for server */
118VAR gid_t Group VALUE(0);
119 /* Group ID for server */
120VAR 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 */
f7deaa1a 132 MaxCopies VALUE(CUPS_DEFAULT_MAX_COPIES),
ef416fc2 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 */
ac884b6a
MS
166 RunUser VALUE(0),
167 /* User to run as, used for files */
fa73b229 168 PrintcapFormat VALUE(PRINTCAP_BSD),
ef416fc2 169 /* Format of printcap file? */
fa73b229 170 DefaultShared VALUE(TRUE);
171 /* Share printers by default? */
ef416fc2 172VAR 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 */
178VAR mime_t *MimeDatabase VALUE(NULL);
179 /* MIME type database */
180VAR int NumMimeTypes VALUE(0);
181 /* Number of MIME types */
182VAR const char **MimeTypes VALUE(NULL);
183 /* Array of MIME types */
184
185#ifdef HAVE_SSL
186VAR char *ServerCertificate VALUE(NULL);
187 /* Server certificate file */
188# if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
189VAR char *ServerKey VALUE(NULL);
190 /* Server key file */
ef416fc2 191# endif /* HAVE_LIBSSL || HAVE_GNUTLS */
192#endif /* HAVE_SSL */
193
a4d04587 194#ifdef HAVE_LAUNCHD
195VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
196 /* Time after which an idle cupsd will exit */
197VAR char *LaunchdConf VALUE(NULL);
198 /* launchd(8) configuration file */
199#endif /* HAVE_LAUNCHD */
ef416fc2 200
7594b224 201#ifdef __APPLE__
202VAR int AppleQuotas VALUE(TRUE);
203 /* Use Apple PrintService Quotas instead of CUPS quotas */
204#endif /* __APPLE__ */
205
f7deaa1a 206#ifdef HAVE_AUTHORIZATION_H
207VAR char *SystemGroupAuthKey VALUE(NULL);
208 /* System group auth key */
209#endif /* HAVE_AUTHORIZATION_H */
210
211
ef416fc2 212/*
213 * Prototypes...
214 */
215
b94498cf 216extern int cupsdCheckPermissions(const char *filename,
217 const char *suffix, int mode,
218 int user, int group, int is_dir,
219 int create_dir);
ef416fc2 220extern char *cupsdGetDateTime(time_t t);
f7deaa1a 221#ifdef HAVE_GSSAPI
222extern int cupsdLogGSSMessage(int level, int major_status,
223 int minor_status,
224 const char *message, ...);
225#endif /* HAVE_GSSAPI */
ef416fc2 226extern int cupsdLogMessage(int level, const char *message, ...)
227#ifdef __GNUC__
228__attribute__ ((__format__ (__printf__, 2, 3)))
229#endif /* __GNUC__ */
230;
231extern int cupsdLogPage(cupsd_job_t *job, const char *page);
f7deaa1a 232extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
b94498cf 233extern int cupsdReadConfiguration(void);
ef416fc2 234
235
236/*
bc44d920 237 * End of "$Id: conf.h 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 238 */