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"
125 #define PRINTER_CONTROL_UNPAUSE 0x00000000
126 #define PRINTER_CONTROL_PAUSE 0x00000001
127 #define PRINTER_CONTROL_RESUME 0x00000002
128 #define PRINTER_CONTROL_PURGE 0x00000003
129 #define PRINTER_CONTROL_SET_STATUS 0x00000004
131 #define PRINTER_STATUS_OK 0x00000000
132 #define JOB_ACCESS_READ 0x00000020
134 /* JOB status codes. */
136 #define JOB_STATUS_QUEUED 0x0000
137 #define JOB_STATUS_PAUSED 0x0001
138 #define JOB_STATUS_ERROR 0x0002
139 #define JOB_STATUS_DELETING 0x0004
140 #define JOB_STATUS_SPOOLING 0x0008
141 #define JOB_STATUS_PRINTING 0x0010
142 #define JOB_STATUS_OFFLINE 0x0020
143 #define JOB_STATUS_PAPEROUT 0x0040
144 #define JOB_STATUS_PRINTED 0x0080
145 #define JOB_STATUS_DELETED 0x0100
146 #define JOB_STATUS_BLOCKED 0x0200
147 #define JOB_STATUS_USER_INTERVENTION 0x0400
149 /* Notify field types */
151 #define NOTIFY_ONE_VALUE 1 /* Notify data is stored in value1 */
152 #define NOTIFY_TWO_VALUE 2 /* Notify data is stored in value2 */
153 #define NOTIFY_POINTER 3 /* Data is a pointer to a buffer */
154 #define NOTIFY_STRING 4 /* Data is a pointer to a buffer w/length */
155 #define NOTIFY_SECDESC 5 /* Data is a security descriptor */
157 #define PRINTER_NOTIFY_TYPE 0x00
158 #define JOB_NOTIFY_TYPE 0x01
159 #define PRINT_TABLE_END 0xFF
161 #define MAX_PRINTER_NOTIFY 26
162 #define MAX_JOB_NOTIFY 24
164 #define MAX_NOTIFY_TYPE_FOR_NOW 26
166 #define PRINTER_NOTIFY_SERVER_NAME 0x00
167 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
168 #define PRINTER_NOTIFY_SHARE_NAME 0x02
169 #define PRINTER_NOTIFY_PORT_NAME 0x03
170 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
171 #define PRINTER_NOTIFY_COMMENT 0x05
172 #define PRINTER_NOTIFY_LOCATION 0x06
173 #define PRINTER_NOTIFY_DEVMODE 0x07
174 #define PRINTER_NOTIFY_SEPFILE 0x08
175 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
176 #define PRINTER_NOTIFY_PARAMETERS 0x0A
177 #define PRINTER_NOTIFY_DATATYPE 0x0B
178 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
179 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
180 #define PRINTER_NOTIFY_PRIORITY 0x0E
181 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
182 #define PRINTER_NOTIFY_START_TIME 0x10
183 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
184 #define PRINTER_NOTIFY_STATUS 0x12
185 #define PRINTER_NOTIFY_STATUS_STRING 0x13
186 #define PRINTER_NOTIFY_CJOBS 0x14
187 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
188 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
189 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
190 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
191 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
193 #define JOB_NOTIFY_PRINTER_NAME 0x00
194 #define JOB_NOTIFY_MACHINE_NAME 0x01
195 #define JOB_NOTIFY_PORT_NAME 0x02
196 #define JOB_NOTIFY_USER_NAME 0x03
197 #define JOB_NOTIFY_NOTIFY_NAME 0x04
198 #define JOB_NOTIFY_DATATYPE 0x05
199 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
200 #define JOB_NOTIFY_PARAMETERS 0x07
201 #define JOB_NOTIFY_DRIVER_NAME 0x08
202 #define JOB_NOTIFY_DEVMODE 0x09
203 #define JOB_NOTIFY_STATUS 0x0A
204 #define JOB_NOTIFY_STATUS_STRING 0x0B
205 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
206 #define JOB_NOTIFY_DOCUMENT 0x0D
207 #define JOB_NOTIFY_PRIORITY 0x0E
208 #define JOB_NOTIFY_POSITION 0x0F
209 #define JOB_NOTIFY_SUBMITTED 0x10
210 #define JOB_NOTIFY_START_TIME 0x11
211 #define JOB_NOTIFY_UNTIL_TIME 0x12
212 #define JOB_NOTIFY_TIME 0x13
213 #define JOB_NOTIFY_TOTAL_PAGES 0x14
214 #define JOB_NOTIFY_PAGES_PRINTED 0x15
215 #define JOB_NOTIFY_TOTAL_BYTES 0x16
216 #define JOB_NOTIFY_BYTES_PRINTED 0x17
218 #define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01
220 #define PRINTER_NOTIFY_INFO_DISCARDED 0x1
223 * Set of macros for flagging what changed in the PRINTER_INFO_2 struct
224 * when sending messages to other smbd's
226 #define PRINTER_MESSAGE_NULL 0x00000000
227 #define PRINTER_MESSAGE_DRIVER 0x00000001
228 #define PRINTER_MESSAGE_COMMENT 0x00000002
229 #define PRINTER_MESSAGE_PRINTERNAME 0x00000004
230 #define PRINTER_MESSAGE_LOCATION 0x00000008
231 #define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */
232 #define PRINTER_MESSAGE_SEPFILE 0x00000020
233 #define PRINTER_MESSAGE_PRINTPROC 0x00000040
234 #define PRINTER_MESSAGE_PARAMS 0x00000080
235 #define PRINTER_MESSAGE_DATATYPE 0x00000100
236 #define PRINTER_MESSAGE_SECDESC 0x00000200
237 #define PRINTER_MESSAGE_CJOBS 0x00000400
238 #define PRINTER_MESSAGE_PORT 0x00000800
239 #define PRINTER_MESSAGE_SHARENAME 0x00001000
240 #define PRINTER_MESSAGE_ATTRIBUTES 0x00002000
242 typedef struct printer_message_info {
243 uint32 low; /* PRINTER_CHANGE_XXX */
244 uint32 high; /* PRINTER_CHANGE_XXX */
245 fstring printer_name;
246 uint32 flags; /* PRINTER_MESSAGE_XXX */
248 PRINTER_MESSAGE_INFO;
251 * The printer attributes.
252 * I #defined all of them (grabbed form MSDN)
254 * ( SHARED | NETWORK | RAW_ONLY )
255 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
258 #define PRINTER_ATTRIBUTE_SAMBA (PRINTER_ATTRIBUTE_RAW_ONLY|\
259 PRINTER_ATTRIBUTE_SHARED|\
260 PRINTER_ATTRIBUTE_LOCAL)
261 #define PRINTER_ATTRIBUTE_NOT_SAMBA (PRINTER_ATTRIBUTE_NETWORK)
263 #define NO_PRIORITY 0
264 #define MAX_PRIORITY 99
265 #define MIN_PRIORITY 1
266 #define DEF_PRIORITY 1
268 /* the flags of each printers */
269 #define PRINTER_ENUM_ICONMASK 0x00ff0000
271 #define DRIVER_ANY_VERSION 0xffffffff
272 #define DRIVER_MAX_VERSION 4
274 /* FLAGS for SPOOLSS_ADDPRINTERDRIVEREX */
276 #define APD_STRICT_UPGRADE 0x00000001
277 #define APD_STRICT_DOWNGRADE 0x00000002
278 #define APD_COPY_ALL_FILES 0x00000004
279 #define APD_COPY_NEW_FILES 0x00000008
282 /* this struct is undocumented */
283 /* thanks to the ddk ... */
285 uint32 size; /* length of user_name & client_name + 2? */
286 UNISTR2 *client_name;
302 * various bits in the DEVICEMODE.fields member
305 #define DEVMODE_ORIENTATION 0x00000001
306 #define DEVMODE_PAPERSIZE 0x00000002
307 #define DEVMODE_PAPERLENGTH 0x00000004
308 #define DEVMODE_PAPERWIDTH 0x00000008
309 #define DEVMODE_SCALE 0x00000010
310 #define DEVMODE_POSITION 0x00000020
311 #define DEVMODE_NUP 0x00000040
312 #define DEVMODE_COPIES 0x00000100
313 #define DEVMODE_DEFAULTSOURCE 0x00000200
314 #define DEVMODE_PRINTQUALITY 0x00000400
315 #define DEVMODE_COLOR 0x00000800
316 #define DEVMODE_DUPLEX 0x00001000
317 #define DEVMODE_YRESOLUTION 0x00002000
318 #define DEVMODE_TTOPTION 0x00004000
319 #define DEVMODE_COLLATE 0x00008000
320 #define DEVMODE_FORMNAME 0x00010000
321 #define DEVMODE_LOGPIXELS 0x00020000
322 #define DEVMODE_BITSPERPEL 0x00040000
323 #define DEVMODE_PELSWIDTH 0x00080000
324 #define DEVMODE_PELSHEIGHT 0x00100000
325 #define DEVMODE_DISPLAYFLAGS 0x00200000
326 #define DEVMODE_DISPLAYFREQUENCY 0x00400000
327 #define DEVMODE_ICMMETHOD 0x00800000
328 #define DEVMODE_ICMINTENT 0x01000000
329 #define DEVMODE_MEDIATYPE 0x02000000
330 #define DEVMODE_DITHERTYPE 0x04000000
331 #define DEVMODE_PANNINGWIDTH 0x08000000
332 #define DEVMODE_PANNINGHEIGHT 0x10000000
336 * Devicemode structure
339 typedef struct devicemode
343 uint16 driverversion;
353 uint16 defaultsource;
366 uint32 displayfrequency;
374 uint32 panningheight;
379 typedef struct _devmode_cont
387 typedef struct _printer_default
391 DEVMODE_CTR devmode_cont;
392 uint32 access_required;
396 /********************************************/
399 UNISTR2 *printername;
400 PRINTER_DEFAULT printer_default;
401 } SPOOL_Q_OPEN_PRINTER;
404 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
406 } SPOOL_R_OPEN_PRINTER;
408 /********************************************/
411 UNISTR2 *printername;
412 PRINTER_DEFAULT printer_default;
414 SPOOL_USER_CTR user_ctr;
415 } SPOOL_Q_OPEN_PRINTER_EX;
418 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
420 } SPOOL_R_OPEN_PRINTER_EX;
422 /********************************************/
424 typedef struct spool_notify_option_type
433 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
435 SPOOL_NOTIFY_OPTION_TYPE;
437 typedef struct spool_notify_option_type_ctr
440 SPOOL_NOTIFY_OPTION_TYPE *type;
442 SPOOL_NOTIFY_OPTION_TYPE_CTR;
446 typedef struct s_header_type
459 typedef struct spool_q_getprinterdata
465 SPOOL_Q_GETPRINTERDATA;
467 typedef struct spool_r_getprinterdata
475 SPOOL_R_GETPRINTERDATA;
477 typedef struct spool_doc_info_1
488 typedef struct spool_doc_info
491 DOC_INFO_1 doc_info_1;
495 typedef struct spool_doc_info_container
502 typedef struct spool_q_startdocprinter
505 DOC_INFO_CONTAINER doc_info_container;
507 SPOOL_Q_STARTDOCPRINTER;
509 typedef struct spool_r_startdocprinter
514 SPOOL_R_STARTDOCPRINTER;
516 typedef struct spool_notify_option
521 uint32 option_type_ptr;
522 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
526 typedef struct spool_notify_info_data
546 } SPOOL_NOTIFY_INFO_DATA;
548 typedef struct spool_notify_info
553 SPOOL_NOTIFY_INFO_DATA *data;
557 /* If the struct name looks obscure, yes it is ! */
558 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
559 typedef struct spoolss_q_rffpcnex
564 uint32 localmachine_ptr;
565 UNISTR2 localmachine;
568 SPOOL_NOTIFY_OPTION *option;
572 typedef struct spool_r_rffpcnex
578 /* Remote Find Next Printer Change Notify Ex */
579 typedef struct spool_q_rfnpcnex
584 SPOOL_NOTIFY_OPTION *option;
588 typedef struct spool_r_rfnpcnex
591 SPOOL_NOTIFY_INFO info;
596 typedef struct printer_info_0
613 uint32 global_counter;
616 uint16 major_version;
617 uint16 build_version;
622 uint32 session_counter;
624 uint32 printer_errors;
645 typedef struct printer_info_1
654 typedef struct printer_info_2
665 UNISTR printprocessor;
671 uint32 defaultpriority;
680 typedef struct printer_info_3
686 typedef struct printer_info_4
694 typedef struct printer_info_5
699 uint32 device_not_selected_timeout;
700 uint32 transmission_retry_timeout;
704 typedef struct printer_info_6
710 #define SPOOL_DS_PUBLISH 1
711 #define SPOOL_DS_UPDATE 2
712 #define SPOOL_DS_UNPUBLISH 4
713 #define SPOOL_DS_PENDING 0x80000000
715 typedef struct printer_info_7
717 UNISTR guid; /* text form of printer guid */
722 typedef struct spool_q_enumprinters
725 uint32 servername_ptr;
731 SPOOL_Q_ENUMPRINTERS;
733 typedef struct printer_info_ctr_info
735 PRINTER_INFO_0 *printers_0;
736 PRINTER_INFO_1 *printers_1;
737 PRINTER_INFO_2 *printers_2;
738 PRINTER_INFO_3 *printers_3;
739 PRINTER_INFO_4 *printers_4;
740 PRINTER_INFO_5 *printers_5;
741 PRINTER_INFO_7 *printers_7;
745 typedef struct spool_r_enumprinters
748 uint32 needed; /* bytes needed */
749 uint32 returned; /* number of printers */
752 SPOOL_R_ENUMPRINTERS;
755 typedef struct spool_q_getprinter
764 typedef struct printer_info_info
768 PRINTER_INFO_0 *info0;
769 PRINTER_INFO_1 *info1;
770 PRINTER_INFO_2 *info2;
775 typedef struct spool_r_getprinter
780 } SPOOL_R_GETPRINTER;
782 typedef struct driver_info_1
787 typedef struct driver_info_2
797 typedef struct driver_info_3
806 uint16 *dependentfiles;
808 UNISTR defaultdatatype;
812 typedef struct driver_info_6
821 uint16 *dependentfiles;
823 UNISTR defaultdatatype;
824 uint16* previousdrivernames;
827 uint32 driver_version_low;
828 uint32 driver_version_high;
836 typedef struct driver_info_info
838 DRIVER_INFO_1 *info1;
839 DRIVER_INFO_2 *info2;
840 DRIVER_INFO_3 *info3;
841 DRIVER_INFO_6 *info6;
845 typedef struct spool_q_getprinterdriver2
848 uint32 architecture_ptr;
849 UNISTR2 architecture;
853 uint32 clientmajorversion;
854 uint32 clientminorversion;
856 SPOOL_Q_GETPRINTERDRIVER2;
858 typedef struct spool_r_getprinterdriver2
862 uint32 servermajorversion;
863 uint32 serverminorversion;
866 SPOOL_R_GETPRINTERDRIVER2;
869 typedef struct add_jobinfo_1
877 typedef struct spool_q_addjob
886 typedef struct spool_r_addjob
895 * I'm really wondering how many different time formats
896 * I will have to cope with
898 * JFM, 09/13/98 In a mad mood ;-(
900 typedef struct systemtime
913 typedef struct s_job_info_1
927 SYSTEMTIME submitted;
931 typedef struct s_job_info_2
940 UNISTR printprocessor;
945 /* SEC_DESC sec_desc;*/
953 SYSTEMTIME submitted;
959 typedef struct spool_q_enumjobs
970 typedef struct job_info_ctr_info
974 JOB_INFO_1 *job_info_1;
975 JOB_INFO_2 *job_info_2;
981 typedef struct spool_r_enumjobs
990 typedef struct spool_q_schedulejob
997 typedef struct spool_r_schedulejob
1001 SPOOL_R_SCHEDULEJOB;
1003 typedef struct s_port_info_1
1009 typedef struct s_port_info_2
1012 UNISTR monitor_name;
1019 /* Port Type bits */
1020 #define PORT_TYPE_WRITE 0x0001
1021 #define PORT_TYPE_READ 0x0002
1022 #define PORT_TYPE_REDIRECTED 0x0004
1023 #define PORT_TYPE_NET_ATTACHED 0x0008
1025 typedef struct spool_q_enumports
1035 typedef struct port_info_ctr_info
1039 PORT_INFO_1 *info_1;
1040 PORT_INFO_2 *info_2;
1047 typedef struct spool_r_enumports
1050 uint32 needed; /* bytes needed */
1051 uint32 returned; /* number of printers */
1056 #define JOB_CONTROL_PAUSE 1
1057 #define JOB_CONTROL_RESUME 2
1058 #define JOB_CONTROL_CANCEL 3
1059 #define JOB_CONTROL_RESTART 4
1060 #define JOB_CONTROL_DELETE 5
1062 typedef struct job_info_info
1066 JOB_INFO_1 job_info_1;
1067 JOB_INFO_2 job_info_2;
1074 typedef struct spool_q_setjob
1085 typedef struct spool_r_setjob
1092 typedef struct spool_q_enumprinterdrivers
1096 uint32 environment_ptr;
1097 UNISTR2 environment;
1102 SPOOL_Q_ENUMPRINTERDRIVERS;
1104 typedef struct spool_r_enumprinterdrivers
1111 SPOOL_R_ENUMPRINTERDRIVERS;
1114 #define FORM_BUILTIN 1
1115 #define FORM_PRINTER 2
1117 typedef struct spool_form_1
1130 typedef struct spool_q_enumforms
1139 typedef struct spool_r_enumforms
1148 typedef struct spool_printer_info_level_1
1151 uint32 description_ptr;
1154 UNISTR2 description;
1157 } SPOOL_PRINTER_INFO_LEVEL_1;
1159 typedef struct spool_printer_info_level_2
1161 uint32 servername_ptr;
1162 uint32 printername_ptr;
1163 uint32 sharename_ptr;
1164 uint32 portname_ptr;
1165 uint32 drivername_ptr;
1167 uint32 location_ptr;
1170 uint32 printprocessor_ptr;
1171 uint32 datatype_ptr;
1172 uint32 parameters_ptr;
1176 uint32 default_priority;
1183 UNISTR2 printername;
1190 UNISTR2 printprocessor;
1194 SPOOL_PRINTER_INFO_LEVEL_2;
1196 typedef struct spool_printer_info_level_3
1200 SPOOL_PRINTER_INFO_LEVEL_3;
1202 typedef struct spool_printer_info_level_7
1208 SPOOL_PRINTER_INFO_LEVEL_7;
1210 typedef struct spool_printer_info_level
1214 SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
1215 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1216 SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
1217 SPOOL_PRINTER_INFO_LEVEL_7 *info_7;
1219 SPOOL_PRINTER_INFO_LEVEL;
1221 typedef struct spool_printer_driver_info_level_3
1225 uint32 environment_ptr;
1226 uint32 driverpath_ptr;
1227 uint32 datafile_ptr;
1228 uint32 configfile_ptr;
1229 uint32 helpfile_ptr;
1230 uint32 monitorname_ptr;
1231 uint32 defaultdatatype_ptr;
1232 uint32 dependentfilessize;
1233 uint32 dependentfiles_ptr;
1236 UNISTR2 environment;
1241 UNISTR2 monitorname;
1242 UNISTR2 defaultdatatype;
1243 BUFFER5 dependentfiles;
1246 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1248 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
1252 uint32 environment_ptr;
1253 uint32 driverpath_ptr;
1254 uint32 datafile_ptr;
1255 uint32 configfile_ptr;
1256 uint32 helpfile_ptr;
1257 uint32 monitorname_ptr;
1258 uint32 defaultdatatype_ptr;
1259 uint32 dependentfiles_len;
1260 uint32 dependentfiles_ptr;
1261 uint32 previousnames_len;
1262 uint32 previousnames_ptr;
1264 uint64 driverversion;
1268 uint32 hardwareid_ptr;
1269 uint32 provider_ptr;
1271 UNISTR2 environment;
1276 UNISTR2 monitorname;
1277 UNISTR2 defaultdatatype;
1278 BUFFER5 dependentfiles;
1279 BUFFER5 previousnames;
1284 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1287 typedef struct spool_printer_driver_info_level
1291 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1292 SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
1294 SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1297 typedef struct spool_q_setprinter
1301 SPOOL_PRINTER_INFO_LEVEL info;
1302 SEC_DESC_BUF *secdesc_ctr;
1303 DEVMODE_CTR devmode_ctr;
1310 typedef struct spool_r_setprinter
1316 /********************************************/
1319 UNISTR2 *server_name;
1321 SPOOL_PRINTER_INFO_LEVEL info;
1322 DEVMODE_CTR devmode_ctr;
1323 SEC_DESC_BUF *secdesc_ctr;
1325 SPOOL_USER_CTR user_ctr;
1326 } SPOOL_Q_ADDPRINTEREX;
1331 } SPOOL_R_ADDPRINTEREX;
1333 /********************************************/
1335 typedef struct spool_q_addprinterdriver
1337 uint32 server_name_ptr;
1338 UNISTR2 server_name;
1340 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1342 SPOOL_Q_ADDPRINTERDRIVER;
1344 typedef struct spool_r_addprinterdriver
1348 SPOOL_R_ADDPRINTERDRIVER;
1350 typedef struct spool_q_addprinterdriverex
1352 uint32 server_name_ptr;
1353 UNISTR2 server_name;
1355 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1358 SPOOL_Q_ADDPRINTERDRIVEREX;
1360 typedef struct spool_r_addprinterdriverex
1364 SPOOL_R_ADDPRINTERDRIVEREX;
1367 typedef struct driver_directory_1
1373 typedef struct driver_info_ctr_info
1375 DRIVER_DIRECTORY_1 *info1;
1377 DRIVER_DIRECTORY_CTR;
1379 typedef struct spool_q_getprinterdriverdirectory
1383 uint32 environment_ptr;
1384 UNISTR2 environment;
1389 SPOOL_Q_GETPRINTERDRIVERDIR;
1391 typedef struct spool_r_getprinterdriverdirectory
1397 SPOOL_R_GETPRINTERDRIVERDIR;
1399 typedef struct spool_q_addprintprocessor
1403 UNISTR2 environment;
1407 SPOOL_Q_ADDPRINTPROCESSOR;
1409 typedef struct spool_r_addprintprocessor
1413 SPOOL_R_ADDPRINTPROCESSOR;
1416 typedef struct spool_q_enumprintprocessors
1420 uint32 environment_ptr;
1421 UNISTR2 environment;
1426 SPOOL_Q_ENUMPRINTPROCESSORS;
1428 typedef struct printprocessor_1
1434 typedef struct spool_r_enumprintprocessors
1441 SPOOL_R_ENUMPRINTPROCESSORS;
1443 typedef struct spool_q_enumprintprocdatatypes
1447 uint32 processor_ptr;
1453 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1455 typedef struct ppdatatype_1
1459 PRINTPROCDATATYPE_1;
1461 typedef struct spool_r_enumprintprocdatatypes
1468 SPOOL_R_ENUMPRINTPROCDATATYPES;
1470 typedef struct printmonitor_1
1476 typedef struct printmonitor_2
1484 typedef struct spool_q_enumprintmonitors
1492 SPOOL_Q_ENUMPRINTMONITORS;
1494 typedef struct spool_r_enumprintmonitors
1501 SPOOL_R_ENUMPRINTMONITORS;
1504 typedef struct spool_q_enumprinterdata
1511 SPOOL_Q_ENUMPRINTERDATA;
1513 typedef struct spool_r_enumprinterdata
1517 uint32 realvaluesize;
1521 uint32 realdatasize;
1524 SPOOL_R_ENUMPRINTERDATA;
1526 typedef struct spool_q_setprinterdata
1534 uint32 numeric_data;
1536 SPOOL_Q_SETPRINTERDATA;
1538 typedef struct spool_r_setprinterdata
1542 SPOOL_R_SETPRINTERDATA;
1544 typedef struct spool_q_resetprinter
1547 uint32 datatype_ptr;
1549 DEVMODE_CTR devmode_ctr;
1551 } SPOOL_Q_RESETPRINTER;
1553 typedef struct spool_r_resetprinter
1557 SPOOL_R_RESETPRINTER;
1561 typedef struct _form
1575 typedef struct spool_q_getjob
1585 typedef struct pjob_info_info
1589 JOB_INFO_1 *job_info_1;
1590 JOB_INFO_2 *job_info_2;
1598 typedef struct spool_r_getjob
1606 typedef struct spool_q_replyopenprinter
1614 SPOOL_Q_REPLYOPENPRINTER;
1616 typedef struct spool_r_replyopenprinter
1621 SPOOL_R_REPLYOPENPRINTER;
1623 typedef struct spool_q_routerreplyprinter
1627 uint32 unknown1; /* 0x00000001 */
1629 uint8 unknown2[5]; /* 0x0000000001 */
1631 SPOOL_Q_ROUTERREPLYPRINTER;
1633 typedef struct spool_r_routerreplyprinter
1637 SPOOL_R_ROUTERREPLYPRINTER;
1639 typedef struct spool_q_replycloseprinter
1643 SPOOL_Q_REPLYCLOSEPRINTER;
1645 typedef struct spool_r_replycloseprinter
1650 SPOOL_R_REPLYCLOSEPRINTER;
1652 typedef struct spool_q_rrpcn
1660 SPOOL_NOTIFY_INFO info;
1662 SPOOL_Q_REPLY_RRPCN;
1664 typedef struct spool_r_rrpcn
1669 SPOOL_R_REPLY_RRPCN;
1671 typedef struct spool_q_getprinterdataex
1678 SPOOL_Q_GETPRINTERDATAEX;
1680 typedef struct spool_r_getprinterdataex
1688 SPOOL_R_GETPRINTERDATAEX;
1690 typedef struct spool_q_setprinterdataex
1699 uint32 numeric_data;
1701 SPOOL_Q_SETPRINTERDATAEX;
1703 typedef struct spool_r_setprinterdataex
1707 SPOOL_R_SETPRINTERDATAEX;
1710 typedef struct spool_q_enumprinterkey
1716 SPOOL_Q_ENUMPRINTERKEY;
1718 typedef struct spool_r_enumprinterkey
1721 uint32 needed; /* in bytes */
1724 SPOOL_R_ENUMPRINTERKEY;
1726 typedef struct printer_enum_values
1735 PRINTER_ENUM_VALUES;
1737 typedef struct printer_enum_values_ctr
1740 uint32 size_of_array;
1741 PRINTER_ENUM_VALUES *values;
1743 PRINTER_ENUM_VALUES_CTR;
1745 typedef struct spool_q_enumprinterdataex
1751 SPOOL_Q_ENUMPRINTERDATAEX;
1753 typedef struct spool_r_enumprinterdataex
1755 PRINTER_ENUM_VALUES_CTR ctr;
1760 SPOOL_R_ENUMPRINTERDATAEX;
1762 typedef struct printprocessor_directory_1
1766 PRINTPROCESSOR_DIRECTORY_1;
1768 typedef struct spool_q_getprintprocessordirectory
1771 UNISTR2 environment;
1776 SPOOL_Q_GETPRINTPROCESSORDIRECTORY;
1778 typedef struct spool_r_getprintprocessordirectory
1784 SPOOL_R_GETPRINTPROCESSORDIRECTORY;
1786 /**************************************/
1788 #define MAX_PORTNAME 64
1789 #define MAX_NETWORK_NAME 49
1790 #define MAX_SNMP_COMM_NAME 33
1791 #define MAX_QUEUE_NAME 33
1792 #define MAX_IPADDR_STRING 17
1795 uint16 portname[MAX_PORTNAME];
1800 uint16 hostaddress[MAX_NETWORK_NAME];
1801 uint16 snmpcommunity[MAX_SNMP_COMM_NAME];
1803 uint16 queue[MAX_QUEUE_NAME];
1804 uint16 ipaddress[MAX_IPADDR_STRING];
1807 uint32 snmpdevindex;
1808 } SPOOL_PORT_DATA_1;
1817 } SPOOL_Q_XCVDATAPORT;
1824 } SPOOL_R_XCVDATAPORT;
1826 #define PRINTER_DRIVER_VERSION 2
1827 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
1829 #endif /* _RPC_SPOOLSS_H */