]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/cups.h
Import CUPS v2.0.3
[thirdparty/cups.git] / cups / cups.h
index e50468508bd08f945ef0421d0311d2818dcff9c9..50e27284becb740e4945ba6ec667617daa1ca704 100644 (file)
@@ -1,18 +1,18 @@
 /*
- * "$Id: cups.h 8781 2009-08-28 17:34:54Z mike $"
+ * "$Id: cups.h 12704 2015-06-08 19:08:01Z msweet $"
  *
- *   API definitions for CUPS.
+ * API definitions for CUPS.
  *
- *   Copyright 2007-2012 by Apple Inc.
- *   Copyright 1997-2007 by Easy Software Products.
+ * Copyright 2007-2015 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"
 
 
 /*
@@ -52,10 +49,10 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION                 1.0700
-#  define CUPS_VERSION_MAJOR           1
-#  define CUPS_VERSION_MINOR           7
-#  define CUPS_VERSION_PATCH           0
+#  define CUPS_VERSION                 2.0003
+#  define CUPS_VERSION_MAJOR           2
+#  define CUPS_VERSION_MINOR           0
+#  define CUPS_VERSION_PATCH           3
 
 #  define CUPS_BC_FD                   3
                                        /* Back-channel file descriptor for
@@ -353,12 +350,13 @@ extern ipp_t              *cupsDoRequest(http_t *http, ipp_t *request,
                                       const char *resource);
 extern http_encryption_t cupsEncryption(void);
 extern void            cupsFreeJobs(int num_jobs, cups_job_t *jobs);
-extern int             cupsGetClasses(char ***classes) _CUPS_DEPRECATED;
+extern int             cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead.");
 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 int             cupsGetPrinters(char ***printers) _CUPS_DEPRECATED;
+extern const char      *cupsGetPPD(const char *name)
+                                   _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead.");
+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,
                                      const char *title, int num_options,
@@ -366,7 +364,7 @@ extern int          cupsPrintFile(const char *name, const char *filename,
 extern int             cupsPrintFiles(const char *name, int num_files,
                                       const char **files, const char *title,
                                       int num_options, cups_option_t *options);
-extern char            *cupsTempFile(char *filename, int len) _CUPS_DEPRECATED;
+extern char            *cupsTempFile(char *filename, int len) _CUPS_DEPRECATED_MSG("Use cupsTempFd or cupsTempFile2 instead.");
 extern int             cupsTempFd(char *filename, int len);
 
 extern int             cupsAddDest(const char *name, const char *instance,
@@ -416,7 +414,7 @@ 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;
+                                    _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead.");
 extern int             cupsPrintFile2(http_t *http, const char *name,
                                       const char *filename,
                                       const char *title, int num_options,
@@ -590,6 +588,39 @@ extern http_status_t       cupsStartDestDocument(http_t *http, cups_dest_t *dest,
                                              cups_option_t *options,
                                              int last_document) _CUPS_API_1_6;
 
+/* New in CUPS 1.7 */
+extern ipp_attribute_t *cupsFindDestDefault(http_t *http, cups_dest_t *dest,
+                                            cups_dinfo_t *dinfo,
+                                            const char *option) _CUPS_API_1_7;
+extern ipp_attribute_t *cupsFindDestReady(http_t *http, cups_dest_t *dest,
+                                          cups_dinfo_t *dinfo,
+                                          const char *option) _CUPS_API_1_7;
+extern ipp_attribute_t *cupsFindDestSupported(http_t *http, cups_dest_t *dest,
+                                              cups_dinfo_t *dinfo,
+                                              const char *option)
+                                              _CUPS_API_1_7;
+extern int             cupsGetDestMediaByIndex(http_t *http, cups_dest_t *dest,
+                                               cups_dinfo_t *dinfo, int n,
+                                               unsigned flags,
+                                               cups_size_t *size)
+                                               _CUPS_API_1_7;
+extern  int            cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
+                                             cups_dinfo_t *dinfo,
+                                             unsigned flags) _CUPS_API_1_7;
+extern int             cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
+                                               cups_dinfo_t *dinfo,
+                                               unsigned flags,
+                                               cups_size_t *size)
+                                               _CUPS_API_1_7;
+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
 }
 #  endif /* __cplusplus */
@@ -597,5 +628,5 @@ extern http_status_t        cupsStartDestDocument(http_t *http, cups_dest_t *dest,
 #endif /* !_CUPS_CUPS_H_ */
 
 /*
- * End of "$Id: cups.h 8781 2009-08-28 17:34:54Z mike $".
+ * End of "$Id: cups.h 12704 2015-06-08 19:08:01Z msweet $".
  */