s3-spoolss: remove rpccli_spoolss_addprinterdriver.
authorGünther Deschner <gd@samba.org>
Tue, 24 Feb 2009 21:53:05 +0000 (22:53 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 24 Feb 2009 22:57:52 +0000 (23:57 +0100)
Guenther

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

index 95c4c1659b262e7cbbcbba022692a42dab20c682..6edad71a9952244e037ccf41a7b7fbe9071543c5 100644 (file)
@@ -5492,9 +5492,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_addprinterdriver (struct rpc_pipe_client *cli, 
-                                    TALLOC_CTX *mem_ctx, uint32 level,
-                                    PRINTER_DRIVER_CTR *ctr);
 WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                 uint32 level, PRINTER_INFO_CTR*ctr);
 WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
@@ -5941,9 +5938,6 @@ bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_I
 bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
                                SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, 
                                uint32 level, PRINTER_DRIVER_CTR *info);
-bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
-       SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
-                               DRIVER_INFO_3 *info3);
 bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
 bool spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
 bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
index 8a8dabeba4b9bb516a5d4b38c08ea758822d5425..19e9aae0f86e41449577201fd2e2ff6c0cd1454f 100644 (file)
@@ -886,36 +886,6 @@ WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
 /**********************************************************************
 **********************************************************************/
 
-WERROR rpccli_spoolss_addprinterdriver (struct rpc_pipe_client *cli, 
-                                    TALLOC_CTX *mem_ctx, uint32 level,
-                                    PRINTER_DRIVER_CTR *ctr)
-{
-       prs_struct qbuf, rbuf;
-       SPOOL_Q_ADDPRINTERDRIVER in;
-        SPOOL_R_ADDPRINTERDRIVER out;
-       fstring server;
-
-       ZERO_STRUCT(in);
-       ZERO_STRUCT(out);
-       
-        slprintf(server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
-        strupper_m(server);
-
-       make_spoolss_q_addprinterdriver( mem_ctx, &in, server, level, ctr );
-
-       CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ADDPRINTERDRIVER,
-                   in, out, 
-                   qbuf, rbuf,
-                   spoolss_io_q_addprinterdriver,
-                   spoolss_io_r_addprinterdriver, 
-                   WERR_GENERAL_FAILURE );
-
-       return out.status;                  
-}
-
-/**********************************************************************
-**********************************************************************/
-
 WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                 uint32 level, PRINTER_INFO_CTR*ctr)
 {
index 4ffa121e1c3db8a761e4fe1dcf5ff069876da76c..9c69dd26595bddf09558a44dbe579380a44241b1 100644 (file)
@@ -3382,109 +3382,6 @@ bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_I
        return True;
 }
 
-/*******************************************************************
- init a SPOOL_Q_ADDPRINTERDRIVER struct
- ******************************************************************/
-
-bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
-                               SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, 
-                               uint32 level, PRINTER_DRIVER_CTR *info)
-{
-       DEBUG(5,("make_spoolss_q_addprinterdriver\n"));
-       
-       if (!srv_name || !info) {
-               return False;
-       }
-
-       q_u->server_name_ptr = 1; /* srv_name is != NULL, see above */
-       init_unistr2(&q_u->server_name, srv_name, UNI_STR_TERMINATE);
-       
-       q_u->level = level;
-       
-       q_u->info.level = level;
-       q_u->info.ptr = 1;      /* Info is != NULL, see above */
-       switch (level)
-       {
-       /* info level 3 is supported by Windows 95/98, WinNT and Win2k */
-       case 3 :
-               make_spoolss_driver_info_3(mem_ctx, &q_u->info.info_3, info->info3);
-               break;
-               
-       default:
-               DEBUG(0,("make_spoolss_q_addprinterdriver: Unknown info level [%d]\n", level));
-               break;
-       }
-       
-       return True;
-}
-
-bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
-       SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
-                               DRIVER_INFO_3 *info3)
-{
-       uint32          len = 0;
-       SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *inf;
-
-       if (!(inf=TALLOC_ZERO_P(mem_ctx, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3)))
-               return False;
-
-       inf->cversion   = info3->version;
-       inf->name_ptr   = (info3->name.buffer!=NULL)?1:0;
-       inf->environment_ptr    = (info3->architecture.buffer!=NULL)?1:0;
-       inf->driverpath_ptr     = (info3->driverpath.buffer!=NULL)?1:0;
-       inf->datafile_ptr       = (info3->datafile.buffer!=NULL)?1:0;
-       inf->configfile_ptr     = (info3->configfile.buffer!=NULL)?1:0;
-       inf->helpfile_ptr       = (info3->helpfile.buffer!=NULL)?1:0;
-       inf->monitorname_ptr    = (info3->monitorname.buffer!=NULL)?1:0;
-       inf->defaultdatatype_ptr        = (info3->defaultdatatype.buffer!=NULL)?1:0;
-
-       init_unistr2_from_unistr(inf, &inf->name, &info3->name);
-       init_unistr2_from_unistr(inf, &inf->environment, &info3->architecture);
-       init_unistr2_from_unistr(inf, &inf->driverpath, &info3->driverpath);
-       init_unistr2_from_unistr(inf, &inf->datafile, &info3->datafile);
-       init_unistr2_from_unistr(inf, &inf->configfile, &info3->configfile);
-       init_unistr2_from_unistr(inf, &inf->helpfile, &info3->helpfile);
-       init_unistr2_from_unistr(inf, &inf->monitorname, &info3->monitorname);
-       init_unistr2_from_unistr(inf, &inf->defaultdatatype, &info3->defaultdatatype);
-
-       if (info3->dependentfiles) {
-               bool done = False;
-               bool null_char = False;
-               uint16 *ptr = info3->dependentfiles;
-
-               while (!done) {
-                       switch (*ptr) {
-                               case 0:
-                                       /* the null_char bool is used to help locate
-                                          two '\0's back to back */
-                                       if (null_char) {
-                                               done = True;
-                                       } else {
-                                               null_char = True;
-                                       }
-                                       break;
-                                       
-                               default:
-                                       null_char = False;
-                                       break;                          
-                       }
-                       len++;
-                       ptr++;
-               }
-       }
-
-       inf->dependentfiles_ptr = (info3->dependentfiles != NULL) ? 1 : 0;
-       inf->dependentfilessize = (info3->dependentfiles != NULL) ? len : 0;
-       if(!make_spoolss_buffer5(mem_ctx, &inf->dependentfiles, len, info3->dependentfiles)) {
-               SAFE_FREE(inf);
-               return False;
-       }
-       
-       *spool_drv_info = inf;
-       
-       return True;
-}
-
 /*******************************************************************
  make a BUFFER5 struct from a uint16*
  ******************************************************************/