s3-spoolss: remove old rpccli_spoolss_getprinterdriver wrapper.
authorGünther Deschner <gd@samba.org>
Tue, 24 Feb 2009 21:26:09 +0000 (22:26 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 24 Feb 2009 21:40:51 +0000 (22:40 +0100)
Guenther

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

index b41a405..08840bd 100644 (file)
@@ -5487,10 +5487,6 @@ WERROR rpccli_spoolss_getprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
 WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                              POLICY_HND *pol, uint32 level, 
                              PRINTER_INFO_CTR *ctr, uint32 command);
-WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli, 
-                                   TALLOC_CTX *mem_ctx, 
-                                   POLICY_HND *pol, uint32 level, 
-                                   const char *env, int version, PRINTER_DRIVER_CTR *ctr);
 WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli, 
                                       TALLOC_CTX *mem_ctx,
                                       uint32 level, const char *env,
index b8f1741..8a8dabe 100644 (file)
@@ -801,85 +801,6 @@ WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
 /**********************************************************************
 **********************************************************************/
 
-WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli, 
-                                   TALLOC_CTX *mem_ctx, 
-                                   POLICY_HND *pol, uint32 level, 
-                                   const char *env, int version, PRINTER_DRIVER_CTR *ctr)
-{
-       prs_struct qbuf, rbuf;
-       SPOOL_Q_GETPRINTERDRIVER2 in;
-        SPOOL_R_GETPRINTERDRIVER2 out;
-       RPC_BUFFER buffer;
-       fstring server;
-       uint32 offered;
-
-       ZERO_STRUCT(in);
-       ZERO_STRUCT(out);
-
-       fstrcpy(server, cli->desthost);
-       strupper_m(server);
-
-       offered = 0;
-       if (!rpcbuf_init(&buffer, offered, mem_ctx))
-               return WERR_NOMEM;
-       make_spoolss_q_getprinterdriver2( &in, pol, env, level, 
-               version, 2, &buffer, offered);
-
-       CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETPRINTERDRIVER2,
-                   in, out, 
-                   qbuf, rbuf,
-                   spoolss_io_q_getprinterdriver2,
-                   spoolss_io_r_getprinterdriver2, 
-                   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_getprinterdriver2( &in, pol, env, level, 
-                       version, 2, &buffer, offered);
-
-               CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETPRINTERDRIVER2,
-                           in, out, 
-                           qbuf, rbuf,
-                           spoolss_io_q_getprinterdriver2,
-                           spoolss_io_r_getprinterdriver2, 
-                           WERR_GENERAL_FAILURE );
-       }
-               
-       if ( !W_ERROR_IS_OK(out.status) )
-               return out.status;
-
-       switch (level) {
-       case 1:
-               if (!decode_printer_driver_1(mem_ctx, out.buffer, 1, &ctr->info1)) {
-                       return WERR_GENERAL_FAILURE;
-               }
-               break;
-       case 2:
-               if (!decode_printer_driver_2(mem_ctx, out.buffer, 1, &ctr->info2)) {
-                       return WERR_GENERAL_FAILURE;
-               }
-               break;
-       case 3:
-               if (!decode_printer_driver_3(mem_ctx, out.buffer, 1, &ctr->info3)) {
-                       return WERR_GENERAL_FAILURE;
-               }
-               break;
-       default:
-               return WERR_UNKNOWN_LEVEL;
-       }
-
-       return out.status;      
-}
-
-/**********************************************************************
-**********************************************************************/
-
 WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli, 
                                       TALLOC_CTX *mem_ctx,
                                       uint32 level, const char *env,
index 435bb1b..4ffa121 100644 (file)
@@ -2050,33 +2050,6 @@ uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info)
        return size;
 }
 
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, 
-                              const POLICY_HND *hnd,
-                              const fstring architecture,
-                              uint32 level, uint32 clientmajor, uint32 clientminor,
-                              RPC_BUFFER *buffer, uint32 offered)
-{      
-       if (q_u == NULL)
-               return False;
-
-       memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
-
-       init_buf_unistr2(&q_u->architecture, &q_u->architecture_ptr, architecture);
-
-       q_u->level=level;
-       q_u->clientmajorversion=clientmajor;
-       q_u->clientminorversion=clientminor;
-
-       q_u->buffer=buffer;
-       q_u->offered=offered;
-
-       return True;
-}
-
 /*******************************************************************
  * read a structure.
  * called from spoolss_getprinterdriver2 (srv_spoolss.c)