Fixed a few typos and added the opnum for ADDPRINTERDRIVEREX to the
[Samba/gbeck.git] / source / rpc_server / srv_spoolss.c
blob654e3875ce265c8db7867d241f41d2c634c3541e
1 /*
2 * Unix SMB/Netbios implementation.
3 * Version 1.9.
4 * RPC Pipe client / server routines
5 * Copyright (C) Andrew Tridgell 1992-2000,
6 * Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
7 * Copyright (C) Jean François Micouleau 1998-2000.
8 * Copyright (C) Jeremy Allison 2001.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include "includes.h"
27 /********************************************************************
28 * api_spoolss_open_printer_ex
29 ********************************************************************/
31 static BOOL api_spoolss_open_printer_ex(pipes_struct *p)
33 SPOOL_Q_OPEN_PRINTER_EX q_u;
34 SPOOL_R_OPEN_PRINTER_EX r_u;
35 prs_struct *data = &p->in_data.data;
36 prs_struct *rdata = &p->out_data.rdata;
38 ZERO_STRUCT(q_u);
39 ZERO_STRUCT(r_u);
41 if (!spoolss_io_q_open_printer_ex("", &q_u, data, 0)) {
42 DEBUG(0,("spoolss_io_q_open_printer_ex: unable to unmarshall SPOOL_Q_OPEN_PRINTER_EX.\n"));
43 return False;
46 r_u.status = _spoolss_open_printer_ex( p, &q_u, &r_u);
48 if (!spoolss_io_r_open_printer_ex("",&r_u,rdata,0)){
49 DEBUG(0,("spoolss_io_r_open_printer_ex: unable to marshall SPOOL_R_OPEN_PRINTER_EX.\n"));
50 return False;
53 return True;
56 /********************************************************************
57 * api_spoolss_getprinterdata
59 * called from the spoolss dispatcher
60 ********************************************************************/
62 static BOOL api_spoolss_getprinterdata(pipes_struct *p)
64 SPOOL_Q_GETPRINTERDATA q_u;
65 SPOOL_R_GETPRINTERDATA r_u;
66 prs_struct *data = &p->in_data.data;
67 prs_struct *rdata = &p->out_data.rdata;
69 ZERO_STRUCT(q_u);
70 ZERO_STRUCT(r_u);
72 /* read the stream and fill the struct */
73 if (!spoolss_io_q_getprinterdata("", &q_u, data, 0)) {
74 DEBUG(0,("spoolss_io_q_getprinterdata: unable to unmarshall SPOOL_Q_GETPRINTERDATA.\n"));
75 return False;
78 r_u.status = _spoolss_getprinterdata( p, &q_u, &r_u);
80 if (!spoolss_io_r_getprinterdata("", &r_u, rdata, 0)) {
81 DEBUG(0,("spoolss_io_r_getprinterdata: unable to marshall SPOOL_R_GETPRINTERDATA.\n"));
82 return False;
85 return True;
88 /********************************************************************
89 * api_spoolss_deleteprinterdata
91 * called from the spoolss dispatcher
92 ********************************************************************/
94 static BOOL api_spoolss_deleteprinterdata(pipes_struct *p)
96 SPOOL_Q_DELETEPRINTERDATA q_u;
97 SPOOL_R_DELETEPRINTERDATA r_u;
98 prs_struct *data = &p->in_data.data;
99 prs_struct *rdata = &p->out_data.rdata;
101 ZERO_STRUCT(q_u);
102 ZERO_STRUCT(r_u);
104 /* read the stream and fill the struct */
105 if (!spoolss_io_q_deleteprinterdata("", &q_u, data, 0)) {
106 DEBUG(0,("spoolss_io_q_deleteprinterdata: unable to unmarshall SPOOL_Q_DELETEPRINTERDATA.\n"));
107 return False;
110 r_u.status = _spoolss_deleteprinterdata( p, &q_u, &r_u);
112 if (!spoolss_io_r_deleteprinterdata("", &r_u, rdata, 0)) {
113 DEBUG(0,("spoolss_io_r_deleteprinterdata: unable to marshall SPOOL_R_DELETEPRINTERDATA.\n"));
114 return False;
117 return True;
120 /********************************************************************
121 * api_spoolss_closeprinter
123 * called from the spoolss dispatcher
124 ********************************************************************/
126 static BOOL api_spoolss_closeprinter(pipes_struct *p)
128 SPOOL_Q_CLOSEPRINTER q_u;
129 SPOOL_R_CLOSEPRINTER r_u;
130 prs_struct *data = &p->in_data.data;
131 prs_struct *rdata = &p->out_data.rdata;
133 ZERO_STRUCT(q_u);
134 ZERO_STRUCT(r_u);
136 if (!spoolss_io_q_closeprinter("", &q_u, data, 0)) {
137 DEBUG(0,("spoolss_io_q_closeprinter: unable to unmarshall SPOOL_Q_CLOSEPRINTER.\n"));
138 return False;
141 r_u.status = _spoolss_closeprinter(p, &q_u, &r_u);
143 if (!spoolss_io_r_closeprinter("",&r_u,rdata,0)) {
144 DEBUG(0,("spoolss_io_r_closeprinter: unable to marshall SPOOL_R_CLOSEPRINTER.\n"));
145 return False;
148 return True;
151 /********************************************************************
152 * api_spoolss_abortprinter
154 * called from the spoolss dispatcher
155 ********************************************************************/
157 static BOOL api_spoolss_abortprinter(pipes_struct *p)
159 SPOOL_Q_ABORTPRINTER q_u;
160 SPOOL_R_ABORTPRINTER r_u;
161 prs_struct *data = &p->in_data.data;
162 prs_struct *rdata = &p->out_data.rdata;
164 ZERO_STRUCT(q_u);
165 ZERO_STRUCT(r_u);
167 if (!spoolss_io_q_abortprinter("", &q_u, data, 0)) {
168 DEBUG(0,("spoolss_io_q_abortprinter: unable to unmarshall SPOOL_Q_ABORTPRINTER.\n"));
169 return False;
172 r_u.status = _spoolss_abortprinter(p, &q_u, &r_u);
174 if (!spoolss_io_r_abortprinter("",&r_u,rdata,0)) {
175 DEBUG(0,("spoolss_io_r_abortprinter: unable to marshall SPOOL_R_ABORTPRINTER.\n"));
176 return False;
179 return True;
182 /********************************************************************
183 * api_spoolss_deleteprinter
185 * called from the spoolss dispatcher
186 ********************************************************************/
188 static BOOL api_spoolss_deleteprinter(pipes_struct *p)
190 SPOOL_Q_DELETEPRINTER q_u;
191 SPOOL_R_DELETEPRINTER r_u;
192 prs_struct *data = &p->in_data.data;
193 prs_struct *rdata = &p->out_data.rdata;
195 ZERO_STRUCT(q_u);
196 ZERO_STRUCT(r_u);
198 if (!spoolss_io_q_deleteprinter("", &q_u, data, 0)) {
199 DEBUG(0,("spoolss_io_q_deleteprinter: unable to unmarshall SPOOL_Q_DELETEPRINTER.\n"));
200 return False;
203 r_u.status = _spoolss_deleteprinter(p, &q_u, &r_u);
205 if (!spoolss_io_r_deleteprinter("",&r_u,rdata,0)) {
206 DEBUG(0,("spoolss_io_r_deleteprinter: unable to marshall SPOOL_R_DELETEPRINTER.\n"));
207 return False;
210 return True;
214 /********************************************************************
215 * api_spoolss_deleteprinterdriver
217 * called from the spoolss dispatcher
218 ********************************************************************/
220 static BOOL api_spoolss_deleteprinterdriver(pipes_struct *p)
222 SPOOL_Q_DELETEPRINTERDRIVER q_u;
223 SPOOL_R_DELETEPRINTERDRIVER r_u;
224 prs_struct *data = &p->in_data.data;
225 prs_struct *rdata = &p->out_data.rdata;
227 ZERO_STRUCT(q_u);
228 ZERO_STRUCT(r_u);
230 if (!spoolss_io_q_deleteprinterdriver("", &q_u, data, 0)) {
231 DEBUG(0,("spoolss_io_q_deleteprinterdriver: unable to unmarshall SPOOL_Q_DELETEPRINTERDRIVER.\n"));
232 return False;
235 r_u.status = _spoolss_deleteprinterdriver(p, &q_u, &r_u);
237 if (!spoolss_io_r_deleteprinterdriver("",&r_u,rdata,0)) {
238 DEBUG(0,("spoolss_io_r_deleteprinter: unable to marshall SPOOL_R_DELETEPRINTER.\n"));
239 return False;
242 return True;
246 /********************************************************************
247 * api_spoolss_rffpcnex
248 * ReplyFindFirstPrinterChangeNotifyEx
249 ********************************************************************/
251 static BOOL api_spoolss_rffpcnex(pipes_struct *p)
253 SPOOL_Q_RFFPCNEX q_u;
254 SPOOL_R_RFFPCNEX r_u;
255 prs_struct *data = &p->in_data.data;
256 prs_struct *rdata = &p->out_data.rdata;
258 ZERO_STRUCT(q_u);
259 ZERO_STRUCT(r_u);
261 if (!spoolss_io_q_rffpcnex("", &q_u, data, 0)) {
262 DEBUG(0,("spoolss_io_q_rffpcnex: unable to unmarshall SPOOL_Q_RFFPCNEX.\n"));
263 return False;
266 r_u.status = _spoolss_rffpcnex(p, &q_u, &r_u);
268 if (!spoolss_io_r_rffpcnex("", &r_u, rdata, 0)) {
269 DEBUG(0,("spoolss_io_r_rffpcnex: unable to marshall SPOOL_R_RFFPCNEX.\n"));
270 return False;
273 return True;
277 /********************************************************************
278 * api_spoolss_rfnpcnex
279 * ReplyFindNextPrinterChangeNotifyEx
280 * called from the spoolss dispatcher
282 * Note - this is the *ONLY* function that breaks the RPC call
283 * symmetry in all the other calls. We need to do this to fix
284 * the massive memory allocation problem with thousands of jobs...
285 * JRA.
286 ********************************************************************/
288 static BOOL api_spoolss_rfnpcnex(pipes_struct *p)
290 SPOOL_Q_RFNPCNEX q_u;
291 SPOOL_R_RFNPCNEX r_u;
292 prs_struct *data = &p->in_data.data;
293 prs_struct *rdata = &p->out_data.rdata;
295 ZERO_STRUCT(q_u);
296 ZERO_STRUCT(r_u);
298 if (!spoolss_io_q_rfnpcnex("", &q_u, data, 0)) {
299 DEBUG(0,("spoolss_io_q_rfnpcnex: unable to unmarshall SPOOL_Q_RFNPCNEX.\n"));
300 return False;
303 r_u.status = _spoolss_rfnpcnex(p, &q_u, &r_u);
305 if (!spoolss_io_r_rfnpcnex("", &r_u, rdata, 0)) {
306 SAFE_FREE(r_u.info.data);
307 DEBUG(0,("spoolss_io_r_rfnpcnex: unable to marshall SPOOL_R_RFNPCNEX.\n"));
308 return False;
311 SAFE_FREE(r_u.info.data);
313 return True;
317 /********************************************************************
318 * api_spoolss_enumprinters
319 * called from the spoolss dispatcher
321 ********************************************************************/
323 static BOOL api_spoolss_enumprinters(pipes_struct *p)
325 SPOOL_Q_ENUMPRINTERS q_u;
326 SPOOL_R_ENUMPRINTERS r_u;
327 prs_struct *data = &p->in_data.data;
328 prs_struct *rdata = &p->out_data.rdata;
330 ZERO_STRUCT(q_u);
331 ZERO_STRUCT(r_u);
333 if (!spoolss_io_q_enumprinters("", &q_u, data, 0)) {
334 DEBUG(0,("spoolss_io_q_enumprinters: unable to unmarshall SPOOL_Q_ENUMPRINTERS.\n"));
335 return False;
338 r_u.status = _spoolss_enumprinters( p, &q_u, &r_u);
340 if (!spoolss_io_r_enumprinters("", &r_u, rdata, 0)) {
341 DEBUG(0,("spoolss_io_r_enumprinters: unable to marshall SPOOL_R_ENUMPRINTERS.\n"));
342 return False;
345 return True;
348 /********************************************************************
349 * api_spoolss_getprinter
350 * called from the spoolss dispatcher
352 ********************************************************************/
354 static BOOL api_spoolss_getprinter(pipes_struct *p)
356 SPOOL_Q_GETPRINTER q_u;
357 SPOOL_R_GETPRINTER r_u;
358 prs_struct *data = &p->in_data.data;
359 prs_struct *rdata = &p->out_data.rdata;
361 ZERO_STRUCT(q_u);
362 ZERO_STRUCT(r_u);
364 if(!spoolss_io_q_getprinter("", &q_u, data, 0)) {
365 DEBUG(0,("spoolss_io_q_getprinter: unable to unmarshall SPOOL_Q_GETPRINTER.\n"));
366 return False;
369 r_u.status = _spoolss_getprinter(p, &q_u, &r_u);
371 if(!spoolss_io_r_getprinter("",&r_u,rdata,0)) {
372 DEBUG(0,("spoolss_io_r_getprinter: unable to marshall SPOOL_R_GETPRINTER.\n"));
373 return False;
376 return True;
379 /********************************************************************
380 * api_spoolss_getprinter
381 * called from the spoolss dispatcher
383 ********************************************************************/
385 static BOOL api_spoolss_getprinterdriver2(pipes_struct *p)
387 SPOOL_Q_GETPRINTERDRIVER2 q_u;
388 SPOOL_R_GETPRINTERDRIVER2 r_u;
389 prs_struct *data = &p->in_data.data;
390 prs_struct *rdata = &p->out_data.rdata;
392 ZERO_STRUCT(q_u);
393 ZERO_STRUCT(r_u);
395 if(!spoolss_io_q_getprinterdriver2("", &q_u, data, 0)) {
396 DEBUG(0,("spoolss_io_q_getprinterdriver2: unable to unmarshall SPOOL_Q_GETPRINTERDRIVER2.\n"));
397 return False;
400 r_u.status = _spoolss_getprinterdriver2(p, &q_u, &r_u);
402 if(!spoolss_io_r_getprinterdriver2("",&r_u,rdata,0)) {
403 DEBUG(0,("spoolss_io_r_getprinterdriver2: unable to marshall SPOOL_R_GETPRINTERDRIVER2.\n"));
404 return False;
407 return True;
410 /********************************************************************
411 * api_spoolss_getprinter
412 * called from the spoolss dispatcher
414 ********************************************************************/
416 static BOOL api_spoolss_startpageprinter(pipes_struct *p)
418 SPOOL_Q_STARTPAGEPRINTER q_u;
419 SPOOL_R_STARTPAGEPRINTER r_u;
420 prs_struct *data = &p->in_data.data;
421 prs_struct *rdata = &p->out_data.rdata;
423 ZERO_STRUCT(q_u);
424 ZERO_STRUCT(r_u);
426 if(!spoolss_io_q_startpageprinter("", &q_u, data, 0)) {
427 DEBUG(0,("spoolss_io_q_startpageprinter: unable to unmarshall SPOOL_Q_STARTPAGEPRINTER.\n"));
428 return False;
431 r_u.status = _spoolss_startpageprinter(p, &q_u, &r_u);
433 if(!spoolss_io_r_startpageprinter("",&r_u,rdata,0)) {
434 DEBUG(0,("spoolss_io_r_startpageprinter: unable to marshall SPOOL_R_STARTPAGEPRINTER.\n"));
435 return False;
438 return True;
441 /********************************************************************
442 * api_spoolss_getprinter
443 * called from the spoolss dispatcher
445 ********************************************************************/
447 static BOOL api_spoolss_endpageprinter(pipes_struct *p)
449 SPOOL_Q_ENDPAGEPRINTER q_u;
450 SPOOL_R_ENDPAGEPRINTER r_u;
451 prs_struct *data = &p->in_data.data;
452 prs_struct *rdata = &p->out_data.rdata;
454 ZERO_STRUCT(q_u);
455 ZERO_STRUCT(r_u);
457 if(!spoolss_io_q_endpageprinter("", &q_u, data, 0)) {
458 DEBUG(0,("spoolss_io_q_endpageprinter: unable to unmarshall SPOOL_Q_ENDPAGEPRINTER.\n"));
459 return False;
462 r_u.status = _spoolss_endpageprinter(p, &q_u, &r_u);
464 if(!spoolss_io_r_endpageprinter("",&r_u,rdata,0)) {
465 DEBUG(0,("spoolss_io_r_endpageprinter: unable to marshall SPOOL_R_ENDPAGEPRINTER.\n"));
466 return False;
469 return True;
472 /********************************************************************
473 ********************************************************************/
475 static BOOL api_spoolss_startdocprinter(pipes_struct *p)
477 SPOOL_Q_STARTDOCPRINTER q_u;
478 SPOOL_R_STARTDOCPRINTER r_u;
479 prs_struct *data = &p->in_data.data;
480 prs_struct *rdata = &p->out_data.rdata;
482 ZERO_STRUCT(q_u);
483 ZERO_STRUCT(r_u);
485 if(!spoolss_io_q_startdocprinter("", &q_u, data, 0)) {
486 DEBUG(0,("spoolss_io_q_startdocprinter: unable to unmarshall SPOOL_Q_STARTDOCPRINTER.\n"));
487 return False;
490 r_u.status = _spoolss_startdocprinter(p, &q_u, &r_u);
492 if(!spoolss_io_r_startdocprinter("",&r_u,rdata,0)) {
493 DEBUG(0,("spoolss_io_r_startdocprinter: unable to marshall SPOOL_R_STARTDOCPRINTER.\n"));
494 return False;
497 return True;
500 /********************************************************************
501 ********************************************************************/
503 static BOOL api_spoolss_enddocprinter(pipes_struct *p)
505 SPOOL_Q_ENDDOCPRINTER q_u;
506 SPOOL_R_ENDDOCPRINTER r_u;
507 prs_struct *data = &p->in_data.data;
508 prs_struct *rdata = &p->out_data.rdata;
510 ZERO_STRUCT(q_u);
511 ZERO_STRUCT(r_u);
513 if(!spoolss_io_q_enddocprinter("", &q_u, data, 0)) {
514 DEBUG(0,("spoolss_io_q_enddocprinter: unable to unmarshall SPOOL_Q_ENDDOCPRINTER.\n"));
515 return False;
518 r_u.status = _spoolss_enddocprinter(p, &q_u, &r_u);
520 if(!spoolss_io_r_enddocprinter("",&r_u,rdata,0)) {
521 DEBUG(0,("spoolss_io_r_enddocprinter: unable to marshall SPOOL_R_ENDDOCPRINTER.\n"));
522 return False;
525 return True;
528 /********************************************************************
529 ********************************************************************/
531 static BOOL api_spoolss_writeprinter(pipes_struct *p)
533 SPOOL_Q_WRITEPRINTER q_u;
534 SPOOL_R_WRITEPRINTER r_u;
535 prs_struct *data = &p->in_data.data;
536 prs_struct *rdata = &p->out_data.rdata;
538 ZERO_STRUCT(q_u);
539 ZERO_STRUCT(r_u);
541 if(!spoolss_io_q_writeprinter("", &q_u, data, 0)) {
542 DEBUG(0,("spoolss_io_q_writeprinter: unable to unmarshall SPOOL_Q_WRITEPRINTER.\n"));
543 return False;
546 r_u.status = _spoolss_writeprinter(p, &q_u, &r_u);
548 if(!spoolss_io_r_writeprinter("",&r_u,rdata,0)) {
549 DEBUG(0,("spoolss_io_r_writeprinter: unable to marshall SPOOL_R_WRITEPRINTER.\n"));
550 return False;
553 return True;
556 /****************************************************************************
558 ****************************************************************************/
560 static BOOL api_spoolss_setprinter(pipes_struct *p)
562 SPOOL_Q_SETPRINTER q_u;
563 SPOOL_R_SETPRINTER r_u;
564 prs_struct *data = &p->in_data.data;
565 prs_struct *rdata = &p->out_data.rdata;
567 ZERO_STRUCT(q_u);
568 ZERO_STRUCT(r_u);
570 if(!spoolss_io_q_setprinter("", &q_u, data, 0)) {
571 DEBUG(0,("spoolss_io_q_setprinter: unable to unmarshall SPOOL_Q_SETPRINTER.\n"));
572 return False;
575 r_u.status = _spoolss_setprinter(p, &q_u, &r_u);
577 if(!spoolss_io_r_setprinter("",&r_u,rdata,0)) {
578 DEBUG(0,("spoolss_io_r_setprinter: unable to marshall SPOOL_R_SETPRINTER.\n"));
579 return False;
582 return True;
585 /****************************************************************************
586 ****************************************************************************/
588 static BOOL api_spoolss_fcpn(pipes_struct *p)
590 SPOOL_Q_FCPN q_u;
591 SPOOL_R_FCPN r_u;
592 prs_struct *data = &p->in_data.data;
593 prs_struct *rdata = &p->out_data.rdata;
595 ZERO_STRUCT(q_u);
596 ZERO_STRUCT(r_u);
598 if(!spoolss_io_q_fcpn("", &q_u, data, 0)) {
599 DEBUG(0,("spoolss_io_q_fcpn: unable to unmarshall SPOOL_Q_FCPN.\n"));
600 return False;
603 r_u.status = _spoolss_fcpn(p, &q_u, &r_u);
605 if(!spoolss_io_r_fcpn("",&r_u,rdata,0)) {
606 DEBUG(0,("spoolss_io_r_fcpn: unable to marshall SPOOL_R_FCPN.\n"));
607 return False;
610 return True;
613 /****************************************************************************
614 ****************************************************************************/
616 static BOOL api_spoolss_addjob(pipes_struct *p)
618 SPOOL_Q_ADDJOB q_u;
619 SPOOL_R_ADDJOB r_u;
620 prs_struct *data = &p->in_data.data;
621 prs_struct *rdata = &p->out_data.rdata;
623 ZERO_STRUCT(q_u);
624 ZERO_STRUCT(r_u);
626 if(!spoolss_io_q_addjob("", &q_u, data, 0)) {
627 DEBUG(0,("spoolss_io_q_addjob: unable to unmarshall SPOOL_Q_ADDJOB.\n"));
628 return False;
631 r_u.status = _spoolss_addjob(p, &q_u, &r_u);
633 if(!spoolss_io_r_addjob("",&r_u,rdata,0)) {
634 DEBUG(0,("spoolss_io_r_addjob: unable to marshall SPOOL_R_ADDJOB.\n"));
635 return False;
638 return True;
641 /****************************************************************************
642 ****************************************************************************/
644 static BOOL api_spoolss_enumjobs(pipes_struct *p)
646 SPOOL_Q_ENUMJOBS q_u;
647 SPOOL_R_ENUMJOBS r_u;
648 prs_struct *data = &p->in_data.data;
649 prs_struct *rdata = &p->out_data.rdata;
651 ZERO_STRUCT(q_u);
652 ZERO_STRUCT(r_u);
654 if (!spoolss_io_q_enumjobs("", &q_u, data, 0)) {
655 DEBUG(0,("spoolss_io_q_enumjobs: unable to unmarshall SPOOL_Q_ENUMJOBS.\n"));
656 return False;
659 r_u.status = _spoolss_enumjobs(p, &q_u, &r_u);
661 if (!spoolss_io_r_enumjobs("",&r_u,rdata,0)) {
662 DEBUG(0,("spoolss_io_r_enumjobs: unable to marshall SPOOL_R_ENUMJOBS.\n"));
663 return False;
666 return True;
669 /****************************************************************************
670 ****************************************************************************/
672 static BOOL api_spoolss_schedulejob(pipes_struct *p)
674 SPOOL_Q_SCHEDULEJOB q_u;
675 SPOOL_R_SCHEDULEJOB r_u;
676 prs_struct *data = &p->in_data.data;
677 prs_struct *rdata = &p->out_data.rdata;
679 ZERO_STRUCT(q_u);
680 ZERO_STRUCT(r_u);
682 if(!spoolss_io_q_schedulejob("", &q_u, data, 0)) {
683 DEBUG(0,("spoolss_io_q_schedulejob: unable to unmarshall SPOOL_Q_SCHEDULEJOB.\n"));
684 return False;
687 r_u.status = _spoolss_schedulejob(p, &q_u, &r_u);
689 if(!spoolss_io_r_schedulejob("",&r_u,rdata,0)) {
690 DEBUG(0,("spoolss_io_r_schedulejob: unable to marshall SPOOL_R_SCHEDULEJOB.\n"));
691 return False;
694 return True;
697 /****************************************************************************
698 ****************************************************************************/
700 static BOOL api_spoolss_setjob(pipes_struct *p)
702 SPOOL_Q_SETJOB q_u;
703 SPOOL_R_SETJOB r_u;
704 prs_struct *data = &p->in_data.data;
705 prs_struct *rdata = &p->out_data.rdata;
707 ZERO_STRUCT(q_u);
708 ZERO_STRUCT(r_u);
710 if(!spoolss_io_q_setjob("", &q_u, data, 0)) {
711 DEBUG(0,("spoolss_io_q_setjob: unable to unmarshall SPOOL_Q_SETJOB.\n"));
712 return False;
715 r_u.status = _spoolss_setjob(p, &q_u, &r_u);
717 if(!spoolss_io_r_setjob("",&r_u,rdata,0)) {
718 DEBUG(0,("spoolss_io_r_setjob: unable to marshall SPOOL_R_SETJOB.\n"));
719 return False;
722 return True;
725 /****************************************************************************
726 ****************************************************************************/
728 static BOOL api_spoolss_enumprinterdrivers(pipes_struct *p)
730 SPOOL_Q_ENUMPRINTERDRIVERS q_u;
731 SPOOL_R_ENUMPRINTERDRIVERS r_u;
732 prs_struct *data = &p->in_data.data;
733 prs_struct *rdata = &p->out_data.rdata;
735 ZERO_STRUCT(q_u);
736 ZERO_STRUCT(r_u);
738 if (!spoolss_io_q_enumprinterdrivers("", &q_u, data, 0)) {
739 DEBUG(0,("spoolss_io_q_enumprinterdrivers: unable to unmarshall SPOOL_Q_ENUMPRINTERDRIVERS.\n"));
740 return False;
743 r_u.status = _spoolss_enumprinterdrivers(p, &q_u, &r_u);
745 if (!spoolss_io_r_enumprinterdrivers("",&r_u,rdata,0)) {
746 DEBUG(0,("spoolss_io_r_enumprinterdrivers: unable to marshall SPOOL_R_ENUMPRINTERDRIVERS.\n"));
747 return False;
750 return True;
753 /****************************************************************************
754 ****************************************************************************/
756 static BOOL api_spoolss_getform(pipes_struct *p)
758 SPOOL_Q_GETFORM q_u;
759 SPOOL_R_GETFORM r_u;
760 prs_struct *data = &p->in_data.data;
761 prs_struct *rdata = &p->out_data.rdata;
763 ZERO_STRUCT(q_u);
764 ZERO_STRUCT(r_u);
766 if (!spoolss_io_q_getform("", &q_u, data, 0)) {
767 DEBUG(0,("spoolss_io_q_getform: unable to unmarshall SPOOL_Q_GETFORM.\n"));
768 return False;
771 r_u.status = _spoolss_getform(p, &q_u, &r_u);
773 if (!spoolss_io_r_getform("",&r_u,rdata,0)) {
774 DEBUG(0,("spoolss_io_r_getform: unable to marshall SPOOL_R_GETFORM.\n"));
775 return False;
778 return True;
781 /****************************************************************************
782 ****************************************************************************/
784 static BOOL api_spoolss_enumforms(pipes_struct *p)
786 SPOOL_Q_ENUMFORMS q_u;
787 SPOOL_R_ENUMFORMS r_u;
788 prs_struct *data = &p->in_data.data;
789 prs_struct *rdata = &p->out_data.rdata;
791 ZERO_STRUCT(q_u);
792 ZERO_STRUCT(r_u);
794 if (!spoolss_io_q_enumforms("", &q_u, data, 0)) {
795 DEBUG(0,("spoolss_io_q_enumforms: unable to unmarshall SPOOL_Q_ENUMFORMS.\n"));
796 return False;
799 r_u.status = _spoolss_enumforms(p, &q_u, &r_u);
801 if (!spoolss_io_r_enumforms("",&r_u,rdata,0)) {
802 DEBUG(0,("spoolss_io_r_enumforms: unable to marshall SPOOL_R_ENUMFORMS.\n"));
803 return False;
806 return True;
809 /****************************************************************************
810 ****************************************************************************/
812 static BOOL api_spoolss_enumports(pipes_struct *p)
814 SPOOL_Q_ENUMPORTS q_u;
815 SPOOL_R_ENUMPORTS r_u;
816 prs_struct *data = &p->in_data.data;
817 prs_struct *rdata = &p->out_data.rdata;
819 ZERO_STRUCT(q_u);
820 ZERO_STRUCT(r_u);
822 if(!spoolss_io_q_enumports("", &q_u, data, 0)) {
823 DEBUG(0,("spoolss_io_q_enumports: unable to unmarshall SPOOL_Q_ENUMPORTS.\n"));
824 return False;
827 r_u.status = _spoolss_enumports(p, &q_u, &r_u);
829 if (!spoolss_io_r_enumports("",&r_u,rdata,0)) {
830 DEBUG(0,("spoolss_io_r_enumports: unable to marshall SPOOL_R_ENUMPORTS.\n"));
831 return False;
834 return True;
837 /****************************************************************************
838 ****************************************************************************/
840 static BOOL api_spoolss_addprinterex(pipes_struct *p)
842 SPOOL_Q_ADDPRINTEREX q_u;
843 SPOOL_R_ADDPRINTEREX r_u;
844 prs_struct *data = &p->in_data.data;
845 prs_struct *rdata = &p->out_data.rdata;
847 ZERO_STRUCT(q_u);
848 ZERO_STRUCT(r_u);
850 if(!spoolss_io_q_addprinterex("", &q_u, data, 0)) {
851 DEBUG(0,("spoolss_io_q_addprinterex: unable to unmarshall SPOOL_Q_ADDPRINTEREX.\n"));
852 return False;
855 r_u.status = _spoolss_addprinterex(p, &q_u, &r_u);
857 if(!spoolss_io_r_addprinterex("", &r_u, rdata, 0)) {
858 DEBUG(0,("spoolss_io_r_addprinterex: unable to marshall SPOOL_R_ADDPRINTEREX.\n"));
859 return False;
862 return True;
865 /****************************************************************************
866 ****************************************************************************/
868 static BOOL api_spoolss_addprinterdriver(pipes_struct *p)
870 SPOOL_Q_ADDPRINTERDRIVER q_u;
871 SPOOL_R_ADDPRINTERDRIVER r_u;
872 prs_struct *data = &p->in_data.data;
873 prs_struct *rdata = &p->out_data.rdata;
875 ZERO_STRUCT(q_u);
876 ZERO_STRUCT(r_u);
878 if(!spoolss_io_q_addprinterdriver("", &q_u, data, 0)) {
879 DEBUG(0,("spoolss_io_q_addprinterdriver: unable to unmarshall SPOOL_Q_ADDPRINTERDRIVER.\n"));
880 return False;
883 r_u.status = _spoolss_addprinterdriver(p, &q_u, &r_u);
885 if(!spoolss_io_r_addprinterdriver("", &r_u, rdata, 0)) {
886 DEBUG(0,("spoolss_io_r_addprinterdriver: unable to marshall SPOOL_R_ADDPRINTERDRIVER.\n"));
887 return False;
890 return True;
893 /****************************************************************************
894 ****************************************************************************/
896 static BOOL api_spoolss_getprinterdriverdirectory(pipes_struct *p)
898 SPOOL_Q_GETPRINTERDRIVERDIR q_u;
899 SPOOL_R_GETPRINTERDRIVERDIR r_u;
900 prs_struct *data = &p->in_data.data;
901 prs_struct *rdata = &p->out_data.rdata;
903 ZERO_STRUCT(q_u);
904 ZERO_STRUCT(r_u);
906 if(!spoolss_io_q_getprinterdriverdir("", &q_u, data, 0)) {
907 DEBUG(0,("spoolss_io_q_getprinterdriverdir: unable to unmarshall SPOOL_Q_GETPRINTERDRIVERDIR.\n"));
908 return False;
911 r_u.status = _spoolss_getprinterdriverdirectory(p, &q_u, &r_u);
913 if(!spoolss_io_r_getprinterdriverdir("", &r_u, rdata, 0)) {
914 DEBUG(0,("spoolss_io_r_getprinterdriverdir: unable to marshall SPOOL_R_GETPRINTERDRIVERDIR.\n"));
915 return False;
918 return True;
921 /****************************************************************************
922 ****************************************************************************/
924 static BOOL api_spoolss_enumprinterdata(pipes_struct *p)
926 SPOOL_Q_ENUMPRINTERDATA q_u;
927 SPOOL_R_ENUMPRINTERDATA r_u;
928 prs_struct *data = &p->in_data.data;
929 prs_struct *rdata = &p->out_data.rdata;
931 ZERO_STRUCT(q_u);
932 ZERO_STRUCT(r_u);
934 if(!spoolss_io_q_enumprinterdata("", &q_u, data, 0)) {
935 DEBUG(0,("spoolss_io_q_enumprinterdata: unable to unmarshall SPOOL_Q_ENUMPRINTERDATA.\n"));
936 return False;
939 r_u.status = _spoolss_enumprinterdata(p, &q_u, &r_u);
941 if(!spoolss_io_r_enumprinterdata("", &r_u, rdata, 0)) {
942 DEBUG(0,("spoolss_io_r_enumprinterdata: unable to marshall SPOOL_R_ENUMPRINTERDATA.\n"));
943 return False;
946 return True;
949 /****************************************************************************
950 ****************************************************************************/
952 static BOOL api_spoolss_setprinterdata(pipes_struct *p)
954 SPOOL_Q_SETPRINTERDATA q_u;
955 SPOOL_R_SETPRINTERDATA r_u;
956 prs_struct *data = &p->in_data.data;
957 prs_struct *rdata = &p->out_data.rdata;
959 ZERO_STRUCT(q_u);
960 ZERO_STRUCT(r_u);
962 if(!spoolss_io_q_setprinterdata("", &q_u, data, 0)) {
963 DEBUG(0,("spoolss_io_q_setprinterdata: unable to unmarshall SPOOL_Q_SETPRINTERDATA.\n"));
964 return False;
967 r_u.status = _spoolss_setprinterdata(p, &q_u, &r_u);
969 if(!spoolss_io_r_setprinterdata("", &r_u, rdata, 0)) {
970 DEBUG(0,("spoolss_io_r_setprinterdata: unable to marshall SPOOL_R_SETPRINTERDATA.\n"));
971 return False;
974 return True;
977 /****************************************************************************
978 ****************************************************************************/
980 static BOOL api_spoolss_addform(pipes_struct *p)
982 SPOOL_Q_ADDFORM q_u;
983 SPOOL_R_ADDFORM r_u;
984 prs_struct *data = &p->in_data.data;
985 prs_struct *rdata = &p->out_data.rdata;
987 ZERO_STRUCT(q_u);
988 ZERO_STRUCT(r_u);
990 if(!spoolss_io_q_addform("", &q_u, data, 0)) {
991 DEBUG(0,("spoolss_io_q_addform: unable to unmarshall SPOOL_Q_ADDFORM.\n"));
992 return False;
995 r_u.status = _spoolss_addform(p, &q_u, &r_u);
997 if(!spoolss_io_r_addform("", &r_u, rdata, 0)) {
998 DEBUG(0,("spoolss_io_r_addform: unable to marshall SPOOL_R_ADDFORM.\n"));
999 return False;
1002 return True;
1005 /****************************************************************************
1006 ****************************************************************************/
1008 static BOOL api_spoolss_deleteform(pipes_struct *p)
1010 SPOOL_Q_DELETEFORM q_u;
1011 SPOOL_R_DELETEFORM r_u;
1012 prs_struct *data = &p->in_data.data;
1013 prs_struct *rdata = &p->out_data.rdata;
1015 ZERO_STRUCT(q_u);
1016 ZERO_STRUCT(r_u);
1018 if(!spoolss_io_q_deleteform("", &q_u, data, 0)) {
1019 DEBUG(0,("spoolss_io_q_deleteform: unable to unmarshall SPOOL_Q_DELETEFORM.\n"));
1020 return False;
1023 r_u.status = _spoolss_deleteform(p, &q_u, &r_u);
1025 if(!spoolss_io_r_deleteform("", &r_u, rdata, 0)) {
1026 DEBUG(0,("spoolss_io_r_deleteform: unable to marshall SPOOL_R_DELETEFORM.\n"));
1027 return False;
1030 return True;
1033 /****************************************************************************
1034 ****************************************************************************/
1036 static BOOL api_spoolss_setform(pipes_struct *p)
1038 SPOOL_Q_SETFORM q_u;
1039 SPOOL_R_SETFORM r_u;
1040 prs_struct *data = &p->in_data.data;
1041 prs_struct *rdata = &p->out_data.rdata;
1043 ZERO_STRUCT(q_u);
1044 ZERO_STRUCT(r_u);
1046 if(!spoolss_io_q_setform("", &q_u, data, 0)) {
1047 DEBUG(0,("spoolss_io_q_setform: unable to unmarshall SPOOL_Q_SETFORM.\n"));
1048 return False;
1051 r_u.status = _spoolss_setform(p, &q_u, &r_u);
1053 if(!spoolss_io_r_setform("", &r_u, rdata, 0)) {
1054 DEBUG(0,("spoolss_io_r_setform: unable to marshall SPOOL_R_SETFORM.\n"));
1055 return False;
1058 return True;
1061 /****************************************************************************
1062 ****************************************************************************/
1064 static BOOL api_spoolss_enumprintprocessors(pipes_struct *p)
1066 SPOOL_Q_ENUMPRINTPROCESSORS q_u;
1067 SPOOL_R_ENUMPRINTPROCESSORS r_u;
1068 prs_struct *data = &p->in_data.data;
1069 prs_struct *rdata = &p->out_data.rdata;
1071 ZERO_STRUCT(q_u);
1072 ZERO_STRUCT(r_u);
1074 if(!spoolss_io_q_enumprintprocessors("", &q_u, data, 0)) {
1075 DEBUG(0,("spoolss_io_q_enumprintprocessors: unable to unmarshall SPOOL_Q_ENUMPRINTPROCESSORS.\n"));
1076 return False;
1079 r_u.status = _spoolss_enumprintprocessors(p, &q_u, &r_u);
1081 if(!spoolss_io_r_enumprintprocessors("", &r_u, rdata, 0)) {
1082 DEBUG(0,("spoolss_io_r_enumprintprocessors: unable to marshall SPOOL_R_ENUMPRINTPROCESSORS.\n"));
1083 return False;
1086 return True;
1089 /****************************************************************************
1090 ****************************************************************************/
1092 static BOOL api_spoolss_addprintprocessor(pipes_struct *p)
1094 SPOOL_Q_ADDPRINTPROCESSOR q_u;
1095 SPOOL_R_ADDPRINTPROCESSOR r_u;
1096 prs_struct *data = &p->in_data.data;
1097 prs_struct *rdata = &p->out_data.rdata;
1099 ZERO_STRUCT(q_u);
1100 ZERO_STRUCT(r_u);
1102 if(!spoolss_io_q_addprintprocessor("", &q_u, data, 0)) {
1103 DEBUG(0,("spoolss_io_q_addprintprocessor: unable to unmarshall SPOOL_Q_ADDPRINTPROCESSOR.\n"));
1104 return False;
1107 /* for now, just indicate success and ignore the add. We'll
1108 automatically set the winprint processor for printer
1109 entries later. Used to debug the LexMark Optra S 1855 PCL
1110 driver --jerry */
1111 r_u.status = WERR_OK;
1113 if(!spoolss_io_r_addprintprocessor("", &r_u, rdata, 0)) {
1114 DEBUG(0,("spoolss_io_r_addprintprocessor: unable to marshall SPOOL_R_ADDPRINTPROCESSOR.\n"));
1115 return False;
1118 return True;
1121 /****************************************************************************
1122 ****************************************************************************/
1124 static BOOL api_spoolss_enumprintprocdatatypes(pipes_struct *p)
1126 SPOOL_Q_ENUMPRINTPROCDATATYPES q_u;
1127 SPOOL_R_ENUMPRINTPROCDATATYPES r_u;
1128 prs_struct *data = &p->in_data.data;
1129 prs_struct *rdata = &p->out_data.rdata;
1131 ZERO_STRUCT(q_u);
1132 ZERO_STRUCT(r_u);
1134 if(!spoolss_io_q_enumprintprocdatatypes("", &q_u, data, 0)) {
1135 DEBUG(0,("spoolss_io_q_enumprintprocdatatypes: unable to unmarshall SPOOL_Q_ENUMPRINTPROCDATATYPES.\n"));
1136 return False;
1139 r_u.status = _spoolss_enumprintprocdatatypes(p, &q_u, &r_u);
1141 if(!spoolss_io_r_enumprintprocdatatypes("", &r_u, rdata, 0)) {
1142 DEBUG(0,("spoolss_io_r_enumprintprocdatatypes: unable to marshall SPOOL_R_ENUMPRINTPROCDATATYPES.\n"));
1143 return False;
1146 return True;
1149 /****************************************************************************
1150 ****************************************************************************/
1152 static BOOL api_spoolss_enumprintmonitors(pipes_struct *p)
1154 SPOOL_Q_ENUMPRINTMONITORS q_u;
1155 SPOOL_R_ENUMPRINTMONITORS r_u;
1156 prs_struct *data = &p->in_data.data;
1157 prs_struct *rdata = &p->out_data.rdata;
1159 ZERO_STRUCT(q_u);
1160 ZERO_STRUCT(r_u);
1162 if (!spoolss_io_q_enumprintmonitors("", &q_u, data, 0)) {
1163 DEBUG(0,("spoolss_io_q_enumprintmonitors: unable to unmarshall SPOOL_Q_ENUMPRINTMONITORS.\n"));
1164 return False;
1167 r_u.status = _spoolss_enumprintmonitors(p, &q_u, &r_u);
1169 if (!spoolss_io_r_enumprintmonitors("", &r_u, rdata, 0)) {
1170 DEBUG(0,("spoolss_io_r_enumprintmonitors: unable to marshall SPOOL_R_ENUMPRINTMONITORS.\n"));
1171 return False;
1174 return True;
1177 /****************************************************************************
1178 ****************************************************************************/
1180 static BOOL api_spoolss_getjob(pipes_struct *p)
1182 SPOOL_Q_GETJOB q_u;
1183 SPOOL_R_GETJOB r_u;
1184 prs_struct *data = &p->in_data.data;
1185 prs_struct *rdata = &p->out_data.rdata;
1187 if(!spoolss_io_q_getjob("", &q_u, data, 0)) {
1188 DEBUG(0,("spoolss_io_q_getjob: unable to unmarshall SPOOL_Q_GETJOB.\n"));
1189 return False;
1192 r_u.status = _spoolss_getjob(p, &q_u, &r_u);
1194 if(!spoolss_io_r_getjob("",&r_u,rdata,0)) {
1195 DEBUG(0,("spoolss_io_r_getjob: unable to marshall SPOOL_R_GETJOB.\n"));
1196 return False;
1199 return True;
1202 /********************************************************************
1203 * api_spoolss_getprinterdataex
1205 * called from the spoolss dispatcher
1206 ********************************************************************/
1208 static BOOL api_spoolss_getprinterdataex(pipes_struct *p)
1210 SPOOL_Q_GETPRINTERDATAEX q_u;
1211 SPOOL_R_GETPRINTERDATAEX r_u;
1212 prs_struct *data = &p->in_data.data;
1213 prs_struct *rdata = &p->out_data.rdata;
1215 ZERO_STRUCT(q_u);
1216 ZERO_STRUCT(r_u);
1218 /* read the stream and fill the struct */
1219 if (!spoolss_io_q_getprinterdataex("", &q_u, data, 0)) {
1220 DEBUG(0,("spoolss_io_q_getprinterdataex: unable to unmarshall SPOOL_Q_GETPRINTERDATAEX.\n"));
1221 return False;
1224 r_u.status = _spoolss_getprinterdataex( p, &q_u, &r_u);
1226 if (!spoolss_io_r_getprinterdataex("", &r_u, rdata, 0)) {
1227 DEBUG(0,("spoolss_io_r_getprinterdataex: unable to marshall SPOOL_R_GETPRINTERDATAEX.\n"));
1228 return False;
1231 return True;
1234 /****************************************************************************
1235 ****************************************************************************/
1237 static BOOL api_spoolss_setprinterdataex(pipes_struct *p)
1239 SPOOL_Q_SETPRINTERDATAEX q_u;
1240 SPOOL_R_SETPRINTERDATAEX r_u;
1241 prs_struct *data = &p->in_data.data;
1242 prs_struct *rdata = &p->out_data.rdata;
1244 ZERO_STRUCT(q_u);
1245 ZERO_STRUCT(r_u);
1247 if(!spoolss_io_q_setprinterdataex("", &q_u, data, 0)) {
1248 DEBUG(0,("spoolss_io_q_setprinterdataex: unable to unmarshall SPOOL_Q_SETPRINTERDATAEX.\n"));
1249 return False;
1252 r_u.status = _spoolss_setprinterdataex(p, &q_u, &r_u);
1254 if(!spoolss_io_r_setprinterdataex("", &r_u, rdata, 0)) {
1255 DEBUG(0,("spoolss_io_r_setprinterdataex: unable to marshall SPOOL_R_SETPRINTERDATAEX.\n"));
1256 return False;
1259 return True;
1262 /*******************************************************************
1263 \pipe\spoolss commands
1264 ********************************************************************/
1266 struct api_struct api_spoolss_cmds[] =
1268 {"SPOOLSS_OPENPRINTEREX", SPOOLSS_OPENPRINTEREX, api_spoolss_open_printer_ex },
1269 {"SPOOLSS_GETPRINTERDATA", SPOOLSS_GETPRINTERDATA, api_spoolss_getprinterdata },
1270 {"SPOOLSS_CLOSEPRINTER", SPOOLSS_CLOSEPRINTER, api_spoolss_closeprinter },
1271 {"SPOOLSS_DELETEPRINTER", SPOOLSS_DELETEPRINTER, api_spoolss_deleteprinter },
1272 {"SPOOLSS_ABORTPRINTER", SPOOLSS_ABORTPRINTER, api_spoolss_abortprinter },
1273 {"SPOOLSS_RFFPCNEX", SPOOLSS_RFFPCNEX, api_spoolss_rffpcnex },
1274 {"SPOOLSS_RFNPCNEX", SPOOLSS_RFNPCNEX, api_spoolss_rfnpcnex },
1275 {"SPOOLSS_ENUMPRINTERS", SPOOLSS_ENUMPRINTERS, api_spoolss_enumprinters },
1276 {"SPOOLSS_GETPRINTER", SPOOLSS_GETPRINTER, api_spoolss_getprinter },
1277 {"SPOOLSS_GETPRINTERDRIVER2", SPOOLSS_GETPRINTERDRIVER2, api_spoolss_getprinterdriver2 },
1278 {"SPOOLSS_STARTPAGEPRINTER", SPOOLSS_STARTPAGEPRINTER, api_spoolss_startpageprinter },
1279 {"SPOOLSS_ENDPAGEPRINTER", SPOOLSS_ENDPAGEPRINTER, api_spoolss_endpageprinter },
1280 {"SPOOLSS_STARTDOCPRINTER", SPOOLSS_STARTDOCPRINTER, api_spoolss_startdocprinter },
1281 {"SPOOLSS_ENDDOCPRINTER", SPOOLSS_ENDDOCPRINTER, api_spoolss_enddocprinter },
1282 {"SPOOLSS_WRITEPRINTER", SPOOLSS_WRITEPRINTER, api_spoolss_writeprinter },
1283 {"SPOOLSS_SETPRINTER", SPOOLSS_SETPRINTER, api_spoolss_setprinter },
1284 {"SPOOLSS_FCPN", SPOOLSS_FCPN, api_spoolss_fcpn },
1285 {"SPOOLSS_ADDJOB", SPOOLSS_ADDJOB, api_spoolss_addjob },
1286 {"SPOOLSS_ENUMJOBS", SPOOLSS_ENUMJOBS, api_spoolss_enumjobs },
1287 {"SPOOLSS_SCHEDULEJOB", SPOOLSS_SCHEDULEJOB, api_spoolss_schedulejob },
1288 {"SPOOLSS_SETJOB", SPOOLSS_SETJOB, api_spoolss_setjob },
1289 {"SPOOLSS_ENUMFORMS", SPOOLSS_ENUMFORMS, api_spoolss_enumforms },
1290 {"SPOOLSS_ENUMPORTS", SPOOLSS_ENUMPORTS, api_spoolss_enumports },
1291 {"SPOOLSS_ENUMPRINTERDRIVERS", SPOOLSS_ENUMPRINTERDRIVERS, api_spoolss_enumprinterdrivers },
1292 {"SPOOLSS_ADDPRINTEREX", SPOOLSS_ADDPRINTEREX, api_spoolss_addprinterex },
1293 {"SPOOLSS_ADDPRINTERDRIVER", SPOOLSS_ADDPRINTERDRIVER, api_spoolss_addprinterdriver },
1294 {"SPOOLSS_DELETEPRINTERDRIVER", SPOOLSS_DELETEPRINTERDRIVER, api_spoolss_deleteprinterdriver },
1295 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_getprinterdriverdirectory },
1296 {"SPOOLSS_ENUMPRINTERDATA", SPOOLSS_ENUMPRINTERDATA, api_spoolss_enumprinterdata },
1297 {"SPOOLSS_SETPRINTERDATA", SPOOLSS_SETPRINTERDATA, api_spoolss_setprinterdata },
1298 {"SPOOLSS_DELETEPRINTERDATA", SPOOLSS_DELETEPRINTERDATA, api_spoolss_deleteprinterdata },
1299 {"SPOOLSS_ADDFORM", SPOOLSS_ADDFORM, api_spoolss_addform },
1300 {"SPOOLSS_DELETEFORM", SPOOLSS_DELETEFORM, api_spoolss_deleteform },
1301 {"SPOOLSS_GETFORM", SPOOLSS_GETFORM, api_spoolss_getform },
1302 {"SPOOLSS_SETFORM", SPOOLSS_SETFORM, api_spoolss_setform },
1303 {"SPOOLSS_ADDPRINTPROCESSOR", SPOOLSS_ADDPRINTPROCESSOR, api_spoolss_addprintprocessor },
1304 {"SPOOLSS_ENUMPRINTPROCESSORS", SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_enumprintprocessors },
1305 {"SPOOLSS_ENUMMONITORS", SPOOLSS_ENUMMONITORS, api_spoolss_enumprintmonitors },
1306 {"SPOOLSS_GETJOB", SPOOLSS_GETJOB, api_spoolss_getjob },
1307 {"SPOOLSS_ENUMPRINTPROCDATATYPES", SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_enumprintprocdatatypes },
1308 {"SPOOLSS_GETPRINTERDATAEX", SPOOLSS_GETPRINTERDATAEX, api_spoolss_getprinterdataex },
1309 {"SPOOLSS_SETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex },
1311 { NULL, 0, NULL }
1314 /*******************************************************************
1315 receives a spoolss pipe and responds.
1316 ********************************************************************/
1317 BOOL api_spoolss_rpc(pipes_struct *p)
1319 return api_rpcTNP(p, "api_spoolss_rpc", api_spoolss_cmds);