1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24 */
25
26#ifndef _SPOOLSS_NDL_
27#define	_SPOOLSS_NDL_
28
29#include <libmlrpc/ndrtypes.ndl>
30#include "security.ndl"
31
32#define TABLE_STRING 1
33#define TABLE_DWORD  2
34#define TABLE_TIME   3
35#define TABLE_DEVMODE 4
36#define TABLE_SECURITY_DESCRIPTOR 5
37
38#define SPOOLSS_OPNUM_EnumPrinters			0x00
39#define SPOOLSS_OPNUM_OpenPrinter			0x01
40#define SPOOLSS_OPNUM_GetJob				0x03
41#define SPOOLSS_OPNUM_EnumJobs				0x04
42#define SPOOLSS_OPNUM_DeletePrinter			0x06
43#define SPOOLSS_OPNUM_GetPrinter			0x08
44#define SPOOLSS_OPNUM_GetPrinterDriver			0x0b
45#define SPOOLSS_OPNUM_DeletePrinterDriver		0x0d
46#define SPOOLSS_OPNUM_StartDocPrinter			0x11
47#define SPOOLSS_OPNUM_StartPagePrinter			0x12
48#define SPOOLSS_OPNUM_WritePrinter			0x13
49#define SPOOLSS_OPNUM_EndPagePrinter			0x14
50#define SPOOLSS_OPNUM_AbortPrinter			0x15
51#define SPOOLSS_OPNUM_AddJob				0x18
52#define SPOOLSS_OPNUM_ScheduleJob			0x19
53#define SPOOLSS_OPNUM_GetPrinterData			0x1a
54#define SPOOLSS_OPNUM_ClosePrinter			0x1d
55#define SPOOLSS_OPNUM_AddForm				0x1e
56#define SPOOLSS_OPNUM_DeleteForm			0x1f
57#define SPOOLSS_OPNUM_EndDocPrinter			0x17
58#define SPOOLSS_OPNUM_EnumForms				0x22
59#define SPOOLSS_OPNUM_EnumPorts				0x23
60#define	SPOOLSS_OPNUM_EnumMonitor			0x24
61#define SPOOLSS_OPNUM_DeletePort			0x27
62#define SPOOLSS_OPNUM_CreatePrinterIC			0x28
63#define	SPOOLSS_OPNUM_AddMonitor			0x2e
64#define	SPOOLSS_OPNUM_DeleteMonitor			0x2f
65#define SPOOLSS_OPNUM_ResetPrinter			0x34
66#define SPOOLSS_OPNUM_GetPrinterDriver2			0x35
67#define SPOOLSS_OPNUM_FCPN				0x38
68#define SPOOLSS_OPNUM_ReplyOpenPrinter			0x3a
69#define SPOOLSS_OPNUM_ReplyClosePrinter			0x3c
70#define SPOOLSS_OPNUM_AddPortEx				0x3d
71#define SPOOLSS_OPNUM_RFFPCNEX				0x41
72#define SPOOLSS_OPNUM_RRPCN				0x42
73#define SPOOLSS_OPNUM_RFNPCNEX				0x43
74#define SPOOLSS_OPNUM_OpenPrinterEx			0x45
75#define SPOOLSS_OPNUM_SetPort				0x47
76#define SPOOLSS_OPNUM_EnumPrinterData			0x48
77#define SPOOLSS_OPNUM_EnumPrinterDataEx			0x4f
78#define SPOOLSS_OPNUM_EnumPrinterKey			0x50
79
80CONTEXT_HANDLE(spoolss_handle) spoolss_handle_t;
81
82struct spoolssDevmodeContainer {
83	BYTE 	DevContCount;
84  SIZE_IS(DevContCount)
85  	BYTE	*DevMode;
86};
87
88
89struct spoolss_DeviceMode {
90	BYTE devicename[64];
91	WORD specversion;
92	WORD driverversion;
93	WORD size;
94	WORD driverextra_length;
95	DWORD	fields;
96	WORD orientation;
97	WORD papersize;
98	WORD paperlength;
99	WORD paperwidth;
100	WORD scale;
101	WORD copies;
102	WORD defaultsource;
103	WORD printquality;
104	WORD color;
105	WORD duplex;
106	WORD yresolution;
107	WORD ttoption;
108	WORD collate;
109	BYTE formname[64];
110	WORD logpixels;
111	DWORD	bitsperpel;
112	DWORD	pelswidth;
113	DWORD	pelsheight;
114	DWORD	displayflags;
115	DWORD	displayfrequency;
116	DWORD	icmmethod;
117	DWORD	icmintent;
118	DWORD	mediatype;
119	DWORD	dithertype;
120	DWORD	reserved1;
121	DWORD	reserved2;
122	DWORD	panningwidth;
123	DWORD	panningheight;
124	struct spoolssDevmodeContainer driverextra_data;
125};
126
127OPERATION(SPOOLSS_OPNUM_CreatePrinterIC)
128struct spoolss_CreatePrinterIC {
129	IN	spoolss_handle_t handle;
130	OUT	spoolss_handle_t gdi_handle;
131	IN	struct spoolssDevmodeContainer dmodeContainer;
132	OUT	DWORD status;
133};
134
135OPERATION(SPOOLSS_OPNUM_OpenPrinter)
136struct spoolss_OpenPrinter {
137	IN	LPTSTR printer_name;
138	OUT	spoolss_handle_t handle;
139	IN	LPTSTR data_type;
140	/* IN	struct spoolssDevmodeContainer dmodeContainer; */
141	/* IN	DWORD AccessRequired; */
142	OUT	DWORD status;
143};
144
145OPERATION(SPOOLSS_OPNUM_EnumJobs)
146struct spoolss_EnumJobs {
147	IN	spoolss_handle_t handle;
148	IN	DWORD FirstJob;
149	IN	DWORD NoJobs;
150	IN	DWORD level;
151	IN	DWORD Buf2;
152	IN	DWORD 	BufCount;
153		SIZE_IS(BufCount)
154  	OUT		BYTE *pJob;
155	OUT	DWORD needed;
156	OUT	DWORD needed2;
157	OUT	DWORD status;
158};
159
160OPERATION(SPOOLSS_OPNUM_DeletePrinter)
161struct spoolss_DeletePrinter {
162	IN	DWORD dontcare;
163	OUT	DWORD status;
164};
165
166#define SPOOLSS_ARCHITECTURE_NT_X86	( "Windows NT x86" )
167struct spoolss_Time {
168	WORD year;
169	WORD month;
170	WORD day_of_week;
171	WORD day;
172	WORD hour;
173	WORD minute;
174	WORD second;
175	WORD millisecond;
176};
177
178struct spoolss_GetPrinter0 {
179	DWORD printername;
180	DWORD servername;
181	DWORD cjobs;
182	DWORD total_jobs;
183	DWORD total_bytes;
184	DWORD time0;
185	DWORD time1;
186	DWORD time2;
187	DWORD time3;
188	DWORD global_counter;
189	DWORD total_pages;
190	DWORD version;
191	DWORD ffreebuild;
192	DWORD cspooling;
193	DWORD cmaxspooling;
194	DWORD session_counter;
195	DWORD out_of_paper;
196	DWORD not_ready;
197	DWORD job_error;
198	DWORD num_processors;
199	DWORD type_processor;
200	DWORD high_part_total_bytes;
201	DWORD change_id;
202	DWORD last_error;
203	DWORD status;
204	DWORD enum_network_printers;
205	DWORD c_setprinter;
206	WORD processor_arch;
207	WORD processor_level;
208	DWORD ref;
209	DWORD reserved2;
210	DWORD reserved3;
211};
212
213/* bitmap spoolss_EnumPrinterFlags */
214#define PRINTER_ENUM_DEFAULT ( 0x00000001 )
215#define PRINTER_ENUM_LOCAL ( 0x00000002 )
216#define PRINTER_ENUM_CONNECTIONS ( 0x00000004 )
217#define PRINTER_ENUM_FAVORITE ( 0x00000004 )
218#define PRINTER_ENUM_NAME ( 0x00000008 )
219#define PRINTER_ENUM_REMOTE ( 0x00000010 )
220#define PRINTER_ENUM_SHARED ( 0x00000020 )
221#define PRINTER_ENUM_NETWORK ( 0x00000040 )
222#define PRINTER_ENUM_EXPAND ( 0x00004000 )
223#define PRINTER_ENUM_CONTAINER ( 0x00008000 )
224#define PRINTER_ENUM_ICON1 ( 0x00010000 )
225#define PRINTER_ENUM_ICON2 ( 0x00020000 )
226#define PRINTER_ENUM_ICON3 ( 0x00040000 )
227#define PRINTER_ENUM_ICON4 ( 0x00080000 )
228#define PRINTER_ENUM_ICON5 ( 0x00100000 )
229#define PRINTER_ENUM_ICON6 ( 0x00200000 )
230#define PRINTER_ENUM_ICON7 ( 0x00400000 )
231#define PRINTER_ENUM_ICON8 ( 0x00800000 )
232#define PRINTER_ENUM_HIDE ( 0x01000000 )
233
234struct spoolss_GetPrinter1 {
235	DWORD flags;
236	DWORD name;
237	DWORD description;
238	DWORD comment;
239};
240
241/* bitmap spoolss_PrinterAttributes */
242#define PRINTER_ATTRIBUTE_QUEUED ( 0x00000001 )
243#define PRINTER_ATTRIBUTE_DIRECT ( 0x00000002 )
244#define PRINTER_ATTRIBUTE_DEFAULT ( 0x00000004 )
245#define PRINTER_ATTRIBUTE_SHARED ( 0x00000008 )
246#define PRINTER_ATTRIBUTE_NETWORK ( 0x00000010 )
247#define PRINTER_ATTRIBUTE_HIDDEN ( 0x00000020 )
248#define PRINTER_ATTRIBUTE_LOCAL ( 0x00000040 )
249#define PRINTER_ATTRIBUTE_ENABLE_DEVQ ( 0x00000080 )
250#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS ( 0x00000100 )
251#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST ( 0x00000200 )
252#define PRINTER_ATTRIBUTE_WORK_OFFLINE ( 0x00000400 )
253#define PRINTER_ATTRIBUTE_ENABLE_BIDI ( 0x00000800 )
254#define PRINTER_ATTRIBUTE_RAW_ONLY ( 0x00001000 )
255#define PRINTER_ATTRIBUTE_PUBLISHED ( 0x00002000 )
256#define PRINTER_ATTRIBUTE_FAX ( 0x00004000 )
257#define PRINTER_ATTRIBUTE_TS ( 0x00008000 )
258
259/* bitmap spoolss_PrinterStatus */
260#define PRINTER_STATUS_PAUSED ( 0x00000001 )
261#define PRINTER_STATUS_ERROR ( 0x00000002 )
262#define PRINTER_STATUS_PENDING_DELETION ( 0x00000004 )
263#define PRINTER_STATUS_PAPER_JAM ( 0x00000008 )
264#define PRINTER_STATUS_PAPER_OUT ( 0x00000010 )
265#define PRINTER_STATUS_MANUAL_FEED ( 0x00000020 )
266#define PRINTER_STATUS_PAPER_PROBLEM ( 0x00000040 )
267#define PRINTER_STATUS_OFFLINE ( 0x00000080 )
268#define PRINTER_STATUS_IO_ACTIVE ( 0x00000100 )
269#define PRINTER_STATUS_BUSY ( 0x00000200 )
270#define PRINTER_STATUS_PRINTING ( 0x00000400 )
271#define PRINTER_STATUS_OUTPUT_BIN_FULL ( 0x00000800 )
272#define PRINTER_STATUS_NOT_AVAILABLE ( 0x00001000 )
273#define PRINTER_STATUS_WAITING ( 0x00002000 )
274#define PRINTER_STATUS_PROCESSING ( 0x00004000 )
275#define PRINTER_STATUS_INITIALIZING ( 0x00008000 )
276#define PRINTER_STATUS_WARMING_UP ( 0x00010000 )
277#define PRINTER_STATUS_TONER_LOW ( 0x00020000 )
278#define PRINTER_STATUS_NO_TONER ( 0x00040000 )
279#define PRINTER_STATUS_PAGE_PUNT ( 0x00080000 )
280#define PRINTER_STATUS_USER_INTERVENTION ( 0x00100000 )
281#define PRINTER_STATUS_OUT_OF_MEMORY ( 0x00200000 )
282#define PRINTER_STATUS_DOOR_OPEN ( 0x00400000 )
283#define PRINTER_STATUS_SERVER_UNKNOWN ( 0x00800000 )
284#define PRINTER_STATUS_POWER_SAVE ( 0x01000000 )
285
286struct spoolss_GetPrinter2 {
287	DWORD servername;
288	DWORD printername;
289	DWORD sharename;
290	DWORD portname;
291	DWORD drivername;
292	DWORD comment;
293	DWORD location;
294	DWORD devmode;
295	DWORD sepfile;
296	DWORD printprocessor;
297	DWORD datatype;
298	DWORD parameters;
299	DWORD secdesc;
300	DWORD attributes;
301	DWORD priority;
302	DWORD defaultpriority;
303	DWORD starttime;
304	DWORD untiltime;
305	DWORD status;
306	DWORD cjobs;
307	DWORD averageppm;
308};
309
310typedef struct spoolss_GetPrinter2 spoolss_GetPrinter2_t;
311
312struct spoolss_GetPrinter3 {
313	DWORD dummy;
314};
315
316struct spoolss_GetPrinter4 {
317	DWORD printername;
318	DWORD servername;
319	DWORD attributes;
320};
321
322struct spoolss_GetPrinter5 {
323	DWORD printername;
324	DWORD portname;
325	DWORD attributes;
326	DWORD device_not_selected_timeout;
327	DWORD transmission_retry_timeout;
328};
329
330struct spoolss_GetPrinter6 {
331	DWORD status;
332};
333
334/* bitmap spoolss_DsPrintAction */
335#define DSPRINT_PUBLISH ( 0x00000001 )
336#define DSPRINT_UPDATE ( 0x00000002 )
337#define DSPRINT_UNPUBLISH ( 0x00000004 )
338#define DSPRINT_REPUBLISH ( 0x00000008 )
339#define DSPRINT_PENDING ( 0x80000000 )
340
341struct spoolss_GetPrinter7 {
342	DWORD guid;
343	DWORD action;
344};
345
346struct spoolss_GetPrinter8 {
347	DWORD flags;
348	DWORD name;
349	DWORD description;
350	DWORD comment;
351};
352
353union spoolss_GetPrinter_result_u {
354	UNION_INFO_ENT(0, spoolss_GetPrinter);
355	UNION_INFO_ENT(1, spoolss_GetPrinter);
356	UNION_INFO_ENT(2, spoolss_GetPrinter);
357	UNION_INFO_ENT(3, spoolss_GetPrinter);
358	UNION_INFO_ENT(4, spoolss_GetPrinter);
359	UNION_INFO_ENT(5, spoolss_GetPrinter);
360	UNION_INFO_ENT(6, spoolss_GetPrinter);
361	UNION_INFO_ENT(7, spoolss_GetPrinter);
362	UNION_INFO_ENT(8, spoolss_GetPrinter);
363	DEFAULT char *nullptr;
364};
365
366struct spoolss_GetPrinter_result {
367	DWORD switch_value;
368	SWITCH(switch_value)
369		union spoolss_GetPrinter_result_u ru;
370};
371
372struct spoolss_RPC_V2_NOTIFY_OPTIONS_TYPE {
373	WORD type;
374	WORD reserved0;
375	DWORD reserved1;
376	DWORD reserved2;
377	DWORD count;
378	SIZE_IS(count)
379		WORD *pFields;
380};
381
382struct spoolss_RPC_V2_NOTIFY_OPTIONS {
383	DWORD version;
384	DWORD reserved;
385	DWORD count;
386	SIZE_IS(count)
387		struct spoolss_RPC_V2_NOTIFY_OPTIONS_TYPE *ptypes;
388};
389
390struct SYSTEMTIME {
391	WORD year;
392	WORD month;
393	WORD dayofweek;
394	WORD day;
395	WORD hour;
396	WORD minute;
397	WORD second;
398	WORD millisecs;
399};
400
401struct SECURITY_CONTAINER {
402	DWORD count;
403	SIZE_IS(count)
404		BYTE *psecurity;
405};
406
407struct SYSTEMTIME_CONTAINER {
408	DWORD count;
409	struct SYSTEMTIME *psystemtime;
410};
411
412struct STRING_CONTAINER {
413	DWORD count;
414	SIZE_IS(count / 2)
415		LPTSTR pstring;
416};
417
418union spoolss_RPC_V2_NOTIFY_INFO_DATA_DATA {
419	CASE(TABLE_STRING)
420		struct STRING_CONTAINER pcont;
421	CASE(TABLE_DWORD)
422		DWORD data[2];
423	CASE(TABLE_TIME)
424		struct SYSTEMTIME_CONTAINER system_time;
425	CASE(TABLE_DEVMODE)
426		struct spoolssDevmodeContainer devmode;
427	CASE(TABLE_SECURITY_DESCRIPTOR)
428		struct SECURITY_CONTAINER security_descriptor;
429};
430
431struct spoolss_RPC_V2_NOTIFY_INFO_DATA {
432	WORD Type;
433	WORD Field;
434	DWORD Reserved;
435	DWORD Id;
436	SWITCH(Reserved & 0x0000FFFF)
437		union spoolss_RPC_V2_NOTIFY_INFO_DATA_DATA data;
438};
439
440struct spoolss_RPC_V2_NOTIFY_INFO {
441	DWORD Version;
442	DWORD Flags;
443	DWORD Count;
444	SIZE_IS(Count)
445		struct spoolss_RPC_V2_NOTIFY_INFO_DATA *aData;
446};
447
448OPERATION(SPOOLSS_OPNUM_GetPrinter)
449struct spoolss_GetPrinter {
450	IN	spoolss_handle_t handle;
451	IN 	DWORD 	switch_value;
452  	IN	DWORD   Buf2;
453	IN	DWORD 	BufCount;
454		SIZE_IS(BufCount)
455  	OUT		BYTE *Buf;
456	OUT	DWORD needed;
457	OUT	DWORD status;
458};
459
460OPERATION(SPOOLSS_OPNUM_GetPrinterData)
461struct spoolss_GetPrinterData {
462	IN	spoolss_handle_t handle;
463	IN	REFERENCE LPTSTR pValueName;
464	OUT	DWORD pType;
465    SIZE_IS(Size)
466   	OUT	REFERENCE LPBYTE Buf;
467	IN	DWORD Size;
468	OUT	DWORD Needed;
469	OUT	DWORD status;
470};
471
472OPERATION(SPOOLSS_OPNUM_GetPrinterDriver)
473struct spoolss_GetPrinterDriver {
474	IN	DWORD dontcare;
475	OUT	DWORD status;
476};
477
478OPERATION(SPOOLSS_OPNUM_DeletePrinterDriver)
479struct spoolss_DeletePrinterDriver {
480	IN	DWORD dontcare;
481	OUT	DWORD status;
482};
483
484struct spoolss_DocInfo {
485	LPTSTR doc_name;
486	LPTSTR printer_name;
487	LPTSTR type;
488};
489typedef struct spoolss_DocInfo spoolss_DocInfo_t;
490
491struct spoolss_DocInfo_Container {
492	DWORD level;
493	DWORD switch_value;
494	spoolss_DocInfo_t *DocInfoContainer;
495};
496typedef struct spoolss_DocInfo_Container spoolss_DocInfo_Container_t;
497
498OPERATION(SPOOLSS_OPNUM_StartDocPrinter)
499struct spoolss_StartDocPrinter {
500	IN	spoolss_handle_t handle;
501	IN	spoolss_DocInfo_Container_t dinfo;
502	OUT	DWORD JobId;
503	OUT	DWORD status;
504};
505
506OPERATION(SPOOLSS_OPNUM_AbortPrinter)
507struct spoolss_AbortPrinter {
508	IN	spoolss_handle_t handle;
509	OUT	DWORD status;
510};
511
512OPERATION(SPOOLSS_OPNUM_EnumPorts)
513struct spoolss_EnumPorts {
514	IN	LPTSTR name;
515	IN	DWORD level;
516	OUT	DWORD needed;
517	OUT	DWORD returned;
518	OUT	DWORD status;
519};
520
521OPERATION(SPOOLSS_OPNUM_DeletePort)
522struct spoolss_DeletePort {
523	IN	LPTSTR name;
524	OUT	DWORD status;
525};
526
527OPERATION(SPOOLSS_OPNUM_AddPortEx)
528struct spoolss_AddPortEx {
529	IN	LPTSTR name;
530	OUT	DWORD status;
531};
532
533OPERATION(SPOOLSS_OPNUM_SetPort)
534struct spoolss_SetPort {
535	IN	LPTSTR name;
536	OUT	DWORD status;
537};
538
539OPERATION(SPOOLSS_OPNUM_EnumMonitor)
540struct spoolss_EnumMonitor {
541	IN	LPTSTR name;
542	IN	DWORD level;
543	OUT	DWORD needed;
544	OUT	DWORD returned;
545	OUT	DWORD status;
546};
547
548OPERATION(SPOOLSS_OPNUM_AddMonitor)
549struct spoolss_AddMonitor {
550	IN	LPTSTR name;
551	OUT	DWORD status;
552};
553
554OPERATION(SPOOLSS_OPNUM_DeleteMonitor)
555struct spoolss_DeleteMonitor {
556	IN	LPTSTR name;
557	OUT	DWORD status;
558};
559
560OPERATION(SPOOLSS_OPNUM_ResetPrinter)
561struct spoolss_ResetPrinter {
562	IN	spoolss_handle_t handle;
563	OUT	DWORD status;
564};
565
566OPERATION(SPOOLSS_OPNUM_StartPagePrinter)
567struct spoolss_StartPagePrinter {
568	IN	spoolss_handle_t handle;
569	OUT	DWORD status;
570};
571
572OPERATION(SPOOLSS_OPNUM_EndPagePrinter)
573struct spoolss_EndPagePrinter {
574	IN	spoolss_handle_t handle;
575	OUT	DWORD status;
576};
577
578OPERATION(SPOOLSS_OPNUM_WritePrinter)
579struct spoolss_WritePrinter {
580	IN	spoolss_handle_t handle;
581	IN	DWORD BufCount;
582		SIZE_IS(BufCount)
583  	IN	REFERENCE LPBYTE pBuf;
584	OUT	DWORD written;
585	OUT	DWORD status;
586};
587
588OPERATION(SPOOLSS_OPNUM_ScheduleJob)
589struct spoolss_ScheduleJob {
590	IN	spoolss_handle_t handle;
591	IN 	DWORD 	JobId;
592	OUT	DWORD status;
593};
594
595OPERATION(SPOOLSS_OPNUM_GetJob)
596struct spoolss_GetJob {
597	IN	spoolss_handle_t handle;
598	IN 	DWORD 	JobId;
599	IN	DWORD 	level;
600		SIZE_IS(BufCount)
601  	INOUT		BYTE *pJob;
602	IN	DWORD BufCount;
603	OUT	DWORD needed;
604	OUT	DWORD status;
605};
606
607OPERATION(SPOOLSS_OPNUM_AddJob)
608struct spoolss_AddJob {
609	IN	spoolss_handle_t handle;
610	IN 	DWORD 	level;
611  	IN	DWORD   Buf2;
612	IN	DWORD 	BufCount;
613		SIZE_IS(BufCount)
614  	OUT		BYTE *pAddJob;
615	OUT	DWORD needed;
616	OUT	DWORD status;
617};
618
619OPERATION(SPOOLSS_OPNUM_ClosePrinter)
620struct spoolss_ClosePrinter {
621	IN	spoolss_handle_t handle;
622	OUT	spoolss_handle_t result_handle;
623	OUT	DWORD status;
624};
625
626OPERATION(SPOOLSS_OPNUM_EndDocPrinter)
627struct spoolss_EndDocPrinter {
628	IN	spoolss_handle_t handle;
629	OUT	DWORD status;
630};
631
632OPERATION(SPOOLSS_OPNUM_AddForm)
633struct spoolss_AddForm {
634	IN	spoolss_handle_t handle;
635	/*	FORM_CONTAINER *form_container; */
636	OUT	DWORD status;
637};
638
639OPERATION(SPOOLSS_OPNUM_DeleteForm)
640struct spoolss_DeleteForm {
641	IN	spoolss_handle_t handle;
642	/* IN	REFERENCE LPTSTR form_name; */
643	OUT	DWORD status;
644};
645
646OPERATION(SPOOLSS_OPNUM_EnumForms)
647struct spoolss_EnumForms {
648	IN	spoolss_handle_t handle;
649	IN 	DWORD 	level;
650	IN	DWORD 	BufCount;
651		SIZE_IS(BufCount)
652  	INOUT		BYTE *pEnumForms;
653	OUT	DWORD needed;
654	OUT	DWORD pcRet;
655	OUT	DWORD status;
656};
657
658OPERATION(SPOOLSS_OPNUM_GetPrinterDriver2)
659struct spoolss_GetPrinterDriver2 {
660	IN	DWORD dontcare;
661	OUT	DWORD status;
662};
663
664OPERATION(SPOOLSS_OPNUM_FCPN)
665struct spoolss_FCPN {
666	IN	DWORD dontcare;
667	OUT	DWORD status;
668};
669
670OPERATION(SPOOLSS_OPNUM_ReplyOpenPrinter)
671struct spoolss_ReplyOpenPrinter {
672	IN	DWORD dontcare;
673	OUT	DWORD status;
674};
675
676OPERATION(SPOOLSS_OPNUM_ReplyClosePrinter)
677struct spoolss_ReplyClosePrinter {
678	IN	DWORD dontcare;
679	OUT	DWORD status;
680};
681
682
683OPERATION(SPOOLSS_OPNUM_RFFPCNEX)
684struct spoolss_RFFPCNEX {
685	IN	spoolss_handle_t handle;
686	OUT	DWORD status;
687};
688
689struct spoolss_infores {
690	DWORD entriesread;
691	struct spoolss_RPC_V2_NOTIFY_INFO *pinfo;
692};
693
694OPERATION(SPOOLSS_OPNUM_RFNPCNEX)
695struct spoolss_RFNPCNEX {
696	IN	spoolss_handle_t handle;
697	IN 	DWORD color;
698	IN	struct spoolss_RPC_V2_NOTIFY_OPTIONS *poptions;
699	OUT	struct spoolss_infores *ppinfo;
700	OUT	DWORD status;
701};
702
703OPERATION(SPOOLSS_OPNUM_RRPCN)
704struct spoolss_RRPCN {
705	IN	DWORD dontcare;
706	OUT	DWORD status;
707};
708
709OPERATION(SPOOLSS_OPNUM_OpenPrinterEx)
710struct spoolss_OpenPrinterEx {
711	IN	LPTSTR printer_name;
712	OUT	spoolss_handle_t handle;
713	IN	LPTSTR data_type;
714	/* IN	struct spoolssDevmodeContainer dmodeContainer; */
715	/* IN	DWORD AccessRequired; */
716	/* IN	CLIENT_CONTAINER client_info; */
717	OUT	DWORD status;
718};
719
720OPERATION(SPOOLSS_OPNUM_EnumPrinterData)
721struct spoolss_EnumPrinterData {
722	IN	DWORD dontcare;
723	OUT	DWORD status;
724};
725
726OPERATION(SPOOLSS_OPNUM_EnumPrinterDataEx)
727struct spoolss_EnumPrinterDataEx {
728	IN	DWORD dontcare;
729	OUT	DWORD status;
730};
731
732OPERATION(SPOOLSS_OPNUM_EnumPrinterKey)
733struct spoolss_EnumPrinterKey {
734	IN	DWORD dontcare;
735	OUT	DWORD status;
736};
737
738/*
739 ***********************************************************************
740 * The spoolss interface definition.
741 ***********************************************************************
742 */
743
744INTERFACE(0)
745union spoolss_interface {
746 	CASE(SPOOLSS_OPNUM_OpenPrinter)
747		struct spoolss_OpenPrinter OpenPrinter;
748
749	CASE(SPOOLSS_OPNUM_DeletePrinter)
750		struct spoolss_DeletePrinter DeletePrinter;
751
752	CASE(SPOOLSS_OPNUM_GetPrinter)
753		struct spoolss_GetPrinter GetPrinter;
754
755	CASE(SPOOLSS_OPNUM_GetPrinterData)
756		struct spoolss_GetPrinterData GetPrinterData;
757
758	CASE(SPOOLSS_OPNUM_AbortPrinter)
759		struct spoolss_AbortPrinter AbortPrinter;
760
761	CASE(SPOOLSS_OPNUM_StartDocPrinter)
762		struct spoolss_StartDocPrinter StartDocPrinter;
763
764	CASE(SPOOLSS_OPNUM_EndDocPrinter)
765		struct spoolss_EndDocPrinter EndDocPrinter;
766
767	CASE(SPOOLSS_OPNUM_CreatePrinterIC)
768		struct spoolss_CreatePrinterIC CreatePrinterIC;
769
770	CASE(SPOOLSS_OPNUM_ResetPrinter)
771		struct spoolss_ResetPrinter ResetPrinter;
772
773	CASE(SPOOLSS_OPNUM_EnumMonitor)
774		struct spoolss_EnumMonitor EnumMonitor;
775
776	CASE(SPOOLSS_OPNUM_AddMonitor)
777		struct spoolss_AddMonitor AddMonitor;
778
779	CASE(SPOOLSS_OPNUM_DeleteMonitor)
780		struct spoolss_DeleteMonitor DeleteMonitor;
781
782	CASE(SPOOLSS_OPNUM_WritePrinter)
783		struct spoolss_WritePrinter WritePrinter;
784
785	CASE(SPOOLSS_OPNUM_StartPagePrinter)
786		struct spoolss_StartPagePrinter StartPagePrinter;
787
788	CASE(SPOOLSS_OPNUM_EndPagePrinter)
789		struct spoolss_EndPagePrinter EndPagePrinter;
790
791	CASE(SPOOLSS_OPNUM_ClosePrinter)
792		struct spoolss_ClosePrinter ClosePrinter;
793
794	CASE(SPOOLSS_OPNUM_OpenPrinterEx)
795		struct spoolss_OpenPrinterEx OpenPrinterEx;
796
797	CASE(SPOOLSS_OPNUM_AddJob)
798		struct spoolss_AddJob AddJob;
799
800	CASE(SPOOLSS_OPNUM_GetJob)
801		struct spoolss_GetJob GetJob;
802
803	CASE(SPOOLSS_OPNUM_ScheduleJob)
804		struct spoolss_ScheduleJob ScheduleJob;
805
806	CASE(SPOOLSS_OPNUM_AddForm)
807		struct spoolss_AddForm AddForm;
808
809	CASE(SPOOLSS_OPNUM_DeleteForm)
810		struct spoolss_DeleteForm DeleteForm;
811
812	CASE(SPOOLSS_OPNUM_EnumForms)
813		struct spoolss_EnumForms EnumForms;
814
815	CASE(SPOOLSS_OPNUM_EnumPorts)
816		struct spoolss_EnumPorts EnumPorts;
817
818	CASE(SPOOLSS_OPNUM_DeletePort)
819		struct spoolss_DeletePort DeletePort;
820
821	CASE(SPOOLSS_OPNUM_AddPortEx)
822		struct spoolss_AddPortEx AddPortEx;
823
824	CASE(SPOOLSS_OPNUM_SetPort)
825		struct spoolss_SetPort SetPort;
826
827	CASE(SPOOLSS_OPNUM_RFNPCNEX)
828		struct spoolss_RFNPCNEX RFNPCNEX;
829
830};
831typedef union spoolss_interface	spoolss_interface_t;
832EXTERNTYPEINFO(spoolss_interface)
833
834#endif /* _SPOOLSS_NDL_ */
835