From c0e3b195c86edc7fc9a862006e258e517465b7fd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 8 Feb 2009 19:21:26 +0100 Subject: s3-spoolss: remove old _spoolss_SetForm. Guenther --- source3/include/proto.h | 8 --- source3/include/rpc_spoolss.h | 16 ------ source3/rpc_client/cli_spoolss.c | 26 ---------- source3/rpc_parse/parse_spoolss.c | 103 -------------------------------------- 4 files changed, 153 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index d33eaf9a96..f36e538485 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5469,9 +5469,6 @@ WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, char *name, char *environment, fstring procdir); -WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, uint32 level, - const char *form_name, FORM *form); WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle, const char *formname, uint32 level, FORM_1 *form); @@ -6053,8 +6050,6 @@ bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth); bool spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth); bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth); bool spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth); bool spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth); void free_devmode(DEVICEMODE *devmode); @@ -6101,8 +6096,6 @@ bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTOR bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth); bool spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth); bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth); -bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, - int level, const char *form_name, FORM *form); bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, const char *formname, uint32 level, RPC_BUFFER *buffer, uint32 offered); @@ -6353,7 +6346,6 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u); WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u); WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u); -WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u); WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, SPOOL_R_ENUMPRINTPROCESSORS *r_u); WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u); WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_u, SPOOL_R_ENUMPRINTMONITORS *r_u); diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index 016593529c..60964de488 100644 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -1708,22 +1708,6 @@ typedef struct _form } FORM; -typedef struct spool_q_setform -{ - POLICY_HND handle; - UNISTR2 name; - uint32 level; - uint32 level2; - FORM form; -} -SPOOL_Q_SETFORM; - -typedef struct spool_r_setform -{ - WERROR status; -} -SPOOL_R_SETFORM; - typedef struct spool_q_getjob { POLICY_HND handle; diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 6baa4f778d..f9411015e8 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -1154,32 +1154,6 @@ WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli, /********************************************************************** **********************************************************************/ -WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, uint32 level, - const char *form_name, FORM *form) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_SETFORM in; - SPOOL_R_SETFORM out; - - ZERO_STRUCT(in); - ZERO_STRUCT(out); - - make_spoolss_q_setform( &in, handle, level, form_name, form ); - - CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_SETFORM, - in, out, - qbuf, rbuf, - spoolss_io_q_setform, - spoolss_io_r_setform, - WERR_GENERAL_FAILURE ); - - return out.status; -} - -/********************************************************************** -**********************************************************************/ - WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle, const char *formname, uint32 level, FORM_1 *form) diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index c8b58fd62d..d817f544cf 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -5782,93 +5782,6 @@ bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_ return True; } -/******************************************************************* -********************************************************************/ - -static bool spoolss_io_addform(const char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "spoolss_io_addform"); - depth++; - if(!prs_align(ps)) - return False; - - if (ptr!=0) - { - if(!prs_uint32("flags", ps, depth, &f->flags)) - return False; - if(!prs_uint32("name_ptr", ps, depth, &f->name_ptr)) - return False; - if(!prs_uint32("size_x", ps, depth, &f->size_x)) - return False; - if(!prs_uint32("size_y", ps, depth, &f->size_y)) - return False; - if(!prs_uint32("left", ps, depth, &f->left)) - return False; - if(!prs_uint32("top", ps, depth, &f->top)) - return False; - if(!prs_uint32("right", ps, depth, &f->right)) - return False; - if(!prs_uint32("bottom", ps, depth, &f->bottom)) - return False; - - if(!smb_io_unistr2("", &f->name, f->name_ptr, ps, depth)) - return False; - } - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth) -{ - uint32 useless_ptr=1; - prs_debug(ps, depth, desc, "spoolss_io_q_setform"); - depth++; - - if(!prs_align(ps)) - return False; - if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth)) - return False; - if(!smb_io_unistr2("", &q_u->name, True, ps, depth)) - return False; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("level", ps, depth, &q_u->level)) - return False; - if(!prs_uint32("level2", ps, depth, &q_u->level2)) - return False; - - if (q_u->level==1) - { - if(!prs_uint32("useless_ptr", ps, depth, &useless_ptr)) - return False; - if(!spoolss_io_addform("", &q_u->form, useless_ptr, ps, depth)) - return False; - } - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "spoolss_io_r_setform"); - depth++; - - if(!prs_align(ps)) - return False; - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - /******************************************************************* Parse a SPOOL_R_GETJOB structure. ********************************************************************/ @@ -6915,22 +6828,6 @@ bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRIN return True; } -/******************************************************************* - * init a structure. - ********************************************************************/ - -bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, - int level, const char *form_name, FORM *form) -{ - memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); - q_u->level = level; - q_u->level2 = level; - memcpy(&q_u->form, form, sizeof(FORM)); - init_unistr2(&q_u->name, form_name, UNI_STR_TERMINATE); - - return True; -} - /******************************************************************* * init a structure. ********************************************************************/ -- cgit