]>
git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/cupsd.h
2 * "$Id: cupsd.h,v 1.28.2.20 2003/07/19 21:57:47 mike Exp $"
4 * Main header file for the Common UNIX Printing System (CUPS) scheduler.
6 * Copyright 1997-2003 by Easy Software Products, all rights reserved.
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636-3111 USA
20 * Voice: (301) 373-9603
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
27 * Define FD_SETSIZE to 2048 on Solaris to get the correct version of
28 * select() for large numbers of file descriptors.
31 # define FD_SETSIZE 2048
36 * Include necessary headers.
47 #include <sys/types.h>
58 #include <cups/cups.h>
59 #include <cups/string.h>
61 #include <cups/http.h>
63 #include <cups/language.h>
64 #include <cups/debug.h>
66 #if defined(HAVE_CDSASSL)
67 # include <CoreFoundation/CoreFoundation.h>
68 #endif /* HAVE_CDSASSL */
72 * Some OS's don't have hstrerror(), most notably Solaris...
75 #ifndef HAVE_HSTRERROR
76 # define hstrerror cups_hstrerror
78 extern const char *cups_hstrerror(int);
79 #endif /* !HAVE_HSTRERROR */
88 # define TRUE (!FALSE)
93 * Implementation limits...
96 #define MAX_USERPASS 33 /* Maximum size of username/password */
97 #define MAX_FILTERS 20 /* Maximum number of filters */
98 #define MAX_SYSTEM_GROUPS 32 /* Maximum number of system groups */
105 #define DEFAULT_HISTORY 1 /* Preserve job history? */
106 #define DEFAULT_FILES 0 /* Preserve job files? */
107 #define DEFAULT_TIMEOUT 300 /* Timeout during requests/updates */
108 #define DEFAULT_KEEPALIVE 60 /* Timeout between requests */
109 #define DEFAULT_INTERVAL 30 /* Interval between browse updates */
110 #define DEFAULT_LANGUAGE setlocale(LC_ALL,"")
111 /* Default language encoding */
112 #define DEFAULT_CHARSET "utf-8" /* Default charset */
116 * Global variable macros...
122 # define VALUE2(x,y) ={x,y}
131 * Other stuff for the scheduler...
138 #include "printers.h"
148 * Directory handling functions...
153 typedef struct dirent DIRENT
;
154 # define NAMLEN(dirent) strlen((dirent)->d_name)
157 # include <sys/ndir.h>
160 # include <sys/dir.h>
165 typedef struct direct DIRENT
;
166 # define NAMLEN(dirent) (dirent)->d_namlen
174 #define RELOAD_NONE 0 /* No reload needed */
175 #define RELOAD_ALL 1 /* Reload everything */
176 #define RELOAD_CUPSD 2 /* Reload only cupsd.conf */
183 VAR
int MaxFDs
, /* Maximum number of files */
184 SetSize
; /* The size of the input/output sets */
185 VAR fd_set
*InputSet
, /* Input files for select() */
186 *OutputSet
; /* Output files for select() */
188 VAR
int NeedReload
VALUE(RELOAD_ALL
),
189 /* Need to load configuration? */
190 SignalCount
VALUE(0);
191 /* Signal handler level */
193 VAR
char *TZ
VALUE(NULL
);
194 /* Timezone configuration */
196 VAR ipp_t
*Devices
VALUE(NULL
),
197 /* Available devices */
206 extern void CatchChildSignals(void);
207 extern void ClearString(char **s
);
208 extern void HoldSignals(void);
209 extern void IgnoreChildSignals(void);
210 extern void LoadDevices(const char *d
);
211 extern void LoadPPDs(const char *d
);
212 extern void ReleaseSignals(void);
213 extern void SetString(char **s
, const char *v
);
214 extern void SetStringf(char **s
, const char *f
, ...);
215 extern void StartServer(void);
216 extern void StopServer(void);
220 * End of "$Id: cupsd.h,v 1.28.2.20 2003/07/19 21:57:47 mike Exp $".