s3-spoolss: remove old spoolss_SetJob.
authorGünther Deschner <gd@samba.org>
Mon, 9 Feb 2009 23:21:53 +0000 (00:21 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 10 Feb 2009 10:26:39 +0000 (11:26 +0100)
Guenther

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

index b4add30..108e982 100644 (file)
@@ -5475,9 +5475,6 @@ WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx
 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);
-WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                         POLICY_HND *hnd, uint32 jobid, uint32 level, 
-                         uint32 command);
 WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                          POLICY_HND *hnd, uint32 jobid, uint32 level,
                          JOB_INFO_CTR *ctr);
@@ -5927,8 +5924,6 @@ bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
                                RPC_BUFFER *buffer,
                                uint32 offered);
 bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth);
 bool spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth);
 bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
                                 const char *name,
@@ -6037,8 +6032,6 @@ bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRIN
 bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, 
                              uint32 level, RPC_BUFFER *buffer,
                              uint32 offered);
-bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle, 
-                          uint32 jobid, uint32 level, uint32 command);
 bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle, 
                           uint32 jobid, uint32 level, RPC_BUFFER *buffer,
                           uint32 offered);
@@ -6252,7 +6245,6 @@ WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname
 bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
 WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u);
 WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u);
-WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u);
 WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u);
 WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u);
 WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
index b257d3d..78e01d3 100644 (file)
@@ -995,24 +995,6 @@ typedef struct job_info_info
 }
 JOB_INFO;
 
-typedef struct spool_q_setjob
-{
-       POLICY_HND handle;
-       uint32 jobid;
-       uint32 level;
-       JOB_INFO ctr;
-       uint32 command;
-
-}
-SPOOL_Q_SETJOB;
-
-typedef struct spool_r_setjob
-{
-       WERROR status;
-
-}
-SPOOL_R_SETJOB;
-
 typedef struct spool_q_enumprinterdrivers
 {
        uint32 name_ptr;
index 1340f97..a62c003 100644 (file)
@@ -1273,32 +1273,6 @@ WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 /**********************************************************************
 **********************************************************************/
 
-WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                         POLICY_HND *hnd, uint32 jobid, uint32 level, 
-                         uint32 command)
-{
-       prs_struct qbuf, rbuf;
-       SPOOL_Q_SETJOB in;
-       SPOOL_R_SETJOB out;
-
-       ZERO_STRUCT(in);
-       ZERO_STRUCT(out);
-
-        make_spoolss_q_setjob( &in, hnd, jobid, level, command );
-
-       CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_SETJOB,
-                   in, out, 
-                   qbuf, rbuf,
-                   spoolss_io_q_setjob,
-                   spoolss_io_r_setjob, 
-                   WERR_GENERAL_FAILURE );
-                   
-       return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
 WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                          POLICY_HND *hnd, uint32 jobid, uint32 level,
                          JOB_INFO_CTR *ctr)
index 0e3bd57..5f125b8 100644 (file)
@@ -3387,50 +3387,6 @@ bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *
        return True;
 }
 
-/*******************************************************************
-********************************************************************/  
-
-bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth)
-{              
-       prs_debug(ps, depth, desc, "spoolss_io_r_setjob");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       
-       if(!prs_werror("status", ps, depth, &r_u->status))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/  
-
-bool spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "spoolss_io_q_setjob");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
-               return False;
-       if(!prs_uint32("jobid", ps, depth, &q_u->jobid))
-               return False;
-       /* 
-        * level is usually 0. If (level!=0) then I'm in trouble !
-        * I will try to generate setjob command with level!=0, one day.
-        */
-       if(!prs_uint32("level", ps, depth, &q_u->level))
-               return False;
-       if(!prs_uint32("command", ps, depth, &q_u->command))
-               return False;
-
-       return True;
-}
-
 /*******************************************************************
  Parse a SPOOL_R_ENUMPRINTERDRIVERS structure.
 ********************************************************************/  
@@ -6046,25 +6002,6 @@ bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
        return True;
 }
 
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle, 
-                          uint32 jobid, uint32 level, uint32 command)
-{
-        memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
-       q_u->jobid = jobid;
-        q_u->level = level;
-
-       /* Hmm - the SPOOL_Q_SETJOB structure has a JOB_INFO ctr in it but
-          the server side code has it marked as unused. */
-
-        q_u->command = command;
-
-       return True;
-}
-
 /*******************************************************************
  * init a structure.
  ********************************************************************/