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

« back to all changes in this revision

Viewing changes to cups/pwg-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: pwg-private.h 9212 2010-07-26 23:05:18Z mike $"
 
2
 * "$Id: pwg-private.h 9230 2010-08-10 00:02:02Z mike $"
3
3
 *
4
4
 *   Private PWG media API definitions for CUPS.
5
5
 *
48
48
 * Types and structures...
49
49
 */
50
50
 
51
 
typedef enum _pwg_output_mode_e         /**** PWG output-mode indices ****/
52
 
{
53
 
  _PWG_OUTPUT_MODE_MONOCHROME = 0,      /* output-mode=monochrome */
54
 
  _PWG_OUTPUT_MODE_COLOR,               /* output-mode=color */
55
 
  _PWG_OUTPUT_MODE_MAX
56
 
} _pwg_output_mode_t;
57
 
 
58
 
typedef enum _pwg_print_quality_e       /**** PWG print-quality indices ****/
59
 
{
60
 
  _PWG_PRINT_QUALITY_DRAFT = 0,         /* print-quality=3 */
61
 
  _PWG_PRINT_QUALITY_NORMAL,            /* print-quality=4 */
62
 
  _PWG_PRINT_QUALITY_HIGH,              /* print-quality=5 */
63
 
  _PWG_PRINT_QUALITY_MAX
64
 
} _pwg_print_quality_t;
 
51
typedef struct _pwg_map_s               /**** Map element - PPD to/from PWG */
 
52
{
 
53
  char          *pwg,                   /* PWG media keyword */
 
54
                *ppd;                   /* PPD option keyword */
 
55
} _pwg_map_t;
65
56
 
66
57
typedef struct _pwg_media_s             /**** Common media size data ****/
67
58
{
72
63
                length;                 /* Length in 2540ths */
73
64
} _pwg_media_t;
74
65
 
75
 
typedef struct _pwg_map_s               /**** Map element - PPD to/from PWG */
76
 
{
77
 
  char          *pwg,                   /* PWG media keyword */
78
 
                *ppd;                   /* PPD option keyword */
79
 
} _pwg_map_t;
80
 
 
81
66
typedef struct _pwg_size_s              /**** Size element - PPD to/from PWG */
82
67
{
83
68
  _pwg_map_t    map;                    /* Map element */
89
74
                top;                    /* Top margin in 2540ths */
90
75
} _pwg_size_t;
91
76
 
92
 
typedef struct _pwg_s                   /**** PWG-PPD conversion data ****/
93
 
{
94
 
  int           num_bins;               /* Number of output bins */
95
 
  _pwg_map_t    *bins;                  /* Output bins */
96
 
  int           num_sizes;              /* Number of media sizes */
97
 
  _pwg_size_t   *sizes;                 /* Media sizes */
98
 
  int           custom_max_width,       /* Maximum custom width in 2540ths */
99
 
                custom_max_length,      /* Maximum custom length in 2540ths */
100
 
                custom_min_width,       /* Minimum custom width in 2540ths */
101
 
                custom_min_length;      /* Minimum custom length in 2540ths */
102
 
  char          *custom_max_keyword,    /* Maximum custom size PWG keyword */
103
 
                *custom_min_keyword,    /* Minimum custom size PWG keyword */
104
 
                custom_ppd_size[41];    /* Custom PPD size name */
105
 
  _pwg_size_t   custom_size;            /* Custom size record */
106
 
  char          *source_option;         /* PPD option for media source */
107
 
  int           num_sources;            /* Number of media sources */
108
 
  _pwg_map_t    *sources;               /* Media sources */
109
 
  int           num_types;              /* Number of media types */
110
 
  _pwg_map_t    *types;                 /* Media types */
111
 
  int           num_presets[_PWG_OUTPUT_MODE_MAX][_PWG_PRINT_QUALITY_MAX];
112
 
                                        /* Number of output-mode/print-quality options */
113
 
  cups_option_t *presets[_PWG_OUTPUT_MODE_MAX][_PWG_PRINT_QUALITY_MAX];
114
 
                                        /* output-mode/print-quality options */
115
 
  char          *sides_option,          /* PPD option for sides */
116
 
                *sides_1sided,          /* Choice for one-sided */
117
 
                *sides_2sided_long,     /* Choice for two-sided-long-edge */
118
 
                *sides_2sided_short;    /* Choice for two-sided-short-edge */
119
 
} _pwg_t;
120
 
 
121
77
 
122
78
/*
123
79
 * Functions...
124
80
 */
125
81
 
126
 
extern _pwg_t           *_pwgCreateWithFile(const char *filename);
127
 
extern _pwg_t           *_pwgCreateWithPPD(ppd_file_t *ppd);
128
 
extern void             _pwgDestroy(_pwg_t *pwg);
129
82
extern void             _pwgGenerateSize(char *keyword, size_t keysize,
130
83
                                         const char *prefix,
131
 
                                         const char *ppdname,
 
84
                                         const char *name,
132
85
                                         int width, int length);
133
 
extern const char       *_pwgGetBin(_pwg_t *pwg, const char *output_bin);
134
 
extern const char       *_pwgGetInputSlot(_pwg_t *pwg, ipp_t *job,
135
 
                                          const char *keyword);
136
 
extern const char       *_pwgGetMediaType(_pwg_t *pwg, ipp_t *job,
137
 
                                          const char *keyword);
138
 
extern const char       *_pwgGetOutputBin(_pwg_t *pwg, const char *keyword);
139
 
extern const char       *_pwgGetPageSize(_pwg_t *pwg, ipp_t *job,
140
 
                                         const char *keyword, int *exact);
141
 
extern _pwg_size_t      *_pwgGetSize(_pwg_t *pwg, const char *page_size);
142
 
extern const char       *_pwgGetSource(_pwg_t *pwg, const char *input_slot);
143
 
extern const char       *_pwgGetType(_pwg_t *pwg, const char *media_type);
144
86
extern int              _pwgInitSize(_pwg_size_t *size, ipp_t *job,
145
87
                                     int *margins_set);
146
 
extern const char       *_pwgInputSlotForSource(const char *media_source,
147
 
                                                char *name, size_t namesize);
148
88
extern _pwg_media_t     *_pwgMediaForLegacy(const char *legacy);
149
89
extern _pwg_media_t     *_pwgMediaForPPD(const char *ppd);
150
90
extern _pwg_media_t     *_pwgMediaForPWG(const char *pwg);
151
91
extern _pwg_media_t     *_pwgMediaForSize(int width, int length);
152
 
extern const char       *_pwgMediaTypeForType(const char *media_source,
153
 
                                              char *name, size_t namesize);
154
 
extern const char       *_pwgPageSizeForMedia(_pwg_media_t *media,
155
 
                                              char *name, size_t namesize);
156
 
extern int              _pwgWriteFile(_pwg_t *pwg, const char *filename);
157
92
 
158
93
 
159
94
#  ifdef __cplusplus
163
98
#endif /* !_CUPS_PWG_PRIVATE_H_ */
164
99
 
165
100
/*
166
 
 * End of "$Id: pwg-private.h 9212 2010-07-26 23:05:18Z mike $".
 
101
 * End of "$Id: pwg-private.h 9230 2010-08-10 00:02:02Z mike $".
167
102
 */