summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_spoolss.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-16 21:41:11 +0100
committerGünther Deschner <gd@samba.org>2009-03-17 12:18:28 +0100
commit86c25b353381179ee392841618c9ae34dca1d992 (patch)
tree9bd37863fc2c77881be45c04f46bbc56f50f6c71 /source3/rpc_client/cli_spoolss.c
parent87d97ad0422c771ea575e9a5e68d0d2e5bfe25be (diff)
downloadsamba-86c25b353381179ee392841618c9ae34dca1d992.tar.gz
samba-86c25b353381179ee392841618c9ae34dca1d992.tar.bz2
samba-86c25b353381179ee392841618c9ae34dca1d992.zip
s3-spoolss: add rpccli_spoolss_enumprinterkey convenience wrapper.
Guenther
Diffstat (limited to 'source3/rpc_client/cli_spoolss.c')
-rw-r--r--source3/rpc_client/cli_spoolss.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 66e760c6f3..696fcd1058 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -746,6 +746,45 @@ WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli,
return werror;
}
+/**********************************************************************
+ convencience wrapper around rpccli_spoolss_EnumPrinterKey
+**********************************************************************/
+
+WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ const char *key_name,
+ const char ***key_buffer,
+ uint32_t offered)
+{
+ NTSTATUS status;
+ WERROR werror;
+ uint32_t needed;
+
+ status = rpccli_spoolss_EnumPrinterKey(cli, mem_ctx,
+ handle,
+ key_name,
+ key_buffer,
+ offered,
+ &needed,
+ &werror);
+
+ if (W_ERROR_EQUAL(werror, WERR_MORE_DATA)) {
+ offered = needed;
+
+ status = rpccli_spoolss_EnumPrinterKey(cli, mem_ctx,
+ handle,
+ key_name,
+ key_buffer,
+ offered,
+ &needed,
+ &werror);
+ }
+
+ return werror;
+}
+
+
/*********************************************************************
Decode various spoolss rpc's and info levels
********************************************************************/