]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/cups.h
Add public cupsEncodeOption API
[thirdparty/cups.git] / cups / cups.h
index 16bd98fec12ba1d7ae412236d5f0435e829f6077..1a0b34a3d10c220af46e7e3a677d425cdf011b6a 100644 (file)
@@ -4,13 +4,7 @@
  * Copyright 2007-2017 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
- * 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"
- * which should have been included with this file.  If this file is
- * missing or damaged, see the license at "http://www.cups.org/".
- *
- * This file is subject to the Apple OS-Developed Software exception.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 #ifndef _CUPS_CUPS_H_
@@ -47,10 +41,10 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION                 2.0204
+#  define CUPS_VERSION                 2.0300
 #  define CUPS_VERSION_MAJOR           2
-#  define CUPS_VERSION_MINOR           2
-#  define CUPS_VERSION_PATCH           4
+#  define CUPS_VERSION_MINOR           3
+#  define CUPS_VERSION_PATCH           0
 
 #  define CUPS_BC_FD                   3
                                        /* Back-channel file descriptor for
@@ -92,6 +86,8 @@ extern "C" {
                                        /* A connection is being established */
 #  define CUPS_DEST_FLAGS_CANCELED     0x40
                                        /* Operation was canceled */
+#  define CUPS_DEST_FLAGS_DEVICE        0x80
+                                        /* For @link cupsConnectDest@: Connect to device */
 
 /* Flags for cupsGetDestMediaByName/Size */
 #  define CUPS_MEDIA_FLAGS_DEFAULT     0x00
@@ -234,10 +230,10 @@ enum cups_ptype_e                 /* Printer type/capability bit
                                         * @since CUPS 1.2/macOS 10.5@ */
   CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was discovered @since CUPS 1.2/macOS 10.5@ */
   CUPS_PRINTER_SCANNER = 0x2000000,    /* Scanner-only device
-                                        * @since CUPS 1.4/macOS 10.6@ */
+                                        * @since CUPS 1.4/macOS 10.6@ @private@ */
   CUPS_PRINTER_MFP = 0x4000000,                /* Printer with scanning capabilities
-                                        * @since CUPS 1.4/macOS 10.6@ */
-  CUPS_PRINTER_3D = 0x8000000,         /* Printer with 3D capabilities @exclude all@ @deprecated@ */
+                                        * @since CUPS 1.4/macOS 10.6@ @private@ */
+  CUPS_PRINTER_3D = 0x8000000,         /* Printer with 3D capabilities @exclude all@ @private@ */
   CUPS_PRINTER_OPTIONS = 0x6fffc       /* ~(CLASS | REMOTE | IMPLICIT |
                                         * DEFAULT | FAX | REJECTING | DELETE |
                                         * NOT_SHARED | AUTHENTICATED |
@@ -308,11 +304,12 @@ typedef int (*cups_dest_cb_t)(void *user_data, unsigned flags,
 #  ifdef __BLOCKS__
 typedef int (^cups_dest_block_t)(unsigned flags, cups_dest_t *dest);
                                        /* Destination enumeration block
-                                        * @since CUPS 1.6/macOS 10.8@ */
+                                        * @since CUPS 1.6/macOS 10.8@
+                                         * @exclude all@ */
 #  endif /* __BLOCKS__ */
 
 typedef const char *(*cups_password_cb_t)(const char *prompt);
-                                       /* Password callback */
+                                       /* Password callback @exclude all@ */
 
 typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http,
                                           const char *method,
@@ -603,6 +600,11 @@ extern ssize_t             cupsHashData(const char *algorithm, const void *data, size_t dat
 extern int             cupsAddIntegerOption(const char *name, int value, int num_options, cups_option_t **options) _CUPS_API_2_2_4;
 extern int             cupsGetIntegerOption(const char *name, int num_options, cups_option_t *options) _CUPS_API_2_2_4;
 
+/* New in CUPS 2.3 */
+extern int             cupsAddDestMediaOptions(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, unsigned flags, cups_size_t *size, int num_options, cups_option_t **options) _CUPS_API_2_3;
+extern ipp_attribute_t *cupsEncodeOption(ipp_t *ipp, ipp_tag_t group_tag, const char *name, const char *value) _CUPS_API_2_3;
+extern const char      *cupsHashString(const unsigned char *hash, size_t hashsize, char *buffer, size_t bufsize) _CUPS_API_2_3;
+
 #  ifdef __cplusplus
 }
 #  endif /* __cplusplus */