2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
4 * Copyright (C) Andrew Tridgell 1992-2000,
5 * Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
6 * Copyright (C) Jean François Micouleau 1998-2000,
7 * Copyright (C) Jeremy Allison 2001,
8 * Copyright (C) Gerald Carter 2001-2002,
9 * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <http://www.gnu.org/licenses/>.
28 #define DBGC_CLASS DBGC_RPC_SRV
30 /*******************************************************************
31 ********************************************************************/
33 static bool proxy_spoolss_call(pipes_struct *p, uint8_t opnum)
35 struct api_struct *fns;
38 spoolss_get_pipe_fns(&fns, &n_fns);
44 if (fns[opnum].opnum != opnum) {
45 smb_panic("SPOOLSS function table not sorted");
48 return fns[opnum].fn(p);
51 /********************************************************************
52 * api_spoolss_open_printer_ex (rarely seen - older call)
53 ********************************************************************/
55 static bool api_spoolss_open_printer(pipes_struct *p)
57 return proxy_spoolss_call(p, NDR_SPOOLSS_OPENPRINTER);
60 /********************************************************************
61 * api_spoolss_open_printer_ex
62 ********************************************************************/
64 static bool api_spoolss_open_printer_ex(pipes_struct *p)
66 return proxy_spoolss_call(p, NDR_SPOOLSS_OPENPRINTEREX);
69 /********************************************************************
70 * api_spoolss_getprinterdata
72 * called from the spoolss dispatcher
73 ********************************************************************/
75 static bool api_spoolss_getprinterdata(pipes_struct *p)
77 SPOOL_Q_GETPRINTERDATA q_u;
78 SPOOL_R_GETPRINTERDATA r_u;
79 prs_struct *data = &p->in_data.data;
80 prs_struct *rdata = &p->out_data.rdata;
85 /* read the stream and fill the struct */
86 if (!spoolss_io_q_getprinterdata("", &q_u, data, 0)) {
87 DEBUG(0,("spoolss_io_q_getprinterdata: unable to unmarshall SPOOL_Q_GETPRINTERDATA.\n"));
91 r_u.status = _spoolss_getprinterdata( p, &q_u, &r_u);
93 if (!spoolss_io_r_getprinterdata("", &r_u, rdata, 0)) {
94 DEBUG(0,("spoolss_io_r_getprinterdata: unable to marshall SPOOL_R_GETPRINTERDATA.\n"));
101 /********************************************************************
102 * api_spoolss_deleteprinterdata
104 * called from the spoolss dispatcher
105 ********************************************************************/
107 static bool api_spoolss_deleteprinterdata(pipes_struct *p)
109 return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDATA);
112 /********************************************************************
113 * api_spoolss_closeprinter
115 * called from the spoolss dispatcher
116 ********************************************************************/
118 static bool api_spoolss_closeprinter(pipes_struct *p)
120 return proxy_spoolss_call(p, NDR_SPOOLSS_CLOSEPRINTER);
123 /********************************************************************
124 * api_spoolss_abortprinter
126 * called from the spoolss dispatcher
127 ********************************************************************/
129 static bool api_spoolss_abortprinter(pipes_struct *p)
131 return proxy_spoolss_call(p, NDR_SPOOLSS_ABORTPRINTER);
134 /********************************************************************
135 * api_spoolss_deleteprinter
137 * called from the spoolss dispatcher
138 ********************************************************************/
140 static bool api_spoolss_deleteprinter(pipes_struct *p)
142 return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTER);
145 /********************************************************************
146 * api_spoolss_deleteprinterdriver
148 * called from the spoolss dispatcher
149 ********************************************************************/
151 static bool api_spoolss_deleteprinterdriver(pipes_struct *p)
153 return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDRIVER);
157 /********************************************************************
158 * api_spoolss_rffpcnex
159 * ReplyFindFirstPrinterChangeNotifyEx
160 ********************************************************************/
162 static bool api_spoolss_rffpcnex(pipes_struct *p)
164 return proxy_spoolss_call(p, NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX);
168 /********************************************************************
169 * api_spoolss_rfnpcnex
170 * ReplyFindNextPrinterChangeNotifyEx
171 * called from the spoolss dispatcher
173 * Note - this is the *ONLY* function that breaks the RPC call
174 * symmetry in all the other calls. We need to do this to fix
175 * the massive memory allocation problem with thousands of jobs...
177 ********************************************************************/
179 static bool api_spoolss_rfnpcnex(pipes_struct *p)
181 return proxy_spoolss_call(p, NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY);
185 /********************************************************************
186 * api_spoolss_enumprinters
187 * called from the spoolss dispatcher
189 ********************************************************************/
191 static bool api_spoolss_enumprinters(pipes_struct *p)
193 SPOOL_Q_ENUMPRINTERS q_u;
194 SPOOL_R_ENUMPRINTERS r_u;
195 prs_struct *data = &p->in_data.data;
196 prs_struct *rdata = &p->out_data.rdata;
201 if (!spoolss_io_q_enumprinters("", &q_u, data, 0)) {
202 DEBUG(0,("spoolss_io_q_enumprinters: unable to unmarshall SPOOL_Q_ENUMPRINTERS.\n"));
206 r_u.status = _spoolss_enumprinters( p, &q_u, &r_u);
208 if (!spoolss_io_r_enumprinters("", &r_u, rdata, 0)) {
209 DEBUG(0,("spoolss_io_r_enumprinters: unable to marshall SPOOL_R_ENUMPRINTERS.\n"));
216 /********************************************************************
217 * api_spoolss_getprinter
218 * called from the spoolss dispatcher
220 ********************************************************************/
222 static bool api_spoolss_getprinter(pipes_struct *p)
224 SPOOL_Q_GETPRINTER q_u;
225 SPOOL_R_GETPRINTER r_u;
226 prs_struct *data = &p->in_data.data;
227 prs_struct *rdata = &p->out_data.rdata;
232 if(!spoolss_io_q_getprinter("", &q_u, data, 0)) {
233 DEBUG(0,("spoolss_io_q_getprinter: unable to unmarshall SPOOL_Q_GETPRINTER.\n"));
237 r_u.status = _spoolss_getprinter(p, &q_u, &r_u);
239 if(!spoolss_io_r_getprinter("",&r_u,rdata,0)) {
240 DEBUG(0,("spoolss_io_r_getprinter: unable to marshall SPOOL_R_GETPRINTER.\n"));
247 /********************************************************************
248 * api_spoolss_getprinter
249 * called from the spoolss dispatcher
251 ********************************************************************/
253 static bool api_spoolss_getprinterdriver2(pipes_struct *p)
255 SPOOL_Q_GETPRINTERDRIVER2 q_u;
256 SPOOL_R_GETPRINTERDRIVER2 r_u;
257 prs_struct *data = &p->in_data.data;
258 prs_struct *rdata = &p->out_data.rdata;
263 if(!spoolss_io_q_getprinterdriver2("", &q_u, data, 0)) {
264 DEBUG(0,("spoolss_io_q_getprinterdriver2: unable to unmarshall SPOOL_Q_GETPRINTERDRIVER2.\n"));
268 r_u.status = _spoolss_getprinterdriver2(p, &q_u, &r_u);
270 if(!spoolss_io_r_getprinterdriver2("",&r_u,rdata,0)) {
271 DEBUG(0,("spoolss_io_r_getprinterdriver2: unable to marshall SPOOL_R_GETPRINTERDRIVER2.\n"));
278 /********************************************************************
279 * api_spoolss_getprinter
280 * called from the spoolss dispatcher
282 ********************************************************************/
284 static bool api_spoolss_startpageprinter(pipes_struct *p)
286 return proxy_spoolss_call(p, NDR_SPOOLSS_STARTPAGEPRINTER);
289 /********************************************************************
290 * api_spoolss_getprinter
291 * called from the spoolss dispatcher
293 ********************************************************************/
295 static bool api_spoolss_endpageprinter(pipes_struct *p)
297 return proxy_spoolss_call(p, NDR_SPOOLSS_ENDPAGEPRINTER);
300 /********************************************************************
301 ********************************************************************/
303 static bool api_spoolss_startdocprinter(pipes_struct *p)
305 return proxy_spoolss_call(p, NDR_SPOOLSS_STARTDOCPRINTER);
308 /********************************************************************
309 ********************************************************************/
311 static bool api_spoolss_enddocprinter(pipes_struct *p)
313 return proxy_spoolss_call(p, NDR_SPOOLSS_ENDDOCPRINTER);
316 /********************************************************************
317 ********************************************************************/
319 static bool api_spoolss_writeprinter(pipes_struct *p)
321 return proxy_spoolss_call(p, NDR_SPOOLSS_WRITEPRINTER);
324 /****************************************************************************
326 ****************************************************************************/
328 static bool api_spoolss_setprinter(pipes_struct *p)
330 return proxy_spoolss_call(p, NDR_SPOOLSS_SETPRINTER);
333 /****************************************************************************
334 ****************************************************************************/
336 static bool api_spoolss_fcpn(pipes_struct *p)
338 return proxy_spoolss_call(p, NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY);
341 /****************************************************************************
342 ****************************************************************************/
344 static bool api_spoolss_addjob(pipes_struct *p)
346 return proxy_spoolss_call(p, NDR_SPOOLSS_ADDJOB);
349 /****************************************************************************
350 ****************************************************************************/
352 static bool api_spoolss_enumjobs(pipes_struct *p)
354 return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMJOBS);
357 /****************************************************************************
358 ****************************************************************************/
360 static bool api_spoolss_schedulejob(pipes_struct *p)
362 return proxy_spoolss_call(p, NDR_SPOOLSS_SCHEDULEJOB);
365 /****************************************************************************
366 ****************************************************************************/
368 static bool api_spoolss_setjob(pipes_struct *p)
370 return proxy_spoolss_call(p, NDR_SPOOLSS_SETJOB);
373 /****************************************************************************
374 ****************************************************************************/
376 static bool api_spoolss_enumprinterdrivers(pipes_struct *p)
378 SPOOL_Q_ENUMPRINTERDRIVERS q_u;
379 SPOOL_R_ENUMPRINTERDRIVERS r_u;
380 prs_struct *data = &p->in_data.data;
381 prs_struct *rdata = &p->out_data.rdata;
386 if (!spoolss_io_q_enumprinterdrivers("", &q_u, data, 0)) {
387 DEBUG(0,("spoolss_io_q_enumprinterdrivers: unable to unmarshall SPOOL_Q_ENUMPRINTERDRIVERS.\n"));
391 r_u.status = _spoolss_enumprinterdrivers(p, &q_u, &r_u);
393 if (!spoolss_io_r_enumprinterdrivers("",&r_u,rdata,0)) {
394 DEBUG(0,("spoolss_io_r_enumprinterdrivers: unable to marshall SPOOL_R_ENUMPRINTERDRIVERS.\n"));
401 /****************************************************************************
402 ****************************************************************************/
404 static bool api_spoolss_getform(pipes_struct *p)
406 return proxy_spoolss_call(p, NDR_SPOOLSS_GETFORM);
409 /****************************************************************************
410 ****************************************************************************/
412 static bool api_spoolss_enumforms(pipes_struct *p)
414 return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMFORMS);
417 /****************************************************************************
418 ****************************************************************************/
420 static bool api_spoolss_enumports(pipes_struct *p)
422 return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMPORTS);
425 /****************************************************************************
426 ****************************************************************************/
428 static bool api_spoolss_addprinterex(pipes_struct *p)
430 return proxy_spoolss_call(p, NDR_SPOOLSS_ADDPRINTEREX);
433 /****************************************************************************
434 ****************************************************************************/
436 static bool api_spoolss_addprinterdriver(pipes_struct *p)
438 return proxy_spoolss_call(p, NDR_SPOOLSS_ADDPRINTERDRIVER);
441 /****************************************************************************
442 ****************************************************************************/
444 static bool api_spoolss_getprinterdriverdirectory(pipes_struct *p)
446 return proxy_spoolss_call(p, NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY);
449 /****************************************************************************
450 ****************************************************************************/
452 static bool api_spoolss_enumprinterdata(pipes_struct *p)
454 SPOOL_Q_ENUMPRINTERDATA q_u;
455 SPOOL_R_ENUMPRINTERDATA r_u;
456 prs_struct *data = &p->in_data.data;
457 prs_struct *rdata = &p->out_data.rdata;
462 if(!spoolss_io_q_enumprinterdata("", &q_u, data, 0)) {
463 DEBUG(0,("spoolss_io_q_enumprinterdata: unable to unmarshall SPOOL_Q_ENUMPRINTERDATA.\n"));
467 r_u.status = _spoolss_enumprinterdata(p, &q_u, &r_u);
469 if(!spoolss_io_r_enumprinterdata("", &r_u, rdata, 0)) {
470 DEBUG(0,("spoolss_io_r_enumprinterdata: unable to marshall SPOOL_R_ENUMPRINTERDATA.\n"));
477 /****************************************************************************
478 ****************************************************************************/
480 static bool api_spoolss_setprinterdata(pipes_struct *p)
482 SPOOL_Q_SETPRINTERDATA q_u;
483 SPOOL_R_SETPRINTERDATA r_u;
484 prs_struct *data = &p->in_data.data;
485 prs_struct *rdata = &p->out_data.rdata;
490 if(!spoolss_io_q_setprinterdata("", &q_u, data, 0)) {
491 DEBUG(0,("spoolss_io_q_setprinterdata: unable to unmarshall SPOOL_Q_SETPRINTERDATA.\n"));
495 r_u.status = _spoolss_setprinterdata(p, &q_u, &r_u);
497 if(!spoolss_io_r_setprinterdata("", &r_u, rdata, 0)) {
498 DEBUG(0,("spoolss_io_r_setprinterdata: unable to marshall SPOOL_R_SETPRINTERDATA.\n"));
505 /****************************************************************************
506 ****************************************************************************/
507 static bool api_spoolss_reset_printer(pipes_struct *p)
509 return proxy_spoolss_call(p, NDR_SPOOLSS_RESETPRINTER);
512 /****************************************************************************
513 ****************************************************************************/
514 static bool api_spoolss_addform(pipes_struct *p)
516 return proxy_spoolss_call(p, NDR_SPOOLSS_ADDFORM);
519 /****************************************************************************
520 ****************************************************************************/
522 static bool api_spoolss_deleteform(pipes_struct *p)
524 return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEFORM);
527 /****************************************************************************
528 ****************************************************************************/
530 static bool api_spoolss_setform(pipes_struct *p)
532 return proxy_spoolss_call(p, NDR_SPOOLSS_SETFORM);
535 /****************************************************************************
536 ****************************************************************************/
538 static bool api_spoolss_enumprintprocessors(pipes_struct *p)
540 return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMPRINTPROCESSORS);
543 /****************************************************************************
544 ****************************************************************************/
546 static bool api_spoolss_addprintprocessor(pipes_struct *p)
548 return proxy_spoolss_call(p, NDR_SPOOLSS_ADDPRINTPROCESSOR);
551 /****************************************************************************
552 ****************************************************************************/
554 static bool api_spoolss_enumprintprocdatatypes(pipes_struct *p)
556 return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMPRINTPROCDATATYPES);
559 /****************************************************************************
560 ****************************************************************************/
562 static bool api_spoolss_enumprintmonitors(pipes_struct *p)
564 return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMMONITORS);
567 /****************************************************************************
568 ****************************************************************************/
570 static bool api_spoolss_getjob(pipes_struct *p)
572 return proxy_spoolss_call(p, NDR_SPOOLSS_GETJOB);
575 /********************************************************************
576 * api_spoolss_getprinterdataex
578 * called from the spoolss dispatcher
579 ********************************************************************/
581 static bool api_spoolss_getprinterdataex(pipes_struct *p)
583 return proxy_spoolss_call(p, NDR_SPOOLSS_GETPRINTERDATAEX);
586 /****************************************************************************
587 ****************************************************************************/
589 static bool api_spoolss_setprinterdataex(pipes_struct *p)
591 return proxy_spoolss_call(p, NDR_SPOOLSS_SETPRINTERDATAEX);
595 /****************************************************************************
596 ****************************************************************************/
598 static bool api_spoolss_enumprinterkey(pipes_struct *p)
600 SPOOL_Q_ENUMPRINTERKEY q_u;
601 SPOOL_R_ENUMPRINTERKEY r_u;
602 prs_struct *data = &p->in_data.data;
603 prs_struct *rdata = &p->out_data.rdata;
608 if(!spoolss_io_q_enumprinterkey("", &q_u, data, 0)) {
609 DEBUG(0,("spoolss_io_q_setprinterkey: unable to unmarshall SPOOL_Q_ENUMPRINTERKEY.\n"));
613 r_u.status = _spoolss_enumprinterkey(p, &q_u, &r_u);
615 if(!spoolss_io_r_enumprinterkey("", &r_u, rdata, 0)) {
616 DEBUG(0,("spoolss_io_r_enumprinterkey: unable to marshall SPOOL_R_ENUMPRINTERKEY.\n"));
623 /****************************************************************************
624 ****************************************************************************/
626 static bool api_spoolss_enumprinterdataex(pipes_struct *p)
628 SPOOL_Q_ENUMPRINTERDATAEX q_u;
629 SPOOL_R_ENUMPRINTERDATAEX r_u;
630 prs_struct *data = &p->in_data.data;
631 prs_struct *rdata = &p->out_data.rdata;
636 if(!spoolss_io_q_enumprinterdataex("", &q_u, data, 0)) {
637 DEBUG(0,("spoolss_io_q_enumprinterdataex: unable to unmarshall SPOOL_Q_ENUMPRINTERDATAEX.\n"));
641 r_u.status = _spoolss_enumprinterdataex(p, &q_u, &r_u);
643 if(!spoolss_io_r_enumprinterdataex("", &r_u, rdata, 0)) {
644 DEBUG(0,("spoolss_io_r_enumprinterdataex: unable to marshall SPOOL_R_ENUMPRINTERDATAEX.\n"));
651 /****************************************************************************
652 ****************************************************************************/
654 static bool api_spoolss_getprintprocessordirectory(pipes_struct *p)
656 return proxy_spoolss_call(p, NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY);
659 /****************************************************************************
660 ****************************************************************************/
662 static bool api_spoolss_deleteprinterdataex(pipes_struct *p)
664 return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDATAEX);
667 /****************************************************************************
668 ****************************************************************************/
670 static bool api_spoolss_deleteprinterkey(pipes_struct *p)
672 return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERKEY);
675 /****************************************************************************
676 ****************************************************************************/
678 static bool api_spoolss_addprinterdriverex(pipes_struct *p)
680 return proxy_spoolss_call(p, NDR_SPOOLSS_ADDPRINTERDRIVEREX);
683 /****************************************************************************
684 ****************************************************************************/
686 static bool api_spoolss_deleteprinterdriverex(pipes_struct *p)
688 return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDRIVEREX);
691 /****************************************************************************
692 ****************************************************************************/
694 static bool api_spoolss_xcvdataport(pipes_struct *p)
696 return proxy_spoolss_call(p, NDR_SPOOLSS_XCVDATA);
699 /*******************************************************************
700 \pipe\spoolss commands
701 ********************************************************************/
703 struct api_struct api_spoolss_cmds[] =
705 {"SPOOLSS_OPENPRINTER", SPOOLSS_OPENPRINTER, api_spoolss_open_printer },
706 {"SPOOLSS_OPENPRINTEREX", SPOOLSS_OPENPRINTEREX, api_spoolss_open_printer_ex },
707 {"SPOOLSS_GETPRINTERDATA", SPOOLSS_GETPRINTERDATA, api_spoolss_getprinterdata },
708 {"SPOOLSS_CLOSEPRINTER", SPOOLSS_CLOSEPRINTER, api_spoolss_closeprinter },
709 {"SPOOLSS_DELETEPRINTER", SPOOLSS_DELETEPRINTER, api_spoolss_deleteprinter },
710 {"SPOOLSS_ABORTPRINTER", SPOOLSS_ABORTPRINTER, api_spoolss_abortprinter },
711 {"SPOOLSS_RFFPCNEX", SPOOLSS_RFFPCNEX, api_spoolss_rffpcnex },
712 {"SPOOLSS_RFNPCNEX", SPOOLSS_RFNPCNEX, api_spoolss_rfnpcnex },
713 {"SPOOLSS_ENUMPRINTERS", SPOOLSS_ENUMPRINTERS, api_spoolss_enumprinters },
714 {"SPOOLSS_GETPRINTER", SPOOLSS_GETPRINTER, api_spoolss_getprinter },
715 {"SPOOLSS_GETPRINTERDRIVER2", SPOOLSS_GETPRINTERDRIVER2, api_spoolss_getprinterdriver2 },
716 {"SPOOLSS_STARTPAGEPRINTER", SPOOLSS_STARTPAGEPRINTER, api_spoolss_startpageprinter },
717 {"SPOOLSS_ENDPAGEPRINTER", SPOOLSS_ENDPAGEPRINTER, api_spoolss_endpageprinter },
718 {"SPOOLSS_STARTDOCPRINTER", SPOOLSS_STARTDOCPRINTER, api_spoolss_startdocprinter },
719 {"SPOOLSS_ENDDOCPRINTER", SPOOLSS_ENDDOCPRINTER, api_spoolss_enddocprinter },
720 {"SPOOLSS_WRITEPRINTER", SPOOLSS_WRITEPRINTER, api_spoolss_writeprinter },
721 {"SPOOLSS_SETPRINTER", SPOOLSS_SETPRINTER, api_spoolss_setprinter },
722 {"SPOOLSS_FCPN", SPOOLSS_FCPN, api_spoolss_fcpn },
723 {"SPOOLSS_ADDJOB", SPOOLSS_ADDJOB, api_spoolss_addjob },
724 {"SPOOLSS_ENUMJOBS", SPOOLSS_ENUMJOBS, api_spoolss_enumjobs },
725 {"SPOOLSS_SCHEDULEJOB", SPOOLSS_SCHEDULEJOB, api_spoolss_schedulejob },
726 {"SPOOLSS_SETJOB", SPOOLSS_SETJOB, api_spoolss_setjob },
727 {"SPOOLSS_ENUMFORMS", SPOOLSS_ENUMFORMS, api_spoolss_enumforms },
728 {"SPOOLSS_ENUMPORTS", SPOOLSS_ENUMPORTS, api_spoolss_enumports },
729 {"SPOOLSS_ENUMPRINTERDRIVERS", SPOOLSS_ENUMPRINTERDRIVERS, api_spoolss_enumprinterdrivers },
730 {"SPOOLSS_ADDPRINTEREX", SPOOLSS_ADDPRINTEREX, api_spoolss_addprinterex },
731 {"SPOOLSS_ADDPRINTERDRIVER", SPOOLSS_ADDPRINTERDRIVER, api_spoolss_addprinterdriver },
732 {"SPOOLSS_DELETEPRINTERDRIVER", SPOOLSS_DELETEPRINTERDRIVER, api_spoolss_deleteprinterdriver },
733 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_getprinterdriverdirectory },
734 {"SPOOLSS_ENUMPRINTERDATA", SPOOLSS_ENUMPRINTERDATA, api_spoolss_enumprinterdata },
735 {"SPOOLSS_SETPRINTERDATA", SPOOLSS_SETPRINTERDATA, api_spoolss_setprinterdata },
736 {"SPOOLSS_RESETPRINTER", SPOOLSS_RESETPRINTER, api_spoolss_reset_printer },
737 {"SPOOLSS_DELETEPRINTERDATA", SPOOLSS_DELETEPRINTERDATA, api_spoolss_deleteprinterdata },
738 {"SPOOLSS_ADDFORM", SPOOLSS_ADDFORM, api_spoolss_addform },
739 {"SPOOLSS_DELETEFORM", SPOOLSS_DELETEFORM, api_spoolss_deleteform },
740 {"SPOOLSS_GETFORM", SPOOLSS_GETFORM, api_spoolss_getform },
741 {"SPOOLSS_SETFORM", SPOOLSS_SETFORM, api_spoolss_setform },
742 {"SPOOLSS_ADDPRINTPROCESSOR", SPOOLSS_ADDPRINTPROCESSOR, api_spoolss_addprintprocessor },
743 {"SPOOLSS_ENUMPRINTPROCESSORS", SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_enumprintprocessors },
744 {"SPOOLSS_ENUMMONITORS", SPOOLSS_ENUMMONITORS, api_spoolss_enumprintmonitors },
745 {"SPOOLSS_GETJOB", SPOOLSS_GETJOB, api_spoolss_getjob },
746 {"SPOOLSS_ENUMPRINTPROCDATATYPES", SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_enumprintprocdatatypes },
747 {"SPOOLSS_GETPRINTERDATAEX", SPOOLSS_GETPRINTERDATAEX, api_spoolss_getprinterdataex },
748 {"SPOOLSS_SETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex },
749 {"SPOOLSS_DELETEPRINTERDATAEX", SPOOLSS_DELETEPRINTERDATAEX, api_spoolss_deleteprinterdataex },
750 {"SPOOLSS_ENUMPRINTERDATAEX", SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_enumprinterdataex },
751 {"SPOOLSS_ENUMPRINTERKEY", SPOOLSS_ENUMPRINTERKEY, api_spoolss_enumprinterkey },
752 {"SPOOLSS_DELETEPRINTERKEY", SPOOLSS_DELETEPRINTERKEY, api_spoolss_deleteprinterkey },
753 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory},
754 {"SPOOLSS_ADDPRINTERDRIVEREX", SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_addprinterdriverex },
755 {"SPOOLSS_DELETEPRINTERDRIVEREX", SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_deleteprinterdriverex },
756 {"SPOOLSS_XCVDATAPORT", SPOOLSS_XCVDATAPORT, api_spoolss_xcvdataport },
759 void spoolss2_get_pipe_fns( struct api_struct **fns, int *n_fns )
761 *fns = api_spoolss_cmds;
762 *n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
765 NTSTATUS rpc_spoolss2_init(void)
767 return rpc_srv_register(
768 SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss",
771 sizeof(api_spoolss_cmds) / sizeof(struct api_struct));