summaryrefslogtreecommitdiffstats
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-17 23:39:00 +0100
committerGünther Deschner <gd@samba.org>2009-03-18 01:30:18 +0100
commitab85fc78bd932aca14103352f784a4b5f2909f3a (patch)
treec7c7e50add1734b174705706834a23c177cc777a /source3/rpc_client
parent18a93e3e62f29448f34f9af84aba54eedb26fe21 (diff)
downloadsamba-ab85fc78bd932aca14103352f784a4b5f2909f3a.tar.gz
samba-ab85fc78bd932aca14103352f784a4b5f2909f3a.tar.xz
samba-ab85fc78bd932aca14103352f784a4b5f2909f3a.zip
s3-spoolss: add rpccli_spoolss_enumprinterdataex convenience wrapper.
Guenther
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_spoolss.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 9ca3ab6daec..0c9bddff287 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -784,6 +784,47 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli,
return werror;
}
+/**********************************************************************
+ convencience wrapper around rpccli_spoolss_EnumPrinterDataEx
+**********************************************************************/
+
+WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ const char *key_name,
+ uint32_t offered,
+ uint32_t *count,
+ struct spoolss_PrinterEnumValues **info)
+{
+ NTSTATUS status;
+ WERROR werror;
+ uint32_t needed;
+
+ status = rpccli_spoolss_EnumPrinterDataEx(cli, mem_ctx,
+ handle,
+ key_name,
+ offered,
+ count,
+ info,
+ &needed,
+ &werror);
+
+ if (W_ERROR_EQUAL(werror, WERR_MORE_DATA)) {
+ offered = needed;
+
+ status = rpccli_spoolss_EnumPrinterDataEx(cli, mem_ctx,
+ handle,
+ key_name,
+ offered,
+ count,
+ info,
+ &needed,
+ &werror);
+ }
+
+ return werror;
+}
+
/*********************************************************************
Decode various spoolss rpc's and info levels