socket_wrapper: pass down sockaddr instead of sockaddr_in to prepare pcap support...
[Samba/gebeck_regimport.git] / source3 / include / rpc_spoolss.h
blob2b4a036ce8a47f02952ab4e1d0d6d850927f824c
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;
277 typedef struct _devmode_cont
279 uint32 size;
280 uint32 devmode_ptr;
281 DEVICEMODE *devmode;
283 DEVMODE_CTR;
285 typedef struct _printer_default
287 uint32 datatype_ptr;
288 UNISTR2 datatype;
289 DEVMODE_CTR devmode_cont;
290 uint32 access_required;
292 PRINTER_DEFAULT;
294 /********************************************/
296 typedef struct spool_q_getprinterdata
298 POLICY_HND handle;
299 UNISTR2 valuename;
300 uint32 size;
302 SPOOL_Q_GETPRINTERDATA;
304 typedef struct spool_r_getprinterdata
306 uint32 type;
307 uint32 size;
308 uint8 *data;
309 uint32 needed;
310 WERROR status;
312 SPOOL_R_GETPRINTERDATA;
314 typedef struct printer_info_0
316 UNISTR printername;
317 UNISTR servername;
318 uint32 cjobs;
319 uint32 total_jobs;
320 uint32 total_bytes;
322 uint16 year;
323 uint16 month;
324 uint16 dayofweek;
325 uint16 day;
326 uint16 hour;
327 uint16 minute;
328 uint16 second;
329 uint16 milliseconds;
331 uint32 global_counter;
332 uint32 total_pages;
334 uint16 major_version;
335 uint16 build_version;
337 uint32 unknown7;
338 uint32 unknown8;
339 uint32 unknown9;
340 uint32 session_counter;
341 uint32 unknown11;
342 uint32 printer_errors;
343 uint32 unknown13;
344 uint32 unknown14;
345 uint32 unknown15;
346 uint32 unknown16;
347 uint32 change_id;
348 uint32 unknown18;
349 uint32 status;
350 uint32 unknown20;
351 uint32 c_setprinter;
353 uint16 unknown22;
354 uint16 unknown23;
355 uint16 unknown24;
356 uint16 unknown25;
357 uint16 unknown26;
358 uint16 unknown27;
359 uint16 unknown28;
360 uint16 unknown29;
361 } PRINTER_INFO_0;
363 typedef struct printer_info_1
365 uint32 flags;
366 UNISTR description;
367 UNISTR name;
368 UNISTR comment;
370 PRINTER_INFO_1;
372 typedef struct printer_info_2
374 UNISTR servername;
375 UNISTR printername;
376 UNISTR sharename;
377 UNISTR portname;
378 UNISTR drivername;
379 UNISTR comment;
380 UNISTR location;
381 DEVICEMODE *devmode;
382 UNISTR sepfile;
383 UNISTR printprocessor;
384 UNISTR datatype;
385 UNISTR parameters;
386 SEC_DESC *secdesc;
387 uint32 attributes;
388 uint32 priority;
389 uint32 defaultpriority;
390 uint32 starttime;
391 uint32 untiltime;
392 uint32 status;
393 uint32 cjobs;
394 uint32 averageppm;
396 PRINTER_INFO_2;
398 typedef struct printer_info_3
400 SEC_DESC *secdesc;
402 PRINTER_INFO_3;
404 typedef struct printer_info_4
406 UNISTR printername;
407 UNISTR servername;
408 uint32 attributes;
410 PRINTER_INFO_4;
412 typedef struct printer_info_5
414 UNISTR printername;
415 UNISTR portname;
416 uint32 attributes;
417 uint32 device_not_selected_timeout;
418 uint32 transmission_retry_timeout;
420 PRINTER_INFO_5;
422 typedef struct printer_info_6
424 uint32 status;
426 PRINTER_INFO_6;
428 typedef struct printer_info_7
430 UNISTR guid; /* text form of printer guid */
431 uint32 action;
433 PRINTER_INFO_7;
435 typedef struct spool_q_enumprinters
437 uint32 flags;
438 uint32 servername_ptr;
439 UNISTR2 servername;
440 uint32 level;
441 RPC_BUFFER *buffer;
442 uint32 offered;
444 SPOOL_Q_ENUMPRINTERS;
446 typedef struct printer_info_ctr_info
448 PRINTER_INFO_0 *printers_0;
449 PRINTER_INFO_1 *printers_1;
450 PRINTER_INFO_2 *printers_2;
451 PRINTER_INFO_3 *printers_3;
452 PRINTER_INFO_4 *printers_4;
453 PRINTER_INFO_5 *printers_5;
454 PRINTER_INFO_7 *printers_7;
456 PRINTER_INFO_CTR;
458 typedef struct spool_r_enumprinters
460 RPC_BUFFER *buffer;
461 uint32 needed; /* bytes needed */
462 uint32 returned; /* number of printers */
463 WERROR status;
465 SPOOL_R_ENUMPRINTERS;
468 typedef struct spool_q_getprinter
470 POLICY_HND handle;
471 uint32 level;
472 RPC_BUFFER *buffer;
473 uint32 offered;
475 SPOOL_Q_GETPRINTER;
477 typedef struct printer_info_info
479 union
481 PRINTER_INFO_0 *info0;
482 PRINTER_INFO_1 *info1;
483 PRINTER_INFO_2 *info2;
484 void *info;
485 } printer;
486 } PRINTER_INFO;
488 typedef struct spool_r_getprinter
490 RPC_BUFFER *buffer;
491 uint32 needed;
492 WERROR status;
493 } SPOOL_R_GETPRINTER;
495 typedef struct driver_info_1
497 UNISTR name;
498 } DRIVER_INFO_1;
500 typedef struct driver_info_2
502 uint32 version;
503 UNISTR name;
504 UNISTR architecture;
505 UNISTR driverpath;
506 UNISTR datafile;
507 UNISTR configfile;
508 } DRIVER_INFO_2;
510 typedef struct driver_info_3
512 uint32 version;
513 UNISTR name;
514 UNISTR architecture;
515 UNISTR driverpath;
516 UNISTR datafile;
517 UNISTR configfile;
518 UNISTR helpfile;
519 uint16 *dependentfiles;
520 UNISTR monitorname;
521 UNISTR defaultdatatype;
523 DRIVER_INFO_3;
525 typedef struct driver_info_6
527 uint32 version;
528 UNISTR name;
529 UNISTR architecture;
530 UNISTR driverpath;
531 UNISTR datafile;
532 UNISTR configfile;
533 UNISTR helpfile;
534 uint16 *dependentfiles;
535 UNISTR monitorname;
536 UNISTR defaultdatatype;
537 uint16* previousdrivernames;
538 NTTIME driver_date;
539 uint32 padding;
540 uint32 driver_version_low;
541 uint32 driver_version_high;
542 UNISTR mfgname;
543 UNISTR oem_url;
544 UNISTR hardware_id;
545 UNISTR provider;
547 DRIVER_INFO_6;
549 typedef struct driver_info_info
551 DRIVER_INFO_1 *info1;
552 DRIVER_INFO_2 *info2;
553 DRIVER_INFO_3 *info3;
554 DRIVER_INFO_6 *info6;
556 PRINTER_DRIVER_CTR;
558 typedef struct spool_q_getprinterdriver2
560 POLICY_HND handle;
561 uint32 architecture_ptr;
562 UNISTR2 architecture;
563 uint32 level;
564 RPC_BUFFER *buffer;
565 uint32 offered;
566 uint32 clientmajorversion;
567 uint32 clientminorversion;
569 SPOOL_Q_GETPRINTERDRIVER2;
571 typedef struct spool_r_getprinterdriver2
573 RPC_BUFFER *buffer;
574 uint32 needed;
575 uint32 servermajorversion;
576 uint32 serverminorversion;
577 WERROR status;
579 SPOOL_R_GETPRINTERDRIVER2;
582 typedef struct add_jobinfo_1
584 UNISTR path;
585 uint32 job_number;
587 ADD_JOBINFO_1;
591 * I'm really wondering how many different time formats
592 * I will have to cope with
594 * JFM, 09/13/98 In a mad mood ;-(
596 typedef struct systemtime
598 uint16 year;
599 uint16 month;
600 uint16 dayofweek;
601 uint16 day;
602 uint16 hour;
603 uint16 minute;
604 uint16 second;
605 uint16 milliseconds;
607 SYSTEMTIME;
609 typedef struct s_job_info_1
611 uint32 jobid;
612 UNISTR printername;
613 UNISTR machinename;
614 UNISTR username;
615 UNISTR document;
616 UNISTR datatype;
617 UNISTR text_status;
618 uint32 status;
619 uint32 priority;
620 uint32 position;
621 uint32 totalpages;
622 uint32 pagesprinted;
623 SYSTEMTIME submitted;
625 JOB_INFO_1;
627 typedef struct s_job_info_2
629 uint32 jobid;
630 UNISTR printername;
631 UNISTR machinename;
632 UNISTR username;
633 UNISTR document;
634 UNISTR notifyname;
635 UNISTR datatype;
636 UNISTR printprocessor;
637 UNISTR parameters;
638 UNISTR drivername;
639 DEVICEMODE *devmode;
640 UNISTR text_status;
641 /* SEC_DESC sec_desc;*/
642 uint32 status;
643 uint32 priority;
644 uint32 position;
645 uint32 starttime;
646 uint32 untiltime;
647 uint32 totalpages;
648 uint32 size;
649 SYSTEMTIME submitted;
650 uint32 timeelapsed;
651 uint32 pagesprinted;
653 JOB_INFO_2;
655 typedef struct spool_q_enumjobs
657 POLICY_HND handle;
658 uint32 firstjob;
659 uint32 numofjobs;
660 uint32 level;
661 RPC_BUFFER *buffer;
662 uint32 offered;
664 SPOOL_Q_ENUMJOBS;
666 typedef struct job_info_ctr_info
668 union
670 JOB_INFO_1 *job_info_1;
671 JOB_INFO_2 *job_info_2;
672 void *info;
673 } job;
675 } JOB_INFO_CTR;
677 typedef struct spool_r_enumjobs
679 RPC_BUFFER *buffer;
680 uint32 needed;
681 uint32 returned;
682 WERROR status;
684 SPOOL_R_ENUMJOBS;
686 typedef struct s_port_info_1
688 UNISTR port_name;
690 PORT_INFO_1;
692 typedef struct s_port_info_2
694 UNISTR port_name;
695 UNISTR monitor_name;
696 UNISTR description;
697 uint32 port_type;
698 uint32 reserved;
700 PORT_INFO_2;
702 /* Port Type bits */
703 #define PORT_TYPE_WRITE 0x0001
704 #define PORT_TYPE_READ 0x0002
705 #define PORT_TYPE_REDIRECTED 0x0004
706 #define PORT_TYPE_NET_ATTACHED 0x0008
708 typedef struct spool_q_enumports
710 uint32 name_ptr;
711 UNISTR2 name;
712 uint32 level;
713 RPC_BUFFER *buffer;
714 uint32 offered;
716 SPOOL_Q_ENUMPORTS;
718 typedef struct port_info_ctr_info
720 union
722 PORT_INFO_1 *info_1;
723 PORT_INFO_2 *info_2;
725 port;
728 PORT_INFO_CTR;
730 typedef struct spool_r_enumports
732 RPC_BUFFER *buffer;
733 uint32 needed; /* bytes needed */
734 uint32 returned; /* number of printers */
735 WERROR status;
737 SPOOL_R_ENUMPORTS;
739 typedef struct job_info_info
741 union
743 JOB_INFO_1 job_info_1;
744 JOB_INFO_2 job_info_2;
746 job;
749 JOB_INFO;
751 typedef struct spool_q_enumprinterdrivers
753 uint32 name_ptr;
754 UNISTR2 name;
755 uint32 environment_ptr;
756 UNISTR2 environment;
757 uint32 level;
758 RPC_BUFFER *buffer;
759 uint32 offered;
761 SPOOL_Q_ENUMPRINTERDRIVERS;
763 typedef struct spool_r_enumprinterdrivers
765 RPC_BUFFER *buffer;
766 uint32 needed;
767 uint32 returned;
768 WERROR status;
770 SPOOL_R_ENUMPRINTERDRIVERS;
772 #define FORM_USER 0
773 #define FORM_BUILTIN 1
774 #define FORM_PRINTER 2
776 typedef struct spool_form_1
778 uint32 flag;
779 UNISTR name;
780 uint32 width;
781 uint32 length;
782 uint32 left;
783 uint32 top;
784 uint32 right;
785 uint32 bottom;
787 FORM_1;
789 typedef struct spool_q_enumforms
791 POLICY_HND handle;
792 uint32 level;
793 RPC_BUFFER *buffer;
794 uint32 offered;
796 SPOOL_Q_ENUMFORMS;
798 typedef struct spool_r_enumforms
800 RPC_BUFFER *buffer;
801 uint32 needed;
802 uint32 numofforms;
803 WERROR status;
805 SPOOL_R_ENUMFORMS;
807 /********************************************/
809 typedef struct spool_q_enumprintprocessors
811 uint32 name_ptr;
812 UNISTR2 name;
813 uint32 environment_ptr;
814 UNISTR2 environment;
815 uint32 level;
816 RPC_BUFFER *buffer;
817 uint32 offered;
819 SPOOL_Q_ENUMPRINTPROCESSORS;
821 typedef struct printprocessor_1
823 UNISTR name;
825 PRINTPROCESSOR_1;
827 typedef struct spool_r_enumprintprocessors
829 RPC_BUFFER *buffer;
830 uint32 needed;
831 uint32 returned;
832 WERROR status;
834 SPOOL_R_ENUMPRINTPROCESSORS;
836 typedef struct spool_q_enumprintprocdatatypes
838 uint32 name_ptr;
839 UNISTR2 name;
840 uint32 processor_ptr;
841 UNISTR2 processor;
842 uint32 level;
843 RPC_BUFFER *buffer;
844 uint32 offered;
846 SPOOL_Q_ENUMPRINTPROCDATATYPES;
848 typedef struct ppdatatype_1
850 UNISTR name;
852 PRINTPROCDATATYPE_1;
854 typedef struct spool_r_enumprintprocdatatypes
856 RPC_BUFFER *buffer;
857 uint32 needed;
858 uint32 returned;
859 WERROR status;
861 SPOOL_R_ENUMPRINTPROCDATATYPES;
863 typedef struct printmonitor_1
865 UNISTR name;
867 PRINTMONITOR_1;
869 typedef struct printmonitor_2
871 UNISTR name;
872 UNISTR environment;
873 UNISTR dll_name;
875 PRINTMONITOR_2;
877 typedef struct spool_q_enumprintmonitors
879 uint32 name_ptr;
880 UNISTR2 name;
881 uint32 level;
882 RPC_BUFFER *buffer;
883 uint32 offered;
885 SPOOL_Q_ENUMPRINTMONITORS;
887 typedef struct spool_r_enumprintmonitors
889 RPC_BUFFER *buffer;
890 uint32 needed;
891 uint32 returned;
892 WERROR status;
894 SPOOL_R_ENUMPRINTMONITORS;
897 typedef struct spool_q_enumprinterdata
899 POLICY_HND handle;
900 uint32 index;
901 uint32 valuesize;
902 uint32 datasize;
904 SPOOL_Q_ENUMPRINTERDATA;
906 typedef struct spool_r_enumprinterdata
908 uint32 valuesize;
909 uint16 *value;
910 uint32 realvaluesize;
911 uint32 type;
912 uint32 datasize;
913 uint8 *data;
914 uint32 realdatasize;
915 WERROR status;
917 SPOOL_R_ENUMPRINTERDATA;
919 typedef struct spool_q_setprinterdata
921 POLICY_HND handle;
922 UNISTR2 value;
923 uint32 type;
924 uint32 max_len;
925 uint8 *data;
926 uint32 real_len;
927 uint32 numeric_data;
929 SPOOL_Q_SETPRINTERDATA;
931 typedef struct spool_r_setprinterdata
933 WERROR status;
935 SPOOL_R_SETPRINTERDATA;
937 typedef struct _form
939 uint32 flags;
940 uint32 name_ptr;
941 uint32 size_x;
942 uint32 size_y;
943 uint32 left;
944 uint32 top;
945 uint32 right;
946 uint32 bottom;
947 UNISTR2 name;
949 FORM;
951 typedef struct spool_q_getjob
953 POLICY_HND handle;
954 uint32 jobid;
955 uint32 level;
956 RPC_BUFFER *buffer;
957 uint32 offered;
959 SPOOL_Q_GETJOB;
961 typedef struct pjob_info_info
963 union
965 JOB_INFO_1 *job_info_1;
966 JOB_INFO_2 *job_info_2;
967 void *info;
969 job;
972 PJOB_INFO;
974 typedef struct spool_r_getjob
976 RPC_BUFFER *buffer;
977 uint32 needed;
978 WERROR status;
980 SPOOL_R_GETJOB;
982 typedef struct spool_q_enumprinterkey
984 POLICY_HND handle;
985 UNISTR2 key;
986 uint32 size;
988 SPOOL_Q_ENUMPRINTERKEY;
990 typedef struct spool_r_enumprinterkey
992 BUFFER5 keys;
993 uint32 needed; /* in bytes */
994 WERROR status;
996 SPOOL_R_ENUMPRINTERKEY;
998 typedef struct printer_enum_values
1000 UNISTR valuename;
1001 uint32 value_len;
1002 uint32 type;
1003 uint8 *data;
1004 uint32 data_len;
1007 PRINTER_ENUM_VALUES;
1009 typedef struct printer_enum_values_ctr
1011 uint32 size;
1012 uint32 size_of_array;
1013 PRINTER_ENUM_VALUES *values;
1015 PRINTER_ENUM_VALUES_CTR;
1017 typedef struct spool_q_enumprinterdataex
1019 POLICY_HND handle;
1020 UNISTR2 key;
1021 uint32 size;
1023 SPOOL_Q_ENUMPRINTERDATAEX;
1025 typedef struct spool_r_enumprinterdataex
1027 PRINTER_ENUM_VALUES_CTR ctr;
1028 uint32 needed;
1029 uint32 returned;
1030 WERROR status;
1032 SPOOL_R_ENUMPRINTERDATAEX;
1034 #endif /* _RPC_SPOOLSS_H */