]>
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 *ErrorPolicy
VALUE(NULL
),
102 /* Default printer-error-policy */
103 *RIPCache
VALUE(NULL
),
104 /* Amount of memory for RIPs */
105 *TempDir
VALUE(NULL
),
106 /* Temporary directory */
107 *Printcap
VALUE(NULL
),
109 *PrintcapGUI
VALUE(NULL
),
110 /* GUI program to use for IRIX */
111 *FontPath
VALUE(NULL
),
112 /* Font search path */
113 *RemoteRoot
VALUE(NULL
),
114 /* Remote root user */
115 *Classification
VALUE(NULL
);
116 /* Classification of system */
118 VAR
char *GSSServiceName
VALUE(NULL
);
119 /* GSS service name */
120 VAR
char *Krb5Keytab
VALUE(NULL
);
121 /* Kerberos Keytab */
122 #endif /* HAVE_GSSAPI */
123 VAR uid_t User
VALUE(1);
124 /* User ID for server */
125 VAR gid_t Group
VALUE(0);
126 /* Group ID for server */
127 VAR
int AccessLogLevel
VALUE(CUPSD_ACCESSLOG_ACTIONS
),
128 /* Access log level */
129 ClassifyOverride
VALUE(0),
130 /* Allow overrides? */
131 ConfigFilePerm
VALUE(0640),
132 /* Permissions for config files */
133 LogFilePerm
VALUE(0644),
134 /* Permissions for log files */
135 LogLevel
VALUE(CUPSD_LOG_WARN
),
136 /* Error log level */
138 /* Maximum number of clients */
139 MaxClientsPerHost
VALUE(0),
140 /* Maximum number of clients per host */
141 MaxCopies
VALUE(CUPS_DEFAULT_MAX_COPIES
),
142 /* Maximum number of copies per job */
143 MaxLogSize
VALUE(1024 * 1024),
144 /* Maximum size of log files */
145 MaxPrinterHistory
VALUE(10),
146 /* Maximum printer state history */
147 MaxRequestSize
VALUE(0),
148 /* Maximum size of IPP requests */
149 HostNameLookups
VALUE(FALSE
),
150 /* Do we do reverse lookups? */
151 Timeout
VALUE(DEFAULT_TIMEOUT
),
152 /* Timeout during requests */
153 KeepAlive
VALUE(TRUE
),
154 /* Support the Keep-Alive option? */
155 KeepAliveTimeout
VALUE(DEFAULT_KEEPALIVE
),
156 /* Timeout between requests */
157 ImplicitClasses
VALUE(TRUE
),
158 /* Are classes implicitly created? */
159 ImplicitAnyClasses
VALUE(FALSE
),
160 /* Create AnyPrinter classes? */
161 HideImplicitMembers
VALUE(TRUE
),
162 /* Hide implicit class members? */
163 FileDevice
VALUE(FALSE
),
164 /* Allow file: devices? */
165 FilterLimit
VALUE(0),
166 /* Max filter cost at any time */
167 FilterLevel
VALUE(0),
168 /* Current filter level */
170 /* Nice value for filters */
171 ReloadTimeout
VALUE(0),
172 /* Timeout before reload from SIGHUP */
173 RootCertDuration
VALUE(300),
174 /* Root certificate update interval */
176 /* User to run as, used for files */
177 PrintcapFormat
VALUE(PRINTCAP_BSD
),
178 /* Format of printcap file? */
179 DefaultShared
VALUE(TRUE
);
180 /* Share printers by default? */
181 VAR cups_file_t
*AccessFile
VALUE(NULL
),
182 /* Access log file */
183 *ErrorFile
VALUE(NULL
),
185 *PageFile
VALUE(NULL
);
187 VAR
char *PageLogFormat
VALUE(NULL
);
188 /* Page log format */
189 VAR mime_t
*MimeDatabase
VALUE(NULL
);
190 /* MIME type database */
191 VAR
int NumMimeTypes
VALUE(0);
192 /* Number of MIME types */
193 VAR
const char **MimeTypes
VALUE(NULL
);
194 /* Array of MIME types */
197 VAR
char *ServerCertificate
VALUE(NULL
);
198 /* Server certificate file */
199 # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
200 VAR
char *ServerKey
VALUE(NULL
);
201 /* Server key file */
202 # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
203 #endif /* HAVE_SSL */
206 VAR
int LaunchdTimeout
VALUE(DEFAULT_TIMEOUT
);
207 /* Time after which an idle cupsd will exit */
208 VAR
char *LaunchdConf
VALUE(NULL
);
209 /* launchd(8) configuration file */
210 #endif /* HAVE_LAUNCHD */
213 VAR
int AppleQuotas
VALUE(TRUE
);
214 /* Use Apple PrintService Quotas instead of CUPS quotas */
215 #endif /* __APPLE__ */
217 #ifdef HAVE_AUTHORIZATION_H
218 VAR
char *SystemGroupAuthKey
VALUE(NULL
);
219 /* System group auth key */
220 #endif /* HAVE_AUTHORIZATION_H */
227 extern int cupsdCheckPermissions(const char *filename
,
228 const char *suffix
, int mode
,
229 int user
, int group
, int is_dir
,
231 extern char *cupsdGetDateTime(time_t t
);
233 extern int cupsdLogGSSMessage(int level
, int major_status
,
235 const char *message
, ...);
236 #endif /* HAVE_GSSAPI */
237 extern int cupsdLogJob(cupsd_job_t
*job
, int level
, const char *message
, ...)
239 __attribute__ ((__format__ (__printf__
, 3, 4)))
240 #endif /* __GNUC__ */
242 extern int cupsdLogMessage(int level
, const char *message
, ...)
244 __attribute__ ((__format__ (__printf__
, 2, 3)))
245 #endif /* __GNUC__ */
247 extern int cupsdLogPage(cupsd_job_t
*job
, const char *page
);
248 extern int cupsdLogRequest(cupsd_client_t
*con
, http_status_t code
);
249 extern int cupsdReadConfiguration(void);
250 extern int cupsdWriteErrorLog(int level
, const char *message
);
254 * End of "$Id: conf.h 7674 2008-06-18 23:18:32Z mike $".