/*
- * "$Id$"
+ * "$Id: cupsd.h 6755 2007-08-01 19:02:47Z 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/".
*/
#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 MaxFDs; /* Maximum number of files */
VAR time_t ReloadTime VALUE(0);
/* Time of reload request... */
VAR int NeedReload VALUE(RELOAD_ALL);
/* Need to load configuration? */
+
+#ifdef HAVE_GSSAPI
+VAR krb5_context KerberosContext;/* 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 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, 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$".
+ * End of "$Id: cupsd.h 6755 2007-08-01 19:02:47Z mike $".
*/