s3-spoolss: remove old rpccli_spoolss_enumforms.
authorGünther Deschner <gd@samba.org>
Fri, 6 Mar 2009 09:55:09 +0000 (10:55 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 6 Mar 2009 13:30:26 +0000 (14:30 +0100)
Guenther

source3/include/proto.h
source3/rpc_client/cli_spoolss.c
source3/rpc_parse/parse_spoolss.c

index 74240fe97adffe80fe71b71147c17e4335e859a9..4ce5ed695f9eb8ee1eb1c4203a04a624c9dafdf5 100644 (file)
@@ -5491,9 +5491,6 @@ WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
                                       uint32 level, const char *env,
                                       uint32 *num_drivers,
                                       PRINTER_DRIVER_CTR *ctr);
-WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                            POLICY_HND *handle, int level, uint32 *num_forms,
-                            FORM_1 **forms);
 WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                            POLICY_HND *hnd, uint32 level, uint32 firstjob, 
                            uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr);
@@ -5924,9 +5921,6 @@ bool spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u,
 bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth);
 bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
 bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
-bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, 
-                             uint32 level, RPC_BUFFER *buffer,
-                             uint32 offered);
 
 /* The following definitions come from rpc_server/srv_eventlog_lib.c  */
 
index b4828b4d909abe2eed8f961e8f77cec079632398..5e09787a9cb4b7102eefadc01bf287b0c900cb8e 100644 (file)
@@ -674,34 +674,6 @@ static bool decode_jobs_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
 /**********************************************************************
 **********************************************************************/
 
-static bool decode_forms_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer, 
-                          uint32 num_forms, FORM_1 **forms)
-{
-       int i;
-
-       if (num_forms) {
-               *forms = TALLOC_ARRAY(mem_ctx, FORM_1, num_forms);
-               if (*forms == NULL) {
-                       return False;
-               }
-       } else {
-               *forms = NULL;
-       }
-
-       prs_set_offset(&buffer->prs,0);
-
-       for (i = 0; i < num_forms; i++) {
-               if (!smb_io_form_1("", buffer, &((*forms)[i]), 0)) {
-                       return False;
-               }
-       }
-
-       return True;
-}
-
-/**********************************************************************
-**********************************************************************/
-
 WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                 char *name, uint32 flags, uint32 level,
                                 uint32 *num_printers, PRINTER_INFO_CTR *ctr)
@@ -938,64 +910,6 @@ WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
 /**********************************************************************
 **********************************************************************/
 
-WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                            POLICY_HND *handle, int level, uint32 *num_forms,
-                            FORM_1 **forms)
-{
-       prs_struct qbuf, rbuf;
-       SPOOL_Q_ENUMFORMS in;
-       SPOOL_R_ENUMFORMS out;
-       RPC_BUFFER buffer;
-       uint32 offered;
-
-       ZERO_STRUCT(in);
-       ZERO_STRUCT(out);
-
-       offered = 0;
-       if (!rpcbuf_init(&buffer, offered, mem_ctx))
-               return WERR_NOMEM;
-       make_spoolss_q_enumforms( &in, handle, level, &buffer, offered );
-
-       CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMFORMS,
-                   in, out, 
-                   qbuf, rbuf,
-                   spoolss_io_q_enumforms,
-                   spoolss_io_r_enumforms, 
-                   WERR_GENERAL_FAILURE );
-
-       if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) {
-               offered = out.needed;
-               
-               ZERO_STRUCT(in);
-               ZERO_STRUCT(out);
-
-               if (!rpcbuf_init(&buffer, offered, mem_ctx))
-                       return WERR_NOMEM;
-               make_spoolss_q_enumforms( &in, handle, level, &buffer, offered );
-
-               CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMFORMS,
-                           in, out, 
-                           qbuf, rbuf,
-                           spoolss_io_q_enumforms,
-                           spoolss_io_r_enumforms, 
-                           WERR_GENERAL_FAILURE );
-       }
-
-       if (!W_ERROR_IS_OK(out.status))
-               return out.status;
-
-       *num_forms = out.numofforms;
-       
-       if (!decode_forms_1(mem_ctx, out.buffer, *num_forms, forms)) {
-               return WERR_GENERAL_FAILURE;
-       }
-
-       return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
 WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                            POLICY_HND *hnd, uint32 level, uint32 firstjob, 
                            uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr)
index 78c041f863ac80bb118706b8f320e494d0c9e934..e3236066a1f695da34551e0f74624b0d60605fee 100644 (file)
@@ -3083,19 +3083,3 @@ bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX
                return False;
        return True;
 }
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, 
-                             uint32 level, RPC_BUFFER *buffer,
-                             uint32 offered)
-{
-        memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
-        q_u->level = level;
-        q_u->buffer=buffer;
-        q_u->offered=offered;
-
-       return True;
-}