]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/util.h
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / scheduler / util.h
index 285c246dcf54b2b4c88d0a1d83f31104f03836e5..6fa8dfd244e1ba3b69c8e801080f1b9d3a5a945b 100644 (file)
@@ -1,25 +1,10 @@
 /*
- * "$Id$"
+ * Mini-daemon utility definitions for CUPS.
  *
- *   Mini-daemon utility definitions for the Common UNIX Printing System (CUPS).
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2005 by Easy Software Products.
  *
- *   Copyright 1997-2005 by Easy Software Products.
- *
- *   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.txt" 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
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 #ifndef _CUPSD_UTIL_H_
  * Include necessary headers...
  */
 
-#  include <cups/cups.h>
-#  include <cups/file.h>
-#  include <cups/string.h>
-#  include <stdlib.h>
-#  include <errno.h>
+#  include <cups/array-private.h>
+#  include <cups/file-private.h>
 #  include <signal.h>
-#  include <dirent.h>
 
 
 /*
- * Prototypes...
+ * C++ magic...
  */
 
-extern int     cupsdCompareNames(const char *s, const char *t);
-extern void    cupsdSendIPPGroup(ipp_tag_t group_tag);
-extern void    cupsdSendIPPHeader(ipp_status_t status_code, int request_id);
-extern void    cupsdSendIPPInteger(ipp_tag_t value_tag, const char *name,
-                                   int value);
-extern void    cupsdSendIPPString(ipp_tag_t value_tag, const char *name,
-                                  const char *value);
-extern void    cupsdSendIPPTrailer(void);
+#  ifdef __cplusplus
+extern "C" {
+#  endif /* __cplusplus */
 
 
-#endif /* !_CUPSD_UTIL_H_ */
+/*
+ * Types...
+ */
+
+typedef int (*cupsd_compare_func_t)(const void *, const void *);
+
 
 /*
- * End of "$Id$".
+ * Prototypes...
  */
+
+extern int             cupsdCompareNames(const char *s, const char *t);
+extern cups_array_t    *cupsdCreateStringsArray(const char *s);
+extern int             cupsdExec(const char *command, char **argv);
+extern cups_file_t     *cupsdPipeCommand(int *pid, const char *command,
+                                         char **argv, uid_t user);
+extern void            cupsdSendIPPGroup(ipp_tag_t group_tag);
+extern void            cupsdSendIPPHeader(ipp_status_t status_code,
+                                          int request_id);
+extern void            cupsdSendIPPInteger(ipp_tag_t value_tag,
+                                           const char *name, int value);
+extern void            cupsdSendIPPString(ipp_tag_t value_tag,
+                                          const char *name, const char *value);
+extern void            cupsdSendIPPTrailer(void);
+
+
+#  ifdef __cplusplus
+}
+#  endif /* __cplusplus */
+
+#endif /* !_CUPSD_UTIL_H_ */