]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/cups.h
The IPP backend incorrectly included the job-password attribute in Validate-Job
[thirdparty/cups.git] / cups / cups.h
index 4c1ed2e729c55de20ae6dddf0169e1265daab284..0fc6c9b23a34896248bfcad38ba37a90abf1582b 100644 (file)
@@ -1,18 +1,18 @@
 /*
  * "$Id$"
  *
- *   API definitions for CUPS.
+ * API definitions for CUPS.
  *
- *   Copyright 2007-2013 by Apple Inc.
- *   Copyright 1997-2007 by Easy Software Products.
+ * Copyright 2007-2014 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
- *   file is missing or damaged, see the license at "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"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  *
- *   This file is subject to the Apple OS-Developed Software exception.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 #ifndef _CUPS_CUPS_H_
 typedef off_t ssize_t;                 /* @private@ */
 #  endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
 
-#  ifdef __BLOCKS__
-#    include <dispatch/dispatch.h>
-#  endif /* __BLOCKS__ */
-
 #  include "file.h"
 #  include "ipp.h"
 #  include "language.h"
 #  include "pwg.h"
 
+/*
+ * Define _PPD_DEPRECATED to silence the warnings about PPD functions being
+ * deprecated...
+ */
+
+#  ifndef _PPD_DEPRECATED
+#    define _PPD_DEPRECATED _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo and friends instead.")
+#  endif /* !_PPD_DEPRECATED */
+
 
 /*
  * C++ magic...
@@ -53,9 +58,9 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION                 1.0700
-#  define CUPS_VERSION_MAJOR           1
-#  define CUPS_VERSION_MINOR           7
+#  define CUPS_VERSION                 2.0200
+#  define CUPS_VERSION_MAJOR           2
+#  define CUPS_VERSION_MINOR           2
 #  define CUPS_VERSION_PATCH           0
 
 #  define CUPS_BC_FD                   3
@@ -245,6 +250,7 @@ enum cups_ptype_e                   /* Printer type/capability bit
                                         * @since CUPS 1.4/OS X 10.6@ */
   CUPS_PRINTER_MFP = 0x4000000,                /* Printer with scanning capabilities
                                         * @since CUPS 1.4/OS X 10.6@ */
+  CUPS_PRINTER_3D = 0x8000000,         /* 3D Printing @since CUPS 2.1@ */
   CUPS_PRINTER_OPTIONS = 0x6fffc       /* ~(CLASS | REMOTE | IMPLICIT |
                                         * DEFAULT | FAX | REJECTING | DELETE |
                                         * NOT_SHARED | AUTHENTICATED |
@@ -358,7 +364,7 @@ extern int          cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsGetDes
 extern const char      *cupsGetDefault(void);
 extern int             cupsGetJobs(cups_job_t **jobs, const char *name,
                                    int myjobs, int whichjobs);
-extern const char      *cupsGetPPD(const char *name);
+extern const char      *cupsGetPPD(const char *name) _PPD_DEPRECATED;
 extern int             cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead.");
 extern ipp_status_t    cupsLastError(void);
 extern int             cupsPrintFile(const char *name, const char *filename,
@@ -416,8 +422,7 @@ extern int          cupsGetDests2(http_t *http, cups_dest_t **dests)
 extern int             cupsGetJobs2(http_t *http, cups_job_t **jobs,
                                     const char *name, int myjobs,
                                     int whichjobs) _CUPS_API_1_1_21;
-extern const char      *cupsGetPPD2(http_t *http, const char *name)
-                                    _CUPS_API_1_1_21;
+extern const char      *cupsGetPPD2(http_t *http, const char *name) _PPD_DEPRECATED;
 extern int             cupsPrintFile2(http_t *http, const char *name,
                                       const char *filename,
                                       const char *title, int num_options,
@@ -482,7 +487,7 @@ extern const char   *cupsGetPassword2(const char *prompt, http_t *http,
                                          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;
+                                   size_t bufsize) _PPD_DEPRECATED;
 extern ipp_t           *cupsGetResponse(http_t *http,
                                         const char *resource) _CUPS_API_1_4;
 extern ssize_t         cupsReadResponseData(http_t *http, char *buffer,
@@ -618,6 +623,11 @@ extern int         cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
 extern void            cupsSetUserAgent(const char *user_agent) _CUPS_API_1_7;
 extern const char      *cupsUserAgent(void) _CUPS_API_1_7;
 
+/* New in CUPS 2.0/OS X 10.10 */
+extern cups_dest_t     *cupsGetDestWithURI(const char *name, const char *uri) _CUPS_API_2_0;
+extern const char      *cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest, cups_dinfo_t *info, unsigned flags, cups_size_t *size) _CUPS_API_2_0;
+extern int             cupsMakeServerCredentials(const char *path, const char *common_name, int num_alt_names, const char **alt_names, time_t expiration_date) _CUPS_API_2_0;
+extern int             cupsSetServerCredentials(const char *path, const char *common_name, int auto_create) _CUPS_API_2_0;
 
 #  ifdef __cplusplus
 }