]> git.ipfire.org Git - thirdparty/cups.git/blame - scheduler/conf.h
Load cups into easysw/current.
[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 */
71VAR char *SystemGroups[MAX_SYSTEM_GROUPS];
72 /* System group names */
bd7854cb 73VAR gid_t SystemGroupIDs[MAX_SYSTEM_GROUPS];
ef416fc2 74 /* System group IDs */
75VAR 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 */
323c5de1 91 *ErrorPolicy VALUE(NULL),
92 /* Default printer-error-policy */
ef416fc2 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 */
f7deaa1a 107#ifdef HAVE_GSSAPI
108VAR char *GSSServiceName VALUE(NULL);
109 /* GSS service name */
110VAR char *Krb5Keytab VALUE(NULL);
111 /* Kerberos Keytab */
112#endif /* HAVE_GSSAPI */
ef416fc2 113VAR uid_t User VALUE(1);
114 /* User ID for server */
115VAR gid_t Group VALUE(0);
116 /* Group ID for server */
117VAR 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 */
f7deaa1a 129 MaxCopies VALUE(CUPS_DEFAULT_MAX_COPIES),
ef416fc2 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 */
ef416fc2 163 RunUser, /* User to run as, used for files */
fa73b229 164 PrintcapFormat VALUE(PRINTCAP_BSD),
ef416fc2 165 /* Format of printcap file? */
fa73b229 166 DefaultShared VALUE(TRUE);
167 /* Share printers by default? */
ef416fc2 168VAR 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 */
174VAR mime_t *MimeDatabase VALUE(NULL);
175 /* MIME type database */
176VAR int NumMimeTypes VALUE(0);
177 /* Number of MIME types */
178VAR const char **MimeTypes VALUE(NULL);
179 /* Array of MIME types */
180
181#ifdef HAVE_SSL
182VAR char *ServerCertificate VALUE(NULL);
183 /* Server certificate file */
184# if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
185VAR char *ServerKey VALUE(NULL);
186 /* Server key file */
ef416fc2 187# endif /* HAVE_LIBSSL || HAVE_GNUTLS */
188#endif /* HAVE_SSL */
189
a4d04587 190#ifdef HAVE_LAUNCHD
191VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
192 /* Time after which an idle cupsd will exit */
193VAR char *LaunchdConf VALUE(NULL);
194 /* launchd(8) configuration file */
195#endif /* HAVE_LAUNCHD */
ef416fc2 196
7594b224 197#ifdef __APPLE__
198VAR int AppleQuotas VALUE(TRUE);
199 /* Use Apple PrintService Quotas instead of CUPS quotas */
200#endif /* __APPLE__ */
201
f7deaa1a 202#ifdef HAVE_AUTHORIZATION_H
203VAR char *SystemGroupAuthKey VALUE(NULL);
204 /* System group auth key */
205#endif /* HAVE_AUTHORIZATION_H */
206
207
ef416fc2 208/*
209 * Prototypes...
210 */
211
b94498cf 212extern int cupsdCheckPermissions(const char *filename,
213 const char *suffix, int mode,
214 int user, int group, int is_dir,
215 int create_dir);
ef416fc2 216extern char *cupsdGetDateTime(time_t t);
f7deaa1a 217#ifdef HAVE_GSSAPI
218extern int cupsdLogGSSMessage(int level, int major_status,
219 int minor_status,
220 const char *message, ...);
221#endif /* HAVE_GSSAPI */
ef416fc2 222extern int cupsdLogMessage(int level, const char *message, ...)
223#ifdef __GNUC__
224__attribute__ ((__format__ (__printf__, 2, 3)))
225#endif /* __GNUC__ */
226;
227extern int cupsdLogPage(cupsd_job_t *job, const char *page);
f7deaa1a 228extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
b94498cf 229extern int cupsdReadConfiguration(void);
ef416fc2 230
231
232/*
bc44d920 233 * End of "$Id: conf.h 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 234 */