]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/cupsd.h
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / scheduler / cupsd.h
index 81b5b35888ea929ace3b702ba3b24b0f0b74754b..a36ae88d1d709626de0a99ffb5a0357c7f59f83b 100644 (file)
@@ -1,25 +1,14 @@
 /*
- * "$Id: cupsd.h 6170 2007-01-02 17:26:41Z mike $"
+ * Main header file for the CUPS scheduler.
  *
- *   Main header file for the Common UNIX Printing System (CUPS) scheduler.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
- *   Copyright 1997-2006 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
- *   "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
+ * These coded instructions, statements, and computer programs are the
+ * 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, see the license at "http://www.cups.org/".
  */
 
 
  * Include necessary headers.
  */
 
-#include <cups/http-private.h>
-#include <cups/string.h>
-#include <stdlib.h>
+#include <cups/cups-private.h>
+#include <cups/file-private.h>
+#include <cups/ppd-private.h>
+
 #include <limits.h>
-#include <errno.h>
 #include <time.h>
 #include <signal.h>
 #include <fcntl.h>
 #  include <unistd.h>
 #endif /* WIN32 */
 
-#include <cups/array.h>
-#include <cups/cups.h>
 #include "mime.h"
-#include <cups/http.h>
-#include <cups/ipp.h>
-#include <cups/i18n.h>
-#include <cups/debug.h>
 
 #if defined(HAVE_CDSASSL)
 #  include <CoreFoundation/CoreFoundation.h>
@@ -98,12 +81,10 @@ extern const char *cups_hstrerror(int);
  * Defaults...
  */
 
-#define DEFAULT_HISTORY                1       /* Preserve job history? */
-#define DEFAULT_FILES          0       /* Preserve job files? */
+#define DEFAULT_HISTORY                INT_MAX /* Preserve job history? */
+#define DEFAULT_FILES          86400   /* Preserve job files? */
 #define DEFAULT_TIMEOUT                300     /* Timeout during requests/updates */
-#define DEFAULT_KEEPALIVE      60      /* Timeout between requests */
-#define DEFAULT_INTERVAL       30      /* Interval between browse updates */
-#define DEFAULT_CHARSET                "utf-8" /* Default charset */
+#define DEFAULT_KEEPALIVE      30      /* Timeout between requests */
 
 
 /*
@@ -134,6 +115,7 @@ extern const char *cups_hstrerror(int);
 #include "printers.h"
 #include "classes.h"
 #include "job.h"
+#include "colorman.h"
 #include "conf.h"
 #include "banners.h"
 #include "dirsvc.h"
@@ -161,61 +143,84 @@ typedef void (*cupsd_selfunc_t)(void *data);
  * Globals...
  */
 
-VAR int                        MaxFDs;         /* Maximum number of files */
+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);
+VAR int                        NeedReload      VALUE(RELOAD_ALL),
                                        /* Need to load configuration? */
-#ifdef HAVE_LAUNCH_H
-VAR int                        Launchd         VALUE(0);
-                                       /* Running from launchd */
-#endif /* HAVE_LAUNCH_H */
+                       DoingShutdown   VALUE(0);
+                                       /* Shutting down the scheduler? */
+VAR void               *DefaultProfile VALUE(0);
+                                       /* Default security profile */
+
+#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
+VAR int                        OnDemand        VALUE(0);
+                                       /* Launched on demand */
+#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
 
 
 /*
  * Prototypes...
  */
 
-extern void    cupsdClearString(char **s);
-extern void    cupsdHoldSignals(void);
-extern void    cupsdReleaseSignals(void);
-extern void    cupsdSetString(char **s, const char *v);
-extern void    cupsdSetStringf(char **s, const char *f, ...)
-#ifdef __GNUC__
-__attribute__ ((__format__ (__printf__, 2, 3)))
-#endif /* __GNUC__ */
-;
-extern void    cupsdStartServer(void);
-extern void    cupsdStopServer(void);
-extern void    cupsdClosePipe(int *fds);
-extern int     cupsdOpenPipe(int *fds);
-
-extern void    cupsdInitEnv(void);
-extern int     cupsdLoadEnv(char *envp[], int envmax);
-extern void    cupsdSetEnv(const char *name, const char *value);
-extern void    cupsdSetEnvf(const char *name, const char *value, ...)
-#ifdef __GNUC__
-__attribute__ ((__format__ (__printf__, 2, 3)))
-#endif /* __GNUC__ */
-;
-
-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 sidefd,
-                                 int root, int *pid);
-
-extern int     cupsdAddSelect(int fd, cupsd_selfunc_t read_cb,
-                              cupsd_selfunc_t write_cb, void *data);
-extern int     cupsdDoSelect(long timeout);
-extern int     cupsdIsSelecting(int fd);
-extern void    cupsdRemoveSelect(int fd);
-extern void    cupsdStartSelect(void);
-extern void    cupsdStopSelect(void);
-
-
-/*
- * End of "$Id: cupsd.h 6170 2007-01-02 17:26:41Z mike $".
- */
+/* env.c */
+extern void            cupsdInitEnv(void);
+extern int             cupsdLoadEnv(char *envp[], int envmax);
+extern void            cupsdSetEnv(const char *name, const char *value);
+extern void            cupsdSetEnvf(const char *name, const char *value, ...)
+                       __attribute__ ((__format__ (__printf__, 2, 3)));
+extern void            cupsdUpdateEnv(void);
+
+/* file.c */
+extern void            cupsdCleanFiles(const char *path, const char *pattern);
+extern int             cupsdCloseCreatedConfFile(cups_file_t *fp,
+                                                 const char *filename);
+extern void            cupsdClosePipe(int *fds);
+extern cups_file_t     *cupsdCreateConfFile(const char *filename, mode_t mode);
+extern cups_file_t     *cupsdOpenConfFile(const char *filename);
+extern int             cupsdOpenPipe(int *fds);
+extern int             cupsdRemoveFile(const char *filename);
+extern int             cupsdUnlinkOrRemoveFile(const char *filename);
+
+/* main.c */
+extern int             cupsdAddString(cups_array_t **a, const char *s);
+extern void            cupsdCheckProcess(void);
+extern void            cupsdClearString(char **s);
+extern void            cupsdFreeStrings(cups_array_t **a);
+extern void            cupsdHoldSignals(void);
+extern char            *cupsdMakeUUID(const char *name, int number,
+                                      char *buffer, size_t bufsize);
+extern void            cupsdReleaseSignals(void);
+extern void            cupsdSetString(char **s, const char *v);
+extern void            cupsdSetStringf(char **s, const char *f, ...)
+                       __attribute__ ((__format__ (__printf__, 2, 3)));
+
+/* process.c */
+extern void            *cupsdCreateProfile(int job_id, int allow_networking);
+extern void            cupsdDestroyProfile(void *profile);
+extern int             cupsdEndProcess(int pid, int force);
+extern const char      *cupsdFinishProcess(int pid, char *name, size_t namelen, int *job_id);
+extern int             cupsdStartProcess(const char *command, char *argv[],
+                                         char *envp[], int infd, int outfd,
+                                         int errfd, int backfd, int sidefd,
+                                         int root, void *profile,
+                                         cupsd_job_t *job, int *pid);
+
+/* select.c */
+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);
+
+/* server.c */
+extern void            cupsdStartServer(void);
+extern void            cupsdStopServer(void);