r7029: Make array support in pidl similar to that in other IDL compilers. We should
[sfrench/samba-autobuild/.git] / source / librpc / idl / spoolss.idl
1 #include "idl_types.h"
2
3 /*
4   spoolss interface definitions
5 */
6
7 [ uuid("12345678-1234-abcd-ef00-0123456789ab"),
8   version(1.0),
9   endpoint("ncacn_np:[\\pipe\\spoolss]"),
10   pointer_default(unique),
11   pointer_default_top(unique),
12   helpstring("Spooler SubSystem"),
13   depends(security)
14 ] interface spoolss
15 {
16         typedef struct {
17                 uint16 year;
18                 uint16 month;
19                 uint16 day_of_week;
20                 uint16 day;
21                 uint16 hour;
22                 uint16 minute;
23                 uint16 second;
24                 uint16 millisecond;
25         } spoolss_Time;
26
27         typedef struct {
28                 [relative] nstring *printername;
29                 [relative] nstring *servername;
30                 uint32 cjobs;
31                 uint32 total_jobs;
32                 uint32 total_bytes;
33                 spoolss_Time time;              
34                 uint32 global_counter;
35                 uint32 total_pages;
36                 uint32 version;
37                 uint32 unknown10;
38                 uint32 unknown11;
39                 uint32 unknown12;
40                 uint32 session_counter;
41                 uint32 unknown14;
42                 uint32 printer_errors;
43                 uint32 unknown16;
44                 uint32 unknown17;
45                 uint32 unknown18;
46                 uint32 unknown19;
47                 uint32 change_id;
48                 uint32 unknown21;
49                 uint32 status;
50                 uint32 unknown23;
51                 uint32 c_setprinter;
52                 uint16 unknown25;
53                 uint16 unknown26;
54                 uint32 unknown27;
55                 uint32 unknown28;
56                 uint32 unknown29;
57         } spoolss_PrinterInfo0;
58
59         typedef struct {
60                 string32 devicename;
61                 uint16 specversion;
62                 uint16 driverversion;
63                 uint16 size;
64                 [value(r->driverextra_data.length)] uint16 __driverextra_length;
65                 uint32 fields;
66                 uint16 orientation;
67                 uint16 papersize;
68                 uint16 paperlength;
69                 uint16 paperwidth;
70                 uint16 scale;
71                 uint16 copies;
72                 uint16 defaultsource;
73                 uint16 printquality;
74                 uint16 color;
75                 uint16 duplex;
76                 uint16 yresolution;
77                 uint16 ttoption;
78                 uint16 collate;
79                 string32 formname;
80                 uint16 logpixels;
81                 uint32 bitsperpel;
82                 uint32 pelswidth;
83                 uint32 pelsheight;
84                 uint32 displayflags;
85                 uint32 displayfrequency;
86                 uint32 icmmethod;
87                 uint32 icmintent;
88                 uint32 mediatype;
89                 uint32 dithertype;
90                 uint32 reserved1;
91                 uint32 reserved2;
92                 uint32 panningwidth;
93                 uint32 panningheight;
94                 [subcontext_size(r->__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data;
95         } spoolss_DeviceMode;
96
97         typedef [public] bitmap {
98                 PRINTER_ENUM_DEFAULT     = 0x00000001,
99                 PRINTER_ENUM_LOCAL       = 0x00000002,
100                 PRINTER_ENUM_CONNECTIONS = 0x00000004,
101                 PRINTER_ENUM_FAVORITE    = 0x00000004,
102                 PRINTER_ENUM_NAME        = 0x00000008,
103                 PRINTER_ENUM_REMOTE      = 0x00000010,
104                 PRINTER_ENUM_SHARED      = 0x00000020,
105                 PRINTER_ENUM_NETWORK     = 0x00000040,
106                 PRINTER_ENUM_EXPAND      = 0x00004000,
107                 PRINTER_ENUM_CONTAINER   = 0x00008000,
108                 PRINTER_ENUM_ICON1       = 0x00010000,
109                 PRINTER_ENUM_ICON2       = 0x00020000,
110                 PRINTER_ENUM_ICON3       = 0x00040000,
111                 PRINTER_ENUM_ICON4       = 0x00080000,
112                 PRINTER_ENUM_ICON5       = 0x00100000,
113                 PRINTER_ENUM_ICON6       = 0x00200000,
114                 PRINTER_ENUM_ICON7       = 0x00400000,
115                 PRINTER_ENUM_ICON8       = 0x00800000,
116                 PRINTER_ENUM_HIDE        = 0x01000000
117         } spoolss_EnumPrinterFlags;
118
119         typedef struct {
120                 spoolss_EnumPrinterFlags flags;
121                 [relative] nstring *name;
122                 [relative] nstring *description;
123                 [relative] nstring *comment;
124         } spoolss_PrinterInfo1;
125
126         typedef bitmap {
127                 PRINTER_ATTRIBUTE_QUEUED                = 0x00000001,
128                 PRINTER_ATTRIBUTE_DIRECT                = 0x00000002,
129                 PRINTER_ATTRIBUTE_DEFAULT               = 0x00000004,
130                 PRINTER_ATTRIBUTE_SHARED                = 0x00000008,
131                 PRINTER_ATTRIBUTE_NETWORK               = 0x00000010,
132                 PRINTER_ATTRIBUTE_HIDDEN                = 0x00000020,
133                 PRINTER_ATTRIBUTE_LOCAL                 = 0x00000040,
134                 PRINTER_ATTRIBUTE_ENABLE_DEVQ           = 0x00000080,
135                 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS       = 0x00000100,
136                 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST     = 0x00000200,
137                 PRINTER_ATTRIBUTE_WORK_OFFLINE          = 0x00000400,
138                 PRINTER_ATTRIBUTE_ENABLE_BIDI           = 0x00000800,
139                 PRINTER_ATTRIBUTE_RAW_ONLY              = 0x00001000,
140                 PRINTER_ATTRIBUTE_PUBLISHED             = 0x00002000,
141                 PRINTER_ATTRIBUTE_FAX                   = 0x00004000,
142                 PRINTER_ATTRIBUTE_TS                    = 0x00008000
143         } spoolss_PrinterAttributes;
144
145         typedef bitmap {
146                 PRINTER_STATUS_PAUSED           = 0x00000001,
147                 PRINTER_STATUS_ERROR            = 0x00000002,
148                 PRINTER_STATUS_PENDING_DELETION = 0x00000004,
149                 PRINTER_STATUS_PAPER_JAM        = 0x00000008,
150                 PRINTER_STATUS_PAPER_OUT        = 0x00000010,
151                 PRINTER_STATUS_MANUAL_FEED      = 0x00000020,
152                 PRINTER_STATUS_PAPER_PROBLEM    = 0x00000040,
153                 PRINTER_STATUS_OFFLINE          = 0x00000080,
154                 PRINTER_STATUS_IO_ACTIVE        = 0x00000100,
155                 PRINTER_STATUS_BUSY             = 0x00000200,
156                 PRINTER_STATUS_PRINTING         = 0x00000400,
157                 PRINTER_STATUS_OUTPUT_BIN_FULL  = 0x00000800,
158                 PRINTER_STATUS_NOT_AVAILABLE    = 0x00001000,
159                 PRINTER_STATUS_WAITING          = 0x00002000,
160                 PRINTER_STATUS_PROCESSING       = 0x00004000,
161                 PRINTER_STATUS_INITIALIZING     = 0x00008000,
162                 PRINTER_STATUS_WARMING_UP       = 0x00010000,
163                 PRINTER_STATUS_TONER_LOW        = 0x00020000,
164                 PRINTER_STATUS_NO_TONER         = 0x00040000,
165                 PRINTER_STATUS_PAGE_PUNT        = 0x00080000,
166                 PRINTER_STATUS_USER_INTERVENTION= 0x00100000,
167                 PRINTER_STATUS_OUT_OF_MEMORY    = 0x00200000,
168                 PRINTER_STATUS_DOOR_OPEN        = 0x00400000,
169                 PRINTER_STATUS_SERVER_UNKNOWN   = 0x00800000,
170                 PRINTER_STATUS_POWER_SAVE       = 0x01000000
171         } spoolss_PrinterStatus;
172
173         typedef struct {
174                 [relative] nstring *servername;
175                 [relative] nstring *printername;
176                 [relative] nstring *sharename;
177                 [relative] nstring *portname;
178                 [relative] nstring *drivername;
179                 [relative] nstring *comment;
180                 [relative] nstring *location;
181                 [relative] spoolss_DeviceMode *devmode;
182                 [relative] nstring *sepfile;
183                 [relative] nstring *printprocessor;
184                 [relative] nstring *datatype;
185                 [relative] nstring *parameters;
186                 [relative,subcontext(0)] security_descriptor *secdesc;
187                 spoolss_PrinterAttributes attributes;
188                 uint32 priority;
189                 uint32 defaultpriority;
190                 uint32 starttime;
191                 uint32 untiltime;
192                 spoolss_PrinterStatus status;
193                 uint32 cjobs;
194                 uint32 averageppm;
195         } spoolss_PrinterInfo2;
196
197         typedef struct {
198                 [relative,subcontext(0)] security_descriptor *secdesc;
199         } spoolss_PrinterInfo3;
200
201         typedef struct {
202                 [relative] nstring *printername;
203                 [relative] nstring *servername;
204                 spoolss_PrinterAttributes attributes;
205         } spoolss_PrinterInfo4;
206
207         typedef struct {
208                 [relative] nstring *printername;
209                 [relative] nstring *portname;
210                 spoolss_PrinterAttributes attributes;
211                 uint32 device_not_selected_timeout;
212                 uint32 transmission_retry_timeout;
213         } spoolss_PrinterInfo5;
214
215         typedef struct {
216                 spoolss_PrinterStatus status;
217         } spoolss_PrinterInfo6;
218
219         typedef bitmap {
220                 DSPRINT_PUBLISH         = 0x00000001,
221                 DSPRINT_UPDATE          = 0x00000002,
222                 DSPRINT_UNPUBLISH       = 0x00000004,
223                 DSPRINT_REPUBLISH       = 0x00000008,
224                 DSPRINT_PENDING         = 0x80000000
225         } spoolss_DsPrintAction;
226
227         typedef struct {
228                 [relative] nstring *guid; /* text form of printer guid */
229                 spoolss_DsPrintAction action;
230         } spoolss_PrinterInfo7;
231
232         typedef struct {
233                 [relative] spoolss_DeviceMode *devmode;
234         } spoolss_DeviceModeInfo;
235
236         typedef [nodiscriminant,public] union {
237                 [case(0)] spoolss_PrinterInfo0 info0;
238                 [case(1)] spoolss_PrinterInfo1 info1;
239                 [case(2)] spoolss_PrinterInfo2 info2;
240                 [case(3)] spoolss_PrinterInfo3 info3;
241                 [case(4)] spoolss_PrinterInfo4 info4;
242                 [case(5)] spoolss_PrinterInfo5 info5;
243                 [case(6)] spoolss_PrinterInfo6 info6;
244                 [case(7)] spoolss_PrinterInfo7 info7;
245                 [case(8)] spoolss_DeviceModeInfo info8;
246                 [case(9)] spoolss_DeviceModeInfo info9;
247                 [default];
248         } spoolss_PrinterInfo;
249
250         /******************/
251         /* Function: 0x00 */
252         [noprint,nopull,nopush] WERROR spoolss_EnumPrinters(
253                 [in] spoolss_EnumPrinterFlags flags,
254                 [in] unistr *server,
255                 [in] uint32 level,
256                 [in] DATA_BLOB *buffer,
257                 /* [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info[count],*/
258                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo **info,
259                 [in,out,ref] uint32 *buf_size,
260                 [out] uint32 count
261         );
262
263         /******************/
264         /* Function: 0x01 */
265         typedef struct {
266                 uint32 foo;
267         } spoolss_Devmode;
268
269         typedef struct {
270                 uint32 size;
271                 spoolss_Devmode *devmode;
272         } spoolss_DevmodeContainer;
273
274         WERROR spoolss_OpenPrinter(
275                 [in] unistr *printername,
276                 [in] unistr *datatype,
277                 [in] spoolss_DevmodeContainer devmode_ctr,
278                 [in] uint32 access_mask,
279                 [out,ref] policy_handle *handle
280         );
281
282         /******************/
283         /* Function: 0x02 */
284         WERROR spoolss_SetJob(
285                 [in,ref] policy_handle *handle,
286                 [in] uint32 job_id,
287                 [in] uint32 level,
288                 [in] uint32 command
289         );
290
291         /******************/
292         /* Function: 0x03 */
293         WERROR spoolss_GetJob(
294                 [in,ref] policy_handle *handle,
295                 [in] uint32 job_id,
296                 [in] uint32 level,
297                 [in] DATA_BLOB *buffer,
298                 [out,subcontext(4),switch_is(level)] spoolss_JobInfo *info,
299                 [in,out,ref] uint32 *buf_size
300         );
301
302         typedef struct {
303                 uint32 job_id;
304                 [relative] nstring *printer_name;
305                 [relative] nstring *server_name;
306                 [relative] nstring *user_name;
307                 [relative] nstring *document_name;
308                 [relative] nstring *data_type;
309                 [relative] nstring *text_status;
310                 uint32 status;
311                 uint32 priority;
312                 uint32 position;
313                 uint32 total_pages;
314                 uint32 pages_printed;
315                 spoolss_Time time;
316         } spoolss_JobInfo1;
317
318         typedef [nodiscriminant,public] union {
319                 [case(1)] spoolss_JobInfo1 info1;
320                 [case(2)]; /* TODO */
321                 [case(3)]; /* TODO */
322                 [default];
323         } spoolss_JobInfo;
324
325         /******************/
326         /* Function: 0x04 */
327         [noprint,nopull,nopush] WERROR spoolss_EnumJobs(
328                 [in,ref] policy_handle *handle,
329                 [in]     uint32 firstjob,
330                 [in]     uint32 numjobs,
331                 [in]     uint32 level,
332                 [in]     DATA_BLOB *buffer,
333                 /* [out,subcontext(4),switch_is(level)] spoolss_JobInfo *info[count],*/
334                 [out,subcontext(4),switch_is(level)] spoolss_JobInfo **info,
335                 [in,out,ref] uint32 *buf_size,
336                 [out]    uint32 count
337         );
338
339         /******************/
340         /* Function: 0x05 */
341         WERROR spoolss_AddPrinter(
342                 /* This function is not implemented in Samba 3 as no
343                    clients have been observed using it. */
344         );
345
346         /******************/
347         /* Function: 0x06 */
348         WERROR spoolss_DeletePrinter(
349         );
350
351         typedef [v1_enum] enum {
352                 SPOOLSS_PRINTER_CONTROL_UNPAUSE    = 0,
353                 SPOOLSS_PRINTER_CONTROL_PAUSE      = 1,
354                 SPOOLSS_PRINTER_CONTROL_RESUME     = 2,
355                 SPOOLSS_PRINTER_CONTROL_PURGE      = 3,
356                 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
357         } spoolss_PrinterControl;
358
359         /******************/
360         /* Function: 0x07 */
361         WERROR spoolss_SetPrinter(
362                 [in,ref] policy_handle *handle,
363                 [in]     uint32 level,
364                 [in,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
365                 [in]     spoolss_DevmodeContainer devmode_ctr,
366                 [in,relative,subcontext(0)] security_descriptor *secdesc,
367                 [in]     spoolss_PrinterControl command
368         );
369
370         /******************/
371         /* Function: 0x08 */
372         WERROR spoolss_GetPrinter(
373                 [in,ref]     policy_handle *handle,
374                 [in]         uint32 level,
375                 [in]         DATA_BLOB *buffer,
376                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
377                 [in,out,ref] uint32 *buf_size
378         );
379
380         /******************/
381         /* Function: 0x09 */
382         WERROR spoolss_AddPrinterDriver(
383         );
384
385         typedef struct {
386                 [relative] nstring *driver_name;
387         } spoolss_DriverInfo1;
388
389         typedef [v1_enum] enum {
390                 SPOOLSS_DRIVER_VERSION_9X       = 0,
391                 SPOOLSS_DRIVER_VERSION_NT35     = 1,
392                 SPOOLSS_DRIVER_VERSION_NT4      = 2,
393                 SPOOLSS_DRIVER_VERSION_200X     = 3
394         } spoolss_DriverOSVersion;
395
396         typedef struct {
397                 spoolss_DriverOSVersion version;
398                 [relative] nstring *driver_name;
399                 [relative] nstring *architecture;
400                 [relative] nstring *driver_path;
401                 [relative] nstring *data_file;
402                 [relative] nstring *config_file;
403         } spoolss_DriverInfo2;
404
405         typedef struct {
406                 spoolss_DriverOSVersion version;
407                 [relative] nstring *driver_name;
408                 [relative] nstring *architecture;
409                 [relative] nstring *driver_path;
410                 [relative] nstring *data_file;
411                 [relative] nstring *config_file;
412                 [relative] nstring *help_file;
413                 [relative] nstring_array *dependent_files;
414                 [relative] nstring *monitor_name;
415                 [relative] nstring *default_datatype;
416         } spoolss_DriverInfo3;
417
418         typedef struct {
419                 spoolss_DriverOSVersion version;
420                 [relative] nstring *driver_name;
421                 [relative] nstring *architecture;
422                 [relative] nstring *driver_path;
423                 [relative] nstring *data_file;
424                 [relative] nstring *config_file;
425                 [relative] nstring *help_file;
426                 [relative] nstring_array *dependent_files;
427                 [relative] nstring *monitor_name;
428                 [relative] nstring *default_datatype;
429                 [relative] nstring_array *previous_names;
430         } spoolss_DriverInfo4;
431
432         typedef struct {
433                 spoolss_DriverOSVersion version;
434                 [relative] nstring *driver_name;
435                 [relative] nstring *architecture;
436                 [relative] nstring *driver_path;
437                 [relative] nstring *data_file;
438                 [relative] nstring *config_file;
439                 uint32 driver_attributes;
440                 uint32 config_version;
441                 uint32 driver_version;
442         } spoolss_DriverInfo5;
443
444         typedef struct {
445                 spoolss_DriverOSVersion version;
446                 [relative] nstring *driver_name;
447                 [relative] nstring *architecture;
448                 [relative] nstring *driver_path;
449                 [relative] nstring *data_file;
450                 [relative] nstring *config_file;
451                 [relative] nstring *help_file;
452                 [relative] nstring_array *dependent_files;
453                 [relative] nstring *monitor_name;
454                 [relative] nstring *default_datatype;
455                 [relative] nstring_array *previous_names;
456                 NTTIME driver_data;
457                 hyper driver_version;
458                 [relative] nstring *manufacturer_name;
459                 [relative] nstring *manufacturer_url;
460                 [relative] nstring *hardware_id;
461                 [relative] nstring *provider;
462         } spoolss_DriverInfo6;
463
464         typedef [nodiscriminant,public] union {
465                 [case(1)] spoolss_DriverInfo1 info1;
466                 [case(2)] spoolss_DriverInfo2 info2;
467                 [case(3)] spoolss_DriverInfo3 info3;
468                 [case(4)] spoolss_DriverInfo4 info4;
469                 [case(5)] spoolss_DriverInfo5 info5;
470                 [case(6)] spoolss_DriverInfo6 info6;
471                 [default];
472         } spoolss_DriverInfo;
473
474         /******************/
475         /* Function: 0x0a */
476         [noprint,nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
477                 [in] unistr *server,
478                 [in] unistr *environment,
479                 [in] uint32 level,
480                 [in] DATA_BLOB *buffer,
481                 /* [out,subcontext(4),switch_is(level)] spoolss_DriverInfo *info[count],*/
482                 [out,subcontext(4),switch_is(level)] spoolss_DriverInfo **info,
483                 [in,out,ref] uint32 *buf_size,
484                 [out] uint32 count
485         );
486
487         /******************/
488         /* Function: 0x0b */
489         WERROR spoolss_GetPrinterDriver(
490         );
491
492         /******************/
493         /* Function: 0x0c */
494         WERROR spoolss_GetPrinterDriverDirectory(
495         );
496
497         /******************/
498         /* Function: 0x0d */
499         WERROR spoolss_DeletePrinterDriver(
500                 [in,ref] policy_handle *handle,
501                 [in] unistr *server,
502                 [in] unistr architecture,
503                 [in] unistr driver
504         );
505
506         /******************/
507         /* Function: 0x0e */
508         WERROR spoolss_AddPrintProcessor(
509         );
510
511         /******************/
512         /* Function: 0x0f */
513         typedef struct {
514                 [relative] nstring *print_processor_name;
515         } spoolss_PrintProcessorInfo1;
516
517         typedef [nodiscriminant,public] union {
518                 [case(1)] spoolss_PrintProcessorInfo1 info1;
519                 [default];
520         } spoolss_PrintProcessorInfo;
521
522         [noprint,nopull,nopush] WERROR spoolss_EnumPrintProcessors(
523                 [in] unistr *servername,
524                 [in] unistr *environment,
525                 [in] uint32 level,
526                 [in] DATA_BLOB *buffer,
527                 /* [out,subcontext(4),switch_is(level)] spoolss_PrintProcessorInfo *info[count],*/
528                 [out,subcontext(4),switch_is(level)]  spoolss_PrintProcessorInfo **info,
529                 /* [out,subcontext(4),flag(NDR_REMAINING)] DATA_BLOB *info,*/
530                 [in,out,ref] uint32 *buf_size,
531                 [out] uint32 count
532         );
533
534         /******************/
535         /* Function: 0x10 */
536         WERROR spoolss_GetPrintProcessorDirectory(
537         );
538
539         /******************/
540         /* Function: 0x11 */
541         WERROR spoolss_StartDocPrinter(
542         );
543
544         /******************/
545         /* Function: 0x12 */
546         WERROR spoolss_StartPagePrinter(
547                 [in,ref] policy_handle *handle          
548         );
549
550         /******************/
551         /* Function: 0x13 */
552         WERROR spoolss_WritePrinter(
553         );
554
555         /******************/
556         /* Function: 0x14 */
557         WERROR spoolss_EndPagePrinter(
558                 [in,ref] policy_handle *handle          
559         );
560
561         /******************/
562         /* Function: 0x15 */
563         WERROR spoolss_AbortPrinter(
564         );
565
566         /******************/
567         /* Function: 0x16 */
568         WERROR spoolss_ReadPrinter(
569         );
570
571         /******************/
572         /* Function: 0x17 */
573         WERROR spoolss_EndDocPrinter(
574         );
575
576         /******************/
577         /* Function: 0x18 */
578         WERROR spoolss_AddJob(
579         );
580
581         /******************/
582         /* Function: 0x19 */
583         WERROR spoolss_ScheduleJob(
584         );
585
586         /******************/
587         /* Function: 0x1a */
588         const string SPOOLSS_ARCHITECTURE_NT_X86                = "Windows NT x86";
589
590         typedef [v1_enum] enum {
591                 SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
592                 SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
593                 SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4
594         } spoolss_PrinterDataType;
595
596         typedef [nodiscriminant,gensize] union {
597                 [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
598                 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
599                 [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
600                 [default,flag(NDR_REMAINING)] DATA_BLOB data;
601         } spoolss_PrinterData;
602
603         WERROR spoolss_GetPrinterData(
604                 [in,ref] policy_handle *handle,
605                 [in] unistr value_name,
606                 [out] spoolss_PrinterDataType type,
607                 [out,subcontext(4),switch_is(type)] spoolss_PrinterData data,
608                 [in,out,ref] uint32 *buf_size
609         );
610
611         /******************/
612         /* Function: 0x1b */
613         WERROR spoolss_SetPrinterData(  
614                 [in,ref] policy_handle *handle,
615                 [in] unistr value_name,
616                 [in] uint32 type,
617                 [in] DATA_BLOB buffer,
618                 [in] uint32 real_len
619         );
620
621         /******************/
622         /* Function: 0x1c */
623         WERROR spoolss_WaitForPrinterChange(
624         );
625
626         /******************/
627         /* Function: 0x1d */
628         WERROR spoolss_ClosePrinter(
629                 [in,out,ref]     policy_handle *handle
630         );
631
632         /******************/
633         /* Function: 0x1e */
634         typedef [v1_enum] enum {
635                 SPOOLSS_FORM_USER       = 0,
636                 SPOOLSS_FORM_BUILTIN    = 1,
637                 SPOOLSS_FORM_PRINTER    = 2
638         } spoolss_FormFlags;
639
640         typedef struct {
641                 uint32 width;
642                 uint32 height;
643         } spoolss_FormSize;
644
645         typedef struct {
646                 uint32 left;
647                 uint32 top;
648                 uint32 right;
649                 uint32 bottom;
650         } spoolss_FormArea;
651
652         typedef struct {
653                 spoolss_FormFlags flags;
654                 [relative] unistr *form_name;
655                 spoolss_FormSize size;
656                 spoolss_FormArea area;
657         } spoolss_AddFormInfo1;
658
659         typedef union {
660                 [case(1)] spoolss_AddFormInfo1 *info1;
661         } spoolss_AddFormInfo;
662
663         WERROR spoolss_AddForm(
664                 [in,ref] policy_handle *handle,
665                 [in] uint32 level,
666                 [in,switch_is(level)] spoolss_AddFormInfo info
667         );
668
669         /******************/
670         /* Function: 0x1f */
671         WERROR spoolss_DeleteForm(
672                 [in,ref] policy_handle *handle,
673                 [in] unistr form_name
674         );
675
676         /******************/
677         /* Function: 0x20 */
678         typedef struct {
679                 spoolss_FormFlags flags;
680                 [relative] nstring *form_name;
681                 spoolss_FormSize size;
682                 spoolss_FormArea area;
683         } spoolss_FormInfo1;
684
685         WERROR spoolss_GetForm(
686                 [in,ref] policy_handle *handle,
687                 [in] unistr form_name,
688                 [in] uint32 level,
689                 [in] DATA_BLOB *buffer,
690                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info,
691                 [in,out,ref] uint32 *buf_size
692         );
693
694         typedef struct {
695                 spoolss_FormFlags flags;
696                 unistr *form_name;
697                 spoolss_FormSize size;
698                 spoolss_FormArea area;
699         } spoolss_SetFormInfo1;
700
701         typedef union {
702                 [case(1)] spoolss_SetFormInfo1 *info1;
703         } spoolss_SetFormInfo;
704
705         /******************/
706         /* Function: 0x21 */
707         WERROR spoolss_SetForm(
708                 [in,ref] policy_handle *handle,
709                 [in] unistr form_name,
710                 [in] uint32 level,
711                 [in,switch_is(level)] spoolss_SetFormInfo info
712         );
713
714         typedef [nodiscriminant,public] union {
715                 [case(1)] spoolss_FormInfo1 info1;
716                 [default];
717         } spoolss_FormInfo;
718
719         /******************/
720         /* Function: 0x22 */
721         [noprint,nopull,nopush] WERROR spoolss_EnumForms(
722                 [in,ref] policy_handle *handle,
723                 [in] uint32 level,
724                 [in] DATA_BLOB *buffer,
725                 /* [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info[count],*/
726                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo **info,
727                 [in,out,ref] uint32 *buf_size,
728                 [out] uint32 count
729         );
730
731         typedef [flag(RELATIVE_CURRENT)] struct {
732                 [relative] nstring *port_name;
733         } spoolss_PortInfo1;
734
735         typedef bitmap {
736                 SPOOLSS_PORT_TYPE_WRITE         = 0x00000001,
737                 SPOOLSS_PORT_TYPE_READ          = 0x00000002,
738                 SPOOLSS_PORT_TYPE_REDIRECTED    = 0x00000004,
739                 SPOOLSS_PORT_TYPE_NET_ATTACHED  = 0x00000008
740         } spoolss_PortType;
741
742         typedef struct {
743                 [relative] nstring *port_name;
744                 [relative] nstring *monitor_name;
745                 [relative] nstring *description;
746                 spoolss_PortType port_type;
747                 uint32 reserved;
748         } spoolss_PortInfo2;
749
750         typedef [nodiscriminant,public] union {
751                 [case(1)] spoolss_PortInfo1 info1;
752                 [case(2)] spoolss_PortInfo2 info2;
753                 [case(3)]; /* TODO */
754                 [default];
755         } spoolss_PortInfo;
756
757         /******************/
758         /* Function: 0x23 */
759         [noprint,nopull,nopush] WERROR spoolss_EnumPorts(
760                 [in] unistr *servername,
761                 [in] uint32 level,
762                 [in] DATA_BLOB *buffer,
763                 /* [out,subcontext(4),switch_is(level)] spoolss_PortInfo *info[count], */
764                 [out,subcontext(4),switch_is(level)] spoolss_PortInfo **info,
765                 [in,out,ref] uint32 *buf_size,
766                 [out] uint32 count
767         );
768
769         /******************/
770         /* Function: 0x24 */
771         typedef struct {
772                 [relative] nstring *monitor_name;
773         } spoolss_MonitorInfo1;
774
775         typedef struct {
776                 [relative] nstring *monitor_name;
777                 [relative] nstring *environment;
778                 [relative] nstring *dll_name;
779         } spoolss_MonitorInfo2;
780
781         typedef [nodiscriminant,public] union {
782                 [case(1)] spoolss_MonitorInfo1 info1;
783                 [case(2)] spoolss_MonitorInfo2 info2;
784                 [default];
785         } spoolss_MonitorInfo;
786
787         [noprint,nopull,nopush] WERROR spoolss_EnumMonitors(
788                 [in] unistr *servername,
789                 [in] uint32 level,
790                 [in] DATA_BLOB *buffer,
791                 /* [out,subcontext(4),switch_is(level)] spoolss_MonitorInfo *info[count], */
792                 [out,subcontext(4),switch_is(level)] spoolss_MonitorInfo **info,
793                 /* [out,subcontext(4),flag(NDR_REMAINING)] DATA_BLOB *info,*/
794                 [in,out,ref] uint32 *buf_size,
795                 [out] uint32 count
796         );
797
798         /******************/
799         /* Function: 0x25 */
800         WERROR spoolss_AddPort(
801                [in] unistr *server_name,
802                [in] uint32 unknown,
803                [in] unistr monitor_name
804         );
805
806         /******************/
807         /* Function: 0x26 */
808         WERROR spoolss_ConfigurePort(
809         );
810
811         /******************/
812         /* Function: 0x27 */
813         WERROR spoolss_DeletePort(
814         );
815
816         /******************/
817         /* Function: 0x28 */
818         WERROR spoolss_CreatePrinterIC(
819         );
820
821         /******************/
822         /* Function: 0x29 */
823         WERROR spoolss_PlayGDIScriptOnPrinterIC(
824         );
825
826         /******************/
827         /* Function: 0x2a */
828         WERROR spoolss_DeletePrinterIC(
829         );
830
831         /******************/
832         /* Function: 0x2b */
833         WERROR spoolss_AddPrinterConnection(
834         );
835
836         /******************/
837         /* Function: 0x2c */
838         WERROR spoolss_DeletePrinterConnection(
839         );
840
841         /******************/
842         /* Function: 0x2d */
843         WERROR spoolss_PrinterMessageBox(
844                 /* Marked as obsolete in MSDN.  "Not necessary and has
845                    no effect". */
846         );
847
848         /******************/
849         /* Function: 0x2e */
850         WERROR spoolss_AddMonitor(
851         );
852
853         /******************/
854         /* Function: 0x2f */
855         WERROR spoolss_DeleteMonitor(
856         );
857
858         /******************/
859         /* Function: 0x30 */
860         WERROR spoolss_DeletePrintProcessor(
861         );
862
863         /******************/
864         /* Function: 0x31 */
865         WERROR spoolss_AddPrintProvidor(
866         );
867
868         /******************/
869         /* Function: 0x32 */
870         WERROR spoolss_DeletePrintProvidor(
871         );
872
873         /******************/
874         /* Function: 0x33 */
875         WERROR spoolss_EnumPrintProcDataTypes(
876         );
877
878         /******************/
879         /* Function: 0x34 */
880         WERROR spoolss_ResetPrinter(
881         );
882
883         /******************/
884         /* Function: 0x35 */
885         WERROR spoolss_GetPrinterDriver2(
886                 [in,ref] policy_handle *handle,
887                 [in] unistr *architecture,
888                 [in] uint32 level,
889                 [in,out] DATA_BLOB *buffer,
890                 [in,out,ref] uint32 *buf_size,
891                 [in] uint32 client_major_version,
892                 [in] uint32 client_minor_version,
893                 [out] uint32 server_major_version,
894                 [out] uint32 server_minor_version
895         );
896
897         /******************/
898         /* Function: 0x36 */
899         WERROR spoolss_FindFirstPrinterChangeNotification(
900         );
901
902         /******************/
903         /* Function: 0x37 */
904         WERROR spoolss_FindNextPrinterChangeNotification(
905         );
906
907         /******************/
908         /* Function: 0x38 */
909         WERROR spoolss_FindClosePrinterNotify(
910         );
911
912         /******************/
913         /* Function: 0x39 */
914         WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
915         );
916
917         /******************/
918         /* Function: 0x3a */
919         WERROR spoolss_ReplyOpenPrinter(
920         );
921
922         /******************/
923         /* Function: 0x3b */
924         WERROR spoolss_RouterReplyPrinter(
925         );
926
927         /******************/
928         /* Function: 0x3c */
929         WERROR spoolss_ReplyClosePrinter(
930         );
931
932         /******************/
933         /* Function: 0x3d */
934         WERROR spoolss_AddPortEx(
935         );
936
937         /******************/
938         /* Function: 0x3e */
939         WERROR spoolss_RouterFindFirstPrinterChangeNotification(
940         );
941
942         /******************/
943         /* Function: 0x3f */
944         WERROR spoolss_SpoolerInit(
945         );
946
947         /******************/
948         /* Function: 0x40 */
949         WERROR spoolss_ResetPrinterEx(
950         );
951
952         /******************/
953         /* Function: 0x41 */
954         typedef [flag(NDR_PAHEX)] struct {
955                 uint16 u1;
956                 uint16 u2;
957                 uint32 u3;
958                 uint32 u4;
959                 uint32 count;
960                 [size_is(count)] uint16 *array;
961         } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2;
962
963         typedef struct {
964                 uint32 u1;
965                 uint32 u2;
966                 uint32 count;
967                 [size_is(count)] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2 *t2;
968         } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1;
969
970         WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
971                 [in,ref] policy_handle *handle,
972                 [in] uint32 u1,
973                 [in] uint32 u2,
974                 [in] unistr *str,
975                 [in] uint32 u3,
976                 [in] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1 *t1
977         );
978
979         /******************/
980         /* Function: 0x42 */
981         WERROR spoolss_RouterRefreshPrinterChangeNotification(
982         );
983
984         /******************/
985         /* Function: 0x43 */
986         WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
987         );
988
989         /******************/
990         /* Function: 0x44 */
991         WERROR spoolss_44(
992         );
993
994         typedef struct {
995                 uint32 size;
996                 unistr *client;
997                 unistr *user;
998                 uint32 build;
999                 uint32 major;
1000                 uint32 minor;
1001                 uint32 processor;
1002         } spoolss_UserLevel1;
1003
1004         typedef union {
1005                 [case(1)]  spoolss_UserLevel1 *level1;
1006         } spoolss_UserLevel;
1007
1008         /******************/
1009         /* Function: 0x45 */
1010         WERROR spoolss_OpenPrinterEx(
1011                 [in]                  unistr *printername,
1012                 [in]                  unistr *datatype,
1013                 [in]                  spoolss_DevmodeContainer devmode_ctr,
1014                 [in]                  uint32 access_mask,
1015                 [in]                  uint32 level,
1016                 [in,switch_is(level)] spoolss_UserLevel userlevel,
1017                 [out,ref]             policy_handle *handle
1018         );
1019
1020         /******************/
1021         /* Function: 0x46 */
1022         WERROR spoolss_AddPrinterEx(
1023                 [in] unistr *server,
1024                 [in] uint32 level,
1025                 [in,switch_is(level)] spoolss_PrinterInfo *info,
1026                 [in] spoolss_DevmodeContainer devmode_ctr,
1027                 [in] security_descriptor *secdesc,
1028                 [in] uint32 ulevel,
1029                 [in,switch_is(ulevel)] spoolss_UserLevel userlevel
1030         );
1031
1032         /******************/
1033         /* Function: 0x47 */
1034         WERROR spoolss_47(
1035         );
1036
1037         /******************/
1038         /* Function: 0x48 */
1039         WERROR spoolss_EnumPrinterData(
1040                 [in,ref] policy_handle *handle,
1041                 [in]     uint32 enum_index,
1042                 [in]     uint32 value_offered,
1043                 [out]    lstring value_name,
1044                 [out]    uint32 value_needed,
1045                 [out]    uint32 printerdata_type,
1046                 [out]    DATA_BLOB buffer,
1047                 [in,out,ref] uint32 *data_size
1048         );
1049
1050         /******************/
1051         /* Function: 0x49 */
1052         WERROR spoolss_DeletePrinterData(
1053                 [in,ref] policy_handle *handle,
1054                 [in] unistr value_name
1055         );
1056
1057         /******************/
1058         /* Function: 0x4a */
1059         WERROR spoolss_4a(
1060         );
1061
1062         /******************/
1063         /* Function: 0x4b */
1064         WERROR spoolss_4b(
1065         );
1066
1067         /******************/
1068         /* Function: 0x4c */
1069         WERROR spoolss_4c(
1070         );
1071
1072         /******************/
1073         /* Function: 0x4d */
1074         WERROR spoolss_SetPrinterDataEx(
1075                 [in,ref] policy_handle *handle,
1076                 [in] unistr key_name,
1077                 [in] unistr value_name,
1078                 [in] uint32 type,
1079                 [in] DATA_BLOB buffer,
1080                 [in,out,ref] uint32 *buf_size
1081         );
1082
1083         /******************/
1084         /* Function: 0x4e */
1085         WERROR spoolss_GetPrinterDataEx(
1086                 [in,ref] policy_handle *handle,
1087                 [in] unistr key_name,
1088                 [in] unistr value_name,
1089                 [out] uint32 type,
1090                 [out] DATA_BLOB buffer,
1091                 [in,out,ref] uint32 *buf_size
1092         );
1093
1094         /******************/
1095         /* Function: 0x4f */
1096         WERROR spoolss_EnumPrinterDataEx(
1097                 [in,ref] policy_handle *handle,
1098                 [in] unistr key_name,
1099                 [out] DATA_BLOB buffer,
1100                 [in,out] uint32 buf_size,
1101                 [out] uint32 count
1102         );
1103
1104         /******************/
1105         /* Function: 0x50 */
1106         WERROR spoolss_EnumPrinterKey(
1107         );
1108
1109         /******************/
1110         /* Function: 0x51 */
1111         WERROR spoolss_DeletePrinterDataEx(
1112                 [in,ref] policy_handle *handle,
1113                 [in] unistr key_name,
1114                 [in] unistr value_name
1115         );
1116
1117         /******************/
1118         /* Function: 0x52 */
1119         WERROR spoolss_DeletePrinterKey(
1120         );
1121
1122         /******************/
1123         /* Function: 0x53 */
1124         WERROR spoolss_53(
1125         );
1126
1127         /******************/
1128         /* Function: 0x54 */
1129         WERROR spoolss_DeletePrinterDriverEx(
1130         );
1131
1132         /******************/
1133         /* Function: 0x55 */
1134         WERROR spoolss_55(
1135         );
1136
1137         /******************/
1138         /* Function: 0x56 */
1139         WERROR spoolss_56(
1140         );
1141
1142         /******************/
1143         /* Function: 0x57 */
1144         WERROR spoolss_57(
1145         );
1146
1147         /******************/
1148         /* Function: 0x58 */
1149         WERROR spoolss_58(
1150         );
1151
1152         /******************/
1153         /* Function: 0x59 */
1154         WERROR spoolss_AddPrinterDriverEx(
1155         );
1156
1157         /******************/
1158         /* Function: 0x5a */
1159         WERROR spoolss_5a(
1160         );
1161
1162         /******************/
1163         /* Function: 0x5b */
1164         WERROR spoolss_5b(
1165         );
1166
1167         /******************/
1168         /* Function: 0x5c */
1169         WERROR spoolss_5c(
1170         );
1171
1172         /******************/
1173         /* Function: 0x5d */
1174         WERROR spoolss_5d(
1175         );
1176
1177         /******************/
1178         /* Function: 0x5e */
1179         WERROR spoolss_5e(
1180         );
1181
1182         /******************/
1183         /* Function: 0x5f */
1184         WERROR spoolss_5f(
1185         );
1186 }