]> git.ipfire.org Git - thirdparty/cups.git/blame - scheduler/conf.h
Merge changes from CUPS 1.4svn-r7715.
[thirdparty/cups.git] / scheduler / conf.h
CommitLineData
ef416fc2 1/*
75bd9771 2 * "$Id: conf.h 7674 2008-06-18 23:18:32Z 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 */
01ce6322
MS
178VAR char *PageLogFormat VALUE(NULL);
179 /* Page log format */
ef416fc2 180VAR mime_t *MimeDatabase VALUE(NULL);
181 /* MIME type database */
182VAR int NumMimeTypes VALUE(0);
183 /* Number of MIME types */
184VAR const char **MimeTypes VALUE(NULL);
185 /* Array of MIME types */
186
187#ifdef HAVE_SSL
188VAR char *ServerCertificate VALUE(NULL);
189 /* Server certificate file */
190# if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
191VAR char *ServerKey VALUE(NULL);
192 /* Server key file */
ef416fc2 193# endif /* HAVE_LIBSSL || HAVE_GNUTLS */
194#endif /* HAVE_SSL */
195
a4d04587 196#ifdef HAVE_LAUNCHD
197VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
198 /* Time after which an idle cupsd will exit */
199VAR char *LaunchdConf VALUE(NULL);
200 /* launchd(8) configuration file */
201#endif /* HAVE_LAUNCHD */
ef416fc2 202
7594b224 203#ifdef __APPLE__
204VAR int AppleQuotas VALUE(TRUE);
205 /* Use Apple PrintService Quotas instead of CUPS quotas */
206#endif /* __APPLE__ */
207
f7deaa1a 208#ifdef HAVE_AUTHORIZATION_H
209VAR char *SystemGroupAuthKey VALUE(NULL);
210 /* System group auth key */
211#endif /* HAVE_AUTHORIZATION_H */
212
213
ef416fc2 214/*
215 * Prototypes...
216 */
217
b94498cf 218extern int cupsdCheckPermissions(const char *filename,
219 const char *suffix, int mode,
220 int user, int group, int is_dir,
221 int create_dir);
ef416fc2 222extern char *cupsdGetDateTime(time_t t);
f7deaa1a 223#ifdef HAVE_GSSAPI
224extern int cupsdLogGSSMessage(int level, int major_status,
225 int minor_status,
226 const char *message, ...);
227#endif /* HAVE_GSSAPI */
75bd9771
MS
228extern int cupsdLogJob(cupsd_job_t *job, int level, const char *message, ...)
229#ifdef __GNUC__
230__attribute__ ((__format__ (__printf__, 3, 4)))
231#endif /* __GNUC__ */
232;
ef416fc2 233extern int cupsdLogMessage(int level, const char *message, ...)
234#ifdef __GNUC__
235__attribute__ ((__format__ (__printf__, 2, 3)))
236#endif /* __GNUC__ */
237;
238extern int cupsdLogPage(cupsd_job_t *job, const char *page);
f7deaa1a 239extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
b94498cf 240extern int cupsdReadConfiguration(void);
75bd9771 241extern int cupsdWriteErrorLog(int level, const char *message);
ef416fc2 242
243
244/*
75bd9771 245 * End of "$Id: conf.h 7674 2008-06-18 23:18:32Z mike $".
ef416fc2 246 */