]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/cupsd.h
Merge changes from CUPS 1.4svn-r7696.
[thirdparty/cups.git] / scheduler / cupsd.h
index 7380c3dcd50c32877686bf444b5886fc0ee50402..b4304ce830ab4d79a4d8ed877ace89507d978806 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id: cupsd.h 5007 2006-01-27 18:25:42Z mike $"
+ * "$Id: cupsd.h 7317 2008-02-15 22:29:27Z mike $"
  *
  *   Main header file for the Common UNIX Printing System (CUPS) scheduler.
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 2007 by Apple Inc.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
  *   "LICENSE" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  */
 
 
@@ -65,6 +56,9 @@
  */
 
 #ifndef HAVE_HSTRERROR
+#  ifdef hstrerror
+#    undef hstrerror
+#  endif /* hstrerror */
 #  define hstrerror cups_hstrerror
 
 extern const char *cups_hstrerror(int);
@@ -85,6 +79,7 @@ extern const char *cups_hstrerror(int);
  * Implementation limits...
  */
 
+#define MAX_ENV                        100     /* Maximum number of environment strings */
 #define MAX_USERPASS           33      /* Maximum size of username/password */
 #define MAX_FILTERS            20      /* Maximum number of filters */
 #define MAX_SYSTEM_GROUPS      32      /* Maximum number of system groups */
@@ -146,29 +141,56 @@ extern const char *cups_hstrerror(int);
 #define RELOAD_CUPSD   2               /* Reload only cupsd.conf */
 
 
+/*
+ * Select callback function type...
+ */
+
+typedef void (*cupsd_selfunc_t)(void *data);
+
+
 /*
  * Globals...
  */
 
-VAR int                        MaxFDs,         /* Maximum number of files */
-                       SetSize;        /* The size of the input/output sets */
-VAR fd_set             *InputSet,      /* Input files for select() */
-                       *OutputSet;     /* Output files for select() */
+VAR int                        TestConfigFile  VALUE(0);
+                                       /* Test the cupsd.conf file? */
+VAR int                        MaxFDs          VALUE(0);
+                                       /* Maximum number of files */
 
 VAR time_t             ReloadTime      VALUE(0);
                                        /* Time of reload request... */
 VAR int                        NeedReload      VALUE(RELOAD_ALL);
                                        /* Need to load configuration? */
+VAR void               *DefaultProfile VALUE(0);
+                                       /* Default security profile */
+
+#ifdef HAVE_GSSAPI
+VAR krb5_context       KerberosContext VALUE(NULL);
+                                       /* Kerberos context for credentials */
+#endif /* HAVE_GSSAPI */
+
+#ifdef HAVE_LAUNCH_H
+VAR int                        Launchd         VALUE(0);
+                                       /* Running from launchd */
+#endif /* HAVE_LAUNCH_H */
+
+#if defined(__APPLE__) && defined(HAVE_DLFCN_H)
+typedef int (*PSQUpdateQuotaProcPtr)(const char *printer, const char *info, 
+                                     const char *user, int nPages, int options);
+VAR PSQUpdateQuotaProcPtr PSQUpdateQuotaProc
+                                       VALUE(0);
+                                       /* Apple PrintService quota function */
+#endif /* __APPLE__ && HAVE_DLFCN_H */
+
+
 
 
 /*
  * Prototypes...
  */
 
-extern void    cupsdCatchChildSignals(void);
 extern void    cupsdClearString(char **s);
 extern void    cupsdHoldSignals(void);
-extern void    cupsdIgnoreChildSignals(void);
 extern void    cupsdReleaseSignals(void);
 extern void    cupsdSetString(char **s, const char *v);
 extern void    cupsdSetStringf(char **s, const char *f, ...)
@@ -181,7 +203,6 @@ extern void cupsdStopServer(void);
 extern void    cupsdClosePipe(int *fds);
 extern int     cupsdOpenPipe(int *fds);
 
-extern void    cupsdClearEnv(void);
 extern void    cupsdInitEnv(void);
 extern int     cupsdLoadEnv(char *envp[], int envmax);
 extern void    cupsdSetEnv(const char *name, const char *value);
@@ -191,12 +212,27 @@ __attribute__ ((__format__ (__printf__, 2, 3)))
 #endif /* __GNUC__ */
 ;
 
+extern void    *cupsdCreateProfile(int job_id);
+extern void    cupsdDestroyProfile(void *profile);
 extern int     cupsdEndProcess(int pid, int force);
+extern const char *cupsdFinishProcess(int pid, char *name, int namelen);
 extern int     cupsdStartProcess(const char *command, char *argv[],
                                  char *envp[], int infd, int outfd,
-                                 int errfd, int backfd, int root, int *pid);
+                                 int errfd, int backfd, int sidefd,
+                                 int root, void *profile, int *pid);
+
+extern int     cupsdAddSelect(int fd, cupsd_selfunc_t read_cb,
+                              cupsd_selfunc_t write_cb, void *data);
+extern int     cupsdDoSelect(long timeout);
+#ifdef CUPSD_IS_SELECTING
+extern int     cupsdIsSelecting(int fd);
+#endif /* CUPSD_IS_SELECTING */
+extern void    cupsdRemoveSelect(int fd);
+extern void    cupsdStartSelect(void);
+extern void    cupsdStopSelect(void);
 
+extern int     cupsdRemoveFile(const char *filename);
 
 /*
- * End of "$Id: cupsd.h 5007 2006-01-27 18:25:42Z mike $".
+ * End of "$Id: cupsd.h 7317 2008-02-15 22:29:27Z mike $".
  */