summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_spoolss.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-07 22:31:19 +0100
committerGünther Deschner <gd@samba.org>2009-03-13 09:25:21 +0100
commit3bd1aabcfe02d411d30c2c62f18923368a4aba9c (patch)
tree09211c3b6a793b32ce9e957199913953d7d9e1aa /source3/rpc_client/cli_spoolss.c
parentd279e76cd22e6028fd236c5eb38bf656ece6634a (diff)
downloadsamba-3bd1aabcfe02d411d30c2c62f18923368a4aba9c.tar.gz
s3-spoolss: remove old rpccli_spoolss_enumjobs wrapper.
Guenther
Diffstat (limited to 'source3/rpc_client/cli_spoolss.c')
-rw-r--r--source3/rpc_client/cli_spoolss.c126
1 files changed, 0 insertions, 126 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 039b496b3e6..c8830acdf2f 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)