s3-spoolss: remove old spoolss_AddPrinterDriver{Ex}.
authorGünther Deschner <gd@samba.org>
Wed, 18 Feb 2009 18:00:29 +0000 (19:00 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 19 Feb 2009 18:26:54 +0000 (19:26 +0100)
Guenther

source3/include/proto.h
source3/include/rpc_spoolss.h
source3/rpc_parse/parse_spoolss.c

index 6f9fce41565531117a720d03b8c8576cb7f50cff..3806c9657e33efe06c0ac3926e52cb2faf9fabbb 100644 (file)
@@ -5964,12 +5964,6 @@ bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
 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);
-bool spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
-bool uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
-                                NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc);
-bool uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
-                                NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc);
 bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
                               NT_PRINTER_INFO_LEVEL_2  *d);
 bool spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth);
index d7d93e322604875ac51af8ad3fe23c7900620f4d..99da007d32d98952d68c48bbc40d4409abded3e9 100644 (file)
@@ -1178,22 +1178,6 @@ typedef struct spool_r_addprinterdriver
 }
 SPOOL_R_ADDPRINTERDRIVER;
 
-typedef struct spool_q_addprinterdriverex
-{
-       uint32 server_name_ptr;
-       UNISTR2 server_name;
-       uint32 level;
-       SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
-       uint32 copy_flags;
-}
-SPOOL_Q_ADDPRINTERDRIVEREX;
-
-typedef struct spool_r_addprinterdriverex
-{
-       WERROR status;
-}
-SPOOL_R_ADDPRINTERDRIVEREX;
-
 typedef struct spool_q_enumprintprocessors
 {
        uint32 name_ptr;
index b798eef455079037383ad3a863b0d63715ce72e8..577ba73a42c516fbee922c76880acf874dfc974d 100644 (file)
@@ -3858,47 +3858,6 @@ bool spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER
        return True;
 }
 
-/*******************************************************************
- convert a buffer of UNICODE strings null terminated
- the buffer is terminated by a NULL
- convert to an dos codepage array (null terminated)
- dynamically allocate memory
-********************************************************************/  
-
-static bool uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
-{
-       fstring f;
-       int n = 0;
-       char *src;
-
-       if (buf5==NULL)
-               return False;
-
-       src = (char *)buf5->buffer;
-       *ar = SMB_MALLOC_ARRAY(fstring, 1);
-       if (!*ar) {
-               return False;
-       }
-
-       while (src < ((char *)buf5->buffer) + buf5->buf_len*2) {
-               rpcstr_pull(f, src, sizeof(f)-1, -1, STR_TERMINATE);
-               src = skip_unibuf(src, 2*buf5->buf_len - PTR_DIFF(src,buf5->buffer));
-               *ar = SMB_REALLOC_ARRAY(*ar, fstring, n+2);
-               if (!*ar) {
-                       return False;
-               }
-               fstrcpy((*ar)[n], f);
-               n++;
-       }
-
-       fstrcpy((*ar)[n], "");
-       return True;
-}
-
 /*******************************************************************
  read a UNICODE array with null terminated strings 
  and null terminated array 
@@ -4125,152 +4084,8 @@ bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q
 }
 
 /*******************************************************************
- fill in the prs_struct for a ADDPRINTERDRIVER request PDU
  ********************************************************************/  
 
-bool spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriverex");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!prs_uint32("server_name_ptr", ps, depth, &q_u->server_name_ptr))
-               return False;
-       if(!smb_io_unistr2("server_name", &q_u->server_name, q_u->server_name_ptr, ps, depth))
-               return False;
-               
-       if(!prs_align(ps))
-               return False;
-       if(!prs_uint32("info_level", ps, depth, &q_u->level))
-               return False;
-
-       if(!spool_io_printer_driver_info_level("", &q_u->info, ps, depth))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-       if(!prs_uint32("copy flags", ps, depth, &q_u->copy_flags))
-               return False;
-               
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/  
-
-bool spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriverex");
-       depth++;
-
-       if(!prs_werror("status", ps, depth, &q_u->status))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/  
-
-bool uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
-                                NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc)
-{
-       NT_PRINTER_DRIVER_INFO_LEVEL_3 *d;
-       
-       DEBUG(7,("uni_2_asc_printer_driver_3: Converting from UNICODE to ASCII\n"));
-       
-       if (*asc==NULL)
-       {
-               *asc=SMB_MALLOC_P(NT_PRINTER_DRIVER_INFO_LEVEL_3);
-               if(*asc == NULL)
-                       return False;
-               ZERO_STRUCTP(*asc);
-       }       
-
-       d=*asc;
-
-       d->cversion=uni->cversion;
-
-       unistr2_to_ascii(d->name,            &uni->name,            sizeof(d->name));
-       unistr2_to_ascii(d->environment,     &uni->environment,     sizeof(d->environment));
-       unistr2_to_ascii(d->driverpath,      &uni->driverpath,      sizeof(d->driverpath));
-       unistr2_to_ascii(d->datafile,        &uni->datafile,        sizeof(d->datafile));
-       unistr2_to_ascii(d->configfile,      &uni->configfile,      sizeof(d->configfile));
-       unistr2_to_ascii(d->helpfile,        &uni->helpfile,        sizeof(d->helpfile));
-       unistr2_to_ascii(d->monitorname,     &uni->monitorname,     sizeof(d->monitorname));
-       unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype));
-
-       DEBUGADD(8,( "version:         %d\n", d->cversion));
-       DEBUGADD(8,( "name:            %s\n", d->name));
-       DEBUGADD(8,( "environment:     %s\n", d->environment));
-       DEBUGADD(8,( "driverpath:      %s\n", d->driverpath));
-       DEBUGADD(8,( "datafile:        %s\n", d->datafile));
-       DEBUGADD(8,( "configfile:      %s\n", d->configfile));
-       DEBUGADD(8,( "helpfile:        %s\n", d->helpfile));
-       DEBUGADD(8,( "monitorname:     %s\n", d->monitorname));
-       DEBUGADD(8,( "defaultdatatype: %s\n", d->defaultdatatype));
-
-       if (uniarray_2_dosarray(&uni->dependentfiles, &d->dependentfiles ))
-               return True;
-       
-       SAFE_FREE(*asc);
-       return False;
-}
-
-/*******************************************************************
-********************************************************************/  
-bool uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
-                                NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc)
-{
-       NT_PRINTER_DRIVER_INFO_LEVEL_6 *d;
-       
-       DEBUG(7,("uni_2_asc_printer_driver_6: Converting from UNICODE to ASCII\n"));
-       
-       if (*asc==NULL)
-       {
-               *asc=SMB_MALLOC_P(NT_PRINTER_DRIVER_INFO_LEVEL_6);
-               if(*asc == NULL)
-                       return False;
-               ZERO_STRUCTP(*asc);
-       }       
-
-       d=*asc;
-
-       d->version=uni->version;
-
-       unistr2_to_ascii(d->name,            &uni->name,            sizeof(d->name));
-       unistr2_to_ascii(d->environment,     &uni->environment,     sizeof(d->environment));
-       unistr2_to_ascii(d->driverpath,      &uni->driverpath,      sizeof(d->driverpath));
-       unistr2_to_ascii(d->datafile,        &uni->datafile,        sizeof(d->datafile));
-       unistr2_to_ascii(d->configfile,      &uni->configfile,      sizeof(d->configfile));
-       unistr2_to_ascii(d->helpfile,        &uni->helpfile,        sizeof(d->helpfile));
-       unistr2_to_ascii(d->monitorname,     &uni->monitorname,     sizeof(d->monitorname));
-       unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype));
-
-       DEBUGADD(8,( "version:         %d\n", d->version));
-       DEBUGADD(8,( "name:            %s\n", d->name));
-       DEBUGADD(8,( "environment:     %s\n", d->environment));
-       DEBUGADD(8,( "driverpath:      %s\n", d->driverpath));
-       DEBUGADD(8,( "datafile:        %s\n", d->datafile));
-       DEBUGADD(8,( "configfile:      %s\n", d->configfile));
-       DEBUGADD(8,( "helpfile:        %s\n", d->helpfile));
-       DEBUGADD(8,( "monitorname:     %s\n", d->monitorname));
-       DEBUGADD(8,( "defaultdatatype: %s\n", d->defaultdatatype));
-
-       if (!uniarray_2_dosarray(&uni->dependentfiles, &d->dependentfiles ))
-               goto error;
-       if (!uniarray_2_dosarray(&uni->previousnames, &d->previousnames ))
-               goto error;
-       
-       return True;
-       
-error:
-       SAFE_FREE(*asc);
-       return False;
-}
-
 bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
                               NT_PRINTER_INFO_LEVEL_2  *d)
 {