]>
git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/conf.h
2 * "$Id: conf.h 7935 2008-09-11 01:54:11Z mike $"
4 * Configuration file definitions for the Common UNIX Printing System (CUPS)
7 * Copyright 2007-2008 by Apple Inc.
8 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
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/".
24 CUPSD_LOG_PPD
= -4, /* Used internally for PPD keywords */
25 CUPSD_LOG_ATTR
, /* Used internally for attributes */
26 CUPSD_LOG_STATE
, /* Used internally for state-reasons */
27 CUPSD_LOG_PAGE
, /* Used internally for page logging */
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 */
42 CUPSD_ACCESSLOG_CONFIG
, /* Log config requests */
43 CUPSD_ACCESSLOG_ACTIONS
, /* Log config, print, and job management requests */
44 CUPSD_ACCESSLOG_ALL
/* Log everything */
49 * FatalErrors flags...
52 #define CUPSD_FATAL_NONE 0 /* No errors are fatal */
53 #define CUPSD_FATAL_BROWSE 1 /* Browse bind errors are fatal */
54 #define CUPSD_FATAL_CONFIG 2 /* Config file syntax errors are fatal */
55 #define CUPSD_FATAL_LISTEN 4 /* Listen/Port bind errors are fatal */
56 #define CUPSD_FATAL_LOG 8 /* Log file errors are fatal */
57 #define CUPSD_FATAL_PERMISSIONS 16 /* File permission errors are fatal */
58 #define CUPSD_FATAL_ALL ~0 /* All errors are fatal */
65 #define PRINTCAP_BSD 0 /* Berkeley LPD format */
66 #define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
70 * SSL options (bits)...
73 #define CUPSD_SSL_NONE 0 /* No special options */
74 #define CUPSD_SSL_NOEMPTY 1 /* Do not insert empty fragments */
81 VAR
char *ConfigurationFile
VALUE(NULL
),
82 /* Configuration file to use */
83 *ServerName
VALUE(NULL
),
85 *ServerAdmin
VALUE(NULL
),
86 /* Administrator's email */
87 *ServerRoot
VALUE(NULL
),
88 /* Root directory for scheduler */
89 *ServerBin
VALUE(NULL
),
90 /* Root directory for binaries */
91 *StateDir
VALUE(NULL
),
92 /* Root directory for state data */
93 *RequestRoot
VALUE(NULL
),
94 /* Directory for request files */
95 *DocumentRoot
VALUE(NULL
);
96 /* Root directory for documents */
97 VAR
int ServerNameIsIP
VALUE(0);
98 VAR
int NumSystemGroups
VALUE(0);
99 /* Number of system group names */
100 VAR
char *SystemGroups
[MAX_SYSTEM_GROUPS
]
102 /* System group names */
103 VAR gid_t SystemGroupIDs
[MAX_SYSTEM_GROUPS
]
105 /* System group IDs */
106 VAR
char *AccessLog
VALUE(NULL
),
107 /* Access log filename */
108 *ErrorLog
VALUE(NULL
),
109 /* Error log filename */
110 *PageLog
VALUE(NULL
),
111 /* Page log filename */
112 *CacheDir
VALUE(NULL
),
113 /* Cache file directory */
114 *DataDir
VALUE(NULL
),
115 /* Data file directory */
116 *DefaultLanguage
VALUE(NULL
),
117 /* Default language encoding */
118 *DefaultCharset
VALUE(NULL
),
119 /* Default charset */
120 *DefaultLocale
VALUE(NULL
),
122 *DefaultPaperSize
VALUE(NULL
),
123 /* Default paper size */
124 *ErrorPolicy
VALUE(NULL
),
125 /* Default printer-error-policy */
126 *RIPCache
VALUE(NULL
),
127 /* Amount of memory for RIPs */
128 *TempDir
VALUE(NULL
),
129 /* Temporary directory */
130 *Printcap
VALUE(NULL
),
132 *PrintcapGUI
VALUE(NULL
),
133 /* GUI program to use for IRIX */
134 *FontPath
VALUE(NULL
),
135 /* Font search path */
136 *RemoteRoot
VALUE(NULL
),
137 /* Remote root user */
138 *Classification
VALUE(NULL
);
139 /* Classification of system */
141 VAR
char *GSSServiceName
VALUE(NULL
);
142 /* GSS service name */
143 VAR
char *Krb5Keytab
VALUE(NULL
);
144 /* Kerberos Keytab */
145 #endif /* HAVE_GSSAPI */
146 VAR uid_t User
VALUE(1);
147 /* User ID for server */
148 VAR gid_t Group
VALUE(0);
149 /* Group ID for server */
150 VAR
int AccessLogLevel
VALUE(CUPSD_ACCESSLOG_ACTIONS
),
151 /* Access log level */
152 ClassifyOverride
VALUE(0),
153 /* Allow overrides? */
154 ConfigFilePerm
VALUE(0640),
155 /* Permissions for config files */
156 FatalErrors
VALUE(CUPSD_FATAL_CONFIG
),
157 /* Which errors are fatal? */
158 LogFilePerm
VALUE(0644),
159 /* Permissions for log files */
160 LogLevel
VALUE(CUPSD_LOG_WARN
),
161 /* Error log level */
163 /* Maximum number of clients */
164 MaxClientsPerHost
VALUE(0),
165 /* Maximum number of clients per host */
166 MaxCopies
VALUE(CUPS_DEFAULT_MAX_COPIES
),
167 /* Maximum number of copies per job */
168 MaxLogSize
VALUE(1024 * 1024),
169 /* Maximum size of log files */
170 MaxPrinterHistory
VALUE(10),
171 /* Maximum printer state history */
172 MaxRequestSize
VALUE(0),
173 /* Maximum size of IPP requests */
174 HostNameLookups
VALUE(FALSE
),
175 /* Do we do reverse lookups? */
176 Timeout
VALUE(DEFAULT_TIMEOUT
),
177 /* Timeout during requests */
178 KeepAlive
VALUE(TRUE
),
179 /* Support the Keep-Alive option? */
180 KeepAliveTimeout
VALUE(DEFAULT_KEEPALIVE
),
181 /* Timeout between requests */
182 ImplicitClasses
VALUE(TRUE
),
183 /* Are classes implicitly created? */
184 ImplicitAnyClasses
VALUE(FALSE
),
185 /* Create AnyPrinter classes? */
186 HideImplicitMembers
VALUE(TRUE
),
187 /* Hide implicit class members? */
188 FileDevice
VALUE(FALSE
),
189 /* Allow file: devices? */
190 FilterLimit
VALUE(0),
191 /* Max filter cost at any time */
192 FilterLevel
VALUE(0),
193 /* Current filter level */
195 /* Nice value for filters */
196 ReloadTimeout
VALUE(DEFAULT_KEEPALIVE
),
197 /* Timeout before reload from SIGHUP */
198 RootCertDuration
VALUE(300),
199 /* Root certificate update interval */
201 /* User to run as, used for files */
202 PrintcapFormat
VALUE(PRINTCAP_BSD
),
203 /* Format of printcap file? */
204 DefaultShared
VALUE(TRUE
);
205 /* Share printers by default? */
206 VAR cups_file_t
*AccessFile
VALUE(NULL
),
207 /* Access log file */
208 *ErrorFile
VALUE(NULL
),
210 *PageFile
VALUE(NULL
);
212 VAR
char *PageLogFormat
VALUE(NULL
);
213 /* Page log format */
214 VAR mime_t
*MimeDatabase
VALUE(NULL
);
215 /* MIME type database */
216 VAR
int NumMimeTypes
VALUE(0);
217 /* Number of MIME types */
218 VAR
const char **MimeTypes
VALUE(NULL
);
219 /* Array of MIME types */
222 VAR
char *ServerCertificate
VALUE(NULL
);
223 /* Server certificate file */
224 # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
225 VAR
char *ServerKey
VALUE(NULL
);
226 /* Server key file */
227 # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
228 VAR
int SSLOptions
VALUE(CUPSD_SSL_NONE
);
229 /* SSL/TLS options */
230 #endif /* HAVE_SSL */
233 VAR
int LaunchdTimeout
VALUE(DEFAULT_KEEPALIVE
);
234 /* Time after which an idle cupsd will exit */
235 VAR
char *LaunchdConf
VALUE(NULL
);
236 /* launchd(8) configuration file */
237 #endif /* HAVE_LAUNCHD */
240 VAR
int AppleQuotas
VALUE(TRUE
);
241 /* Use Apple PrintService Quotas instead of CUPS quotas */
242 #endif /* __APPLE__ */
244 #ifdef HAVE_AUTHORIZATION_H
245 VAR
char *SystemGroupAuthKey
VALUE(NULL
);
246 /* System group auth key */
247 #endif /* HAVE_AUTHORIZATION_H */
254 extern int cupsdCheckPermissions(const char *filename
,
255 const char *suffix
, int mode
,
256 int user
, int group
, int is_dir
,
258 extern char *cupsdGetDateTime(time_t t
);
260 extern int cupsdLogGSSMessage(int level
, int major_status
,
262 const char *message
, ...);
263 #endif /* HAVE_GSSAPI */
264 extern int cupsdLogJob(cupsd_job_t
*job
, int level
, const char *message
, ...)
266 __attribute__ ((__format__ (__printf__
, 3, 4)))
267 #endif /* __GNUC__ */
269 extern int cupsdLogMessage(int level
, const char *message
, ...)
271 __attribute__ ((__format__ (__printf__
, 2, 3)))
272 #endif /* __GNUC__ */
274 extern int cupsdLogPage(cupsd_job_t
*job
, const char *page
);
275 extern int cupsdLogRequest(cupsd_client_t
*con
, http_status_t code
);
276 extern int cupsdReadConfiguration(void);
277 extern int cupsdWriteErrorLog(int level
, const char *message
);
281 * End of "$Id: conf.h 7935 2008-09-11 01:54:11Z mike $".