4 (c) Copyright 1996 Hewlett-Packard Company
5 (c) Copyright 1996 International Business Machines Corp.
6 (c) Copyright 1996 Sun Microsystems, Inc.
7 (c) Copyright 1996 Novell, Inc.
8 (c) Copyright 1996 Digital Equipment Corp.
9 (c) Copyright 1996 Fujitsu Limited
10 (c) Copyright 1996 Hitachi, Ltd.
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files (the "Software"), to deal
14 in the Software without restriction, including without limitation the rights
15 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions:
19 The above copyright notice and this permission notice shall be included in
20 all copies or substantial portions of the Software.
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
26 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 Except as contained in this notice, the names of the copyright holders shall
30 not be used in advertising or otherwise to promote the sale, use or other
31 dealings in this Software without prior written authorization from said
35 #ifdef HAVE_DIX_CONFIG_H
36 #include <dix-config.h>
40 #include "AttrValid.h"
43 * define valid values and defaults for Printer pool
45 static XpOid ValidContentOrientationsOids
[] = {
46 xpoid_val_content_orientation_portrait
,
47 xpoid_val_content_orientation_landscape
,
48 xpoid_val_content_orientation_reverse_portrait
,
49 xpoid_val_content_orientation_reverse_landscape
51 static XpOidList ValidContentOrientations
= {
52 ValidContentOrientationsOids
, XpNumber(ValidContentOrientationsOids
)
55 static XpOid DefaultContentOrientationsOids
[] = {
56 xpoid_val_content_orientation_portrait
,
57 xpoid_val_content_orientation_landscape
59 static XpOidList DefaultContentOrientations
= {
60 DefaultContentOrientationsOids
, XpNumber(DefaultContentOrientationsOids
)
63 static XpOid ValidPlexesOids
[] = {
64 xpoid_val_plex_simplex
, xpoid_val_plex_duplex
, xpoid_val_plex_tumble
66 static XpOidList ValidPlexes
= {
67 ValidPlexesOids
, XpNumber(ValidPlexesOids
)
70 static XpOid DefaultPlexesOids
[] = {
71 xpoid_val_plex_simplex
73 static XpOidList DefaultPlexes
= {
74 DefaultPlexesOids
, XpNumber(DefaultPlexesOids
)
77 static unsigned long ValidPrinterResolutionsCards
[] = {
80 static XpOidCardList ValidPrinterResolutions
= {
81 ValidPrinterResolutionsCards
, XpNumber(ValidPrinterResolutionsCards
)
84 static unsigned long DefaultPrinterResolutionsCards
[] = {
87 static XpOidCardList DefaultPrinterResolutions
= {
88 DefaultPrinterResolutionsCards
, XpNumber(DefaultPrinterResolutionsCards
)
91 static XpOid ValidListfontsModesOids
[] = {
92 xpoid_val_xp_list_internal_printer_fonts
, xpoid_val_xp_list_glyph_fonts
94 static XpOidList ValidListfontsModes
= {
95 ValidListfontsModesOids
, XpNumber(ValidListfontsModesOids
)
98 static XpOid DefaultListfontsModesOids
[] = {
99 xpoid_val_xp_list_glyph_fonts
101 static XpOidList DefaultListfontsModes
= {
102 DefaultListfontsModesOids
, XpNumber(DefaultListfontsModesOids
)
105 static XpOid ValidSetupProvisoOids
[] = {
106 xpoid_val_xp_setup_mandatory
, xpoid_val_xp_setup_optional
108 static XpOidList ValidSetupProviso
= {
111 ValidSetupProvisoOids
, XpNumber(ValidSetupProvisoOids
)
114 static XpOidDocFmt ValidDocFormatsSupportedFmts
[] = {
115 { "PCL", "5", NULL
},
117 static XpOidDocFmtList ValidDocFormatsSupported
= {
118 ValidDocFormatsSupportedFmts
, XpNumber(ValidDocFormatsSupportedFmts
)
121 static XpOidDocFmt DefaultDocFormatsSupportedFmts
[] = {
124 static XpOidDocFmtList DefaultDocFormatsSupported
= {
125 DefaultDocFormatsSupportedFmts
, XpNumber(DefaultDocFormatsSupportedFmts
)
128 static XpOidDocFmt ValidEmbeddedFormatsSupportedFmts
[] = {
129 { "HPGL", "2", NULL
},
131 static XpOidDocFmtList ValidEmbeddedFormatsSupported
= {
132 ValidEmbeddedFormatsSupportedFmts
, XpNumber(ValidEmbeddedFormatsSupportedFmts
)
135 static XpOidDocFmt DefaultEmbeddedFormatsSupportedFmts
[] = {
136 { "HPGL", "2", NULL
}
138 static XpOidDocFmtList DefaultEmbeddedFormatsSupported
= {
139 DefaultEmbeddedFormatsSupportedFmts
, XpNumber(DefaultEmbeddedFormatsSupportedFmts
)
142 static XpOidDocFmt ValidRawFormatsSupportedFmts
[] = {
143 { "PCL", "5", NULL
},
144 { "Postscript", "2", NULL
},
145 { "ASCII", NULL
, NULL
}
148 static XpOidDocFmtList ValidRawFormatsSupported
= {
149 ValidRawFormatsSupportedFmts
, XpNumber(ValidRawFormatsSupportedFmts
)
152 static XpOidDocFmt DefaultRawFormatsSupportedFmts
[] = {
155 static XpOidDocFmtList DefaultRawFormatsSupported
= {
156 DefaultRawFormatsSupportedFmts
, XpNumber(DefaultRawFormatsSupportedFmts
)
159 static XpOid ValidInputTraysOids
[] = {
160 xpoid_val_input_tray_manual
,
161 xpoid_val_input_tray_main
,
162 xpoid_val_input_tray_envelope
,
163 xpoid_val_input_tray_large_capacity
,
164 xpoid_val_input_tray_bottom
166 static XpOidList ValidInputTrays
= {
167 ValidInputTraysOids
, XpNumber(ValidInputTraysOids
)
170 static XpOid ValidMediumSizesOids
[] = {
171 xpoid_val_medium_size_iso_a3
,
172 xpoid_val_medium_size_iso_a4
,
173 xpoid_val_medium_size_na_letter
,
174 xpoid_val_medium_size_na_legal
,
175 xpoid_val_medium_size_executive
,
176 xpoid_val_medium_size_ledger
,
177 xpoid_val_medium_size_iso_c5
,
178 xpoid_val_medium_size_iso_designated_long
,
179 xpoid_val_medium_size_na_number_10_envelope
,
180 xpoid_val_medium_size_monarch_envelope
,
181 xpoid_val_medium_size_jis_b5
,
183 static XpOidList ValidMediumSizes
= {
184 ValidMediumSizesOids
, XpNumber(ValidMediumSizesOids
)
187 static XpOidDocFmt DefaultDocumentFormat
= {
193 * init struct for XpValidate*Pool
195 XpValidatePoolsRec PclValidatePoolsRec
= {
196 &ValidContentOrientations
, &DefaultContentOrientations
,
197 &ValidDocFormatsSupported
, &DefaultDocFormatsSupported
,
198 &ValidInputTrays
, &ValidMediumSizes
,
199 &ValidPlexes
, &DefaultPlexes
,
200 &ValidPrinterResolutions
, &DefaultPrinterResolutions
,
201 &ValidEmbeddedFormatsSupported
, &DefaultEmbeddedFormatsSupported
,
202 &ValidListfontsModes
, &DefaultListfontsModes
,
203 &ValidRawFormatsSupported
, &DefaultRawFormatsSupported
,
205 &DefaultDocumentFormat