~ubuntu-branches/ubuntu/oneiric/cups/oneiric-proposed

« back to all changes in this revision

Viewing changes to cups/ppd-private.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Till Kamppeter, Martin Pitt
  • Date: 2011-08-07 12:53:12 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110807125312-s323cyb3oqaxaemo
Tags: 1.5.0-1
[ Till Kamppeter ]
* New upstream release
* debian/patches/usb-backend-no-segfault-on-bad-device-id.patch,
  debian/patches/usb-backend-accept-old-usblp-uris.patch,
  debian/patches/use-ps2write-ghostscript-device-for-pdftops-filter.patch:
  Removed, included upstream.
* debian/patches/poppler-based-pdftops-fixes.patch,
  debian/patches/do-not-emit-ps-level-3-with-poppler.patch: Replaced patch
  by a new one only containing the parts which remain after removing the
  parts included upstream.
* debian/patches/pidfile.patch,
  debian/patches/ppd-poll-with-client-conf.patch,
  debian/patches/cups-avahi.patch,
  debian/patches/drop_unnecessary_dependencies.patch,
  debian/patches/do-not-broadcast-with-hostnames.patch,
  debian/patches/ppdc-dynamic-linking.patch,
  debian/patches/pstops-based-workflow-only-for-printing-ps-on-a-ps-printer.patch:
  Manually regenerated to adapt to upstream changes.
* debian/patches/manpage-translations.patch,
  debian/patches/rootbackends-worldreadable.patch,
  debian/patches/no-conffile-timestamp.patch,
  debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch,
  debian/patches/cups-snmp-oids-device-id-hp-ricoh.patch,
  debian/patches/configure-default-browse-protocols.patch,
  debian/patches/logfiles_adm_readable.patch,
  debian/patches/confdirperms.patch,
  debian/patches/printer-filtering.patch,
  debian/patches/show-compile-command-lines.patch,
  debian/patches/log-debug-history-nearly-unlimited.patch:
  Refreshed using quilt.
* debian/patches/default-ripcache-size-auto.patch: Dropped, as once,
  Ghostscript 9.04 is ignoring the cache size value as it crashes easily
  otherwise (Ghostscript upstream bug #691586) and second, CUPS defaults to
  more reasonable 128 MB (now only used for imagetops).
* debian/patches/support-gzipped-charmaps.patch: Dropped, as the SBCS and
  VBCS character maps are not used any more by CUPS.
* debian/rules: Enable threads in the ./configure command line, as otherwise
  CUPS 1.5.0 does not build at all.
* debian/local/filters/pdf-filters/filter/pdftoijs.cxx,
  debian/local/filters/pdf-filters/filter/pdftoraster.cxx,
  debian/local/filters/pdf-filters/pdftoopvp/pdftoopvp.cxx,
  debian/local/filters/pdf-filters/pdftopdf/pdftopdf.cxx: Under CUPS 1.5.x.
  all programs using the PPD API of CUPS need to explicitly include
  "<cups/ppd.h>". Updated the PDF filter add-on package.
* debian/local/filters/pdf-filters/addtocups: Make the addition of the
  pdftopdf and pdftoopvp directories also work with CUPS 1.5.x.
* debian/local/filters/pdf-filters/addtocups,
  debian/local/filters/pdf-filters/removefromcups: Added a symbolic link
  cups/i18n.h, so that texttopdf builds.
* debian/cups-client.install: Install the new ipptool and its sample
  files and manpages.
* debian/cups-client.install: Commented out lines for dropped man page
  translations: ipptool, lppasswd, client.conf, ipptoolfile, cupsenable,
  lpadmin, lpinfo, cupsreject, cupsdisable, cupsaccept
* debian/cups-common.install, debian/rules: The /usr/share/cups/charmaps
  directory got removed from CUPS.
* debian/libcups2-dev.install: cups/i18n.h got renamed to
  cups/language-private.h. Install this as /usr/include/cups/i18n.h.
* debian/libcups2.symbols, debian/libcupsmime1.symbols: Updated.
* debian/cups.lintian-overrides, debian/cups.postinst, debian/cups.prerm,
  debian/cups.templates, debian/local/apparmor-profile: The "scsi"
  CUPS backend got dropped upstream, removed its treatment from these files.

[ Martin Pitt ]
* Add Serbian (Cyrillic) debconf translations, thanks Zlatan Todoric.
  (Closes: #635105)
* Add Serbian (Latin) debconf translations, thanks Zlatan Todoric.
  (Closes: #635108)
* debian/local/apparmor-profile: Allow access to serial printers on USB
  adapters. (LP: #677432)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: ppd-private.h 9170 2010-06-22 03:06:13Z mike $"
3
 
 *
4
 
 *   Private PPD definitions for the Common UNIX Printing System (CUPS).
5
 
 *
6
 
 *   Copyright 2007-2008 by Apple Inc.
 
2
 * "$Id: ppd-private.h 9662 2011-03-30 16:59:09Z mike $"
 
3
 *
 
4
 *   Private PPD definitions for CUPS.
 
5
 *
 
6
 *   Copyright 2007-2011 by Apple Inc.
7
7
 *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
8
8
 *
9
9
 *   These coded instructions, statements, and computer programs are the
31
31
 * Include necessary headers...
32
32
 */
33
33
 
34
 
#  include "cups.h"
 
34
#  include <cups/cups.h>
 
35
#  include <cups/ppd.h>
 
36
#  include "pwg-private.h"
35
37
 
36
38
 
37
39
/*
44
46
 
45
47
 
46
48
/*
 
49
 * Constants...
 
50
 */
 
51
 
 
52
#  define _PPD_CACHE_VERSION    1       /* Version number in cache file */
 
53
 
 
54
 
 
55
/*
47
56
 * Types and structures...
48
57
 */
49
58
 
69
78
  _ppd_cups_uiconst_t *constraints;     /* Constraints */
70
79
} _ppd_cups_uiconsts_t;
71
80
 
 
81
typedef enum _pwg_print_color_mode_e    /**** PWG print-color-mode indices ****/
 
82
{
 
83
  _PWG_PRINT_COLOR_MODE_MONOCHROME = 0, /* print-color-mode=monochrome */
 
84
  _PWG_PRINT_COLOR_MODE_COLOR,          /* print-color-mode=color */
 
85
  /* Other proposed values are not supported by CUPS yet. */
 
86
  _PWG_PRINT_COLOR_MODE_MAX
 
87
} _pwg_print_color_mode_t;
 
88
 
 
89
typedef enum _pwg_print_quality_e       /**** PWG print-quality indices ****/
 
90
{
 
91
  _PWG_PRINT_QUALITY_DRAFT = 0,         /* print-quality=3 */
 
92
  _PWG_PRINT_QUALITY_NORMAL,            /* print-quality=4 */
 
93
  _PWG_PRINT_QUALITY_HIGH,              /* print-quality=5 */
 
94
  _PWG_PRINT_QUALITY_MAX
 
95
} _pwg_print_quality_t;
 
96
 
 
97
struct _ppd_cache_s                     /**** PPD cache and PWG conversion data ****/
 
98
{
 
99
  int           num_bins;               /* Number of output bins */
 
100
  _pwg_map_t    *bins;                  /* Output bins */
 
101
  int           num_sizes;              /* Number of media sizes */
 
102
  _pwg_size_t   *sizes;                 /* Media sizes */
 
103
  int           custom_max_width,       /* Maximum custom width in 2540ths */
 
104
                custom_max_length,      /* Maximum custom length in 2540ths */
 
105
                custom_min_width,       /* Minimum custom width in 2540ths */
 
106
                custom_min_length;      /* Minimum custom length in 2540ths */
 
107
  char          *custom_max_keyword,    /* Maximum custom size PWG keyword */
 
108
                *custom_min_keyword,    /* Minimum custom size PWG keyword */
 
109
                custom_ppd_size[41];    /* Custom PPD size name */
 
110
  _pwg_size_t   custom_size;            /* Custom size record */
 
111
  char          *source_option;         /* PPD option for media source */
 
112
  int           num_sources;            /* Number of media sources */
 
113
  _pwg_map_t    *sources;               /* Media sources */
 
114
  int           num_types;              /* Number of media types */
 
115
  _pwg_map_t    *types;                 /* Media types */
 
116
  int           num_presets[_PWG_PRINT_COLOR_MODE_MAX][_PWG_PRINT_QUALITY_MAX];
 
117
                                        /* Number of print-color-mode/print-quality options */
 
118
  cups_option_t *presets[_PWG_PRINT_COLOR_MODE_MAX][_PWG_PRINT_QUALITY_MAX];
 
119
                                        /* print-color-mode/print-quality options */
 
120
  char          *sides_option,          /* PPD option for sides */
 
121
                *sides_1sided,          /* Choice for one-sided */
 
122
                *sides_2sided_long,     /* Choice for two-sided-long-edge */
 
123
                *sides_2sided_short;    /* Choice for two-sided-short-edge */
 
124
  char          *product;               /* Product value */
 
125
  cups_array_t  *filters,               /* cupsFilter/cupsFilter2 values */
 
126
                *prefilters;            /* cupsPreFilter values */
 
127
  int           single_file;            /* cupsSingleFile value */
 
128
};
 
129
 
72
130
 
73
131
/*
74
132
 * Prototypes...
75
133
 */
76
134
 
 
135
extern _ppd_cache_t     *_ppdCacheCreateWithFile(const char *filename,
 
136
                                                 ipp_t **attrs);
 
137
extern _ppd_cache_t     *_ppdCacheCreateWithPPD(ppd_file_t *ppd);
 
138
extern void             _ppdCacheDestroy(_ppd_cache_t *pc);
 
139
extern const char       *_ppdCacheGetBin(_ppd_cache_t *pc,
 
140
                                         const char *output_bin);
 
141
extern const char       *_ppdCacheGetInputSlot(_ppd_cache_t *pc, ipp_t *job,
 
142
                                               const char *keyword);
 
143
extern const char       *_ppdCacheGetMediaType(_ppd_cache_t *pc, ipp_t *job,
 
144
                                               const char *keyword);
 
145
extern const char       *_ppdCacheGetOutputBin(_ppd_cache_t *pc,
 
146
                                               const char *keyword);
 
147
extern const char       *_ppdCacheGetPageSize(_ppd_cache_t *pc, ipp_t *job,
 
148
                                              const char *keyword, int *exact);
 
149
extern _pwg_size_t      *_ppdCacheGetSize(_ppd_cache_t *pc,
 
150
                                          const char *page_size);
 
151
extern const char       *_ppdCacheGetSource(_ppd_cache_t *pc,
 
152
                                            const char *input_slot);
 
153
extern const char       *_ppdCacheGetType(_ppd_cache_t *pc,
 
154
                                          const char *media_type);
 
155
extern int              _ppdCacheWriteFile(_ppd_cache_t *pc,
 
156
                                           const char *filename, ipp_t *attrs);
77
157
extern void             _ppdFreeLanguages(cups_array_t *languages);
78
 
extern int              _ppdGet1284Values(const char *device_id,
79
 
                                          cups_option_t **values);
80
158
extern cups_encoding_t  _ppdGetEncoding(const char *name);
81
159
extern cups_array_t     *_ppdGetLanguages(ppd_file_t *ppd);
82
160
extern unsigned         _ppdHashName(const char *name);
88
166
extern int              _ppdParseOptions(const char *s, int num_options,
89
167
                                         cups_option_t **options,
90
168
                                         _ppd_parse_t which);
 
169
extern const char       *_pwgInputSlotForSource(const char *media_source,
 
170
                                                char *name, size_t namesize);
 
171
extern const char       *_pwgMediaTypeForType(const char *media_type,
 
172
                                              char *name, size_t namesize);
 
173
extern const char       *_pwgPageSizeForMedia(_pwg_media_t *media,
 
174
                                              char *name, size_t namesize);
91
175
 
92
176
 
93
177
/*
100
184
#endif /* !_CUPS_PPD_PRIVATE_H_ */
101
185
 
102
186
/*
103
 
 * End of "$Id: ppd-private.h 9170 2010-06-22 03:06:13Z mike $".
 
187
 * End of "$Id: ppd-private.h 9662 2011-03-30 16:59:09Z mike $".
104
188
 */