]> git.ipfire.org Git - thirdparty/cups.git/blame - scheduler/conf.h
Merge CUPS 1.4svn-r7319.
[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{
f7deaa1a 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 */
ef416fc2 27 CUPSD_LOG_NONE,
f7deaa1a 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 */
ef416fc2 37} cupsd_loglevel_t;
38
39
40/*
41 * Printcap formats...
42 */
43
f7deaa1a 44#define PRINTCAP_BSD 0 /* Berkeley LPD format */
45#define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
ef416fc2 46
47
48/*
49 * Globals...
50 */
51
52VAR 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 */
8ca02f3c 68VAR int ServerNameIsIP VALUE(0);
ef416fc2 69VAR int NumSystemGroups VALUE(0);
70 /* Number of system group names */
ac884b6a
MS
71VAR char *SystemGroups[MAX_SYSTEM_GROUPS]
72 VALUE({0});
ef416fc2 73 /* System group names */
ac884b6a
MS
74VAR gid_t SystemGroupIDs[MAX_SYSTEM_GROUPS]
75 VALUE({0});
ef416fc2 76 /* System group IDs */
77VAR 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 */
323c5de1 93 *ErrorPolicy VALUE(NULL),
94 /* Default printer-error-policy */
ef416fc2 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 */
f7deaa1a 109#ifdef HAVE_GSSAPI
110VAR char *GSSServiceName VALUE(NULL);
111 /* GSS service name */
112VAR char *Krb5Keytab VALUE(NULL);
113 /* Kerberos Keytab */
114#endif /* HAVE_GSSAPI */
ef416fc2 115VAR uid_t User VALUE(1);
116 /* User ID for server */
117VAR gid_t Group VALUE(0);
118 /* Group ID for server */
119VAR 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 */
f7deaa1a 131 MaxCopies VALUE(CUPS_DEFAULT_MAX_COPIES),
ef416fc2 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 */
ac884b6a
MS
165 RunUser VALUE(0),
166 /* User to run as, used for files */
fa73b229 167 PrintcapFormat VALUE(PRINTCAP_BSD),
ef416fc2 168 /* Format of printcap file? */
fa73b229 169 DefaultShared VALUE(TRUE);
170 /* Share printers by default? */
ef416fc2 171VAR 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 */
177VAR mime_t *MimeDatabase VALUE(NULL);
178 /* MIME type database */
179VAR int NumMimeTypes VALUE(0);
180 /* Number of MIME types */
181VAR const char **MimeTypes VALUE(NULL);
182 /* Array of MIME types */
183
184#ifdef HAVE_SSL
185VAR char *ServerCertificate VALUE(NULL);
186 /* Server certificate file */
187# if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
188VAR char *ServerKey VALUE(NULL);
189 /* Server key file */
ef416fc2 190# endif /* HAVE_LIBSSL || HAVE_GNUTLS */
191#endif /* HAVE_SSL */
192
a4d04587 193#ifdef HAVE_LAUNCHD
194VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
195 /* Time after which an idle cupsd will exit */
196VAR char *LaunchdConf VALUE(NULL);
197 /* launchd(8) configuration file */
198#endif /* HAVE_LAUNCHD */
ef416fc2 199
7594b224 200#ifdef __APPLE__
201VAR int AppleQuotas VALUE(TRUE);
202 /* Use Apple PrintService Quotas instead of CUPS quotas */
203#endif /* __APPLE__ */
204
f7deaa1a 205#ifdef HAVE_AUTHORIZATION_H
206VAR char *SystemGroupAuthKey VALUE(NULL);
207 /* System group auth key */
208#endif /* HAVE_AUTHORIZATION_H */
209
210
ef416fc2 211/*
212 * Prototypes...
213 */
214
b94498cf 215extern int cupsdCheckPermissions(const char *filename,
216 const char *suffix, int mode,
217 int user, int group, int is_dir,
218 int create_dir);
ef416fc2 219extern char *cupsdGetDateTime(time_t t);
f7deaa1a 220#ifdef HAVE_GSSAPI
221extern int cupsdLogGSSMessage(int level, int major_status,
222 int minor_status,
223 const char *message, ...);
224#endif /* HAVE_GSSAPI */
ef416fc2 225extern int cupsdLogMessage(int level, const char *message, ...)
226#ifdef __GNUC__
227__attribute__ ((__format__ (__printf__, 2, 3)))
228#endif /* __GNUC__ */
229;
230extern int cupsdLogPage(cupsd_job_t *job, const char *page);
f7deaa1a 231extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
b94498cf 232extern int cupsdReadConfiguration(void);
ef416fc2 233
234
235/*
bc44d920 236 * End of "$Id: conf.h 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 237 */