]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/cups.h
Merge changes from CUPS 1.4svn-r8628.
[thirdparty/cups.git] / cups / cups.h
index 6ef70f6474595078b51fd24d22b00c95a5514045..6502d95a5f936b815e7c84e1c9b856ef9a1f2159 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: cups.h 6870 2007-08-27 21:13:35Z mike $"
+ * "$Id: cups.h 7847 2008-08-19 04:22:14Z mike $"
  *
  *   API definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2009 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -59,7 +59,7 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION         1.0399
+#  define CUPS_VERSION         1.0400
 #  define CUPS_VERSION_MAJOR   1
 #  define CUPS_VERSION_MINOR   4
 #  define CUPS_VERSION_PATCH   -1
@@ -68,11 +68,13 @@ extern "C" {
 #  define CUPS_DATE_ANY                (time_t)-1
 #  define CUPS_EXCLUDE_NONE    (const char *)0
 #  define CUPS_FORMAT_AUTO     "application/octet-stream"
+#  define CUPS_FORMAT_COMMAND  "application/vnd.cups-command"
 #  define CUPS_FORMAT_PDF      "application/pdf"
 #  define CUPS_FORMAT_POSTSCRIPT "application/postscript"
 #  define CUPS_FORMAT_RAW      "application/vnd.cups-raw"
 #  define CUPS_FORMAT_TEXT     "text/plain"
 #  define CUPS_HTTP_DEFAULT    (http_t *)0
+#  define CUPS_INCLUDE_ALL     (const char *)0
 #  define CUPS_JOBID_ALL       -1
 #  define CUPS_JOBID_CURRENT   0
 #  define CUPS_LENGTH_VARIABLE (ssize_t)0
@@ -110,22 +112,31 @@ enum cups_ptype_e                 /**** Printer type/capability bit constants ****/
   CUPS_PRINTER_DEFAULT = 0x20000,      /* Default printer on network */
   CUPS_PRINTER_FAX = 0x40000,          /* Fax queue */
   CUPS_PRINTER_REJECTING = 0x80000,    /* Printer is rejecting jobs */
-  CUPS_PRINTER_DELETE = 0x100000,      /* Delete printer @since CUPS 1.2@ */
-  CUPS_PRINTER_NOT_SHARED = 0x200000,  /* Printer is not shared @since CUPS 1.2@ */
-  CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2@ */
-  CUPS_PRINTER_COMMANDS = 0x800000,    /* Printer supports maintenance commands @since CUPS 1.2@ */
-  CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3@ */
+  CUPS_PRINTER_DELETE = 0x100000,      /* Delete printer @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_NOT_SHARED = 0x200000,  /* Printer is not shared @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_COMMANDS = 0x800000,    /* Printer supports maintenance commands @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3/Mac OS X 10.5@ */
+  CUPS_PRINTER_SCANNER = 0x2000000,    /* Scanner-only device @since CUPS 1.4/Mac OS X 10.6@ */
+  CUPS_PRINTER_MFP = 0x4000000,                /* Printer with scanning capabilities @since CUPS 1.4/Mac OS X 10.6@ */
   CUPS_PRINTER_OPTIONS = 0x6fffc       /* ~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED) @private@ */
 };
 
 typedef const char *(*cups_password_cb_t)(const char *prompt);
                                        /**** Password callback ****/
 
+typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http,
+                                          const char *method,
+                                          const char *resource,
+                                          void *user_data);
+                                       /**** New password callback @since CUPS 1.4/Mac OS X 10.6@ ****/
+
 typedef void (*cups_device_cb_t)(const char *device_class,
                                  const char *device_id, const char *device_info,
                                  const char *device_make_and_model,
-                                 const char *device_uri, void *user_data);
-                                       /**** Device callback @since CUPS 1.4@ ****/
+                                 const char *device_uri,
+                                const char *device_location, void *user_data);
+                                       /**** Device callback @since CUPS 1.4/Mac OS X 10.6@ ****/
 
 typedef struct cups_option_s           /**** Printer Options ****/
 {
@@ -278,12 +289,20 @@ extern int                cupsCreateJob(http_t *http, const char *name,
                                      cups_option_t *options) _CUPS_API_1_4;
 extern ipp_status_t    cupsFinishDocument(http_t *http,
                                           const char *name) _CUPS_API_1_4;
+extern int             cupsGetConflicts(ppd_file_t *ppd, const char *option,
+                                        const char *choice,
+                                        cups_option_t **options)
+                                            _CUPS_API_1_4;
 extern ipp_status_t    cupsGetDevices(http_t *http, int timeout,
+                                      const char *include_schemes,
                                       const char *exclude_schemes,
                                       cups_device_cb_t callback,
                                       void *user_data) _CUPS_API_1_4;
 extern cups_dest_t     *cupsGetNamedDest(http_t *http, const char *name,
                                          const char *instance) _CUPS_API_1_4;
+extern const char      *cupsGetPassword2(const char *prompt, http_t *http,
+                                         const char *method,
+                                         const char *resource) _CUPS_API_1_4;
 extern http_status_t   cupsGetPPD3(http_t *http, const char *name,
                                    time_t *modtime, char *buffer,
                                    size_t bufsize) _CUPS_API_1_4;
@@ -291,9 +310,16 @@ extern ipp_t               *cupsGetResponse(http_t *http,
                                         const char *resource) _CUPS_API_1_4;
 extern ssize_t         cupsReadResponseData(http_t *http, char *buffer,
                                             size_t length) _CUPS_API_1_4;
+extern int             cupsResolveConflicts(ppd_file_t *ppd, const char *option,
+                                            const char *choice,
+                                            int *num_options,
+                                            cups_option_t **options)
+                                            _CUPS_API_1_4;
 extern http_status_t   cupsSendRequest(http_t *http, ipp_t *request,
                                        const char *resource,
                                        size_t length) _CUPS_API_1_4;
+extern void            cupsSetPasswordCB2(cups_password_cb2_t cb,
+                                          void *user_data) _CUPS_API_1_4;
 extern http_status_t   cupsStartDocument(http_t *http, const char *name,
                                          int job_id, const char *docname,
                                          const char *format,
@@ -308,5 +334,5 @@ extern http_status_t        cupsWriteRequestData(http_t *http, const char *buffer,
 #endif /* !_CUPS_CUPS_H_ */
 
 /*
- * End of "$Id: cups.h 6870 2007-08-27 21:13:35Z mike $".
+ * End of "$Id: cups.h 7847 2008-08-19 04:22:14Z mike $".
  */