]> git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/conf.h
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / conf.h
1 /*
2 * "$Id: conf.h 5200 2006-02-28 00:10:32Z mike $"
3 *
4 * Configuration file definitions for the Common UNIX Printing System (CUPS)
5 * scheduler.
6 *
7 * Copyright 1997-2006 by Easy Software Products, all rights reserved.
8 *
9 * These coded instructions, statements, and computer programs are the
10 * property of Easy Software Products and are protected by Federal
11 * copyright law. Distribution and use rights are outlined in the file
12 * "LICENSE.txt" which should have been included with this file. If this
13 * file is missing or damaged please contact Easy Software Products
14 * at:
15 *
16 * Attn: CUPS Licensing Information
17 * Easy Software Products
18 * 44141 Airport View Drive, Suite 204
19 * Hollywood, Maryland 20636 USA
20 *
21 * Voice: (301) 373-9600
22 * EMail: cups-info@cups.org
23 * WWW: http://www.cups.org
24 */
25
26
27 /*
28 * Log levels...
29 */
30
31 typedef enum
32 {
33 CUPSD_LOG_ATTR = -3, /* Used internally for attributes */
34 CUPSD_LOG_STATE, /* Used internally for state-reasons */
35 CUPSD_LOG_PAGE, /* Used internally for page logging */
36 CUPSD_LOG_NONE,
37 CUPSD_LOG_EMERG, /* Emergency issues */
38 CUPSD_LOG_ALERT, /* Something bad happened that needs attention */
39 CUPSD_LOG_CRIT, /* Critical error but server continues */
40 CUPSD_LOG_ERROR, /* Error condition */
41 CUPSD_LOG_WARN, /* Warning */
42 CUPSD_LOG_NOTICE, /* Normal condition that needs logging */
43 CUPSD_LOG_INFO, /* General information */
44 CUPSD_LOG_DEBUG, /* General debugging */
45 CUPSD_LOG_DEBUG2 /* Detailed debugging */
46 } cupsd_loglevel_t;
47
48
49 /*
50 * Printcap formats...
51 */
52
53 #define PRINTCAP_BSD 0 /* Berkeley LPD format */
54 #define PRINTCAP_SOLARIS 1 /* Solaris lpsched format */
55
56
57 /*
58 * Globals...
59 */
60
61 VAR char *ConfigurationFile VALUE(NULL),
62 /* Configuration file to use */
63 *ServerName VALUE(NULL),
64 /* FQDN for server */
65 *ServerAdmin VALUE(NULL),
66 /* Administrator's email */
67 *ServerRoot VALUE(NULL),
68 /* Root directory for scheduler */
69 *ServerBin VALUE(NULL),
70 /* Root directory for binaries */
71 *StateDir VALUE(NULL),
72 /* Root directory for state data */
73 *RequestRoot VALUE(NULL),
74 /* Directory for request files */
75 *DocumentRoot VALUE(NULL);
76 /* Root directory for documents */
77 VAR int NumSystemGroups VALUE(0);
78 /* Number of system group names */
79 VAR char *SystemGroups[MAX_SYSTEM_GROUPS];
80 /* System group names */
81 VAR gid_t SystemGroupIDs[MAX_SYSTEM_GROUPS];
82 /* System group IDs */
83 VAR char *AccessLog VALUE(NULL),
84 /* Access log filename */
85 *ErrorLog VALUE(NULL),
86 /* Error log filename */
87 *PageLog VALUE(NULL),
88 /* Page log filename */
89 *CacheDir VALUE(NULL),
90 /* Cache file directory */
91 *DataDir VALUE(NULL),
92 /* Data file directory */
93 *DefaultLanguage VALUE(NULL),
94 /* Default language encoding */
95 *DefaultCharset VALUE(NULL),
96 /* Default charset */
97 *DefaultLocale VALUE(NULL),
98 /* Default locale */
99 *RIPCache VALUE(NULL),
100 /* Amount of memory for RIPs */
101 *TempDir VALUE(NULL),
102 /* Temporary directory */
103 *Printcap VALUE(NULL),
104 /* Printcap file */
105 *PrintcapGUI VALUE(NULL),
106 /* GUI program to use for IRIX */
107 *FontPath VALUE(NULL),
108 /* Font search path */
109 *RemoteRoot VALUE(NULL),
110 /* Remote root user */
111 *Classification VALUE(NULL);
112 /* Classification of system */
113 VAR uid_t User VALUE(1);
114 /* User ID for server */
115 VAR gid_t Group VALUE(0);
116 /* Group ID for server */
117 VAR 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 */
129 MaxCopies VALUE(100),
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 */
163 RunAsUser VALUE(FALSE),
164 /* Run as unpriviledged user? */
165 RunUser, /* User to run as, used for files */
166 PrintcapFormat VALUE(PRINTCAP_BSD),
167 /* Format of printcap file? */
168 DefaultShared VALUE(TRUE);
169 /* Share printers by default? */
170 VAR cups_file_t *AccessFile VALUE(NULL),
171 /* Access log file */
172 *ErrorFile VALUE(NULL),
173 /* Error log file */
174 *PageFile VALUE(NULL);
175 /* Page log file */
176 VAR mime_t *MimeDatabase VALUE(NULL);
177 /* MIME type database */
178 VAR int NumMimeTypes VALUE(0);
179 /* Number of MIME types */
180 VAR const char **MimeTypes VALUE(NULL);
181 /* Array of MIME types */
182
183 #ifdef HAVE_SSL
184 VAR char *ServerCertificate VALUE(NULL);
185 /* Server certificate file */
186 # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
187 VAR char *ServerKey VALUE(NULL);
188 /* Server key file */
189 # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
190 #endif /* HAVE_SSL */
191
192 #ifdef HAVE_LAUNCHD
193 VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
194 /* Time after which an idle cupsd will exit */
195 VAR char *LaunchdConf VALUE(NULL);
196 /* launchd(8) configuration file */
197 #endif /* HAVE_LAUNCHD */
198
199 /*
200 * Prototypes...
201 */
202
203 extern char *cupsdGetDateTime(time_t t);
204 extern int cupsdReadConfiguration(void);
205 extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
206 extern int cupsdLogMessage(int level, const char *message, ...)
207 #ifdef __GNUC__
208 __attribute__ ((__format__ (__printf__, 2, 3)))
209 #endif /* __GNUC__ */
210 ;
211 extern int cupsdLogPage(cupsd_job_t *job, const char *page);
212
213
214 /*
215 * End of "$Id: conf.h 5200 2006-02-28 00:10:32Z mike $".
216 */