]>
git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/conf.h
2 * "$Id: conf.h 7674 2008-06-18 23:18:32Z 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 */
52 #define PRINTCAP_BSD 0 /* Berkeley LPD format */
53 #define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
60 VAR
char *ConfigurationFile
VALUE(NULL
),
61 /* Configuration file to use */
62 *ServerName
VALUE(NULL
),
64 *ServerAdmin
VALUE(NULL
),
65 /* Administrator's email */
66 *ServerRoot
VALUE(NULL
),
67 /* Root directory for scheduler */
68 *ServerBin
VALUE(NULL
),
69 /* Root directory for binaries */
70 *StateDir
VALUE(NULL
),
71 /* Root directory for state data */
72 *RequestRoot
VALUE(NULL
),
73 /* Directory for request files */
74 *DocumentRoot
VALUE(NULL
);
75 /* Root directory for documents */
76 VAR
int ServerNameIsIP
VALUE(0);
77 VAR
int NumSystemGroups
VALUE(0);
78 /* Number of system group names */
79 VAR
char *SystemGroups
[MAX_SYSTEM_GROUPS
]
81 /* System group names */
82 VAR gid_t SystemGroupIDs
[MAX_SYSTEM_GROUPS
]
84 /* System group IDs */
85 VAR
char *AccessLog
VALUE(NULL
),
86 /* Access log filename */
87 *ErrorLog
VALUE(NULL
),
88 /* Error log filename */
90 /* Page log filename */
91 *CacheDir
VALUE(NULL
),
92 /* Cache file directory */
94 /* Data file directory */
95 *DefaultLanguage
VALUE(NULL
),
96 /* Default language encoding */
97 *DefaultCharset
VALUE(NULL
),
99 *DefaultLocale
VALUE(NULL
),
101 *DefaultPaperSize
VALUE(NULL
),
102 /* Default paper size */
103 *ErrorPolicy
VALUE(NULL
),
104 /* Default printer-error-policy */
105 *RIPCache
VALUE(NULL
),
106 /* Amount of memory for RIPs */
107 *TempDir
VALUE(NULL
),
108 /* Temporary directory */
109 *Printcap
VALUE(NULL
),
111 *PrintcapGUI
VALUE(NULL
),
112 /* GUI program to use for IRIX */
113 *FontPath
VALUE(NULL
),
114 /* Font search path */
115 *RemoteRoot
VALUE(NULL
),
116 /* Remote root user */
117 *Classification
VALUE(NULL
);
118 /* Classification of system */
120 VAR
char *GSSServiceName
VALUE(NULL
);
121 /* GSS service name */
122 VAR
char *Krb5Keytab
VALUE(NULL
);
123 /* Kerberos Keytab */
124 #endif /* HAVE_GSSAPI */
125 VAR uid_t User
VALUE(1);
126 /* User ID for server */
127 VAR gid_t Group
VALUE(0);
128 /* Group ID for server */
129 VAR
int AccessLogLevel
VALUE(CUPSD_ACCESSLOG_ACTIONS
),
130 /* Access log level */
131 ClassifyOverride
VALUE(0),
132 /* Allow overrides? */
133 ConfigFilePerm
VALUE(0640),
134 /* Permissions for config files */
135 LogFilePerm
VALUE(0644),
136 /* Permissions for log files */
137 LogLevel
VALUE(CUPSD_LOG_WARN
),
138 /* Error log level */
140 /* Maximum number of clients */
141 MaxClientsPerHost
VALUE(0),
142 /* Maximum number of clients per host */
143 MaxCopies
VALUE(CUPS_DEFAULT_MAX_COPIES
),
144 /* Maximum number of copies per job */
145 MaxLogSize
VALUE(1024 * 1024),
146 /* Maximum size of log files */
147 MaxPrinterHistory
VALUE(10),
148 /* Maximum printer state history */
149 MaxRequestSize
VALUE(0),
150 /* Maximum size of IPP requests */
151 HostNameLookups
VALUE(FALSE
),
152 /* Do we do reverse lookups? */
153 Timeout
VALUE(DEFAULT_TIMEOUT
),
154 /* Timeout during requests */
155 KeepAlive
VALUE(TRUE
),
156 /* Support the Keep-Alive option? */
157 KeepAliveTimeout
VALUE(DEFAULT_KEEPALIVE
),
158 /* Timeout between requests */
159 ImplicitClasses
VALUE(TRUE
),
160 /* Are classes implicitly created? */
161 ImplicitAnyClasses
VALUE(FALSE
),
162 /* Create AnyPrinter classes? */
163 HideImplicitMembers
VALUE(TRUE
),
164 /* Hide implicit class members? */
165 FileDevice
VALUE(FALSE
),
166 /* Allow file: devices? */
167 FilterLimit
VALUE(0),
168 /* Max filter cost at any time */
169 FilterLevel
VALUE(0),
170 /* Current filter level */
172 /* Nice value for filters */
173 ReloadTimeout
VALUE(0),
174 /* Timeout before reload from SIGHUP */
175 RootCertDuration
VALUE(300),
176 /* Root certificate update interval */
178 /* User to run as, used for files */
179 PrintcapFormat
VALUE(PRINTCAP_BSD
),
180 /* Format of printcap file? */
181 DefaultShared
VALUE(TRUE
);
182 /* Share printers by default? */
183 VAR cups_file_t
*AccessFile
VALUE(NULL
),
184 /* Access log file */
185 *ErrorFile
VALUE(NULL
),
187 *PageFile
VALUE(NULL
);
189 VAR
char *PageLogFormat
VALUE(NULL
);
190 /* Page log format */
191 VAR mime_t
*MimeDatabase
VALUE(NULL
);
192 /* MIME type database */
193 VAR
int NumMimeTypes
VALUE(0);
194 /* Number of MIME types */
195 VAR
const char **MimeTypes
VALUE(NULL
);
196 /* Array of MIME types */
199 VAR
char *ServerCertificate
VALUE(NULL
);
200 /* Server certificate file */
201 # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
202 VAR
char *ServerKey
VALUE(NULL
);
203 /* Server key file */
204 # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
205 #endif /* HAVE_SSL */
208 VAR
int LaunchdTimeout
VALUE(DEFAULT_TIMEOUT
);
209 /* Time after which an idle cupsd will exit */
210 VAR
char *LaunchdConf
VALUE(NULL
);
211 /* launchd(8) configuration file */
212 #endif /* HAVE_LAUNCHD */
215 VAR
int AppleQuotas
VALUE(TRUE
);
216 /* Use Apple PrintService Quotas instead of CUPS quotas */
217 #endif /* __APPLE__ */
219 #ifdef HAVE_AUTHORIZATION_H
220 VAR
char *SystemGroupAuthKey
VALUE(NULL
);
221 /* System group auth key */
222 #endif /* HAVE_AUTHORIZATION_H */
229 extern int cupsdCheckPermissions(const char *filename
,
230 const char *suffix
, int mode
,
231 int user
, int group
, int is_dir
,
233 extern char *cupsdGetDateTime(time_t t
);
235 extern int cupsdLogGSSMessage(int level
, int major_status
,
237 const char *message
, ...);
238 #endif /* HAVE_GSSAPI */
239 extern int cupsdLogJob(cupsd_job_t
*job
, int level
, const char *message
, ...)
241 __attribute__ ((__format__ (__printf__
, 3, 4)))
242 #endif /* __GNUC__ */
244 extern int cupsdLogMessage(int level
, const char *message
, ...)
246 __attribute__ ((__format__ (__printf__
, 2, 3)))
247 #endif /* __GNUC__ */
249 extern int cupsdLogPage(cupsd_job_t
*job
, const char *page
);
250 extern int cupsdLogRequest(cupsd_client_t
*con
, http_status_t code
);
251 extern int cupsdReadConfiguration(void);
252 extern int cupsdWriteErrorLog(int level
, const char *message
);
256 * End of "$Id: conf.h 7674 2008-06-18 23:18:32Z mike $".