diff options
author | Günther Deschner <gd@samba.org> | 2009-03-07 22:31:19 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-13 09:25:21 +0100 |
commit | 3bd1aabcfe02d411d30c2c62f18923368a4aba9c (patch) | |
tree | 09211c3b6a793b32ce9e957199913953d7d9e1aa /source3 | |
parent | d279e76cd22e6028fd236c5eb38bf656ece6634a (diff) | |
download | samba-3bd1aabcfe02d411d30c2c62f18923368a4aba9c.tar.gz samba-3bd1aabcfe02d411d30c2c62f18923368a4aba9c.tar.bz2 samba-3bd1aabcfe02d411d30c2c62f18923368a4aba9c.zip |
s3-spoolss: remove old rpccli_spoolss_enumjobs wrapper.
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 9 | ||||
-rw-r--r-- | source3/rpc_client/cli_spoolss.c | 126 | ||||
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 23 |
3 files changed, 0 insertions, 158 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index eba3c14e71..25237bbba6 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5523,9 +5523,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_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_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, const char *valuename, REGISTRY_VALUE *value); @@ -5879,12 +5876,6 @@ bool spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_ bool spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth); bool spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth); bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth); -bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd, - uint32 firstjob, - uint32 numofjobs, - uint32 level, - 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_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth); bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u, diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 039b496b3e..c8830acdf2 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -825,60 +825,6 @@ static bool decode_printer_driver_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer, /********************************************************************** **********************************************************************/ -static bool decode_jobs_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer, - uint32 num_jobs, JOB_INFO_1 **jobs) -{ - uint32 i; - - if (num_jobs) { - *jobs = TALLOC_ARRAY(mem_ctx, JOB_INFO_1, num_jobs); - if (*jobs == NULL) { - return False; - } - } else { - *jobs = NULL; - } - prs_set_offset(&buffer->prs,0); - - for (i = 0; i < num_jobs; i++) { - if (!smb_io_job_info_1("", buffer, &((*jobs)[i]), 0)) { - return False; - } - } - - return True; -} - -/********************************************************************** -**********************************************************************/ - -static bool decode_jobs_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer, - uint32 num_jobs, JOB_INFO_2 **jobs) -{ - uint32 i; - - if (num_jobs) { - *jobs = TALLOC_ARRAY(mem_ctx, JOB_INFO_2, num_jobs); - if (*jobs == NULL) { - return False; - } - } else { - *jobs = NULL; - } - prs_set_offset(&buffer->prs,0); - - for (i = 0; i < num_jobs; i++) { - if (!smb_io_job_info_2("", buffer, &((*jobs)[i]), 0)) { - return False; - } - } - - return True; -} - -/********************************************************************** -**********************************************************************/ - WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, char *name, uint32 flags, uint32 level, uint32 *num_printers, PRINTER_INFO_CTR *ctr) @@ -1043,78 +989,6 @@ WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli, /********************************************************************** **********************************************************************/ -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) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENUMJOBS in; - SPOOL_R_ENUMJOBS out; - RPC_BUFFER buffer; - uint32 offered; - - ZERO_STRUCT(in); - ZERO_STRUCT(out); - - offered = 0; - if (!rpcbuf_init(&buffer, offered, mem_ctx)) - return WERR_NOMEM; - make_spoolss_q_enumjobs( &in, hnd, firstjob, num_jobs, level, - &buffer, offered ); - - CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMJOBS, - in, out, - qbuf, rbuf, - spoolss_io_q_enumjobs, - spoolss_io_r_enumjobs, - 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_enumjobs( &in, hnd, firstjob, num_jobs, level, - &buffer, offered ); - - CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMJOBS, - in, out, - qbuf, rbuf, - spoolss_io_q_enumjobs, - spoolss_io_r_enumjobs, - WERR_GENERAL_FAILURE ); - } - - if (!W_ERROR_IS_OK(out.status)) - return out.status; - - switch(level) { - case 1: - if (!decode_jobs_1(mem_ctx, out.buffer, out.returned, &ctr->job.job_info_1)) { - return WERR_GENERAL_FAILURE; - } - break; - case 2: - if (!decode_jobs_2(mem_ctx, out.buffer, out.returned, &ctr->job.job_info_2)) { - return WERR_GENERAL_FAILURE; - } - break; - default: - DEBUG(3, ("unsupported info level %d", level)); - return WERR_UNKNOWN_LEVEL; - } - - *returned = out.returned; - - return out.status; -} - -/********************************************************************** -**********************************************************************/ - WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, const char *valuename, REGISTRY_VALUE *value) diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 337121d70d..ea40fc8bae 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -1715,29 +1715,6 @@ bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct * /******************************************************************* ********************************************************************/ -bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd, - uint32 firstjob, - uint32 numofjobs, - uint32 level, - RPC_BUFFER *buffer, - uint32 offered) -{ - if (q_u == NULL) - { - return False; - } - memcpy(&q_u->handle, hnd, sizeof(q_u->handle)); - q_u->firstjob = firstjob; - q_u->numofjobs = numofjobs; - q_u->level = level; - q_u->buffer= buffer; - q_u->offered = offered; - return True; -} - -/******************************************************************* -********************************************************************/ - bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumjobs"); |