]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/ppd-private.h
Merge pull request #5081 from sblondon/master
[thirdparty/cups.git] / cups / ppd-private.h
index 9e890e9edec86873e98316973f3c4d5df86a86f2..b199bbd2e93464c96b69debe310d9b4e1968c672 100644 (file)
@@ -1,16 +1,14 @@
 /*
- * "$Id$"
- *
  * Private PPD definitions for CUPS.
  *
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * 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/".
+ * missing or damaged, see the license at "http://www.cups.org/".
  *
  * PostScript is a trademark of Adobe Systems, Inc.
  *
@@ -49,13 +47,25 @@ extern "C" {
  * Constants...
  */
 
-#  define _PPD_CACHE_VERSION   6       /* Version number in cache file */
+#  define _PPD_CACHE_VERSION   8       /* Version number in cache file */
 
 
 /*
  * Types and structures...
  */
 
+typedef struct _ppd_globals_s          /**** CUPS PPD global state data ****/
+{
+  /* ppd.c */
+  ppd_status_t         ppd_status;     /* Status of last ppdOpen*() */
+  int                  ppd_line;       /* Current line number */
+  ppd_conform_t                ppd_conform;    /* Level of conformance required */
+
+  /* ppd-util.c */
+  char                 ppd_filename[HTTP_MAX_URI];
+                                       /* PPD filename */
+} _ppd_globals_t;
+
 typedef enum _ppd_localization_e       /**** Selector for _ppdOpen ****/
 {
   _PPD_LOCALIZATION_DEFAULT,           /* Load only the default localization */
@@ -90,7 +100,7 @@ typedef enum _pwg_print_color_mode_e /**** PWG print-color-mode indices ****/
 {
   _PWG_PRINT_COLOR_MODE_MONOCHROME = 0,        /* print-color-mode=monochrome */
   _PWG_PRINT_COLOR_MODE_COLOR,         /* print-color-mode=color */
-  /* Other proposed values are not supported by CUPS yet. */
+  /* Other values are not supported by CUPS yet. */
   _PWG_PRINT_COLOR_MODE_MAX
 } _pwg_print_color_mode_t;
 
@@ -155,6 +165,7 @@ struct _ppd_cache_s                 /**** PPD cache and PWG conversion data ****/
  * Prototypes...
  */
 
+extern int             _cupsConvertOptions(ipp_t *request, ppd_file_t *ppd, _ppd_cache_t *pc, ipp_attribute_t *media_col_sup, ipp_attribute_t *doc_handling_sup, ipp_attribute_t *print_color_mode_sup, const char *user, const char *format, int copies, int num_options, cups_option_t *options);
 extern _ppd_cache_t    *_ppdCacheCreateWithFile(const char *filename,
                                                 ipp_t **attrs);
 extern _ppd_cache_t    *_ppdCacheCreateWithPPD(ppd_file_t *ppd);
@@ -187,9 +198,11 @@ extern const char  *_ppdCacheGetType(_ppd_cache_t *pc,
                                          const char *media_type);
 extern int             _ppdCacheWriteFile(_ppd_cache_t *pc,
                                           const char *filename, ipp_t *attrs);
+extern char            *_ppdCreateFromIPP(char *buffer, size_t bufsize, ipp_t *response);
 extern void            _ppdFreeLanguages(cups_array_t *languages);
 extern cups_encoding_t _ppdGetEncoding(const char *name);
 extern cups_array_t    *_ppdGetLanguages(ppd_file_t *ppd);
+extern _ppd_globals_t  *_ppdGlobals(void);
 extern unsigned                _ppdHashName(const char *name);
 extern ppd_attr_t      *_ppdLocalizedAttr(ppd_file_t *ppd, const char *keyword,
                                           const char *spec, const char *ll_CC);
@@ -219,7 +232,3 @@ extern const char   *_pwgPageSizeForMedia(pwg_media_t *media,
 }
 #  endif /* __cplusplus */
 #endif /* !_CUPS_PPD_PRIVATE_H_ */
-
-/*
- * End of "$Id$".
- */