summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-11-16 04:25:45 +0000
committerTim Potter <tpot@samba.org>2003-11-16 04:25:45 +0000
commit1f4fe8e48603a68c4bc9ebbbee001b8e932c77ba (patch)
tree7c51938e6858d1ce344c66338a9c9115b41a5ef4
parentfc55fd3e336576fea9a1029a8f2aedc2c4c21b06 (diff)
downloadsamba-1f4fe8e48603a68c4bc9ebbbee001b8e932c77ba.tar.gz
samba-1f4fe8e48603a68c4bc9ebbbee001b8e932c77ba.tar.xz
samba-1f4fe8e48603a68c4bc9ebbbee001b8e932c77ba.zip
Commit autogenerated code for EnumPrinters and ClosePrinter.
(This used to be commit 1a0271fc3402ab7bd7bb004be8f833dfb8a1724f)
-rw-r--r--source4/librpc/ndr/ndr_spoolss.c33
-rw-r--r--source4/librpc/ndr/ndr_spoolss.h18
-rw-r--r--source4/librpc/rpc/rpc_spoolss.c16
3 files changed, 51 insertions, 16 deletions
diff --git a/source4/librpc/ndr/ndr_spoolss.c b/source4/librpc/ndr/ndr_spoolss.c
index be3082d69e9..319e2dade0e 100644
--- a/source4/librpc/ndr/ndr_spoolss.c
+++ b/source4/librpc/ndr/ndr_spoolss.c
@@ -2,8 +2,19 @@
#include "includes.h"
-NTSTATUS ndr_push_spoolss_00(struct ndr_push *ndr, struct spoolss_00 *r)
+NTSTATUS ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, struct spoolss_EnumPrinters *r)
{
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.flags));
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.server));
+ if (r->in.server) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->in.server));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.level));
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer));
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_push_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.buffer));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.offered));
return NT_STATUS_OK;
}
@@ -176,8 +187,9 @@ NTSTATUS ndr_push_spoolss_1c(struct ndr_push *ndr, struct spoolss_1c *r)
return NT_STATUS_OK;
}
-NTSTATUS ndr_push_spoolss_1d(struct ndr_push *ndr, struct spoolss_1d *r)
+NTSTATUS ndr_push_spoolss_ClosePrinter(struct ndr_push *ndr, struct spoolss_ClosePrinter *r)
{
+ NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
return NT_STATUS_OK;
}
@@ -667,8 +679,20 @@ NTSTATUS ndr_push_spoolss_5f(struct ndr_push *ndr, struct spoolss_5f *r)
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_spoolss_00(struct ndr_pull *ndr, struct spoolss_00 *r)
+NTSTATUS ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, struct spoolss_EnumPrinters *r)
{
+ uint32 _ptr_buffer;
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer));
+ if (_ptr_buffer) {
+ NDR_ALLOC(ndr, r->out.buffer);
+ } else {
+ r->out.buffer = NULL;
+ }
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_pull_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.buffer));
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->out.needed));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->out.returned));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
@@ -870,8 +894,9 @@ NTSTATUS ndr_pull_spoolss_1c(struct ndr_pull *ndr, struct spoolss_1c *r)
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_spoolss_1d(struct ndr_pull *ndr, struct spoolss_1d *r)
+NTSTATUS ndr_pull_spoolss_ClosePrinter(struct ndr_pull *ndr, struct spoolss_ClosePrinter *r)
{
+ NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
diff --git a/source4/librpc/ndr/ndr_spoolss.h b/source4/librpc/ndr/ndr_spoolss.h
index a0fa0d6e14d..dcacef337ac 100644
--- a/source4/librpc/ndr/ndr_spoolss.h
+++ b/source4/librpc/ndr/ndr_spoolss.h
@@ -1,10 +1,18 @@
/* header auto-generated by pidl */
-struct spoolss_00 {
+struct spoolss_EnumPrinters {
struct {
+ uint32 flags;
+ const char *server;
+ uint32 level;
+ struct uint8_buf *buffer;
+ uint32 offered;
} in;
struct {
+ struct uint8_buf *buffer;
+ uint32 needed;
+ uint32 returned;
NTSTATUS result;
} out;
@@ -290,11 +298,13 @@ struct spoolss_1c {
};
-struct spoolss_1d {
+struct spoolss_ClosePrinter {
struct {
+ struct policy_handle *handle;
} in;
struct {
+ struct policy_handle *handle;
NTSTATUS result;
} out;
@@ -990,7 +1000,7 @@ struct spoolss_5f {
};
-#define DCERPC_SPOOLSS_00 0
+#define DCERPC_SPOOLSS_ENUMPRINTERS 0
#define DCERPC_SPOOLSS_01 1
#define DCERPC_SPOOLSS_02 2
#define DCERPC_SPOOLSS_03 3
@@ -1019,7 +1029,7 @@ struct spoolss_5f {
#define DCERPC_SPOOLSS_1A 26
#define DCERPC_SPOOLSS_1B 27
#define DCERPC_SPOOLSS_1C 28
-#define DCERPC_SPOOLSS_1D 29
+#define DCERPC_SPOOLSS_CLOSEPRINTER 29
#define DCERPC_SPOOLSS_1E 30
#define DCERPC_SPOOLSS_1F 31
#define DCERPC_SPOOLSS_20 32
diff --git a/source4/librpc/rpc/rpc_spoolss.c b/source4/librpc/rpc/rpc_spoolss.c
index d8ec769b612..45ee3726fd2 100644
--- a/source4/librpc/rpc/rpc_spoolss.c
+++ b/source4/librpc/rpc/rpc_spoolss.c
@@ -3,12 +3,12 @@
#include "includes.h"
-NTSTATUS dcerpc_spoolss_00(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_00 *r)
+NTSTATUS dcerpc_spoolss_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_EnumPrinters *r)
{
NTSTATUS status;
- status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_00, mem_ctx,
- (ndr_push_fn_t) ndr_push_spoolss_00,
- (ndr_pull_fn_t) ndr_pull_spoolss_00,
+ status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_ENUMPRINTERS, mem_ctx,
+ (ndr_push_fn_t) ndr_push_spoolss_EnumPrinters,
+ (ndr_pull_fn_t) ndr_pull_spoolss_EnumPrinters,
r);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -409,12 +409,12 @@ NTSTATUS dcerpc_spoolss_1c(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct sp
return r->out.result;
}
-NTSTATUS dcerpc_spoolss_1d(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_1d *r)
+NTSTATUS dcerpc_spoolss_ClosePrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_ClosePrinter *r)
{
NTSTATUS status;
- status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_1D, mem_ctx,
- (ndr_push_fn_t) ndr_push_spoolss_1d,
- (ndr_pull_fn_t) ndr_pull_spoolss_1d,
+ status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_CLOSEPRINTER, mem_ctx,
+ (ndr_push_fn_t) ndr_push_spoolss_ClosePrinter,
+ (ndr_pull_fn_t) ndr_pull_spoolss_ClosePrinter,
r);
if (!NT_STATUS_IS_OK(status)) {
return status;