s3-spoolss: remove old spoolss_GetPrinterDataEx.
authorGünther Deschner <gd@samba.org>
Thu, 12 Feb 2009 21:07:30 +0000 (22:07 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 12 Feb 2009 21:51:29 +0000 (22:51 +0100)
Guenther

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

index bc5d839..2033d4b 100644 (file)
@@ -5498,10 +5498,6 @@ WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                  POLICY_HND *hnd, const char *valuename, 
                                  REGISTRY_VALUE *value);
-WERROR rpccli_spoolss_getprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                                   POLICY_HND *hnd, const char *keyname, 
-                                   const char *valuename, 
-                                   REGISTRY_VALUE *value);
 WERROR rpccli_spoolss_setprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                  POLICY_HND *hnd, REGISTRY_VALUE *value);
 WERROR rpccli_spoolss_setprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
@@ -5830,10 +5826,6 @@ bool make_spoolss_printer_info_7(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_7
 bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
                                   const POLICY_HND *handle,
                                   const char *valuename, uint32 size);
-bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
-                                    const POLICY_HND *handle,
-                                    const char *keyname, 
-                                    const char *valuename, uint32 size);
 bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
 bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
 bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth);
@@ -6019,8 +6011,6 @@ bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
                                SPOOL_NOTIFY_INFO *info);
 bool spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth);
 bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
 bool spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
 bool spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
 bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u, 
@@ -6263,7 +6253,6 @@ WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS
 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);
 WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_u);
-WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, SPOOL_R_GETPRINTERDATAEX *r_u);
 WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u);
 WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u);
 WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
index 472ce45..c163b37 100644 (file)
@@ -1436,25 +1436,6 @@ typedef struct spool_r_rrpcn
 }
 SPOOL_R_REPLY_RRPCN;
 
-typedef struct spool_q_getprinterdataex
-{
-       POLICY_HND handle;
-       UNISTR2 keyname;
-        UNISTR2 valuename;
-       uint32 size;
-}
-SPOOL_Q_GETPRINTERDATAEX;
-
-typedef struct spool_r_getprinterdataex
-{
-       uint32 type;
-       uint32 size;
-       uint8 *data;
-       uint32 needed;
-       WERROR status;
-}
-SPOOL_R_GETPRINTERDATAEX;
-
 typedef struct spool_q_setprinterdataex
 {
        POLICY_HND handle;
index b635bc7..5074042 100644 (file)
@@ -1368,63 +1368,6 @@ WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *me
 /**********************************************************************
 **********************************************************************/
 
-WERROR rpccli_spoolss_getprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                                   POLICY_HND *hnd, const char *keyname, 
-                                   const char *valuename, 
-                                   REGISTRY_VALUE *value)
-{
-       prs_struct qbuf, rbuf;
-       SPOOL_Q_GETPRINTERDATAEX in;
-       SPOOL_R_GETPRINTERDATAEX out;
-       uint32 offered = 0;
-
-       ZERO_STRUCT(in);
-       ZERO_STRUCT(out);
-
-       make_spoolss_q_getprinterdataex( &in, hnd, keyname, valuename, offered );
-
-       CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETPRINTERDATAEX,
-                   in, out, 
-                   qbuf, rbuf,
-                   spoolss_io_q_getprinterdataex,
-                   spoolss_io_r_getprinterdataex, 
-                   WERR_GENERAL_FAILURE );
-
-       if ( W_ERROR_EQUAL( out.status, WERR_MORE_DATA ) ) {
-               offered = out.needed;
-               
-               ZERO_STRUCT(in);
-               ZERO_STRUCT(out);
-               
-               make_spoolss_q_getprinterdataex( &in, hnd, keyname, valuename, offered );
-
-               CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETPRINTERDATAEX,
-                           in, out, 
-                           qbuf, rbuf,
-                           spoolss_io_q_getprinterdataex,
-                           spoolss_io_r_getprinterdataex, 
-                           WERR_GENERAL_FAILURE );
-       }
-
-       if (!W_ERROR_IS_OK(out.status))
-               return out.status;      
-
-       /* Return output parameters */
-
-       if (out.needed) {
-               value->data_p = (uint8 *)TALLOC_MEMDUP(mem_ctx, out.data, out.needed);
-       } else {
-               value->data_p = NULL;
-       }
-       value->type = out.type;
-       value->size = out.needed;
-       
-       return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
 WERROR rpccli_spoolss_setprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                  POLICY_HND *hnd, REGISTRY_VALUE *value)
 {
index f11672a..8c16274 100644 (file)
@@ -944,27 +944,6 @@ bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
         return True;
 }
 
-/*******************************************************************
- * make a structure.
- ********************************************************************/
-
-bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
-                                    const POLICY_HND *handle,
-                                    const char *keyname, 
-                                    const char *valuename, uint32 size)
-{
-        if (q_u == NULL) return False;
-
-        DEBUG(5,("make_spoolss_q_getprinterdataex\n"));
-
-        q_u->handle = *handle;
-       init_unistr2(&q_u->valuename, valuename, UNI_STR_TERMINATE);
-       init_unistr2(&q_u->keyname, keyname, UNI_STR_TERMINATE);
-        q_u->size = size;
-
-        return True;
-}
-
 /*******************************************************************
  * read a structure.
  * called from spoolss_q_getprinterdata (srv_spoolss.c)
@@ -5186,79 +5165,6 @@ bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_st
        return True;            
 }
 
-/*******************************************************************
- * read a structure.
- * called from spoolss_q_getprinterdataex (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
-{
-       if (q_u == NULL)
-               return False;
-
-       prs_debug(ps, depth, desc, "spoolss_io_q_getprinterdataex");
-       depth++;
-
-       if (!prs_align(ps))
-               return False;
-       if (!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
-               return False;
-       if (!prs_align(ps))
-               return False;
-       if (!smb_io_unistr2("keyname", &q_u->keyname,True,ps,depth))
-               return False;
-       if (!prs_align(ps))
-               return False;
-       if (!smb_io_unistr2("valuename", &q_u->valuename,True,ps,depth))
-               return False;
-       if (!prs_align(ps))
-               return False;
-       if (!prs_uint32("size", ps, depth, &q_u->size))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_getprinterdataex (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
-{
-       if (r_u == NULL)
-               return False;
-
-       prs_debug(ps, depth, desc, "spoolss_io_r_getprinterdataex");
-       depth++;
-
-       if (!prs_align(ps))
-               return False;
-       if (!prs_uint32("type", ps, depth, &r_u->type))
-               return False;
-       if (!prs_uint32("size", ps, depth, &r_u->size))
-               return False;
-       
-       if (UNMARSHALLING(ps) && r_u->size) {
-               r_u->data = PRS_ALLOC_MEM(ps, unsigned char, r_u->size);
-               if(!r_u->data)
-                       return False;
-       }
-
-       if (!prs_uint8s(False,"data", ps, depth, r_u->data, r_u->size))
-               return False;
-               
-       if (!prs_align(ps))
-               return False;
-       
-       if (!prs_uint32("needed", ps, depth, &r_u->needed))
-               return False;
-       if (!prs_werror("status", ps, depth, &r_u->status))
-               return False;
-               
-       return True;
-}
-
 /*******************************************************************
  * read a structure.
  ********************************************************************/