summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/spoolss.idl24
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c17
2 files changed, 37 insertions, 4 deletions
diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl
index 14cb3ed441..2c318ce4a1 100644
--- a/source4/librpc/idl/spoolss.idl
+++ b/source4/librpc/idl/spoolss.idl
@@ -58,6 +58,17 @@
} spoolss_PrinterInfo1;
typedef struct {
+ uint32 flags;
+ [relative] nstring *name;
+ uint32 width;
+ uint32 length;
+ uint32 left;
+ uint32 top;
+ uint32 right;
+ uint32 bottom;
+ } spoolss_FormInfo1;
+
+ typedef struct {
[relative] nstring *servername;
[relative] nstring *printername;
[relative] nstring *sharename;
@@ -309,7 +320,8 @@
[in,ref] policy_handle *handle,
[in] unistr formname,
[in] uint32 level,
- [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
+ [in] DATA_BLOB *buffer,
+ [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info,
[in,out,ref] uint32 *buf_size
);
@@ -318,14 +330,18 @@
WERROR spoolss_21(
);
+ typedef [nodiscriminant,public] union {
+ [case(1)] spoolss_FormInfo1 info1;
+ } spoolss_FormInfo;
+
/******************/
/* Function: 0x22 */
WERROR spoolss_EnumForms(
[in,ref] policy_handle *handle,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
- [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
- [in,out,ref] uint32 *buf_size
+ [in,out] DATA_BLOB *buffer,
+ [in,out,ref] uint32 *buf_size,
+ [out] uint32 count
);
/******************/
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index 381093a58f..6c12ab2ae5 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -40,3 +40,20 @@ NTSTATUS pull_spoolss_PrinterInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
}
return NT_STATUS_OK;
}
+
+NTSTATUS pull_spoolss_FormInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
+ uint32 level, uint32 count,
+ union spoolss_FormInfo **info)
+{
+ int i;
+ struct ndr_pull *ndr;
+ ndr = ndr_pull_init_blob(blob, mem_ctx);
+ if (!ndr) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ NDR_ALLOC_N(ndr, *info, count);
+ for (i=0;i<count;i++) {
+ NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr, NDR_SCALARS|NDR_BUFFERS, level, &(*info)[i]));
+ }
+ return NT_STATUS_OK;
+}