]>
git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/cupsd.h
2 * "$Id: cupsd.h 5053 2006-02-02 18:14:38Z mike $"
4 * Main header file for the Common UNIX Printing System (CUPS) scheduler.
6 * Copyright 1997-2006 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 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
27 * Include necessary headers.
30 #include <cups/http-private.h>
31 #include <cups/string.h>
39 #include <sys/types.h>
50 #include <cups/array.h>
51 #include <cups/cups.h>
53 #include <cups/http.h>
55 #include <cups/i18n.h>
56 #include <cups/debug.h>
58 #if defined(HAVE_CDSASSL)
59 # include <CoreFoundation/CoreFoundation.h>
60 #endif /* HAVE_CDSASSL */
64 * Some OS's don't have hstrerror(), most notably Solaris...
67 #ifndef HAVE_HSTRERROR
68 # define hstrerror cups_hstrerror
70 extern const char *cups_hstrerror(int);
71 #endif /* !HAVE_HSTRERROR */
80 # define TRUE (!FALSE)
85 * Implementation limits...
88 #define MAX_ENV 100 /* Maximum number of environment strings */
89 #define MAX_USERPASS 33 /* Maximum size of username/password */
90 #define MAX_FILTERS 20 /* Maximum number of filters */
91 #define MAX_SYSTEM_GROUPS 32 /* Maximum number of system groups */
98 #define DEFAULT_HISTORY 1 /* Preserve job history? */
99 #define DEFAULT_FILES 0 /* Preserve job files? */
100 #define DEFAULT_TIMEOUT 300 /* Timeout during requests/updates */
101 #define DEFAULT_KEEPALIVE 60 /* Timeout between requests */
102 #define DEFAULT_INTERVAL 30 /* Interval between browse updates */
103 #define DEFAULT_CHARSET "utf-8" /* Default charset */
107 * Global variable macros...
113 # define VALUE2(x,y) ={x,y}
122 * Other stuff for the scheduler...
131 #include "printers.h"
138 #include "subscriptions.h"
145 #define RELOAD_NONE 0 /* No reload needed */
146 #define RELOAD_ALL 1 /* Reload everything */
147 #define RELOAD_CUPSD 2 /* Reload only cupsd.conf */
154 VAR
int MaxFDs
, /* Maximum number of files */
155 SetSize
; /* The size of the input/output sets */
156 VAR fd_set
*InputSet
, /* Input files for select() */
157 *OutputSet
; /* Output files for select() */
159 VAR
time_t ReloadTime
VALUE(0);
160 /* Time of reload request... */
161 VAR
int NeedReload
VALUE(RELOAD_ALL
);
162 /* Need to load configuration? */
164 VAR
int Launchd
VALUE(0);
165 /* Running from launchd */
166 #endif /* HAVE_LAUNCH_H */
173 extern void cupsdCatchChildSignals(void);
174 extern void cupsdClearString(char **s
);
175 extern void cupsdHoldSignals(void);
176 extern void cupsdIgnoreChildSignals(void);
177 extern void cupsdReleaseSignals(void);
178 extern void cupsdSetString(char **s
, const char *v
);
179 extern void cupsdSetStringf(char **s
, const char *f
, ...)
181 __attribute__ ((__format__ (__printf__
, 2, 3)))
182 #endif /* __GNUC__ */
184 extern void cupsdStartServer(void);
185 extern void cupsdStopServer(void);
186 extern void cupsdClosePipe(int *fds
);
187 extern int cupsdOpenPipe(int *fds
);
189 extern void cupsdClearEnv(void);
190 extern void cupsdInitEnv(void);
191 extern int cupsdLoadEnv(char *envp
[], int envmax
);
192 extern void cupsdSetEnv(const char *name
, const char *value
);
193 extern void cupsdSetEnvf(const char *name
, const char *value
, ...)
195 __attribute__ ((__format__ (__printf__
, 2, 3)))
196 #endif /* __GNUC__ */
199 extern int cupsdEndProcess(int pid
, int force
);
200 extern const char *cupsdFinishProcess(int pid
, char *name
, int namelen
);
201 extern int cupsdStartProcess(const char *command
, char *argv
[],
202 char *envp
[], int infd
, int outfd
,
203 int errfd
, int backfd
, int root
, int *pid
);
207 * End of "$Id: cupsd.h 5053 2006-02-02 18:14:38Z mike $".