2 Unix SMB/Netbios implementation.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-2000,
6 Copyright (C) Jean Francois Micouleau 1998-2000.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #ifndef NT_PRINTING_H_
24 #define NT_PRINTING_H_
26 #define ORIENTATION 0x00000001L
27 #define PAPERSIZE 0x00000002L
28 #define PAPERLENGTH 0x00000004L
29 #define PAPERWIDTH 0x00000008L
30 #define SCALE 0x00000010L
31 #define COPIES 0x00000100L
32 #define DEFAULTSOURCE 0x00000200L
33 #define PRINTQUALITY 0x00000400L
34 #define COLOR 0x00000800L
35 #define DUPLEX 0x00001000L
36 #define YRESOLUTION 0x00002000L
37 #define TTOPTION 0x00004000L
38 #define COLLATE 0x00008000L
39 #define FORMNAME 0x00010000L
40 #define LOGPIXELS 0x00020000L
41 #define BITSPERPEL 0x00040000L
42 #define PELSWIDTH 0x00080000L
43 #define PELSHEIGHT 0x00100000L
44 #define DISPLAYFLAGS 0x00200000L
45 #define DISPLAYFREQUENCY 0x00400000L
46 #define PANNINGWIDTH 0x00800000L
47 #define PANNINGHEIGHT 0x01000000L
49 #define ORIENT_PORTRAIT 1
50 #define ORIENT_LANDSCAPE 2
52 #define PAPER_FIRST PAPER_LETTER
53 #define PAPER_LETTER 1 /* Letter 8 1/2 x 11 in */
54 #define PAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */
55 #define PAPER_TABLOID 3 /* Tabloid 11 x 17 in */
56 #define PAPER_LEDGER 4 /* Ledger 17 x 11 in */
57 #define PAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */
58 #define PAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */
59 #define PAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */
60 #define PAPER_A3 8 /* A3 297 x 420 mm */
61 #define PAPER_A4 9 /* A4 210 x 297 mm */
62 #define PAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */
63 #define PAPER_A5 11 /* A5 148 x 210 mm */
64 #define PAPER_B4 12 /* B4 (JIS) 250 x 354 */
65 #define PAPER_B5 13 /* B5 (JIS) 182 x 257 mm */
66 #define PAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */
67 #define PAPER_QUARTO 15 /* Quarto 215 x 275 mm */
68 #define PAPER_10X14 16 /* 10x14 in */
69 #define PAPER_11X17 17 /* 11x17 in */
70 #define PAPER_NOTE 18 /* Note 8 1/2 x 11 in */
71 #define PAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */
72 #define PAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */
73 #define PAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */
74 #define PAPER_ENV_12 22 /* Envelope #12 4 \276 x 11 */
75 #define PAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 */
76 #define PAPER_CSHEET 24 /* C size sheet */
77 #define PAPER_DSHEET 25 /* D size sheet */
78 #define PAPER_ESHEET 26 /* E size sheet */
79 #define PAPER_ENV_DL 27 /* Envelope DL 110 x 220mm */
80 #define PAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */
81 #define PAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */
82 #define PAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */
83 #define PAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */
84 #define PAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */
85 #define PAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */
86 #define PAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */
87 #define PAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */
88 #define PAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */
89 #define PAPER_ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */
90 #define PAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
91 #define PAPER_FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */
92 #define PAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */
93 #define PAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */
95 #define PAPER_LAST PAPER_FANFOLD_LGL_GERMAN
96 #define PAPER_USER 256
98 #define BIN_FIRST BIN_UPPER
100 #define BIN_ONLYONE 1
104 #define BIN_ENVELOPE 5
105 #define BIN_ENVMANUAL 6
107 #define BIN_TRACTOR 8
108 #define BIN_SMALLFMT 9
109 #define BIN_LARGEFMT 10
110 #define BIN_LARGECAPACITY 11
111 #define BIN_CASSETTE 14
112 #define BIN_FORMSOURCE 15
113 #define BIN_LAST BIN_FORMSOURCE
115 #define BIN_USER 256 /* device specific bins start here */
117 #define RES_DRAFT (-1)
119 #define RES_MEDIUM (-3)
120 #define RES_HIGH (-4)
122 #define COLOR_MONOCHROME 1
123 #define COLOR_COLOR 2
125 #define DUP_SIMPLEX 1
126 #define DUP_VERTICAL 2
127 #define DUP_HORIZONTAL 3
129 #define TT_BITMAP 1 /* print TT fonts as graphics */
130 #define TT_DOWNLOAD 2 /* download TT fonts as soft fonts */
131 #define TT_SUBDEV 3 /* substitute device fonts for TT fonts */
133 #define COLLATE_FALSE 0
134 #define COLLATE_TRUE 1
136 typedef struct nt_printer_driver_info_level_3
147 fstring defaultdatatype
;
148 fstring
*dependentfiles
;
149 } NT_PRINTER_DRIVER_INFO_LEVEL_3
;
151 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
161 fstring defaultdatatype
;
166 fstring
*dependentfiles
;
167 fstring
*previousnames
;
168 } NT_PRINTER_DRIVER_INFO_LEVEL_6
;
171 typedef struct nt_printer_driver_info_level
173 NT_PRINTER_DRIVER_INFO_LEVEL_3
*info_3
;
174 NT_PRINTER_DRIVER_INFO_LEVEL_6
*info_6
;
175 } NT_PRINTER_DRIVER_INFO_LEVEL
;
177 typedef struct nt_printer_param
183 struct nt_printer_param
*next
;
186 #define MAXDEVICENAME 32
188 typedef struct ntdevicemode
194 uint16 driverversion
;
203 uint16 defaultsource
;
217 uint32 displayfrequency
;
225 uint32 panningheight
;
229 typedef struct nt_printer_info_level_2
233 uint32 default_priority
;
246 NT_DEVICEMODE
*devmode
;
248 fstring printprocessor
;
251 NT_PRINTER_PARAM
*specific
;
252 SEC_DESC_BUF
*secdesc_buf
;
253 /* not used but ... and how ??? */
257 } NT_PRINTER_INFO_LEVEL_2
;
259 typedef struct nt_printer_info_level
261 NT_PRINTER_INFO_LEVEL_2
*info_2
;
262 } NT_PRINTER_INFO_LEVEL
;
291 #ifndef SAMBA_PRINTER_PORT_NAME
292 #define SAMBA_PRINTER_PORT_NAME "Samba Printer Port"
295 /* DOS header format */
296 #define DOS_HEADER_SIZE 64
297 #define DOS_HEADER_MAGIC_OFFSET 0
298 #define DOS_HEADER_MAGIC 0x5A4D
299 #define DOS_HEADER_LFANEW_OFFSET 60
301 /* New Executable format (Win or OS/2 1.x segmented) */
302 #define NE_HEADER_SIZE 64
303 #define NE_HEADER_SIGNATURE_OFFSET 0
304 #define NE_HEADER_SIGNATURE 0x454E
305 #define NE_HEADER_TARGET_OS_OFFSET 54
306 #define NE_HEADER_TARGOS_WIN 0x02
307 #define NE_HEADER_MINOR_VER_OFFSET 62
308 #define NE_HEADER_MAJOR_VER_OFFSET 63
310 /* Portable Executable format */
311 #define PE_HEADER_SIZE 248
312 #define PE_HEADER_SIGNATURE_OFFSET 0
313 #define PE_HEADER_SIGNATURE 0x00004550
314 #define PE_HEADER_MACHINE_OFFSET 4
315 #define PE_HEADER_MACHINE_I386 0x14c
316 #define PE_HEADER_NUMBER_OF_SECTIONS 6
317 #define PE_HEADER_MAJOR_OS_VER_OFFSET 64
318 #define PE_HEADER_MINOR_OS_VER_OFFSET 66
319 #define PE_HEADER_MAJOR_IMG_VER_OFFSET 68
320 #define PE_HEADER_MINOR_IMG_VER_OFFSET 70
321 #define PE_HEADER_MAJOR_SS_VER_OFFSET 72
322 #define PE_HEADER_MINOR_SS_VER_OFFSET 74
323 #define PE_HEADER_SECT_HEADER_SIZE 40
324 #define PE_HEADER_SECT_NAME_OFFSET 0
325 #define PE_HEADER_SECT_SIZE_DATA_OFFSET 16
326 #define PE_HEADER_SECT_PTR_DATA_OFFSET 20
328 /* Microsoft file version format */
329 #define VS_SIGNATURE "VS_VERSION_INFO"
330 #define VS_MAGIC_VALUE 0xfeef04bd
331 #define VS_MAJOR_OFFSET 8
332 #define VS_MINOR_OFFSET 12
333 #define VS_VERSION_INFO_UNICODE_SIZE (sizeof(VS_SIGNATURE)*2+4+VS_MINOR_OFFSET+4) /* not true size! */
334 #define VS_VERSION_INFO_SIZE (sizeof(VS_SIGNATURE)+4+VS_MINOR_OFFSET+4) /* not true size! */
335 #define VS_NE_BUF_SIZE 4096 /* Must be > 2*VS_VERSION_INFO_SIZE */
337 #endif /* NT_PRINTING_H_ */