s3-spoolss: remove old spoolss_GetPrinterData.
[Samba/gbeck.git] / source3 / include / rpc_spoolss.h
blobef1cbd18f454942a1198961f4cc5098ab74906a2
1 /*
2 Unix SMB/Netbios implementation.
4 Copyright (C) Andrew Tridgell 1992-2000,
5 Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
6 Copyright (C) Jean Francois Micouleau 1998-2000.
7 Copyright (C) Gerald Carter 2001-2006.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "librpc/gen_ndr/spoolss.h"
25 #ifndef _RPC_SPOOLSS_H /* _RPC_SPOOLSS_H */
26 #define _RPC_SPOOLSS_H
28 /* spoolss pipe: this are the calls which are not implemented ...
29 #define SPOOLSS_GETPRINTERDRIVER 0x0b
30 #define SPOOLSS_READPRINTER 0x16
31 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
32 #define SPOOLSS_ADDPORT 0x25
33 #define SPOOLSS_CONFIGUREPORT 0x26
34 #define SPOOLSS_DELETEPORT 0x27
35 #define SPOOLSS_CREATEPRINTERIC 0x28
36 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
37 #define SPOOLSS_DELETEPRINTERIC 0x2a
38 #define SPOOLSS_ADDPRINTERCONNECTION 0x2b
39 #define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
40 #define SPOOLSS_PRINTERMESSAGEBOX 0x2d
41 #define SPOOLSS_ADDMONITOR 0x2e
42 #define SPOOLSS_DELETEMONITOR 0x2f
43 #define SPOOLSS_DELETEPRINTPROCESSOR 0x30
44 #define SPOOLSS_ADDPRINTPROVIDOR 0x31
45 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32
46 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
47 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
48 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
49 #define SPOOLSS_ADDPORTEX 0x3d
50 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
51 #define SPOOLSS_SPOOLERINIT 0x3f
52 #define SPOOLSS_RESETPRINTEREX 0x40
55 /* those are implemented */
56 #define SPOOLSS_ENUMPRINTERS 0x00
57 #define SPOOLSS_OPENPRINTER 0x01
58 #define SPOOLSS_SETJOB 0x02
59 #define SPOOLSS_GETJOB 0x03
60 #define SPOOLSS_ENUMJOBS 0x04
61 #define SPOOLSS_ADDPRINTER 0x05
62 #define SPOOLSS_DELETEPRINTER 0x06
63 #define SPOOLSS_SETPRINTER 0x07
64 #define SPOOLSS_GETPRINTER 0x08
65 #define SPOOLSS_ADDPRINTERDRIVER 0x09
66 #define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
67 #define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
68 #define SPOOLSS_DELETEPRINTERDRIVER 0x0d
69 #define SPOOLSS_ADDPRINTPROCESSOR 0x0e
70 #define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
71 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
72 #define SPOOLSS_STARTDOCPRINTER 0x11
73 #define SPOOLSS_STARTPAGEPRINTER 0x12
74 #define SPOOLSS_WRITEPRINTER 0x13
75 #define SPOOLSS_ENDPAGEPRINTER 0x14
76 #define SPOOLSS_ABORTPRINTER 0x15
77 #define SPOOLSS_ENDDOCPRINTER 0x17
78 #define SPOOLSS_ADDJOB 0x18
79 #define SPOOLSS_SCHEDULEJOB 0x19
80 #define SPOOLSS_GETPRINTERDATA 0x1a
81 #define SPOOLSS_SETPRINTERDATA 0x1b
82 #define SPOOLSS_CLOSEPRINTER 0x1d
83 #define SPOOLSS_ADDFORM 0x1e
84 #define SPOOLSS_DELETEFORM 0x1f
85 #define SPOOLSS_GETFORM 0x20
86 #define SPOOLSS_SETFORM 0x21
87 #define SPOOLSS_ENUMFORMS 0x22
88 #define SPOOLSS_ENUMPORTS 0x23
89 #define SPOOLSS_ENUMMONITORS 0x24
90 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
91 #define SPOOLSS_RESETPRINTER 0x34
92 #define SPOOLSS_GETPRINTERDRIVER2 0x35
93 #define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */
94 #define SPOOLSS_REPLYOPENPRINTER 0x3a
95 #define SPOOLSS_ROUTERREPLYPRINTER 0x3b
96 #define SPOOLSS_REPLYCLOSEPRINTER 0x3c
97 #define SPOOLSS_RFFPCNEX 0x41 /* RemoteFindFirstPrinterChangeNotifyEx */
98 #define SPOOLSS_RRPCN 0x42 /* RouteRefreshPrinterChangeNotification */
99 #define SPOOLSS_RFNPCNEX 0x43 /* RemoteFindNextPrinterChangeNotifyEx */
100 #define SPOOLSS_OPENPRINTEREX 0x45
101 #define SPOOLSS_ADDPRINTEREX 0x46
102 #define SPOOLSS_ENUMPRINTERDATA 0x48
103 #define SPOOLSS_DELETEPRINTERDATA 0x49
104 #define SPOOLSS_SETPRINTERDATAEX 0x4d
105 #define SPOOLSS_GETPRINTERDATAEX 0x4e
106 #define SPOOLSS_ENUMPRINTERDATAEX 0x4f
107 #define SPOOLSS_ENUMPRINTERKEY 0x50
108 #define SPOOLSS_DELETEPRINTERDATAEX 0x51
109 #define SPOOLSS_DELETEPRINTERKEY 0x52
110 #define SPOOLSS_DELETEPRINTERDRIVEREX 0x54
111 #define SPOOLSS_XCVDATAPORT 0x58
112 #define SPOOLSS_ADDPRINTERDRIVEREX 0x59
115 * Special strings for the OpenPrinter() call. See the MSDN DDK
116 * docs on the XcvDataPort() for more details.
119 #define SPL_LOCAL_PORT "Local Port"
120 #define SPL_TCPIP_PORT "Standard TCP/IP Port"
121 #define SPL_XCV_MONITOR_LOCALMON ",XcvMonitor Local Port"
122 #define SPL_XCV_MONITOR_TCPMON ",XcvMonitor Standard TCP/IP Port"
124 /* Notify field types */
126 #define PRINTER_NOTIFY_TYPE 0x00
127 #define JOB_NOTIFY_TYPE 0x01
129 #define PRINTER_NOTIFY_SERVER_NAME 0x00
130 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
131 #define PRINTER_NOTIFY_SHARE_NAME 0x02
132 #define PRINTER_NOTIFY_PORT_NAME 0x03
133 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
134 #define PRINTER_NOTIFY_COMMENT 0x05
135 #define PRINTER_NOTIFY_LOCATION 0x06
136 #define PRINTER_NOTIFY_DEVMODE 0x07
137 #define PRINTER_NOTIFY_SEPFILE 0x08
138 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
139 #define PRINTER_NOTIFY_PARAMETERS 0x0A
140 #define PRINTER_NOTIFY_DATATYPE 0x0B
141 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
142 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
143 #define PRINTER_NOTIFY_PRIORITY 0x0E
144 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
145 #define PRINTER_NOTIFY_START_TIME 0x10
146 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
147 #define PRINTER_NOTIFY_STATUS 0x12
148 #define PRINTER_NOTIFY_STATUS_STRING 0x13
149 #define PRINTER_NOTIFY_CJOBS 0x14
150 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
151 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
152 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
153 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
154 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
156 #define JOB_NOTIFY_PRINTER_NAME 0x00
157 #define JOB_NOTIFY_MACHINE_NAME 0x01
158 #define JOB_NOTIFY_PORT_NAME 0x02
159 #define JOB_NOTIFY_USER_NAME 0x03
160 #define JOB_NOTIFY_NOTIFY_NAME 0x04
161 #define JOB_NOTIFY_DATATYPE 0x05
162 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
163 #define JOB_NOTIFY_PARAMETERS 0x07
164 #define JOB_NOTIFY_DRIVER_NAME 0x08
165 #define JOB_NOTIFY_DEVMODE 0x09
166 #define JOB_NOTIFY_STATUS 0x0A
167 #define JOB_NOTIFY_STATUS_STRING 0x0B
168 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
169 #define JOB_NOTIFY_DOCUMENT 0x0D
170 #define JOB_NOTIFY_PRIORITY 0x0E
171 #define JOB_NOTIFY_POSITION 0x0F
172 #define JOB_NOTIFY_SUBMITTED 0x10
173 #define JOB_NOTIFY_START_TIME 0x11
174 #define JOB_NOTIFY_UNTIL_TIME 0x12
175 #define JOB_NOTIFY_TIME 0x13
176 #define JOB_NOTIFY_TOTAL_PAGES 0x14
177 #define JOB_NOTIFY_PAGES_PRINTED 0x15
178 #define JOB_NOTIFY_TOTAL_BYTES 0x16
179 #define JOB_NOTIFY_BYTES_PRINTED 0x17
182 * Set of macros for flagging what changed in the PRINTER_INFO_2 struct
183 * when sending messages to other smbd's
185 #define PRINTER_MESSAGE_NULL 0x00000000
186 #define PRINTER_MESSAGE_DRIVER 0x00000001
187 #define PRINTER_MESSAGE_COMMENT 0x00000002
188 #define PRINTER_MESSAGE_PRINTERNAME 0x00000004
189 #define PRINTER_MESSAGE_LOCATION 0x00000008
190 #define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */
191 #define PRINTER_MESSAGE_SEPFILE 0x00000020
192 #define PRINTER_MESSAGE_PRINTPROC 0x00000040
193 #define PRINTER_MESSAGE_PARAMS 0x00000080
194 #define PRINTER_MESSAGE_DATATYPE 0x00000100
195 #define PRINTER_MESSAGE_SECDESC 0x00000200
196 #define PRINTER_MESSAGE_CJOBS 0x00000400
197 #define PRINTER_MESSAGE_PORT 0x00000800
198 #define PRINTER_MESSAGE_SHARENAME 0x00001000
199 #define PRINTER_MESSAGE_ATTRIBUTES 0x00002000
201 typedef struct printer_message_info {
202 uint32 low; /* PRINTER_CHANGE_XXX */
203 uint32 high; /* PRINTER_CHANGE_XXX */
204 fstring printer_name;
205 uint32 flags; /* PRINTER_MESSAGE_XXX */
207 PRINTER_MESSAGE_INFO;
210 * The printer attributes.
211 * I #defined all of them (grabbed form MSDN)
212 * I'm only using:
213 * ( SHARED | NETWORK | RAW_ONLY )
214 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
217 #define PRINTER_ATTRIBUTE_SAMBA (PRINTER_ATTRIBUTE_RAW_ONLY|\
218 PRINTER_ATTRIBUTE_SHARED|\
219 PRINTER_ATTRIBUTE_LOCAL)
220 #define PRINTER_ATTRIBUTE_NOT_SAMBA (PRINTER_ATTRIBUTE_NETWORK)
222 #define NO_PRIORITY 0
223 #define MAX_PRIORITY 99
224 #define MIN_PRIORITY 1
225 #define DEF_PRIORITY 1
227 /* the flags of each printers */
229 #define DRIVER_ANY_VERSION 0xffffffff
230 #define DRIVER_MAX_VERSION 4
234 * Devicemode structure
237 typedef struct devicemode
239 UNISTR devicename;
240 uint16 specversion;
241 uint16 driverversion;
242 uint16 size;
243 uint16 driverextra;
244 uint32 fields;
245 uint16 orientation;
246 uint16 papersize;
247 uint16 paperlength;
248 uint16 paperwidth;
249 uint16 scale;
250 uint16 copies;
251 uint16 defaultsource;
252 uint16 printquality;
253 uint16 color;
254 uint16 duplex;
255 uint16 yresolution;
256 uint16 ttoption;
257 uint16 collate;
258 UNISTR formname;
259 uint16 logpixels;
260 uint32 bitsperpel;
261 uint32 pelswidth;
262 uint32 pelsheight;
263 uint32 displayflags;
264 uint32 displayfrequency;
265 uint32 icmmethod;
266 uint32 icmintent;
267 uint32 mediatype;
268 uint32 dithertype;
269 uint32 reserved1;
270 uint32 reserved2;
271 uint32 panningwidth;
272 uint32 panningheight;
273 uint8 *dev_private;
275 DEVICEMODE;
278 * I'm really wondering how many different time formats
279 * I will have to cope with
281 * JFM, 09/13/98 In a mad mood ;-(
283 typedef struct systemtime
285 uint16 year;
286 uint16 month;
287 uint16 dayofweek;
288 uint16 day;
289 uint16 hour;
290 uint16 minute;
291 uint16 second;
292 uint16 milliseconds;
294 SYSTEMTIME;
296 /********************************************/
298 typedef struct spool_q_enumprinterdata
300 POLICY_HND handle;
301 uint32 index;
302 uint32 valuesize;
303 uint32 datasize;
305 SPOOL_Q_ENUMPRINTERDATA;
307 typedef struct spool_r_enumprinterdata
309 uint32 valuesize;
310 uint16 *value;
311 uint32 realvaluesize;
312 uint32 type;
313 uint32 datasize;
314 uint8 *data;
315 uint32 realdatasize;
316 WERROR status;
318 SPOOL_R_ENUMPRINTERDATA;
320 typedef struct spool_q_setprinterdata
322 POLICY_HND handle;
323 UNISTR2 value;
324 uint32 type;
325 uint32 max_len;
326 uint8 *data;
327 uint32 real_len;
328 uint32 numeric_data;
330 SPOOL_Q_SETPRINTERDATA;
332 typedef struct spool_r_setprinterdata
334 WERROR status;
336 SPOOL_R_SETPRINTERDATA;
338 typedef struct spool_q_enumprinterkey
340 POLICY_HND handle;
341 UNISTR2 key;
342 uint32 size;
344 SPOOL_Q_ENUMPRINTERKEY;
346 typedef struct spool_r_enumprinterkey
348 BUFFER5 keys;
349 uint32 needed; /* in bytes */
350 WERROR status;
352 SPOOL_R_ENUMPRINTERKEY;
354 typedef struct printer_enum_values
356 UNISTR valuename;
357 uint32 value_len;
358 uint32 type;
359 uint8 *data;
360 uint32 data_len;
363 PRINTER_ENUM_VALUES;
365 typedef struct printer_enum_values_ctr
367 uint32 size;
368 uint32 size_of_array;
369 PRINTER_ENUM_VALUES *values;
371 PRINTER_ENUM_VALUES_CTR;
373 typedef struct spool_q_enumprinterdataex
375 POLICY_HND handle;
376 UNISTR2 key;
377 uint32 size;
379 SPOOL_Q_ENUMPRINTERDATAEX;
381 typedef struct spool_r_enumprinterdataex
383 PRINTER_ENUM_VALUES_CTR ctr;
384 uint32 needed;
385 uint32 returned;
386 WERROR status;
388 SPOOL_R_ENUMPRINTERDATAEX;
390 #endif /* _RPC_SPOOLSS_H */