summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-09 18:18:35 +0100
committerGünther Deschner <gd@samba.org>2009-03-13 09:25:22 +0100
commit6928c5ce47e2ba37f844d030aa06f6b78c6ad64b (patch)
tree35e0f5a4366e0723518ca95b4671cfe2643659b2 /source3
parent7876d28d9a738768bfce6050d26d5f6c2668c28d (diff)
downloadsamba-6928c5ce47e2ba37f844d030aa06f6b78c6ad64b.tar.gz
samba-6928c5ce47e2ba37f844d030aa06f6b78c6ad64b.tar.bz2
samba-6928c5ce47e2ba37f844d030aa06f6b78c6ad64b.zip
s3-spoolss: remove old rpccli_spoolss_enumprinterdrivers wrapper.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h10
-rw-r--r--source3/rpc_client/cli_spoolss.c178
-rw-r--r--source3/rpc_parse/parse_spoolss.c20
3 files changed, 0 insertions, 208 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1aa59cb9a8..5eac7afda3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5526,11 +5526,6 @@ WERROR rpccli_spoolss_enumprinterdrivers(struct rpc_pipe_client *cli,
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);
-WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level, const char *env,
- uint32 *num_drivers,
- PRINTER_DRIVER_CTR *ctr);
WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *valuename,
REGISTRY_VALUE *value);
@@ -5880,11 +5875,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_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,
- const char *environment,
- uint32 level,
- RPC_BUFFER *buffer, uint32 offered);
bool spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth);
bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
bool spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth);
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 13ba499cdd..fa70cd8aad 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -786,99 +786,6 @@ static bool decode_printer_info_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
/**********************************************************************
**********************************************************************/
-static bool decode_printer_driver_1(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
- uint32 returned, DRIVER_INFO_1 **info)
-{
- uint32 i;
- DRIVER_INFO_1 *inf;
-
- if (returned) {
- inf=TALLOC_ARRAY(mem_ctx, DRIVER_INFO_1, returned);
- if (!inf) {
- return False;
- }
- memset(inf, 0, returned*sizeof(DRIVER_INFO_1));
- } else {
- inf = NULL;
- }
-
- prs_set_offset(&buffer->prs,0);
-
- for (i=0; i<returned; i++) {
- if (!smb_io_printer_driver_info_1("", buffer, &(inf[i]), 0)) {
- return False;
- }
- }
-
- *info=inf;
- return True;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-static bool decode_printer_driver_2(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
- uint32 returned, DRIVER_INFO_2 **info)
-{
- uint32 i;
- DRIVER_INFO_2 *inf;
-
- if (returned) {
- inf=TALLOC_ARRAY(mem_ctx, DRIVER_INFO_2, returned);
- if (!inf) {
- return False;
- }
- memset(inf, 0, returned*sizeof(DRIVER_INFO_2));
- } else {
- inf = NULL;
- }
-
- prs_set_offset(&buffer->prs,0);
-
- for (i=0; i<returned; i++) {
- if (!smb_io_printer_driver_info_2("", buffer, &(inf[i]), 0)) {
- return False;
- }
- }
-
- *info=inf;
- return True;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-static bool decode_printer_driver_3(TALLOC_CTX *mem_ctx, RPC_BUFFER *buffer,
- uint32 returned, DRIVER_INFO_3 **info)
-{
- uint32 i;
- DRIVER_INFO_3 *inf;
-
- if (returned) {
- inf=TALLOC_ARRAY(mem_ctx, DRIVER_INFO_3, returned);
- if (!inf) {
- return False;
- }
- memset(inf, 0, returned*sizeof(DRIVER_INFO_3));
- } else {
- inf = NULL;
- }
-
- prs_set_offset(&buffer->prs,0);
-
- for (i=0; i<returned; i++) {
- if (!smb_io_printer_driver_info_3("", buffer, &(inf[i]), 0)) {
- return False;
- }
- }
-
- *info=inf;
- 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)
@@ -958,91 +865,6 @@ WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level, const char *env,
- uint32 *num_drivers,
- PRINTER_DRIVER_CTR *ctr)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_ENUMPRINTERDRIVERS in;
- SPOOL_R_ENUMPRINTERDRIVERS out;
- RPC_BUFFER buffer;
- fstring server;
- uint32 offered;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- slprintf(server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
- strupper_m(server);
-
- offered = 0;
- if (!rpcbuf_init(&buffer, offered, mem_ctx))
- return WERR_NOMEM;
- make_spoolss_q_enumprinterdrivers( &in, server, env, level,
- &buffer, offered);
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPRINTERDRIVERS,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_enumprinterdrivers,
- spoolss_io_r_enumprinterdrivers,
- 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_enumprinterdrivers( &in, server, env, level,
- &buffer, offered);
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPRINTERDRIVERS,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_enumprinterdrivers,
- spoolss_io_r_enumprinterdrivers,
- WERR_GENERAL_FAILURE );
- }
-
- *num_drivers = out.returned;
-
- if ( !W_ERROR_IS_OK(out.status) )
- return out.status;
-
- if ( out.returned ) {
-
- switch (level) {
- case 1:
- if (!decode_printer_driver_1(mem_ctx, out.buffer, out.returned, &ctr->info1)) {
- return WERR_GENERAL_FAILURE;
- }
- break;
- case 2:
- if (!decode_printer_driver_2(mem_ctx, out.buffer, out.returned, &ctr->info2)) {
- return WERR_GENERAL_FAILURE;
- }
- break;
- case 3:
- if (!decode_printer_driver_3(mem_ctx, out.buffer, out.returned, &ctr->info3)) {
- return WERR_GENERAL_FAILURE;
- }
- break;
- default:
- return WERR_UNKNOWN_LEVEL;
- }
- }
-
- 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 1b47dbea3f..522c4ddbda 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -1530,26 +1530,6 @@ bool spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVER
}
/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
- const char *name,
- const char *environment,
- uint32 level,
- RPC_BUFFER *buffer, uint32 offered)
-{
- init_buf_unistr2(&q_u->name, &q_u->name_ptr, name);
- init_buf_unistr2(&q_u->environment, &q_u->environment_ptr, environment);
-
- q_u->level=level;
- q_u->buffer=buffer;
- q_u->offered=offered;
-
- return True;
-}
-
-/*******************************************************************
Parse a SPOOL_Q_ENUMPRINTERDRIVERS structure.
********************************************************************/