From 3d4221a9cbe178fc96e0e72b6f3b331fc0700752 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 10 Feb 2009 01:53:32 +0100 Subject: s3-spoolss: remove old spoolss_OpenPrinterEx. Guenther --- source3/rpc_parse/parse_spoolss.c | 147 -------------------------------------- 1 file changed, 147 deletions(-) (limited to 'source3/rpc_parse') diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 5f125b8b8e..3af7263c65 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -757,92 +757,6 @@ static bool spoolss_io_devmode_cont(const char *desc, DEVMODE_CTR *dm_c, prs_str return True; } -/******************************************************************* -********************************************************************/ - -static bool spoolss_io_printer_default(const char *desc, PRINTER_DEFAULT *pd, prs_struct *ps, int depth) -{ - if (pd==NULL) - return False; - - prs_debug(ps, depth, desc, "spoolss_io_printer_default"); - depth++; - - if (!prs_uint32("datatype_ptr", ps, depth, &pd->datatype_ptr)) - return False; - - if (!smb_io_unistr2("datatype", &pd->datatype, pd->datatype_ptr, ps,depth)) - return False; - - if (!prs_align(ps)) - return False; - - if (!spoolss_io_devmode_cont("", &pd->devmode_cont, ps, depth)) - return False; - - if (!prs_align(ps)) - return False; - - if (!prs_uint32("access_required", ps, depth, &pd->access_required)) - return False; - - return True; -} - -/******************************************************************* - * init a structure. - ********************************************************************/ - -bool make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u, - const fstring printername, - const fstring datatype, - uint32 access_required, - const fstring clientname, - const fstring user_name) -{ - DEBUG(5,("make_spoolss_q_open_printer_ex\n")); - - q_u->printername = TALLOC_P( talloc_tos(), UNISTR2 ); - if (!q_u->printername) { - return False; - } - init_unistr2(q_u->printername, printername, UNI_STR_TERMINATE); - - q_u->printer_default.datatype_ptr = 0; - - q_u->printer_default.devmode_cont.size=0; - q_u->printer_default.devmode_cont.devmode_ptr=0; - q_u->printer_default.devmode_cont.devmode=NULL; - q_u->printer_default.access_required=access_required; - - q_u->user_switch = 1; - - q_u->user_ctr.level = 1; - q_u->user_ctr.user.user1 = TALLOC_P( talloc_tos(), SPOOL_USER_1 ); - if (!q_u->user_ctr.user.user1) { - return False; - } - q_u->user_ctr.user.user1->size = strlen(clientname) + strlen(user_name) + 10; - q_u->user_ctr.user.user1->build = 1381; - q_u->user_ctr.user.user1->major = 2; - q_u->user_ctr.user.user1->minor = 0; - q_u->user_ctr.user.user1->processor = 0; - - q_u->user_ctr.user.user1->client_name = TALLOC_P( talloc_tos(), UNISTR2 ); - if (!q_u->user_ctr.user.user1->client_name) { - return False; - } - q_u->user_ctr.user.user1->user_name = TALLOC_P( talloc_tos(), UNISTR2 ); - if (!q_u->user_ctr.user.user1->user_name) { - return False; - } - - init_unistr2(q_u->user_ctr.user.user1->client_name, clientname, UNI_STR_TERMINATE); - init_unistr2(q_u->user_ctr.user.user1->user_name, user_name, UNI_STR_TERMINATE); - - return True; -} - /******************************************************************* * init a structure. ********************************************************************/ @@ -1067,67 +981,6 @@ bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_ return True; } - -/******************************************************************* - * read a structure. - * called from spoolss_q_open_printer_ex (srv_spoolss.c) - ********************************************************************/ - -bool spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "spoolss_io_q_open_printer_ex"); - depth++; - - if (!prs_align(ps)) - return False; - - if (!prs_io_unistr2_p("ptr", ps, depth, &q_u->printername)) - return False; - if (!prs_io_unistr2("printername", ps, depth, q_u->printername)) - return False; - - if (!prs_align(ps)) - return False; - - if (!spoolss_io_printer_default("", &q_u->printer_default, ps, depth)) - return False; - - if (!prs_uint32("user_switch", ps, depth, &q_u->user_switch)) - return False; - if (!spool_io_user_level("", &q_u->user_ctr, ps, depth)) - return False; - - return True; -} - -/******************************************************************* - * write a structure. - * called from static spoolss_r_open_printer_ex (srv_spoolss.c) - * called from spoolss_open_printer_ex (cli_spoolss.c) - ********************************************************************/ - -bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) return False; - - prs_debug(ps, depth, desc, "spoolss_io_r_open_printer_ex"); - depth++; - - if (!prs_align(ps)) - return False; - - if (!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth)) - return False; - - if (!prs_werror("status", ps, depth, &(r_u->status))) - return False; - - return True; -} - /******************************************************************* * make a structure. ********************************************************************/ -- cgit