summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/smbsrv/ndl/spoolss.ndl
blob: ef923797d43611fe7b7ba4791cf9813dce5e1595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
 * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
 */

#ifndef _SPOOLSS_NDL_
#define	_SPOOLSS_NDL_

#include <libmlrpc/ndrtypes.ndl>
#include "security.ndl"

#define TABLE_STRING 1
#define TABLE_DWORD  2
#define TABLE_TIME   3
#define TABLE_DEVMODE 4
#define TABLE_SECURITY_DESCRIPTOR 5

#define SPOOLSS_OPNUM_EnumPrinters			0x00
#define SPOOLSS_OPNUM_OpenPrinter			0x01
#define SPOOLSS_OPNUM_GetJob				0x03
#define SPOOLSS_OPNUM_EnumJobs				0x04
#define SPOOLSS_OPNUM_DeletePrinter			0x06
#define SPOOLSS_OPNUM_GetPrinter			0x08
#define SPOOLSS_OPNUM_GetPrinterDriver			0x0b
#define SPOOLSS_OPNUM_DeletePrinterDriver		0x0d
#define SPOOLSS_OPNUM_StartDocPrinter			0x11
#define SPOOLSS_OPNUM_StartPagePrinter			0x12
#define SPOOLSS_OPNUM_WritePrinter			0x13
#define SPOOLSS_OPNUM_EndPagePrinter			0x14
#define SPOOLSS_OPNUM_AbortPrinter			0x15
#define SPOOLSS_OPNUM_AddJob				0x18
#define SPOOLSS_OPNUM_ScheduleJob			0x19
#define SPOOLSS_OPNUM_GetPrinterData			0x1a
#define SPOOLSS_OPNUM_ClosePrinter			0x1d
#define SPOOLSS_OPNUM_AddForm				0x1e
#define SPOOLSS_OPNUM_DeleteForm			0x1f
#define SPOOLSS_OPNUM_EndDocPrinter			0x17
#define SPOOLSS_OPNUM_EnumForms				0x22
#define SPOOLSS_OPNUM_EnumPorts				0x23
#define	SPOOLSS_OPNUM_EnumMonitor			0x24
#define SPOOLSS_OPNUM_DeletePort			0x27
#define SPOOLSS_OPNUM_CreatePrinterIC			0x28
#define	SPOOLSS_OPNUM_AddMonitor			0x2e
#define	SPOOLSS_OPNUM_DeleteMonitor			0x2f
#define SPOOLSS_OPNUM_ResetPrinter			0x34
#define SPOOLSS_OPNUM_GetPrinterDriver2			0x35
#define SPOOLSS_OPNUM_FCPN				0x38
#define SPOOLSS_OPNUM_ReplyOpenPrinter			0x3a
#define SPOOLSS_OPNUM_ReplyClosePrinter			0x3c
#define SPOOLSS_OPNUM_AddPortEx				0x3d
#define SPOOLSS_OPNUM_RFFPCNEX				0x41
#define SPOOLSS_OPNUM_RRPCN				0x42
#define SPOOLSS_OPNUM_RFNPCNEX				0x43
#define SPOOLSS_OPNUM_OpenPrinterEx			0x45
#define SPOOLSS_OPNUM_SetPort				0x47
#define SPOOLSS_OPNUM_EnumPrinterData			0x48
#define SPOOLSS_OPNUM_EnumPrinterDataEx			0x4f
#define SPOOLSS_OPNUM_EnumPrinterKey			0x50

CONTEXT_HANDLE(spoolss_handle) spoolss_handle_t;

struct spoolssDevmodeContainer {
	BYTE 	DevContCount;
  SIZE_IS(DevContCount)
  	BYTE	*DevMode;
};


struct spoolss_DeviceMode {
	BYTE devicename[64];
	WORD specversion;
	WORD driverversion;
	WORD size;
	WORD driverextra_length;
	DWORD	fields;
	WORD orientation;
	WORD papersize;
	WORD paperlength;
	WORD paperwidth;
	WORD scale;
	WORD copies;
	WORD defaultsource;
	WORD printquality;
	WORD color;
	WORD duplex;
	WORD yresolution;
	WORD ttoption;
	WORD collate;
	BYTE formname[64];
	WORD logpixels;
	DWORD	bitsperpel;
	DWORD	pelswidth;
	DWORD	pelsheight;
	DWORD	displayflags;
	DWORD	displayfrequency;
	DWORD	icmmethod;
	DWORD	icmintent;
	DWORD	mediatype;
	DWORD	dithertype;
	DWORD	reserved1;
	DWORD	reserved2;
	DWORD	panningwidth;
	DWORD	panningheight;
	struct spoolssDevmodeContainer driverextra_data;
};

OPERATION(SPOOLSS_OPNUM_CreatePrinterIC)
struct spoolss_CreatePrinterIC {
	IN	spoolss_handle_t handle;
	OUT	spoolss_handle_t gdi_handle;
	IN	struct spoolssDevmodeContainer dmodeContainer;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_OpenPrinter)
struct spoolss_OpenPrinter {
	IN	LPTSTR printer_name;
	OUT	spoolss_handle_t handle;
	IN	LPTSTR data_type;
	/* IN	struct spoolssDevmodeContainer dmodeContainer; */
	/* IN	DWORD AccessRequired; */
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EnumJobs)
struct spoolss_EnumJobs {
	IN	spoolss_handle_t handle;
	IN	DWORD FirstJob;
	IN	DWORD NoJobs;
	IN	DWORD level;
	IN	DWORD Buf2;
	IN	DWORD 	BufCount;
		SIZE_IS(BufCount)
  	OUT		BYTE *pJob;
	OUT	DWORD needed;
	OUT	DWORD needed2;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_DeletePrinter)
struct spoolss_DeletePrinter {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

#define SPOOLSS_ARCHITECTURE_NT_X86	( "Windows NT x86" )
struct spoolss_Time {
	WORD year;
	WORD month;
	WORD day_of_week;
	WORD day;
	WORD hour;
	WORD minute;
	WORD second;
	WORD millisecond;
};

struct spoolss_GetPrinter0 {
	DWORD printername;
	DWORD servername;
	DWORD cjobs;
	DWORD total_jobs;
	DWORD total_bytes;
	DWORD time0;
	DWORD time1;
	DWORD time2;
	DWORD time3;
	DWORD global_counter;
	DWORD total_pages;
	DWORD version;
	DWORD ffreebuild;
	DWORD cspooling;
	DWORD cmaxspooling;
	DWORD session_counter;
	DWORD out_of_paper;
	DWORD not_ready;
	DWORD job_error;
	DWORD num_processors;
	DWORD type_processor;
	DWORD high_part_total_bytes;
	DWORD change_id;
	DWORD last_error;
	DWORD status;
	DWORD enum_network_printers;
	DWORD c_setprinter;
	WORD processor_arch;
	WORD processor_level;
	DWORD ref;
	DWORD reserved2;
	DWORD reserved3;
};

/* bitmap spoolss_EnumPrinterFlags */
#define PRINTER_ENUM_DEFAULT ( 0x00000001 )
#define PRINTER_ENUM_LOCAL ( 0x00000002 )
#define PRINTER_ENUM_CONNECTIONS ( 0x00000004 )
#define PRINTER_ENUM_FAVORITE ( 0x00000004 )
#define PRINTER_ENUM_NAME ( 0x00000008 )
#define PRINTER_ENUM_REMOTE ( 0x00000010 )
#define PRINTER_ENUM_SHARED ( 0x00000020 )
#define PRINTER_ENUM_NETWORK ( 0x00000040 )
#define PRINTER_ENUM_EXPAND ( 0x00004000 )
#define PRINTER_ENUM_CONTAINER ( 0x00008000 )
#define PRINTER_ENUM_ICON1 ( 0x00010000 )
#define PRINTER_ENUM_ICON2 ( 0x00020000 )
#define PRINTER_ENUM_ICON3 ( 0x00040000 )
#define PRINTER_ENUM_ICON4 ( 0x00080000 )
#define PRINTER_ENUM_ICON5 ( 0x00100000 )
#define PRINTER_ENUM_ICON6 ( 0x00200000 )
#define PRINTER_ENUM_ICON7 ( 0x00400000 )
#define PRINTER_ENUM_ICON8 ( 0x00800000 )
#define PRINTER_ENUM_HIDE ( 0x01000000 )

struct spoolss_GetPrinter1 {
	DWORD flags;
	DWORD name;
	DWORD description;
	DWORD comment;
};

/* bitmap spoolss_PrinterAttributes */
#define PRINTER_ATTRIBUTE_QUEUED ( 0x00000001 )
#define PRINTER_ATTRIBUTE_DIRECT ( 0x00000002 )
#define PRINTER_ATTRIBUTE_DEFAULT ( 0x00000004 )
#define PRINTER_ATTRIBUTE_SHARED ( 0x00000008 )
#define PRINTER_ATTRIBUTE_NETWORK ( 0x00000010 )
#define PRINTER_ATTRIBUTE_HIDDEN ( 0x00000020 )
#define PRINTER_ATTRIBUTE_LOCAL ( 0x00000040 )
#define PRINTER_ATTRIBUTE_ENABLE_DEVQ ( 0x00000080 )
#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS ( 0x00000100 )
#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST ( 0x00000200 )
#define PRINTER_ATTRIBUTE_WORK_OFFLINE ( 0x00000400 )
#define PRINTER_ATTRIBUTE_ENABLE_BIDI ( 0x00000800 )
#define PRINTER_ATTRIBUTE_RAW_ONLY ( 0x00001000 )
#define PRINTER_ATTRIBUTE_PUBLISHED ( 0x00002000 )
#define PRINTER_ATTRIBUTE_FAX ( 0x00004000 )
#define PRINTER_ATTRIBUTE_TS ( 0x00008000 )

/* bitmap spoolss_PrinterStatus */
#define PRINTER_STATUS_PAUSED ( 0x00000001 )
#define PRINTER_STATUS_ERROR ( 0x00000002 )
#define PRINTER_STATUS_PENDING_DELETION ( 0x00000004 )
#define PRINTER_STATUS_PAPER_JAM ( 0x00000008 )
#define PRINTER_STATUS_PAPER_OUT ( 0x00000010 )
#define PRINTER_STATUS_MANUAL_FEED ( 0x00000020 )
#define PRINTER_STATUS_PAPER_PROBLEM ( 0x00000040 )
#define PRINTER_STATUS_OFFLINE ( 0x00000080 )
#define PRINTER_STATUS_IO_ACTIVE ( 0x00000100 )
#define PRINTER_STATUS_BUSY ( 0x00000200 )
#define PRINTER_STATUS_PRINTING ( 0x00000400 )
#define PRINTER_STATUS_OUTPUT_BIN_FULL ( 0x00000800 )
#define PRINTER_STATUS_NOT_AVAILABLE ( 0x00001000 )
#define PRINTER_STATUS_WAITING ( 0x00002000 )
#define PRINTER_STATUS_PROCESSING ( 0x00004000 )
#define PRINTER_STATUS_INITIALIZING ( 0x00008000 )
#define PRINTER_STATUS_WARMING_UP ( 0x00010000 )
#define PRINTER_STATUS_TONER_LOW ( 0x00020000 )
#define PRINTER_STATUS_NO_TONER ( 0x00040000 )
#define PRINTER_STATUS_PAGE_PUNT ( 0x00080000 )
#define PRINTER_STATUS_USER_INTERVENTION ( 0x00100000 )
#define PRINTER_STATUS_OUT_OF_MEMORY ( 0x00200000 )
#define PRINTER_STATUS_DOOR_OPEN ( 0x00400000 )
#define PRINTER_STATUS_SERVER_UNKNOWN ( 0x00800000 )
#define PRINTER_STATUS_POWER_SAVE ( 0x01000000 )

struct spoolss_GetPrinter2 {
	DWORD servername;
	DWORD printername;
	DWORD sharename;
	DWORD portname;
	DWORD drivername;
	DWORD comment;
	DWORD location;
	DWORD devmode;
	DWORD sepfile;
	DWORD printprocessor;
	DWORD datatype;
	DWORD parameters;
	DWORD secdesc; 
	DWORD attributes;
	DWORD priority;
	DWORD defaultpriority;
	DWORD starttime;
	DWORD untiltime;
	DWORD status;
	DWORD cjobs;
	DWORD averageppm;
};

typedef struct spoolss_GetPrinter2 spoolss_GetPrinter2_t;

struct spoolss_GetPrinter3 {
	DWORD dummy;
};

struct spoolss_GetPrinter4 {
	DWORD printername;
	DWORD servername;
	DWORD attributes;
};

struct spoolss_GetPrinter5 {
	DWORD printername;
	DWORD portname;
	DWORD attributes;
	DWORD device_not_selected_timeout;
	DWORD transmission_retry_timeout;
};

struct spoolss_GetPrinter6 {
	DWORD status;
};

/* bitmap spoolss_DsPrintAction */
#define DSPRINT_PUBLISH ( 0x00000001 )
#define DSPRINT_UPDATE ( 0x00000002 )
#define DSPRINT_UNPUBLISH ( 0x00000004 )
#define DSPRINT_REPUBLISH ( 0x00000008 )
#define DSPRINT_PENDING ( 0x80000000 )

struct spoolss_GetPrinter7 {
	DWORD guid;
	DWORD action;
};

struct spoolss_GetPrinter8 {
	DWORD flags;
	DWORD name;
	DWORD description;
	DWORD comment;
};

union spoolss_GetPrinter_result_u {
	UNION_INFO_ENT(0, spoolss_GetPrinter);
	UNION_INFO_ENT(1, spoolss_GetPrinter);
	UNION_INFO_ENT(2, spoolss_GetPrinter);
	UNION_INFO_ENT(3, spoolss_GetPrinter);
	UNION_INFO_ENT(4, spoolss_GetPrinter);
	UNION_INFO_ENT(5, spoolss_GetPrinter);
	UNION_INFO_ENT(6, spoolss_GetPrinter);
	UNION_INFO_ENT(7, spoolss_GetPrinter);
	UNION_INFO_ENT(8, spoolss_GetPrinter);
	DEFAULT char *nullptr;
};

struct spoolss_GetPrinter_result {
	DWORD switch_value;
	SWITCH(switch_value)
		union spoolss_GetPrinter_result_u ru;
};

struct spoolss_RPC_V2_NOTIFY_OPTIONS_TYPE {
	WORD type;
	WORD reserved0;
	DWORD reserved1;
	DWORD reserved2;
	DWORD count;
	SIZE_IS(count)
		WORD *pFields;
};

struct spoolss_RPC_V2_NOTIFY_OPTIONS {
	DWORD version;
	DWORD reserved;
	DWORD count;
	SIZE_IS(count)
		struct spoolss_RPC_V2_NOTIFY_OPTIONS_TYPE *ptypes;
};

struct SYSTEMTIME {
	WORD year;
	WORD month;
	WORD dayofweek;
	WORD day;
	WORD hour;
	WORD minute;
	WORD second;
	WORD millisecs;
};

struct SECURITY_CONTAINER {
	DWORD count;
	SIZE_IS(count)
		BYTE *psecurity;
};

struct SYSTEMTIME_CONTAINER {
	DWORD count;
	struct SYSTEMTIME *psystemtime;
};

struct STRING_CONTAINER {
	DWORD count;
	SIZE_IS(count / 2)
		LPTSTR pstring;
};

union spoolss_RPC_V2_NOTIFY_INFO_DATA_DATA {
	CASE(TABLE_STRING)
		struct STRING_CONTAINER pcont;
	CASE(TABLE_DWORD)
		DWORD data[2];
	CASE(TABLE_TIME)
		struct SYSTEMTIME_CONTAINER system_time;
	CASE(TABLE_DEVMODE)
		struct spoolssDevmodeContainer devmode;
	CASE(TABLE_SECURITY_DESCRIPTOR)
		struct SECURITY_CONTAINER security_descriptor;
};

struct spoolss_RPC_V2_NOTIFY_INFO_DATA {
	WORD Type;
	WORD Field;
	DWORD Reserved;
	DWORD Id;
	SWITCH(Reserved & 0x0000FFFF)
		union spoolss_RPC_V2_NOTIFY_INFO_DATA_DATA data;
};

struct spoolss_RPC_V2_NOTIFY_INFO {
	DWORD Version;
	DWORD Flags;
	DWORD Count;
	SIZE_IS(Count)
		struct spoolss_RPC_V2_NOTIFY_INFO_DATA *aData;
};
	
OPERATION(SPOOLSS_OPNUM_GetPrinter)
struct spoolss_GetPrinter {
	IN	spoolss_handle_t handle;
	IN 	DWORD 	switch_value;
  	IN	DWORD   Buf2;
	IN	DWORD 	BufCount;
		SIZE_IS(BufCount)
  	OUT		BYTE *Buf;
	OUT	DWORD needed;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_GetPrinterData)
struct spoolss_GetPrinterData {
	IN	spoolss_handle_t handle;
	IN	REFERENCE LPTSTR pValueName;
	OUT	DWORD pType;
    SIZE_IS(Size)
   	OUT	REFERENCE LPBYTE Buf;
	IN	DWORD Size;
	OUT	DWORD Needed;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_GetPrinterDriver)
struct spoolss_GetPrinterDriver {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_DeletePrinterDriver)
struct spoolss_DeletePrinterDriver {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

struct spoolss_DocInfo {
	LPTSTR doc_name;
	LPTSTR printer_name;
	LPTSTR type;
};
typedef struct spoolss_DocInfo spoolss_DocInfo_t;

struct spoolss_DocInfo_Container {
	DWORD level;
	DWORD switch_value;
	spoolss_DocInfo_t *DocInfoContainer;
};
typedef struct spoolss_DocInfo_Container spoolss_DocInfo_Container_t;

OPERATION(SPOOLSS_OPNUM_StartDocPrinter)
struct spoolss_StartDocPrinter {
	IN	spoolss_handle_t handle;
	IN	spoolss_DocInfo_Container_t dinfo;
	OUT	DWORD JobId;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_AbortPrinter)
struct spoolss_AbortPrinter {
	IN	spoolss_handle_t handle;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EnumPorts)
struct spoolss_EnumPorts {
	IN	LPTSTR name;
	IN	DWORD level;
	OUT	DWORD needed;
	OUT	DWORD returned;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_DeletePort)
struct spoolss_DeletePort {
	IN	LPTSTR name;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_AddPortEx)
struct spoolss_AddPortEx {
	IN	LPTSTR name;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_SetPort)
struct spoolss_SetPort {
	IN	LPTSTR name;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EnumMonitor)
struct spoolss_EnumMonitor {
	IN	LPTSTR name;
	IN	DWORD level;
	OUT	DWORD needed;
	OUT	DWORD returned;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_AddMonitor)
struct spoolss_AddMonitor {
	IN	LPTSTR name;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_DeleteMonitor)
struct spoolss_DeleteMonitor {
	IN	LPTSTR name;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_ResetPrinter)
struct spoolss_ResetPrinter {
	IN	spoolss_handle_t handle;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_StartPagePrinter)
struct spoolss_StartPagePrinter {
	IN	spoolss_handle_t handle;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EndPagePrinter)
struct spoolss_EndPagePrinter {
	IN	spoolss_handle_t handle;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_WritePrinter)
struct spoolss_WritePrinter {
	IN	spoolss_handle_t handle;
	IN	DWORD BufCount;
		SIZE_IS(BufCount)
  	IN	REFERENCE LPBYTE pBuf;
	OUT	DWORD written;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_ScheduleJob)
struct spoolss_ScheduleJob {
	IN	spoolss_handle_t handle;
	IN 	DWORD 	JobId;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_GetJob)
struct spoolss_GetJob {
	IN	spoolss_handle_t handle;
	IN 	DWORD 	JobId;
	IN	DWORD 	level;
		SIZE_IS(BufCount)
  	INOUT		BYTE *pJob;
	IN	DWORD BufCount;
	OUT	DWORD needed;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_AddJob)
struct spoolss_AddJob {
	IN	spoolss_handle_t handle;
	IN 	DWORD 	level;
  	IN	DWORD   Buf2;
	IN	DWORD 	BufCount;
		SIZE_IS(BufCount)
  	OUT		BYTE *pAddJob;
	OUT	DWORD needed;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_ClosePrinter)
struct spoolss_ClosePrinter {
	IN	spoolss_handle_t handle;
	OUT	spoolss_handle_t result_handle;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EndDocPrinter)
struct spoolss_EndDocPrinter {
	IN	spoolss_handle_t handle;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_AddForm)
struct spoolss_AddForm {
	IN	spoolss_handle_t handle;
	/*	FORM_CONTAINER *form_container; */
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_DeleteForm)
struct spoolss_DeleteForm {
	IN	spoolss_handle_t handle;
	/* IN	REFERENCE LPTSTR form_name; */
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EnumForms)
struct spoolss_EnumForms {
	IN	spoolss_handle_t handle;
	IN 	DWORD 	level;
	IN	DWORD 	BufCount;
		SIZE_IS(BufCount)
  	INOUT		BYTE *pEnumForms;
	OUT	DWORD needed;
	OUT	DWORD pcRet;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_GetPrinterDriver2)
struct spoolss_GetPrinterDriver2 {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_FCPN)
struct spoolss_FCPN {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_ReplyOpenPrinter)
struct spoolss_ReplyOpenPrinter {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_ReplyClosePrinter)
struct spoolss_ReplyClosePrinter {
	IN	DWORD dontcare;
	OUT	DWORD status;
};


OPERATION(SPOOLSS_OPNUM_RFFPCNEX)
struct spoolss_RFFPCNEX {
	IN	spoolss_handle_t handle;
	OUT	DWORD status;
};

struct spoolss_infores {
	DWORD entriesread;
	struct spoolss_RPC_V2_NOTIFY_INFO *pinfo;
};

OPERATION(SPOOLSS_OPNUM_RFNPCNEX)
struct spoolss_RFNPCNEX {
	IN	spoolss_handle_t handle;
	IN 	DWORD color;
	IN	struct spoolss_RPC_V2_NOTIFY_OPTIONS *poptions;
	OUT	struct spoolss_infores *ppinfo;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_RRPCN)
struct spoolss_RRPCN {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_OpenPrinterEx)
struct spoolss_OpenPrinterEx {
	IN	LPTSTR printer_name;
	OUT	spoolss_handle_t handle;
	IN	LPTSTR data_type;
	/* IN	struct spoolssDevmodeContainer dmodeContainer; */
	/* IN	DWORD AccessRequired; */
	/* IN	CLIENT_CONTAINER client_info; */
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EnumPrinterData)
struct spoolss_EnumPrinterData {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EnumPrinterDataEx)
struct spoolss_EnumPrinterDataEx {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

OPERATION(SPOOLSS_OPNUM_EnumPrinterKey)
struct spoolss_EnumPrinterKey {
	IN	DWORD dontcare;
	OUT	DWORD status;
};

/*
 ***********************************************************************
 * The spoolss interface definition.
 ***********************************************************************
 */

INTERFACE(0)
union spoolss_interface {
 	CASE(SPOOLSS_OPNUM_OpenPrinter)
		struct spoolss_OpenPrinter OpenPrinter;

	CASE(SPOOLSS_OPNUM_DeletePrinter)
		struct spoolss_DeletePrinter DeletePrinter;

	CASE(SPOOLSS_OPNUM_GetPrinter)
		struct spoolss_GetPrinter GetPrinter;

	CASE(SPOOLSS_OPNUM_GetPrinterData)
		struct spoolss_GetPrinterData GetPrinterData;
	
	CASE(SPOOLSS_OPNUM_AbortPrinter)
		struct spoolss_AbortPrinter AbortPrinter;
	
	CASE(SPOOLSS_OPNUM_StartDocPrinter)
		struct spoolss_StartDocPrinter StartDocPrinter;
	
	CASE(SPOOLSS_OPNUM_EndDocPrinter)
		struct spoolss_EndDocPrinter EndDocPrinter;
	
	CASE(SPOOLSS_OPNUM_CreatePrinterIC)
		struct spoolss_CreatePrinterIC CreatePrinterIC;
	
	CASE(SPOOLSS_OPNUM_ResetPrinter)
		struct spoolss_ResetPrinter ResetPrinter;

	CASE(SPOOLSS_OPNUM_EnumMonitor)
		struct spoolss_EnumMonitor EnumMonitor;

	CASE(SPOOLSS_OPNUM_AddMonitor)
		struct spoolss_AddMonitor AddMonitor;

	CASE(SPOOLSS_OPNUM_DeleteMonitor)
		struct spoolss_DeleteMonitor DeleteMonitor;

	CASE(SPOOLSS_OPNUM_WritePrinter)
		struct spoolss_WritePrinter WritePrinter;
	
	CASE(SPOOLSS_OPNUM_StartPagePrinter)
		struct spoolss_StartPagePrinter StartPagePrinter;
	
	CASE(SPOOLSS_OPNUM_EndPagePrinter)
		struct spoolss_EndPagePrinter EndPagePrinter;
	
	CASE(SPOOLSS_OPNUM_ClosePrinter)
		struct spoolss_ClosePrinter ClosePrinter;

	CASE(SPOOLSS_OPNUM_OpenPrinterEx)
		struct spoolss_OpenPrinterEx OpenPrinterEx;
	
	CASE(SPOOLSS_OPNUM_AddJob)
		struct spoolss_AddJob AddJob;

	CASE(SPOOLSS_OPNUM_GetJob)
		struct spoolss_GetJob GetJob;

	CASE(SPOOLSS_OPNUM_ScheduleJob)
		struct spoolss_ScheduleJob ScheduleJob;

	CASE(SPOOLSS_OPNUM_AddForm)
		struct spoolss_AddForm AddForm;

	CASE(SPOOLSS_OPNUM_DeleteForm)
		struct spoolss_DeleteForm DeleteForm;

	CASE(SPOOLSS_OPNUM_EnumForms)
		struct spoolss_EnumForms EnumForms;

	CASE(SPOOLSS_OPNUM_EnumPorts)
		struct spoolss_EnumPorts EnumPorts;

	CASE(SPOOLSS_OPNUM_DeletePort)
		struct spoolss_DeletePort DeletePort;

	CASE(SPOOLSS_OPNUM_AddPortEx)
		struct spoolss_AddPortEx AddPortEx;

	CASE(SPOOLSS_OPNUM_SetPort)
		struct spoolss_SetPort SetPort;

	CASE(SPOOLSS_OPNUM_RFNPCNEX)
		struct spoolss_RFNPCNEX RFNPCNEX;

};
typedef union spoolss_interface	spoolss_interface_t;
EXTERNTYPEINFO(spoolss_interface)

#endif /* _SPOOLSS_NDL_ */