summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-29 08:26:19 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-29 08:27:58 +1000
commit66e47f393c9867c2c040b5310706f31b2bb5f314 (patch)
treec984c8ac5c32e00a982bd79ba1123578e70dd280 /librpc/gen_ndr
parent4a87ca2028fe301d1d61e5cd365df49ff1f2dd22 (diff)
downloadsamba-66e47f393c9867c2c040b5310706f31b2bb5f314.tar.gz
samba-66e47f393c9867c2c040b5310706f31b2bb5f314.tar.bz2
samba-66e47f393c9867c2c040b5310706f31b2bb5f314.zip
s4-idl: added generated files from rap.idl
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r--librpc/gen_ndr/cli_rap.c647
-rw-r--r--librpc/gen_ndr/cli_rap.h90
-rw-r--r--librpc/gen_ndr/ndr_rap.c1860
-rw-r--r--librpc/gen_ndr/ndr_rap.h50
-rw-r--r--librpc/gen_ndr/ndr_rap_c.c602
-rw-r--r--librpc/gen_ndr/ndr_rap_c.h50
-rw-r--r--librpc/gen_ndr/ndr_rap_s.c3
-rw-r--r--librpc/gen_ndr/py_rap.c4099
-rw-r--r--librpc/gen_ndr/srv_rap.c398
-rw-r--r--librpc/gen_ndr/srv_rap.h15
10 files changed, 7814 insertions, 0 deletions
diff --git a/librpc/gen_ndr/cli_rap.c b/librpc/gen_ndr/cli_rap.c
new file mode 100644
index 0000000000..ae41a03a5d
--- /dev/null
+++ b/librpc/gen_ndr/cli_rap.c
@@ -0,0 +1,647 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/cli_rap.h"
+
+struct rpccli_rap_NetShareEnum_state {
+ struct rap_NetShareEnum orig;
+ struct rap_NetShareEnum tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_rap_NetShareEnum_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_rap_NetShareEnum_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _count /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_share_info *_info /* [out] [ref,switch_is(level)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_rap_NetShareEnum_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_rap_NetShareEnum_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.level = _level;
+ state->orig.in.bufsize = _bufsize;
+
+ /* Out parameters */
+ state->orig.out.status = _status;
+ state->orig.out.convert = _convert;
+ state->orig.out.count = _count;
+ state->orig.out.available = _available;
+ state->orig.out.info = _info;
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_rap_NetShareEnum_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rap,
+ NDR_RAP_NETSHAREENUM,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_rap_NetShareEnum_done, req);
+ return req;
+}
+
+static void rpccli_rap_NetShareEnum_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_rap_NetShareEnum_state *state = tevent_req_data(
+ req, struct rpccli_rap_NetShareEnum_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ *state->orig.out.info = *state->tmp.out.info;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_rap_NetShareEnum_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_rap_NetShareEnum_state *state = tevent_req_data(
+ req, struct rpccli_rap_NetShareEnum_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_rap_NetShareEnum(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t count /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_share_info *info /* [out] [ref,switch_is(level)] */)
+{
+ struct rap_NetShareEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.level = level;
+ r.in.bufsize = bufsize;
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_rap,
+ NDR_RAP_NETSHAREENUM,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ *info = *r.out.info;
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+struct rpccli_rap_NetServerEnum2_state {
+ struct rap_NetServerEnum2 orig;
+ struct rap_NetServerEnum2 tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_rap_NetServerEnum2_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_rap_NetServerEnum2_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint32_t _servertype /* [in] */,
+ const char *_domain /* [in] [ref,charset(DOS)] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _count /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_server_info *_info /* [out] [ref,switch_is(level)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_rap_NetServerEnum2_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_rap_NetServerEnum2_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.level = _level;
+ state->orig.in.bufsize = _bufsize;
+ state->orig.in.servertype = _servertype;
+ state->orig.in.domain = _domain;
+
+ /* Out parameters */
+ state->orig.out.status = _status;
+ state->orig.out.convert = _convert;
+ state->orig.out.count = _count;
+ state->orig.out.available = _available;
+ state->orig.out.info = _info;
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_rap_NetServerEnum2_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rap,
+ NDR_RAP_NETSERVERENUM2,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_rap_NetServerEnum2_done, req);
+ return req;
+}
+
+static void rpccli_rap_NetServerEnum2_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_rap_NetServerEnum2_state *state = tevent_req_data(
+ req, struct rpccli_rap_NetServerEnum2_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ *state->orig.out.info = *state->tmp.out.info;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_rap_NetServerEnum2_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_rap_NetServerEnum2_state *state = tevent_req_data(
+ req, struct rpccli_rap_NetServerEnum2_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_rap_NetServerEnum2(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint32_t servertype /* [in] */,
+ const char *domain /* [in] [ref,charset(DOS)] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t count /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_server_info *info /* [out] [ref,switch_is(level)] */)
+{
+ struct rap_NetServerEnum2 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.level = level;
+ r.in.bufsize = bufsize;
+ r.in.servertype = servertype;
+ r.in.domain = domain;
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_rap,
+ NDR_RAP_NETSERVERENUM2,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ *info = *r.out.info;
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+struct rpccli_rap_WserverGetInfo_state {
+ struct rap_WserverGetInfo orig;
+ struct rap_WserverGetInfo tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_rap_WserverGetInfo_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_rap_WserverGetInfo_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_server_info _info /* [out] [switch_is(level)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_rap_WserverGetInfo_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_rap_WserverGetInfo_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.level = _level;
+ state->orig.in.bufsize = _bufsize;
+
+ /* Out parameters */
+ state->orig.out.status = _status;
+ state->orig.out.convert = _convert;
+ state->orig.out.available = _available;
+ state->orig.out.info = _info;
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_rap_WserverGetInfo_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rap,
+ NDR_RAP_WSERVERGETINFO,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_rap_WserverGetInfo_done, req);
+ return req;
+}
+
+static void rpccli_rap_WserverGetInfo_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_rap_WserverGetInfo_state *state = tevent_req_data(
+ req, struct rpccli_rap_WserverGetInfo_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_rap_WserverGetInfo_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_rap_WserverGetInfo_state *state = tevent_req_data(
+ req, struct rpccli_rap_WserverGetInfo_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_rap_WserverGetInfo(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_server_info info /* [out] [switch_is(level)] */)
+{
+ struct rap_WserverGetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.level = level;
+ r.in.bufsize = bufsize;
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_rap,
+ NDR_RAP_WSERVERGETINFO,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+struct rpccli_rap_NetPrintQEnum_state {
+ struct rap_NetPrintQEnum orig;
+ struct rap_NetPrintQEnum tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_rap_NetPrintQEnum_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_rap_NetPrintQEnum_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _count /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_printq_info *_info /* [out] [ref,switch_is(level)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_rap_NetPrintQEnum_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_rap_NetPrintQEnum_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.level = _level;
+ state->orig.in.bufsize = _bufsize;
+
+ /* Out parameters */
+ state->orig.out.status = _status;
+ state->orig.out.convert = _convert;
+ state->orig.out.count = _count;
+ state->orig.out.available = _available;
+ state->orig.out.info = _info;
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_rap_NetPrintQEnum_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rap,
+ NDR_RAP_NETPRINTQENUM,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_rap_NetPrintQEnum_done, req);
+ return req;
+}
+
+static void rpccli_rap_NetPrintQEnum_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_rap_NetPrintQEnum_state *state = tevent_req_data(
+ req, struct rpccli_rap_NetPrintQEnum_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ *state->orig.out.info = *state->tmp.out.info;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_rap_NetPrintQEnum_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_rap_NetPrintQEnum_state *state = tevent_req_data(
+ req, struct rpccli_rap_NetPrintQEnum_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_rap_NetPrintQEnum(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t count /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_printq_info *info /* [out] [ref,switch_is(level)] */)
+{
+ struct rap_NetPrintQEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.level = level;
+ r.in.bufsize = bufsize;
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_rap,
+ NDR_RAP_NETPRINTQENUM,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ return NT_STATUS_NOT_SUPPORTED;
+ *info = *r.out.info;
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
diff --git a/librpc/gen_ndr/cli_rap.h b/librpc/gen_ndr/cli_rap.h
new file mode 100644
index 0000000000..fd87a6b1ce
--- /dev/null
+++ b/librpc/gen_ndr/cli_rap.h
@@ -0,0 +1,90 @@
+#include "../librpc/gen_ndr/ndr_rap.h"
+#ifndef __CLI_RAP__
+#define __CLI_RAP__
+struct tevent_req *rpccli_rap_NetShareEnum_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _count /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_share_info *_info /* [out] [ref,switch_is(level)] */);
+NTSTATUS rpccli_rap_NetShareEnum_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_rap_NetShareEnum(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t count /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_share_info *info /* [out] [ref,switch_is(level)] */);
+struct tevent_req *rpccli_rap_NetServerEnum2_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint32_t _servertype /* [in] */,
+ const char *_domain /* [in] [ref,charset(DOS)] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _count /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_server_info *_info /* [out] [ref,switch_is(level)] */);
+NTSTATUS rpccli_rap_NetServerEnum2_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_rap_NetServerEnum2(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint32_t servertype /* [in] */,
+ const char *domain /* [in] [ref,charset(DOS)] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t count /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_server_info *info /* [out] [ref,switch_is(level)] */);
+struct tevent_req *rpccli_rap_WserverGetInfo_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_server_info _info /* [out] [switch_is(level)] */);
+NTSTATUS rpccli_rap_WserverGetInfo_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_rap_WserverGetInfo(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_server_info info /* [out] [switch_is(level)] */);
+struct tevent_req *rpccli_rap_NetPrintQEnum_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ uint16_t _bufsize /* [in] */,
+ uint16_t _status /* [out] */,
+ uint16_t _convert /* [out] */,
+ uint16_t _count /* [out] */,
+ uint16_t _available /* [out] */,
+ union rap_printq_info *_info /* [out] [ref,switch_is(level)] */);
+NTSTATUS rpccli_rap_NetPrintQEnum_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_rap_NetPrintQEnum(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t level /* [in] */,
+ uint16_t bufsize /* [in] */,
+ uint16_t status /* [out] */,
+ uint16_t convert /* [out] */,
+ uint16_t count /* [out] */,
+ uint16_t available /* [out] */,
+ union rap_printq_info *info /* [out] [ref,switch_is(level)] */);
+#endif /* __CLI_RAP__ */
diff --git a/librpc/gen_ndr/ndr_rap.c b/librpc/gen_ndr/ndr_rap.c
new file mode 100644
index 0000000000..aece68b165
--- /dev/null
+++ b/librpc/gen_ndr/ndr_rap.c
@@ -0,0 +1,1860 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/ndr_rap.h"
+
+static enum ndr_err_code ndr_push_rap_share_info_0(struct ndr_push *ndr, int ndr_flags, const struct rap_share_info_0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->share_name, 13));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_share_info_0(struct ndr_pull *ndr, int ndr_flags, struct rap_share_info_0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->share_name, 13));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_share_info_0(struct ndr_print *ndr, const char *name, const struct rap_share_info_0 *r)
+{
+ ndr_print_struct(ndr, name, "rap_share_info_0");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "share_name", r->share_name, 13);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_share_info_1(struct ndr_push *ndr, int ndr_flags, const struct rap_share_info_1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 5));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->share_name, 13));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved1));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->share_type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_share_info_1(struct ndr_pull *ndr, int ndr_flags, struct rap_share_info_1 *r)
+{
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 5));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->share_name, 13));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved1));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->share_type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_share_info_1(struct ndr_print *ndr, const char *name, const struct rap_share_info_1 *r)
+{
+ ndr_print_struct(ndr, name, "rap_share_info_1");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "share_name", r->share_name, 13);
+ ndr_print_uint8(ndr, "reserved1", r->reserved1);
+ ndr_print_uint16(ndr, "share_type", r->share_type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_share_info_2(struct ndr_push *ndr, int ndr_flags, const struct rap_share_info_2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 5));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->share_name, 13));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved1));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->share_type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->perms));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->maximum_users));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->active_users));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, 9));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved2));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->path) {
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_share_info_2(struct ndr_pull *ndr, int ndr_flags, struct rap_share_info_2 *r)
+{
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ uint32_t _ptr_path;
+ TALLOC_CTX *_mem_save_path_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 5));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->share_name, 13));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved1));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->share_type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->perms));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->maximum_users));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->active_users));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
+ if (_ptr_path) {
+ NDR_PULL_ALLOC(ndr, r->path);
+ } else {
+ r->path = NULL;
+ }
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, 9));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved2));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ if (r->path) {
+ _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
+ if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_share_info_2(struct ndr_print *ndr, const char *name, const struct rap_share_info_2 *r)
+{
+ ndr_print_struct(ndr, name, "rap_share_info_2");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "share_name", r->share_name, 13);
+ ndr_print_uint8(ndr, "reserved1", r->reserved1);
+ ndr_print_uint16(ndr, "share_type", r->share_type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "perms", r->perms);
+ ndr_print_uint16(ndr, "maximum_users", r->maximum_users);
+ ndr_print_uint16(ndr, "active_users", r->active_users);
+ ndr_print_ptr(ndr, "path", r->path);
+ ndr->depth++;
+ if (r->path) {
+ ndr_print_string(ndr, "path", r->path);
+ }
+ ndr->depth--;
+ ndr_print_array_uint8(ndr, "password", r->password, 9);
+ ndr_print_uint8(ndr, "reserved2", r->reserved2);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_share_info(struct ndr_push *ndr, int ndr_flags, const union rap_share_info *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_union_align(ndr, 5));
+ switch (level) {
+ case 0: {
+ NDR_CHECK(ndr_push_rap_share_info_0(ndr, NDR_SCALARS, &r->info0));
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_push_rap_share_info_1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ case 2: {
+ NDR_CHECK(ndr_push_rap_share_info_2(ndr, NDR_SCALARS, &r->info2));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_rap_share_info_1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_rap_share_info_2(ndr, NDR_BUFFERS, &r->info2));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_share_info(struct ndr_pull *ndr, int ndr_flags, union rap_share_info *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_union_align(ndr, 5));
+ switch (level) {
+ case 0: {
+ NDR_CHECK(ndr_pull_rap_share_info_0(ndr, NDR_SCALARS, &r->info0));
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_pull_rap_share_info_1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ case 2: {
+ NDR_CHECK(ndr_pull_rap_share_info_2(ndr, NDR_SCALARS, &r->info2));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_pull_rap_share_info_1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_pull_rap_share_info_2(ndr, NDR_BUFFERS, &r->info2));
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_share_info(struct ndr_print *ndr, const char *name, const union rap_share_info *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "rap_share_info");
+ switch (level) {
+ case 0:
+ ndr_print_rap_share_info_0(ndr, "info0", &r->info0);
+ break;
+
+ case 1:
+ ndr_print_rap_share_info_1(ndr, "info1", &r->info1);
+ break;
+
+ case 2:
+ ndr_print_rap_share_info_2(ndr, "info2", &r->info2);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+static enum ndr_err_code ndr_push_rap_server_info_0(struct ndr_push *ndr, int ndr_flags, const struct rap_server_info_0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->name, 16));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_server_info_0(struct ndr_pull *ndr, int ndr_flags, struct rap_server_info_0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->name, 16));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_server_info_0(struct ndr_print *ndr, const char *name, const struct rap_server_info_0 *r)
+{
+ ndr_print_struct(ndr, name, "rap_server_info_0");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "name", r->name, 16);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_server_info_1(struct ndr_push *ndr, int ndr_flags, const struct rap_server_info_1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 5));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->name, 16));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->version_major));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->version_minor));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->servertype));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_server_info_1(struct ndr_pull *ndr, int ndr_flags, struct rap_server_info_1 *r)
+{
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 5));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->name, 16));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->version_major));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->version_minor));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->servertype));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_server_info_1(struct ndr_print *ndr, const char *name, const struct rap_server_info_1 *r)
+{
+ ndr_print_struct(ndr, name, "rap_server_info_1");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "name", r->name, 16);
+ ndr_print_uint8(ndr, "version_major", r->version_major);
+ ndr_print_uint8(ndr, "version_minor", r->version_minor);
+ ndr_print_uint32(ndr, "servertype", r->servertype);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_server_info(struct ndr_push *ndr, int ndr_flags, const union rap_server_info *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_union_align(ndr, 5));
+ switch (level) {
+ case 0: {
+ NDR_CHECK(ndr_push_rap_server_info_0(ndr, NDR_SCALARS, &r->info0));
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_push_rap_server_info_1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_rap_server_info_1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_server_info(struct ndr_pull *ndr, int ndr_flags, union rap_server_info *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_union_align(ndr, 5));
+ switch (level) {
+ case 0: {
+ NDR_CHECK(ndr_pull_rap_server_info_0(ndr, NDR_SCALARS, &r->info0));
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_pull_rap_server_info_1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_pull_rap_server_info_1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_server_info(struct ndr_print *ndr, const char *name, const union rap_server_info *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "rap_server_info");
+ switch (level) {
+ case 0:
+ ndr_print_rap_server_info_0(ndr, "info0", &r->info0);
+ break;
+
+ case 1:
+ ndr_print_rap_server_info_1(ndr, "info1", &r->info1);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_rap_PrintQStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintQStatusCode r)
+{
+ NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_rap_PrintQStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintQStatusCode *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintQStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintQStatusCode r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case PRQ_ACTIVE: val = "PRQ_ACTIVE"; break;
+ case PRQ_PAUSE: val = "PRQ_PAUSE"; break;
+ case PRQ_ERROR: val = "PRQ_ERROR"; break;
+ case PRQ_PENDING: val = "PRQ_PENDING"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_rap_PrintQueue0(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintQueue0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->PrintQName, 13));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_PrintQueue0(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintQueue0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->PrintQName, 13));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintQueue0(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue0 *r)
+{
+ ndr_print_struct(ndr, name, "rap_PrintQueue0");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "PrintQName", r->PrintQName, 13);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_PrintQueue1(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintQueue1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 5));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->PrintQName, 13));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Pad1));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Priority));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->StartTime));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->UntilTime));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->SeparatorPageFilename));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->SeparatorPageFilenameHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintProcessorDllName));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintProcessorDllNameHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintDestinationsName));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintDestinationsNameHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintParameterString));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintParameterStringHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->CommentString));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->CommentStringHigh));
+ NDR_CHECK(ndr_push_rap_PrintQStatusCode(ndr, NDR_SCALARS, r->PrintQStatus));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintJobCount));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->SeparatorPageFilename) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->SeparatorPageFilename));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->SeparatorPageFilename, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->SeparatorPageFilename, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->SeparatorPageFilename, ndr_charset_length(r->SeparatorPageFilename, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->PrintProcessorDllName) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintProcessorDllName));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintProcessorDllName, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintProcessorDllName, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintProcessorDllName, ndr_charset_length(r->PrintProcessorDllName, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->PrintDestinationsName) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintDestinationsName));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintDestinationsName, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintDestinationsName, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintDestinationsName, ndr_charset_length(r->PrintDestinationsName, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->PrintParameterString) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintParameterString));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintParameterString, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintParameterString, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintParameterString, ndr_charset_length(r->PrintParameterString, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->CommentString) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->CommentString));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->CommentString, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->CommentString, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->CommentString, ndr_charset_length(r->CommentString, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_PrintQueue1(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintQueue1 *r)
+{
+ uint16_t _ptr_SeparatorPageFilename;
+ TALLOC_CTX *_mem_save_SeparatorPageFilename_0;
+ uint16_t _ptr_PrintProcessorDllName;
+ TALLOC_CTX *_mem_save_PrintProcessorDllName_0;
+ uint16_t _ptr_PrintDestinationsName;
+ TALLOC_CTX *_mem_save_PrintDestinationsName_0;
+ uint16_t _ptr_PrintParameterString;
+ TALLOC_CTX *_mem_save_PrintParameterString_0;
+ uint16_t _ptr_CommentString;
+ TALLOC_CTX *_mem_save_CommentString_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 5));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->PrintQName, 13));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad1));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Priority));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->StartTime));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UntilTime));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_SeparatorPageFilename));
+ if (_ptr_SeparatorPageFilename) {
+ NDR_PULL_ALLOC(ndr, r->SeparatorPageFilename);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->SeparatorPageFilename, _ptr_SeparatorPageFilename));
+ } else {
+ r->SeparatorPageFilename = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->SeparatorPageFilenameHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintProcessorDllName));
+ if (_ptr_PrintProcessorDllName) {
+ NDR_PULL_ALLOC(ndr, r->PrintProcessorDllName);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintProcessorDllName, _ptr_PrintProcessorDllName));
+ } else {
+ r->PrintProcessorDllName = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintProcessorDllNameHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintDestinationsName));
+ if (_ptr_PrintDestinationsName) {
+ NDR_PULL_ALLOC(ndr, r->PrintDestinationsName);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintDestinationsName, _ptr_PrintDestinationsName));
+ } else {
+ r->PrintDestinationsName = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintDestinationsNameHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintParameterString));
+ if (_ptr_PrintParameterString) {
+ NDR_PULL_ALLOC(ndr, r->PrintParameterString);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintParameterString, _ptr_PrintParameterString));
+ } else {
+ r->PrintParameterString = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintParameterStringHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_CommentString));
+ if (_ptr_CommentString) {
+ NDR_PULL_ALLOC(ndr, r->CommentString);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->CommentString, _ptr_CommentString));
+ } else {
+ r->CommentString = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->CommentStringHigh));
+ NDR_CHECK(ndr_pull_rap_PrintQStatusCode(ndr, NDR_SCALARS, &r->PrintQStatus));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintJobCount));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->SeparatorPageFilename) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->SeparatorPageFilename));
+ _mem_save_SeparatorPageFilename_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->SeparatorPageFilename, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->SeparatorPageFilename));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->SeparatorPageFilename));
+ if (ndr_get_array_length(ndr, &r->SeparatorPageFilename) > ndr_get_array_size(ndr, &r->SeparatorPageFilename)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->SeparatorPageFilename), ndr_get_array_length(ndr, &r->SeparatorPageFilename));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->SeparatorPageFilename), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->SeparatorPageFilename, ndr_get_array_length(ndr, &r->SeparatorPageFilename), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SeparatorPageFilename_0, 0);
+ }
+ if (r->PrintProcessorDllName) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintProcessorDllName));
+ _mem_save_PrintProcessorDllName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintProcessorDllName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintProcessorDllName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintProcessorDllName));
+ if (ndr_get_array_length(ndr, &r->PrintProcessorDllName) > ndr_get_array_size(ndr, &r->PrintProcessorDllName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintProcessorDllName), ndr_get_array_length(ndr, &r->PrintProcessorDllName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintProcessorDllName), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintProcessorDllName, ndr_get_array_length(ndr, &r->PrintProcessorDllName), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintProcessorDllName_0, 0);
+ }
+ if (r->PrintDestinationsName) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintDestinationsName));
+ _mem_save_PrintDestinationsName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintDestinationsName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintDestinationsName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintDestinationsName));
+ if (ndr_get_array_length(ndr, &r->PrintDestinationsName) > ndr_get_array_size(ndr, &r->PrintDestinationsName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintDestinationsName), ndr_get_array_length(ndr, &r->PrintDestinationsName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintDestinationsName), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintDestinationsName, ndr_get_array_length(ndr, &r->PrintDestinationsName), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintDestinationsName_0, 0);
+ }
+ if (r->PrintParameterString) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintParameterString));
+ _mem_save_PrintParameterString_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintParameterString, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintParameterString));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintParameterString));
+ if (ndr_get_array_length(ndr, &r->PrintParameterString) > ndr_get_array_size(ndr, &r->PrintParameterString)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintParameterString), ndr_get_array_length(ndr, &r->PrintParameterString));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintParameterString), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintParameterString, ndr_get_array_length(ndr, &r->PrintParameterString), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintParameterString_0, 0);
+ }
+ if (r->CommentString) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->CommentString));
+ _mem_save_CommentString_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->CommentString, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->CommentString));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->CommentString));
+ if (ndr_get_array_length(ndr, &r->CommentString) > ndr_get_array_size(ndr, &r->CommentString)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->CommentString), ndr_get_array_length(ndr, &r->CommentString));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->CommentString), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->CommentString, ndr_get_array_length(ndr, &r->CommentString), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_CommentString_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintQueue1(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue1 *r)
+{
+ ndr_print_struct(ndr, name, "rap_PrintQueue1");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "PrintQName", r->PrintQName, 13);
+ ndr_print_uint8(ndr, "Pad1", r->Pad1);
+ ndr_print_uint16(ndr, "Priority", r->Priority);
+ ndr_print_uint16(ndr, "StartTime", r->StartTime);
+ ndr_print_uint16(ndr, "UntilTime", r->UntilTime);
+ ndr_print_ptr(ndr, "SeparatorPageFilename", r->SeparatorPageFilename);
+ ndr->depth++;
+ if (r->SeparatorPageFilename) {
+ ndr_print_string(ndr, "SeparatorPageFilename", r->SeparatorPageFilename);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "SeparatorPageFilenameHigh", r->SeparatorPageFilenameHigh);
+ ndr_print_ptr(ndr, "PrintProcessorDllName", r->PrintProcessorDllName);
+ ndr->depth++;
+ if (r->PrintProcessorDllName) {
+ ndr_print_string(ndr, "PrintProcessorDllName", r->PrintProcessorDllName);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintProcessorDllNameHigh", r->PrintProcessorDllNameHigh);
+ ndr_print_ptr(ndr, "PrintDestinationsName", r->PrintDestinationsName);
+ ndr->depth++;
+ if (r->PrintDestinationsName) {
+ ndr_print_string(ndr, "PrintDestinationsName", r->PrintDestinationsName);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintDestinationsNameHigh", r->PrintDestinationsNameHigh);
+ ndr_print_ptr(ndr, "PrintParameterString", r->PrintParameterString);
+ ndr->depth++;
+ if (r->PrintParameterString) {
+ ndr_print_string(ndr, "PrintParameterString", r->PrintParameterString);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintParameterStringHigh", r->PrintParameterStringHigh);
+ ndr_print_ptr(ndr, "CommentString", r->CommentString);
+ ndr->depth++;
+ if (r->CommentString) {
+ ndr_print_string(ndr, "CommentString", r->CommentString);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "CommentStringHigh", r->CommentStringHigh);
+ ndr_print_rap_PrintQStatusCode(ndr, "PrintQStatus", r->PrintQStatus);
+ ndr_print_uint16(ndr, "PrintJobCount", r->PrintJobCount);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_PrintQueue2(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintQueue2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_PrintQueue2(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintQueue2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintQueue2(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue2 *r)
+{
+ ndr_print_struct(ndr, name, "rap_PrintQueue2");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_PrintQueue3(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintQueue3 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 5));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintQueueName));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintQueueNameHigh));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Priority));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->StartTime));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->UntilTime));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Pad));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->SeparatorPageFilename));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->SeparatorPageFilenameHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintProcessorDllName));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintProcessorDllNameHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintParameterString));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintParameterStringHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->CommentString));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->CommentStringHigh));
+ NDR_CHECK(ndr_push_rap_PrintQStatusCode(ndr, NDR_SCALARS, r->PrintQStatus));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintJobCount));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->Printers));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintersHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->DriverName));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->DriverNameHigh));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintDriverData));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintDriverDataHigh));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->PrintQueueName) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintQueueName));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintQueueName, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintQueueName, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintQueueName, ndr_charset_length(r->PrintQueueName, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->SeparatorPageFilename) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->SeparatorPageFilename));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->SeparatorPageFilename, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->SeparatorPageFilename, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->SeparatorPageFilename, ndr_charset_length(r->SeparatorPageFilename, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->PrintProcessorDllName) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintProcessorDllName));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintProcessorDllName, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintProcessorDllName, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintProcessorDllName, ndr_charset_length(r->PrintProcessorDllName, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->PrintParameterString) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintParameterString));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintParameterString, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintParameterString, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintParameterString, ndr_charset_length(r->PrintParameterString, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->CommentString) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->CommentString));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->CommentString, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->CommentString, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->CommentString, ndr_charset_length(r->CommentString, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->Printers) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->Printers));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->Printers, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->Printers, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->Printers, ndr_charset_length(r->Printers, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->DriverName) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->DriverName));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->DriverName, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->DriverName, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->DriverName, ndr_charset_length(r->DriverName, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (r->PrintDriverData) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintDriverData));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintDriverData, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintDriverData, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintDriverData, ndr_charset_length(r->PrintDriverData, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_PrintQueue3(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintQueue3 *r)
+{
+ uint16_t _ptr_PrintQueueName;
+ TALLOC_CTX *_mem_save_PrintQueueName_0;
+ uint16_t _ptr_SeparatorPageFilename;
+ TALLOC_CTX *_mem_save_SeparatorPageFilename_0;
+ uint16_t _ptr_PrintProcessorDllName;
+ TALLOC_CTX *_mem_save_PrintProcessorDllName_0;
+ uint16_t _ptr_PrintParameterString;
+ TALLOC_CTX *_mem_save_PrintParameterString_0;
+ uint16_t _ptr_CommentString;
+ TALLOC_CTX *_mem_save_CommentString_0;
+ uint16_t _ptr_Printers;
+ TALLOC_CTX *_mem_save_Printers_0;
+ uint16_t _ptr_DriverName;
+ TALLOC_CTX *_mem_save_DriverName_0;
+ uint16_t _ptr_PrintDriverData;
+ TALLOC_CTX *_mem_save_PrintDriverData_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 5));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintQueueName));
+ if (_ptr_PrintQueueName) {
+ NDR_PULL_ALLOC(ndr, r->PrintQueueName);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintQueueName, _ptr_PrintQueueName));
+ } else {
+ r->PrintQueueName = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintQueueNameHigh));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Priority));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->StartTime));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UntilTime));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_SeparatorPageFilename));
+ if (_ptr_SeparatorPageFilename) {
+ NDR_PULL_ALLOC(ndr, r->SeparatorPageFilename);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->SeparatorPageFilename, _ptr_SeparatorPageFilename));
+ } else {
+ r->SeparatorPageFilename = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->SeparatorPageFilenameHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintProcessorDllName));
+ if (_ptr_PrintProcessorDllName) {
+ NDR_PULL_ALLOC(ndr, r->PrintProcessorDllName);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintProcessorDllName, _ptr_PrintProcessorDllName));
+ } else {
+ r->PrintProcessorDllName = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintProcessorDllNameHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintParameterString));
+ if (_ptr_PrintParameterString) {
+ NDR_PULL_ALLOC(ndr, r->PrintParameterString);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintParameterString, _ptr_PrintParameterString));
+ } else {
+ r->PrintParameterString = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintParameterStringHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_CommentString));
+ if (_ptr_CommentString) {
+ NDR_PULL_ALLOC(ndr, r->CommentString);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->CommentString, _ptr_CommentString));
+ } else {
+ r->CommentString = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->CommentStringHigh));
+ NDR_CHECK(ndr_pull_rap_PrintQStatusCode(ndr, NDR_SCALARS, &r->PrintQStatus));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintJobCount));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_Printers));
+ if (_ptr_Printers) {
+ NDR_PULL_ALLOC(ndr, r->Printers);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->Printers, _ptr_Printers));
+ } else {
+ r->Printers = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintersHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_DriverName));
+ if (_ptr_DriverName) {
+ NDR_PULL_ALLOC(ndr, r->DriverName);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DriverName, _ptr_DriverName));
+ } else {
+ r->DriverName = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DriverNameHigh));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintDriverData));
+ if (_ptr_PrintDriverData) {
+ NDR_PULL_ALLOC(ndr, r->PrintDriverData);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintDriverData, _ptr_PrintDriverData));
+ } else {
+ r->PrintDriverData = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintDriverDataHigh));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->PrintQueueName) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintQueueName));
+ _mem_save_PrintQueueName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintQueueName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintQueueName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintQueueName));
+ if (ndr_get_array_length(ndr, &r->PrintQueueName) > ndr_get_array_size(ndr, &r->PrintQueueName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintQueueName), ndr_get_array_length(ndr, &r->PrintQueueName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintQueueName), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintQueueName, ndr_get_array_length(ndr, &r->PrintQueueName), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintQueueName_0, 0);
+ }
+ if (r->SeparatorPageFilename) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->SeparatorPageFilename));
+ _mem_save_SeparatorPageFilename_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->SeparatorPageFilename, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->SeparatorPageFilename));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->SeparatorPageFilename));
+ if (ndr_get_array_length(ndr, &r->SeparatorPageFilename) > ndr_get_array_size(ndr, &r->SeparatorPageFilename)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->SeparatorPageFilename), ndr_get_array_length(ndr, &r->SeparatorPageFilename));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->SeparatorPageFilename), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->SeparatorPageFilename, ndr_get_array_length(ndr, &r->SeparatorPageFilename), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SeparatorPageFilename_0, 0);
+ }
+ if (r->PrintProcessorDllName) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintProcessorDllName));
+ _mem_save_PrintProcessorDllName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintProcessorDllName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintProcessorDllName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintProcessorDllName));
+ if (ndr_get_array_length(ndr, &r->PrintProcessorDllName) > ndr_get_array_size(ndr, &r->PrintProcessorDllName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintProcessorDllName), ndr_get_array_length(ndr, &r->PrintProcessorDllName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintProcessorDllName), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintProcessorDllName, ndr_get_array_length(ndr, &r->PrintProcessorDllName), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintProcessorDllName_0, 0);
+ }
+ if (r->PrintParameterString) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintParameterString));
+ _mem_save_PrintParameterString_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintParameterString, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintParameterString));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintParameterString));
+ if (ndr_get_array_length(ndr, &r->PrintParameterString) > ndr_get_array_size(ndr, &r->PrintParameterString)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintParameterString), ndr_get_array_length(ndr, &r->PrintParameterString));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintParameterString), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintParameterString, ndr_get_array_length(ndr, &r->PrintParameterString), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintParameterString_0, 0);
+ }
+ if (r->CommentString) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->CommentString));
+ _mem_save_CommentString_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->CommentString, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->CommentString));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->CommentString));
+ if (ndr_get_array_length(ndr, &r->CommentString) > ndr_get_array_size(ndr, &r->CommentString)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->CommentString), ndr_get_array_length(ndr, &r->CommentString));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->CommentString), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->CommentString, ndr_get_array_length(ndr, &r->CommentString), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_CommentString_0, 0);
+ }
+ if (r->Printers) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->Printers));
+ _mem_save_Printers_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->Printers, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->Printers));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->Printers));
+ if (ndr_get_array_length(ndr, &r->Printers) > ndr_get_array_size(ndr, &r->Printers)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->Printers), ndr_get_array_length(ndr, &r->Printers));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->Printers), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Printers, ndr_get_array_length(ndr, &r->Printers), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Printers_0, 0);
+ }
+ if (r->DriverName) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DriverName));
+ _mem_save_DriverName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->DriverName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->DriverName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->DriverName));
+ if (ndr_get_array_length(ndr, &r->DriverName) > ndr_get_array_size(ndr, &r->DriverName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->DriverName), ndr_get_array_length(ndr, &r->DriverName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->DriverName), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->DriverName, ndr_get_array_length(ndr, &r->DriverName), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DriverName_0, 0);
+ }
+ if (r->PrintDriverData) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintDriverData));
+ _mem_save_PrintDriverData_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintDriverData, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintDriverData));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintDriverData));
+ if (ndr_get_array_length(ndr, &r->PrintDriverData) > ndr_get_array_size(ndr, &r->PrintDriverData)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintDriverData), ndr_get_array_length(ndr, &r->PrintDriverData));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintDriverData), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintDriverData, ndr_get_array_length(ndr, &r->PrintDriverData), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintDriverData_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintQueue3(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue3 *r)
+{
+ ndr_print_struct(ndr, name, "rap_PrintQueue3");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "PrintQueueName", r->PrintQueueName);
+ ndr->depth++;
+ if (r->PrintQueueName) {
+ ndr_print_string(ndr, "PrintQueueName", r->PrintQueueName);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintQueueNameHigh", r->PrintQueueNameHigh);
+ ndr_print_uint16(ndr, "Priority", r->Priority);
+ ndr_print_uint16(ndr, "StartTime", r->StartTime);
+ ndr_print_uint16(ndr, "UntilTime", r->UntilTime);
+ ndr_print_uint16(ndr, "Pad", r->Pad);
+ ndr_print_ptr(ndr, "SeparatorPageFilename", r->SeparatorPageFilename);
+ ndr->depth++;
+ if (r->SeparatorPageFilename) {
+ ndr_print_string(ndr, "SeparatorPageFilename", r->SeparatorPageFilename);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "SeparatorPageFilenameHigh", r->SeparatorPageFilenameHigh);
+ ndr_print_ptr(ndr, "PrintProcessorDllName", r->PrintProcessorDllName);
+ ndr->depth++;
+ if (r->PrintProcessorDllName) {
+ ndr_print_string(ndr, "PrintProcessorDllName", r->PrintProcessorDllName);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintProcessorDllNameHigh", r->PrintProcessorDllNameHigh);
+ ndr_print_ptr(ndr, "PrintParameterString", r->PrintParameterString);
+ ndr->depth++;
+ if (r->PrintParameterString) {
+ ndr_print_string(ndr, "PrintParameterString", r->PrintParameterString);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintParameterStringHigh", r->PrintParameterStringHigh);
+ ndr_print_ptr(ndr, "CommentString", r->CommentString);
+ ndr->depth++;
+ if (r->CommentString) {
+ ndr_print_string(ndr, "CommentString", r->CommentString);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "CommentStringHigh", r->CommentStringHigh);
+ ndr_print_rap_PrintQStatusCode(ndr, "PrintQStatus", r->PrintQStatus);
+ ndr_print_uint16(ndr, "PrintJobCount", r->PrintJobCount);
+ ndr_print_ptr(ndr, "Printers", r->Printers);
+ ndr->depth++;
+ if (r->Printers) {
+ ndr_print_string(ndr, "Printers", r->Printers);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintersHigh", r->PrintersHigh);
+ ndr_print_ptr(ndr, "DriverName", r->DriverName);
+ ndr->depth++;
+ if (r->DriverName) {
+ ndr_print_string(ndr, "DriverName", r->DriverName);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "DriverNameHigh", r->DriverNameHigh);
+ ndr_print_ptr(ndr, "PrintDriverData", r->PrintDriverData);
+ ndr->depth++;
+ if (r->PrintDriverData) {
+ ndr_print_string(ndr, "PrintDriverData", r->PrintDriverData);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintDriverDataHigh", r->PrintDriverDataHigh);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_PrintQueue4(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintQueue4 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_PrintQueue4(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintQueue4 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintQueue4(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue4 *r)
+{
+ ndr_print_struct(ndr, name, "rap_PrintQueue4");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_PrintQueue5(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintQueue5 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 5));
+ NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintQueueName));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintQueueNameHigh));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->PrintQueueName) {
+ NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintQueueName));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintQueueName, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintQueueName, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintQueueName, ndr_charset_length(r->PrintQueueName, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_PrintQueue5(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintQueue5 *r)
+{
+ uint16_t _ptr_PrintQueueName;
+ TALLOC_CTX *_mem_save_PrintQueueName_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 5));
+ NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintQueueName));
+ if (_ptr_PrintQueueName) {
+ NDR_PULL_ALLOC(ndr, r->PrintQueueName);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintQueueName, _ptr_PrintQueueName));
+ } else {
+ r->PrintQueueName = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintQueueNameHigh));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->PrintQueueName) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintQueueName));
+ _mem_save_PrintQueueName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->PrintQueueName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintQueueName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintQueueName));
+ if (ndr_get_array_length(ndr, &r->PrintQueueName) > ndr_get_array_size(ndr, &r->PrintQueueName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintQueueName), ndr_get_array_length(ndr, &r->PrintQueueName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintQueueName), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintQueueName, ndr_get_array_length(ndr, &r->PrintQueueName), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintQueueName_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintQueue5(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue5 *r)
+{
+ ndr_print_struct(ndr, name, "rap_PrintQueue5");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "PrintQueueName", r->PrintQueueName);
+ ndr->depth++;
+ if (r->PrintQueueName) {
+ ndr_print_string(ndr, "PrintQueueName", r->PrintQueueName);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "PrintQueueNameHigh", r->PrintQueueNameHigh);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_rap_printq_info(struct ndr_push *ndr, int ndr_flags, const union rap_printq_info *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_union_align(ndr, 5));
+ switch (level) {
+ case 0: {
+ NDR_CHECK(ndr_push_rap_PrintQueue0(ndr, NDR_SCALARS, &r->info0));
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_push_rap_PrintQueue1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ case 2: {
+ NDR_CHECK(ndr_push_rap_PrintQueue2(ndr, NDR_SCALARS, &r->info2));
+ break; }
+
+ case 3: {
+ NDR_CHECK(ndr_push_rap_PrintQueue3(ndr, NDR_SCALARS, &r->info3));
+ break; }
+
+ case 4: {
+ NDR_CHECK(ndr_push_rap_PrintQueue4(ndr, NDR_SCALARS, &r->info4));
+ break; }
+
+ case 5: {
+ NDR_CHECK(ndr_push_rap_PrintQueue5(ndr, NDR_SCALARS, &r->info5));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_rap_PrintQueue1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ case 2:
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_rap_PrintQueue3(ndr, NDR_BUFFERS, &r->info3));
+ break;
+
+ case 4:
+ break;
+
+ case 5:
+ NDR_CHECK(ndr_push_rap_PrintQueue5(ndr, NDR_BUFFERS, &r->info5));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_rap_printq_info(struct ndr_pull *ndr, int ndr_flags, union rap_printq_info *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_union_align(ndr, 5));
+ switch (level) {
+ case 0: {
+ NDR_CHECK(ndr_pull_rap_PrintQueue0(ndr, NDR_SCALARS, &r->info0));
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_pull_rap_PrintQueue1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ case 2: {
+ NDR_CHECK(ndr_pull_rap_PrintQueue2(ndr, NDR_SCALARS, &r->info2));
+ break; }
+
+ case 3: {
+ NDR_CHECK(ndr_pull_rap_PrintQueue3(ndr, NDR_SCALARS, &r->info3));
+ break; }
+
+ case 4: {
+ NDR_CHECK(ndr_pull_rap_PrintQueue4(ndr, NDR_SCALARS, &r->info4));
+ break; }
+
+ case 5: {
+ NDR_CHECK(ndr_pull_rap_PrintQueue5(ndr, NDR_SCALARS, &r->info5));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_pull_rap_PrintQueue1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ case 2:
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_pull_rap_PrintQueue3(ndr, NDR_BUFFERS, &r->info3));
+ break;
+
+ case 4:
+ break;
+
+ case 5:
+ NDR_CHECK(ndr_pull_rap_PrintQueue5(ndr, NDR_BUFFERS, &r->info5));
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_printq_info(struct ndr_print *ndr, const char *name, const union rap_printq_info *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "rap_printq_info");
+ switch (level) {
+ case 0:
+ ndr_print_rap_PrintQueue0(ndr, "info0", &r->info0);
+ break;
+
+ case 1:
+ ndr_print_rap_PrintQueue1(ndr, "info1", &r->info1);
+ break;
+
+ case 2:
+ ndr_print_rap_PrintQueue2(ndr, "info2", &r->info2);
+ break;
+
+ case 3:
+ ndr_print_rap_PrintQueue3(ndr, "info3", &r->info3);
+ break;
+
+ case 4:
+ ndr_print_rap_PrintQueue4(ndr, "info4", &r->info4);
+ break;
+
+ case 5:
+ ndr_print_rap_PrintQueue5(ndr, "info5", &r->info5);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_rap_PrintJStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintJStatusCode r)
+{
+ NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_rap_PrintJStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintJStatusCode *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_PrintJStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintJStatusCode r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case PRJ_QS_QUEUED: val = "PRJ_QS_QUEUED"; break;
+ case PRJ_QS_PAUSED: val = "PRJ_QS_PAUSED"; break;
+ case PRJ_QS_SPOOLING: val = "PRJ_QS_SPOOLING"; break;
+ case PRJ_QS_PRINTING: val = "PRJ_QS_PRINTING"; break;
+ case PRJ_QS_ERROR: val = "PRJ_QS_ERROR"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_rap_NetShareEnum(struct ndr_push *ndr, int flags, const struct rap_NetShareEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.bufsize));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.status));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.convert));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.count));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.available));
+ if (r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_rap_share_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_rap_NetShareEnum(struct ndr_pull *ndr, int flags, struct rap_NetShareEnum *r)
+{
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.bufsize));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.status));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.convert));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.count));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.available));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_rap_share_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetShareEnum *r)
+{
+ ndr_print_struct(ndr, name, "rap_NetShareEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "rap_NetShareEnum");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_uint16(ndr, "bufsize", r->in.bufsize);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "rap_NetShareEnum");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "status", r->out.status);
+ ndr_print_uint16(ndr, "convert", r->out.convert);
+ ndr_print_uint16(ndr, "count", r->out.count);
+ ndr_print_uint16(ndr, "available", r->out.available);
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_rap_share_info(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_rap_NetServerEnum2(struct ndr_push *ndr, int flags, const struct rap_NetServerEnum2 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.bufsize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servertype));
+ if (r->in.domain == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_DOS)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_DOS)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain, ndr_charset_length(r->in.domain, CH_DOS), sizeof(uint8_t), CH_DOS));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.status));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.convert));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.count));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.available));
+ if (r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_rap_server_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_rap_NetServerEnum2(struct ndr_pull *ndr, int flags, struct rap_NetServerEnum2 *r)
+{
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.bufsize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servertype));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
+ if (ndr_get_array_length(ndr, &r->in.domain) > ndr_get_array_size(ndr, &r->in.domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain), ndr_get_array_length(ndr, &r->in.domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.status));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.convert));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.count));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.available));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_rap_server_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_NetServerEnum2(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetServerEnum2 *r)
+{
+ ndr_print_struct(ndr, name, "rap_NetServerEnum2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "rap_NetServerEnum2");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_uint16(ndr, "bufsize", r->in.bufsize);
+ ndr_print_uint32(ndr, "servertype", r->in.servertype);
+ ndr_print_ptr(ndr, "domain", r->in.domain);
+ ndr->depth++;
+ ndr_print_string(ndr, "domain", r->in.domain);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "rap_NetServerEnum2");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "status", r->out.status);
+ ndr_print_uint16(ndr, "convert", r->out.convert);
+ ndr_print_uint16(ndr, "count", r->out.count);
+ ndr_print_uint16(ndr, "available", r->out.available);
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_rap_server_info(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_rap_WserverGetInfo(struct ndr_push *ndr, int flags, const struct rap_WserverGetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.bufsize));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.status));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.convert));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.available));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_rap_server_info(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_rap_WserverGetInfo(struct ndr_pull *ndr, int flags, struct rap_WserverGetInfo *r)
+{
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.bufsize));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.status));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.convert));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.available));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_rap_server_info(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_WserverGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct rap_WserverGetInfo *r)
+{
+ ndr_print_struct(ndr, name, "rap_WserverGetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "rap_WserverGetInfo");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_uint16(ndr, "bufsize", r->in.bufsize);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "rap_WserverGetInfo");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "status", r->out.status);
+ ndr_print_uint16(ndr, "convert", r->out.convert);
+ ndr_print_uint16(ndr, "available", r->out.available);
+ ndr_print_set_switch_value(ndr, &r->out.info, r->in.level);
+ ndr_print_rap_server_info(ndr, "info", &r->out.info);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_rap_NetPrintQEnum(struct ndr_push *ndr, int flags, const struct rap_NetPrintQEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.bufsize));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.status));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.convert));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.count));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.available));
+ if (r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_rap_printq_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_rap_NetPrintQEnum(struct ndr_pull *ndr, int flags, struct rap_NetPrintQEnum *r)
+{
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.bufsize));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.status));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.convert));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.count));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.available));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_rap_printq_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_rap_NetPrintQEnum(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetPrintQEnum *r)
+{
+ ndr_print_struct(ndr, name, "rap_NetPrintQEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "rap_NetPrintQEnum");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_uint16(ndr, "bufsize", r->in.bufsize);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "rap_NetPrintQEnum");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "status", r->out.status);
+ ndr_print_uint16(ndr, "convert", r->out.convert);
+ ndr_print_uint16(ndr, "count", r->out.count);
+ ndr_print_uint16(ndr, "available", r->out.available);
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_rap_printq_info(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
diff --git a/librpc/gen_ndr/ndr_rap.h b/librpc/gen_ndr/ndr_rap.h
new file mode 100644
index 0000000000..dc2293d4b3
--- /dev/null
+++ b/librpc/gen_ndr/ndr_rap.h
@@ -0,0 +1,50 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "../librpc/gen_ndr/rap.h"
+
+#ifndef _HEADER_NDR_rap
+#define _HEADER_NDR_rap
+
+#define NDR_RAP_NETSHAREENUM (0x00)
+
+#define NDR_RAP_NETSERVERENUM2 (0x01)
+
+#define NDR_RAP_WSERVERGETINFO (0x02)
+
+#define NDR_RAP_NETPRINTQENUM (0x03)
+
+#define NDR_RAP_CALL_COUNT (4)
+void ndr_print_rap_share_info_0(struct ndr_print *ndr, const char *name, const struct rap_share_info_0 *r);
+void ndr_print_rap_share_info_1(struct ndr_print *ndr, const char *name, const struct rap_share_info_1 *r);
+void ndr_print_rap_share_info_2(struct ndr_print *ndr, const char *name, const struct rap_share_info_2 *r);
+void ndr_print_rap_share_info(struct ndr_print *ndr, const char *name, const union rap_share_info *r);
+void ndr_print_rap_server_info_0(struct ndr_print *ndr, const char *name, const struct rap_server_info_0 *r);
+void ndr_print_rap_server_info_1(struct ndr_print *ndr, const char *name, const struct rap_server_info_1 *r);
+void ndr_print_rap_server_info(struct ndr_print *ndr, const char *name, const union rap_server_info *r);
+enum ndr_err_code ndr_push_rap_PrintQStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintQStatusCode r);
+enum ndr_err_code ndr_pull_rap_PrintQStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintQStatusCode *r);
+void ndr_print_rap_PrintQStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintQStatusCode r);
+void ndr_print_rap_PrintQueue0(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue0 *r);
+void ndr_print_rap_PrintQueue1(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue1 *r);
+void ndr_print_rap_PrintQueue2(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue2 *r);
+void ndr_print_rap_PrintQueue3(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue3 *r);
+void ndr_print_rap_PrintQueue4(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue4 *r);
+void ndr_print_rap_PrintQueue5(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue5 *r);
+void ndr_print_rap_printq_info(struct ndr_print *ndr, const char *name, const union rap_printq_info *r);
+enum ndr_err_code ndr_push_rap_PrintJStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintJStatusCode r);
+enum ndr_err_code ndr_pull_rap_PrintJStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintJStatusCode *r);
+void ndr_print_rap_PrintJStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintJStatusCode r);
+enum ndr_err_code ndr_push_rap_NetShareEnum(struct ndr_push *ndr, int flags, const struct rap_NetShareEnum *r);
+enum ndr_err_code ndr_pull_rap_NetShareEnum(struct ndr_pull *ndr, int flags, struct rap_NetShareEnum *r);
+void ndr_print_rap_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetShareEnum *r);
+enum ndr_err_code ndr_push_rap_NetServerEnum2(struct ndr_push *ndr, int flags, const struct rap_NetServerEnum2 *r);
+enum ndr_err_code ndr_pull_rap_NetServerEnum2(struct ndr_pull *ndr, int flags, struct rap_NetServerEnum2 *r);
+void ndr_print_rap_NetServerEnum2(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetServerEnum2 *r);
+enum ndr_err_code ndr_push_rap_WserverGetInfo(struct ndr_push *ndr, int flags, const struct rap_WserverGetInfo *r);
+enum ndr_err_code ndr_pull_rap_WserverGetInfo(struct ndr_pull *ndr, int flags, struct rap_WserverGetInfo *r);
+void ndr_print_rap_WserverGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct rap_WserverGetInfo *r);
+enum ndr_err_code ndr_push_rap_NetPrintQEnum(struct ndr_push *ndr, int flags, const struct rap_NetPrintQEnum *r);
+enum ndr_err_code ndr_pull_rap_NetPrintQEnum(struct ndr_pull *ndr, int flags, struct rap_NetPrintQEnum *r);
+void ndr_print_rap_NetPrintQEnum(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetPrintQEnum *r);
+#endif /* _HEADER_NDR_rap */
diff --git a/librpc/gen_ndr/ndr_rap_c.c b/librpc/gen_ndr/ndr_rap_c.c
new file mode 100644
index 0000000000..130a47aede
--- /dev/null
+++ b/librpc/gen_ndr/ndr_rap_c.c
@@ -0,0 +1,602 @@
+/* client functions auto-generated by pidl */
+
+#include "includes.h"
+#include <tevent.h>
+#include "lib/util/tevent_ntstatus.h"
+#include "../librpc/gen_ndr/ndr_rap.h"
+#include "../librpc/gen_ndr/ndr_rap_c.h"
+
+/* rap - client functions generated by pidl */
+
+NTSTATUS dcerpc_rap_NetShareEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetShareEnum *r)
+{
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetShareEnum, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETSHAREENUM, mem_ctx, r);
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetShareEnum, r);
+ }
+
+ return status;
+}
+
+static struct rpc_request *dcerpc_rap_NetShareEnum_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetShareEnum *r)
+{
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetShareEnum, r);
+ }
+
+ return dcerpc_ndr_request_send(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETSHAREENUM, true, mem_ctx, r);
+}
+
+static NTSTATUS dcerpc_rap_NetShareEnum_recv(struct rpc_request *rreq)
+{
+NTSTATUS status;
+ struct dcerpc_pipe *p = rreq->p;
+ struct rap_NetShareEnum *r = (struct rap_NetShareEnum *)rreq->ndr.struct_ptr;
+
+ status = dcerpc_ndr_request_recv(rreq);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetShareEnum, r);
+ }
+
+ return status;
+}
+
+struct dcerpc_rap_NetShareEnum_r_state {
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_rap_NetShareEnum_r_done(struct rpc_request *subreq);
+
+struct tevent_req *dcerpc_rap_NetShareEnum_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_NetShareEnum *r)
+{
+ struct tevent_req *req;
+ struct dcerpc_rap_NetShareEnum_r_state *state;
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+ struct rpc_request *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_rap_NetShareEnum_r_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ state->out_mem_ctx = talloc_new(state);
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ subreq = dcerpc_rap_NetShareEnum_send(p, state->out_mem_ctx, r);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ subreq->async.callback = dcerpc_rap_NetShareEnum_r_done;
+ subreq->async.private_data = req;
+
+ return req;
+}
+
+static void dcerpc_rap_NetShareEnum_r_done(struct rpc_request *subreq)
+{
+ struct tevent_req *req =
+ talloc_get_type_abort(subreq->async.private_data,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_rap_NetShareEnum_recv(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_rap_NetShareEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
+{
+ struct dcerpc_rap_NetShareEnum_r_state *state =
+ tevent_req_data(req,
+ struct dcerpc_rap_NetShareEnum_r_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS dcerpc_rap_NetShareEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_NetShareEnum *r)
+{
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetShareEnum, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETSHAREENUM, mem_ctx, r);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetShareEnum, r);
+ }
+ return status;
+}
+
+NTSTATUS dcerpc_rap_NetServerEnum2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetServerEnum2 *r)
+{
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetServerEnum2, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETSERVERENUM2, mem_ctx, r);
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetServerEnum2, r);
+ }
+
+ return status;
+}
+
+static struct rpc_request *dcerpc_rap_NetServerEnum2_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetServerEnum2 *r)
+{
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetServerEnum2, r);
+ }
+
+ return dcerpc_ndr_request_send(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETSERVERENUM2, true, mem_ctx, r);
+}
+
+static NTSTATUS dcerpc_rap_NetServerEnum2_recv(struct rpc_request *rreq)
+{
+NTSTATUS status;
+ struct dcerpc_pipe *p = rreq->p;
+ struct rap_NetServerEnum2 *r = (struct rap_NetServerEnum2 *)rreq->ndr.struct_ptr;
+
+ status = dcerpc_ndr_request_recv(rreq);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetServerEnum2, r);
+ }
+
+ return status;
+}
+
+struct dcerpc_rap_NetServerEnum2_r_state {
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_rap_NetServerEnum2_r_done(struct rpc_request *subreq);
+
+struct tevent_req *dcerpc_rap_NetServerEnum2_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_NetServerEnum2 *r)
+{
+ struct tevent_req *req;
+ struct dcerpc_rap_NetServerEnum2_r_state *state;
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+ struct rpc_request *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_rap_NetServerEnum2_r_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ state->out_mem_ctx = talloc_new(state);
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ subreq = dcerpc_rap_NetServerEnum2_send(p, state->out_mem_ctx, r);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ subreq->async.callback = dcerpc_rap_NetServerEnum2_r_done;
+ subreq->async.private_data = req;
+
+ return req;
+}
+
+static void dcerpc_rap_NetServerEnum2_r_done(struct rpc_request *subreq)
+{
+ struct tevent_req *req =
+ talloc_get_type_abort(subreq->async.private_data,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_rap_NetServerEnum2_recv(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_rap_NetServerEnum2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
+{
+ struct dcerpc_rap_NetServerEnum2_r_state *state =
+ tevent_req_data(req,
+ struct dcerpc_rap_NetServerEnum2_r_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS dcerpc_rap_NetServerEnum2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_NetServerEnum2 *r)
+{
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetServerEnum2, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETSERVERENUM2, mem_ctx, r);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetServerEnum2, r);
+ }
+ return status;
+}
+
+NTSTATUS dcerpc_rap_WserverGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_WserverGetInfo *r)
+{
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_WserverGetInfo, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_WSERVERGETINFO, mem_ctx, r);
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_WserverGetInfo, r);
+ }
+
+ return status;
+}
+
+static struct rpc_request *dcerpc_rap_WserverGetInfo_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_WserverGetInfo *r)
+{
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_WserverGetInfo, r);
+ }
+
+ return dcerpc_ndr_request_send(p, NULL, &ndr_table_rap,
+ NDR_RAP_WSERVERGETINFO, true, mem_ctx, r);
+}
+
+static NTSTATUS dcerpc_rap_WserverGetInfo_recv(struct rpc_request *rreq)
+{
+NTSTATUS status;
+ struct dcerpc_pipe *p = rreq->p;
+ struct rap_WserverGetInfo *r = (struct rap_WserverGetInfo *)rreq->ndr.struct_ptr;
+
+ status = dcerpc_ndr_request_recv(rreq);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_WserverGetInfo, r);
+ }
+
+ return status;
+}
+
+struct dcerpc_rap_WserverGetInfo_r_state {
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_rap_WserverGetInfo_r_done(struct rpc_request *subreq);
+
+struct tevent_req *dcerpc_rap_WserverGetInfo_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_WserverGetInfo *r)
+{
+ struct tevent_req *req;
+ struct dcerpc_rap_WserverGetInfo_r_state *state;
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+ struct rpc_request *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_rap_WserverGetInfo_r_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ state->out_mem_ctx = talloc_new(state);
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ subreq = dcerpc_rap_WserverGetInfo_send(p, state->out_mem_ctx, r);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ subreq->async.callback = dcerpc_rap_WserverGetInfo_r_done;
+ subreq->async.private_data = req;
+
+ return req;
+}
+
+static void dcerpc_rap_WserverGetInfo_r_done(struct rpc_request *subreq)
+{
+ struct tevent_req *req =
+ talloc_get_type_abort(subreq->async.private_data,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_rap_WserverGetInfo_recv(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_rap_WserverGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
+{
+ struct dcerpc_rap_WserverGetInfo_r_state *state =
+ tevent_req_data(req,
+ struct dcerpc_rap_WserverGetInfo_r_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS dcerpc_rap_WserverGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_WserverGetInfo *r)
+{
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_WserverGetInfo, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_WSERVERGETINFO, mem_ctx, r);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_WserverGetInfo, r);
+ }
+ return status;
+}
+
+NTSTATUS dcerpc_rap_NetPrintQEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetPrintQEnum *r)
+{
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetPrintQEnum, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETPRINTQENUM, mem_ctx, r);
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetPrintQEnum, r);
+ }
+
+ return status;
+}
+
+static struct rpc_request *dcerpc_rap_NetPrintQEnum_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetPrintQEnum *r)
+{
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetPrintQEnum, r);
+ }
+
+ return dcerpc_ndr_request_send(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETPRINTQENUM, true, mem_ctx, r);
+}
+
+static NTSTATUS dcerpc_rap_NetPrintQEnum_recv(struct rpc_request *rreq)
+{
+NTSTATUS status;
+ struct dcerpc_pipe *p = rreq->p;
+ struct rap_NetPrintQEnum *r = (struct rap_NetPrintQEnum *)rreq->ndr.struct_ptr;
+
+ status = dcerpc_ndr_request_recv(rreq);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetPrintQEnum, r);
+ }
+
+ return status;
+}
+
+struct dcerpc_rap_NetPrintQEnum_r_state {
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_rap_NetPrintQEnum_r_done(struct rpc_request *subreq);
+
+struct tevent_req *dcerpc_rap_NetPrintQEnum_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_NetPrintQEnum *r)
+{
+ struct tevent_req *req;
+ struct dcerpc_rap_NetPrintQEnum_r_state *state;
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+ struct rpc_request *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_rap_NetPrintQEnum_r_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ state->out_mem_ctx = talloc_new(state);
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ subreq = dcerpc_rap_NetPrintQEnum_send(p, state->out_mem_ctx, r);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ subreq->async.callback = dcerpc_rap_NetPrintQEnum_r_done;
+ subreq->async.private_data = req;
+
+ return req;
+}
+
+static void dcerpc_rap_NetPrintQEnum_r_done(struct rpc_request *subreq)
+{
+ struct tevent_req *req =
+ talloc_get_type_abort(subreq->async.private_data,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_rap_NetPrintQEnum_recv(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_rap_NetPrintQEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
+{
+ struct dcerpc_rap_NetPrintQEnum_r_state *state =
+ tevent_req_data(req,
+ struct dcerpc_rap_NetPrintQEnum_r_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS dcerpc_rap_NetPrintQEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_NetPrintQEnum *r)
+{
+ struct dcerpc_pipe *p =
+ talloc_get_type_abort(h->private_data,
+ struct dcerpc_pipe);
+
+
+ NTSTATUS status;
+
+ if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(rap_NetPrintQEnum, r);
+ }
+
+ status = dcerpc_ndr_request(p, NULL, &ndr_table_rap,
+ NDR_RAP_NETPRINTQENUM, mem_ctx, r);
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
+ }
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(rap_NetPrintQEnum, r);
+ }
+ return status;
+}
+
diff --git a/librpc/gen_ndr/ndr_rap_c.h b/librpc/gen_ndr/ndr_rap_c.h
new file mode 100644
index 0000000000..4ba8dfa630
--- /dev/null
+++ b/librpc/gen_ndr/ndr_rap_c.h
@@ -0,0 +1,50 @@
+#include "librpc/rpc/dcerpc.h"
+#include "../librpc/gen_ndr/rap.h"
+#ifndef _HEADER_RPC_rap
+#define _HEADER_RPC_rap
+
+
+NTSTATUS dcerpc_rap_NetShareEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetShareEnum *r);
+
+struct tevent_req *dcerpc_rap_NetShareEnum_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_NetShareEnum *r);
+
+NTSTATUS dcerpc_rap_NetShareEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+
+NTSTATUS dcerpc_rap_NetShareEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_NetShareEnum *r);
+
+NTSTATUS dcerpc_rap_NetServerEnum2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetServerEnum2 *r);
+
+struct tevent_req *dcerpc_rap_NetServerEnum2_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_NetServerEnum2 *r);
+
+NTSTATUS dcerpc_rap_NetServerEnum2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+
+NTSTATUS dcerpc_rap_NetServerEnum2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_NetServerEnum2 *r);
+
+NTSTATUS dcerpc_rap_WserverGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_WserverGetInfo *r);
+
+struct tevent_req *dcerpc_rap_WserverGetInfo_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_WserverGetInfo *r);
+
+NTSTATUS dcerpc_rap_WserverGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+
+NTSTATUS dcerpc_rap_WserverGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_WserverGetInfo *r);
+
+NTSTATUS dcerpc_rap_NetPrintQEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct rap_NetPrintQEnum *r);
+
+struct tevent_req *dcerpc_rap_NetPrintQEnum_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct rap_NetPrintQEnum *r);
+
+NTSTATUS dcerpc_rap_NetPrintQEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+
+NTSTATUS dcerpc_rap_NetPrintQEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct rap_NetPrintQEnum *r);
+#endif /* _HEADER_RPC_rap */
diff --git a/librpc/gen_ndr/ndr_rap_s.c b/librpc/gen_ndr/ndr_rap_s.c
new file mode 100644
index 0000000000..9e6207a6d7
--- /dev/null
+++ b/librpc/gen_ndr/ndr_rap_s.c
@@ -0,0 +1,3 @@
+/* server functions auto-generated by pidl */
+#include "../librpc/gen_ndr/ndr_rap.h"
+
diff --git a/librpc/gen_ndr/py_rap.c b/librpc/gen_ndr/py_rap.c
new file mode 100644
index 0000000000..e5d9c04e42
--- /dev/null
+++ b/librpc/gen_ndr/py_rap.c
@@ -0,0 +1,4099 @@
+
+/* Python wrapper functions auto-generated by pidl */
+#include <Python.h>
+#include "includes.h"
+#include "lib/talloc/pytalloc.h"
+#include "librpc/rpc/pyrpc.h"
+#include "../librpc/gen_ndr/ndr_rap.h"
+#include "../librpc/gen_ndr/ndr_rap_c.h"
+
+staticforward PyTypeObject rap_group_info_1_Type;
+staticforward PyTypeObject rap_user_info_1_Type;
+staticforward PyTypeObject rap_service_info_2_Type;
+staticforward PyTypeObject rap_share_info_0_Type;
+staticforward PyTypeObject rap_share_info_1_Type;
+staticforward PyTypeObject rap_share_info_2_Type;
+staticforward PyTypeObject rap_server_info_0_Type;
+staticforward PyTypeObject rap_server_info_1_Type;
+staticforward PyTypeObject rap_PrintQueue0_Type;
+staticforward PyTypeObject rap_PrintQueue1_Type;
+staticforward PyTypeObject rap_PrintQueue2_Type;
+staticforward PyTypeObject rap_PrintQueue3_Type;
+staticforward PyTypeObject rap_PrintQueue4_Type;
+staticforward PyTypeObject rap_PrintQueue5_Type;
+staticforward PyTypeObject rap_PrintJobInfo0_Type;
+staticforward PyTypeObject rap_PrintJobInfo1_Type;
+staticforward PyTypeObject rap_PrintJobInfo2_Type;
+staticforward PyTypeObject rap_PrintJobInfo3_Type;
+
+
+static PyObject *py_rap_group_info_1_get_group_name(PyObject *obj, void *closure)
+{
+ struct rap_group_info_1 *object = (struct rap_group_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_group_name;
+ py_group_name = PyList_New(21);
+ if (py_group_name == NULL) {
+ return NULL;
+ }
+ {
+ int group_name_cntr_0;
+ for (group_name_cntr_0 = 0; group_name_cntr_0 < 21; group_name_cntr_0++) {
+ PyObject *py_group_name_0;
+ py_group_name_0 = PyInt_FromLong(object->group_name[group_name_cntr_0]);
+ PyList_SetItem(py_group_name, group_name_cntr_0, py_group_name_0);
+ }
+ }
+ return py_group_name;
+}
+
+static int py_rap_group_info_1_set_group_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_group_info_1 *object = (struct rap_group_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int group_name_cntr_0;
+ for (group_name_cntr_0 = 0; group_name_cntr_0 < PyList_Size(value); group_name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, group_name_cntr_0), return -1;);
+ object->group_name[group_name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, group_name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_group_info_1_get_reserved1(PyObject *obj, void *closure)
+{
+ struct rap_group_info_1 *object = (struct rap_group_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_reserved1;
+ py_reserved1 = PyInt_FromLong(object->reserved1);
+ return py_reserved1;
+}
+
+static int py_rap_group_info_1_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_group_info_1 *object = (struct rap_group_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->reserved1 = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_group_info_1_get_comment(PyObject *obj, void *closure)
+{
+ struct rap_group_info_1 *object = (struct rap_group_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_comment;
+ if (object->comment == NULL) {
+ py_comment = Py_None;
+ } else {
+ py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
+ }
+ return py_comment;
+}
+
+static int py_rap_group_info_1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_group_info_1 *object = (struct rap_group_info_1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->comment = NULL;
+ } else {
+ object->comment = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->comment);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->comment = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_group_info_1_getsetters[] = {
+ { discard_const_p(char, "group_name"), py_rap_group_info_1_get_group_name, py_rap_group_info_1_set_group_name },
+ { discard_const_p(char, "reserved1"), py_rap_group_info_1_get_reserved1, py_rap_group_info_1_set_reserved1 },
+ { discard_const_p(char, "comment"), py_rap_group_info_1_get_comment, py_rap_group_info_1_set_comment },
+ { NULL }
+};
+
+static PyObject *py_rap_group_info_1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_group_info_1, type);
+}
+
+
+static PyTypeObject rap_group_info_1_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.group_info_1",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_group_info_1_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_group_info_1_new,
+};
+
+
+static PyObject *py_rap_user_info_1_get_user_name(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_user_name;
+ py_user_name = PyList_New(21);
+ if (py_user_name == NULL) {
+ return NULL;
+ }
+ {
+ int user_name_cntr_0;
+ for (user_name_cntr_0 = 0; user_name_cntr_0 < 21; user_name_cntr_0++) {
+ PyObject *py_user_name_0;
+ py_user_name_0 = PyInt_FromLong(object->user_name[user_name_cntr_0]);
+ PyList_SetItem(py_user_name, user_name_cntr_0, py_user_name_0);
+ }
+ }
+ return py_user_name;
+}
+
+static int py_rap_user_info_1_set_user_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int user_name_cntr_0;
+ for (user_name_cntr_0 = 0; user_name_cntr_0 < PyList_Size(value); user_name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, user_name_cntr_0), return -1;);
+ object->user_name[user_name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, user_name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_reserved1(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_reserved1;
+ py_reserved1 = PyInt_FromLong(object->reserved1);
+ return py_reserved1;
+}
+
+static int py_rap_user_info_1_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->reserved1 = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_passwrd(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_passwrd;
+ py_passwrd = PyList_New(16);
+ if (py_passwrd == NULL) {
+ return NULL;
+ }
+ {
+ int passwrd_cntr_0;
+ for (passwrd_cntr_0 = 0; passwrd_cntr_0 < 16; passwrd_cntr_0++) {
+ PyObject *py_passwrd_0;
+ py_passwrd_0 = PyInt_FromLong(object->passwrd[passwrd_cntr_0]);
+ PyList_SetItem(py_passwrd, passwrd_cntr_0, py_passwrd_0);
+ }
+ }
+ return py_passwrd;
+}
+
+static int py_rap_user_info_1_set_passwrd(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int passwrd_cntr_0;
+ for (passwrd_cntr_0 = 0; passwrd_cntr_0 < PyList_Size(value); passwrd_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, passwrd_cntr_0), return -1;);
+ object->passwrd[passwrd_cntr_0] = PyInt_AsLong(PyList_GetItem(value, passwrd_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_pwage(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_pwage;
+ py_pwage = PyInt_FromLong(object->pwage);
+ return py_pwage;
+}
+
+static int py_rap_user_info_1_set_pwage(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->pwage = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_priv(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_priv;
+ py_priv = PyInt_FromLong(object->priv);
+ return py_priv;
+}
+
+static int py_rap_user_info_1_set_priv(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->priv = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_home_dir(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_home_dir;
+ if (object->home_dir == NULL) {
+ py_home_dir = Py_None;
+ } else {
+ py_home_dir = PyUnicode_Decode(object->home_dir, strlen(object->home_dir), "utf-8", "ignore");
+ }
+ return py_home_dir;
+}
+
+static int py_rap_user_info_1_set_home_dir(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->home_dir = NULL;
+ } else {
+ object->home_dir = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->home_dir);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->home_dir = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_comment(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_comment;
+ if (object->comment == NULL) {
+ py_comment = Py_None;
+ } else {
+ py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
+ }
+ return py_comment;
+}
+
+static int py_rap_user_info_1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->comment = NULL;
+ } else {
+ object->comment = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->comment);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->comment = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_userflags(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_userflags;
+ py_userflags = PyInt_FromLong(object->userflags);
+ return py_userflags;
+}
+
+static int py_rap_user_info_1_set_userflags(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->userflags = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_user_info_1_get_logon_script(PyObject *obj, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_logon_script;
+ if (object->logon_script == NULL) {
+ py_logon_script = Py_None;
+ } else {
+ py_logon_script = PyUnicode_Decode(object->logon_script, strlen(object->logon_script), "utf-8", "ignore");
+ }
+ return py_logon_script;
+}
+
+static int py_rap_user_info_1_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_user_info_1 *object = (struct rap_user_info_1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->logon_script = NULL;
+ } else {
+ object->logon_script = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->logon_script);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->logon_script = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_user_info_1_getsetters[] = {
+ { discard_const_p(char, "user_name"), py_rap_user_info_1_get_user_name, py_rap_user_info_1_set_user_name },
+ { discard_const_p(char, "reserved1"), py_rap_user_info_1_get_reserved1, py_rap_user_info_1_set_reserved1 },
+ { discard_const_p(char, "passwrd"), py_rap_user_info_1_get_passwrd, py_rap_user_info_1_set_passwrd },
+ { discard_const_p(char, "pwage"), py_rap_user_info_1_get_pwage, py_rap_user_info_1_set_pwage },
+ { discard_const_p(char, "priv"), py_rap_user_info_1_get_priv, py_rap_user_info_1_set_priv },
+ { discard_const_p(char, "home_dir"), py_rap_user_info_1_get_home_dir, py_rap_user_info_1_set_home_dir },
+ { discard_const_p(char, "comment"), py_rap_user_info_1_get_comment, py_rap_user_info_1_set_comment },
+ { discard_const_p(char, "userflags"), py_rap_user_info_1_get_userflags, py_rap_user_info_1_set_userflags },
+ { discard_const_p(char, "logon_script"), py_rap_user_info_1_get_logon_script, py_rap_user_info_1_set_logon_script },
+ { NULL }
+};
+
+static PyObject *py_rap_user_info_1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_user_info_1, type);
+}
+
+
+static PyTypeObject rap_user_info_1_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.user_info_1",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_user_info_1_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_user_info_1_new,
+};
+
+
+static PyObject *py_rap_service_info_2_get_service_name(PyObject *obj, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_service_name;
+ py_service_name = PyList_New(16);
+ if (py_service_name == NULL) {
+ return NULL;
+ }
+ {
+ int service_name_cntr_0;
+ for (service_name_cntr_0 = 0; service_name_cntr_0 < 16; service_name_cntr_0++) {
+ PyObject *py_service_name_0;
+ py_service_name_0 = PyInt_FromLong(object->service_name[service_name_cntr_0]);
+ PyList_SetItem(py_service_name, service_name_cntr_0, py_service_name_0);
+ }
+ }
+ return py_service_name;
+}
+
+static int py_rap_service_info_2_set_service_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int service_name_cntr_0;
+ for (service_name_cntr_0 = 0; service_name_cntr_0 < PyList_Size(value); service_name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, service_name_cntr_0), return -1;);
+ object->service_name[service_name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, service_name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_service_info_2_get_status(PyObject *obj, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_status;
+ py_status = PyInt_FromLong(object->status);
+ return py_status;
+}
+
+static int py_rap_service_info_2_set_status(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->status = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_service_info_2_get_installcode(PyObject *obj, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_installcode;
+ py_installcode = PyInt_FromLong(object->installcode);
+ return py_installcode;
+}
+
+static int py_rap_service_info_2_set_installcode(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->installcode = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_service_info_2_get_process_num(PyObject *obj, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_process_num;
+ py_process_num = PyInt_FromLong(object->process_num);
+ return py_process_num;
+}
+
+static int py_rap_service_info_2_set_process_num(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->process_num = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_service_info_2_get_comment(PyObject *obj, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_comment;
+ if (object->comment == NULL) {
+ py_comment = Py_None;
+ } else {
+ py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
+ }
+ return py_comment;
+}
+
+static int py_rap_service_info_2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_service_info_2 *object = (struct rap_service_info_2 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->comment = NULL;
+ } else {
+ object->comment = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->comment);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->comment = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_service_info_2_getsetters[] = {
+ { discard_const_p(char, "service_name"), py_rap_service_info_2_get_service_name, py_rap_service_info_2_set_service_name },
+ { discard_const_p(char, "status"), py_rap_service_info_2_get_status, py_rap_service_info_2_set_status },
+ { discard_const_p(char, "installcode"), py_rap_service_info_2_get_installcode, py_rap_service_info_2_set_installcode },
+ { discard_const_p(char, "process_num"), py_rap_service_info_2_get_process_num, py_rap_service_info_2_set_process_num },
+ { discard_const_p(char, "comment"), py_rap_service_info_2_get_comment, py_rap_service_info_2_set_comment },
+ { NULL }
+};
+
+static PyObject *py_rap_service_info_2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_service_info_2, type);
+}
+
+
+static PyTypeObject rap_service_info_2_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.service_info_2",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_service_info_2_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_service_info_2_new,
+};
+
+
+static PyObject *py_rap_share_info_0_get_share_name(PyObject *obj, void *closure)
+{
+ struct rap_share_info_0 *object = (struct rap_share_info_0 *)py_talloc_get_ptr(obj);
+ PyObject *py_share_name;
+ py_share_name = PyList_New(13);
+ if (py_share_name == NULL) {
+ return NULL;
+ }
+ {
+ int share_name_cntr_0;
+ for (share_name_cntr_0 = 0; share_name_cntr_0 < 13; share_name_cntr_0++) {
+ PyObject *py_share_name_0;
+ py_share_name_0 = PyInt_FromLong(object->share_name[share_name_cntr_0]);
+ PyList_SetItem(py_share_name, share_name_cntr_0, py_share_name_0);
+ }
+ }
+ return py_share_name;
+}
+
+static int py_rap_share_info_0_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_0 *object = (struct rap_share_info_0 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int share_name_cntr_0;
+ for (share_name_cntr_0 = 0; share_name_cntr_0 < PyList_Size(value); share_name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, share_name_cntr_0), return -1;);
+ object->share_name[share_name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, share_name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_share_info_0_getsetters[] = {
+ { discard_const_p(char, "share_name"), py_rap_share_info_0_get_share_name, py_rap_share_info_0_set_share_name },
+ { NULL }
+};
+
+static PyObject *py_rap_share_info_0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_share_info_0, type);
+}
+
+
+static PyTypeObject rap_share_info_0_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.share_info_0",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_share_info_0_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_share_info_0_new,
+};
+
+
+static PyObject *py_rap_share_info_1_get_share_name(PyObject *obj, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_share_name;
+ py_share_name = PyList_New(13);
+ if (py_share_name == NULL) {
+ return NULL;
+ }
+ {
+ int share_name_cntr_0;
+ for (share_name_cntr_0 = 0; share_name_cntr_0 < 13; share_name_cntr_0++) {
+ PyObject *py_share_name_0;
+ py_share_name_0 = PyInt_FromLong(object->share_name[share_name_cntr_0]);
+ PyList_SetItem(py_share_name, share_name_cntr_0, py_share_name_0);
+ }
+ }
+ return py_share_name;
+}
+
+static int py_rap_share_info_1_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int share_name_cntr_0;
+ for (share_name_cntr_0 = 0; share_name_cntr_0 < PyList_Size(value); share_name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, share_name_cntr_0), return -1;);
+ object->share_name[share_name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, share_name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_share_info_1_get_reserved1(PyObject *obj, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_reserved1;
+ py_reserved1 = PyInt_FromLong(object->reserved1);
+ return py_reserved1;
+}
+
+static int py_rap_share_info_1_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->reserved1 = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_share_info_1_get_share_type(PyObject *obj, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_share_type;
+ py_share_type = PyInt_FromLong(object->share_type);
+ return py_share_type;
+}
+
+static int py_rap_share_info_1_set_share_type(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->share_type = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_share_info_1_get_comment(PyObject *obj, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_comment;
+ if (object->comment == NULL) {
+ py_comment = Py_None;
+ } else {
+ py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
+ }
+ return py_comment;
+}
+
+static int py_rap_share_info_1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_1 *object = (struct rap_share_info_1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->comment = NULL;
+ } else {
+ object->comment = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->comment);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->comment = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_share_info_1_getsetters[] = {
+ { discard_const_p(char, "share_name"), py_rap_share_info_1_get_share_name, py_rap_share_info_1_set_share_name },
+ { discard_const_p(char, "reserved1"), py_rap_share_info_1_get_reserved1, py_rap_share_info_1_set_reserved1 },
+ { discard_const_p(char, "share_type"), py_rap_share_info_1_get_share_type, py_rap_share_info_1_set_share_type },
+ { discard_const_p(char, "comment"), py_rap_share_info_1_get_comment, py_rap_share_info_1_set_comment },
+ { NULL }
+};
+
+static PyObject *py_rap_share_info_1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_share_info_1, type);
+}
+
+
+static PyTypeObject rap_share_info_1_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.share_info_1",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_share_info_1_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_share_info_1_new,
+};
+
+
+static PyObject *py_rap_share_info_2_get_share_name(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_share_name;
+ py_share_name = PyList_New(13);
+ if (py_share_name == NULL) {
+ return NULL;
+ }
+ {
+ int share_name_cntr_0;
+ for (share_name_cntr_0 = 0; share_name_cntr_0 < 13; share_name_cntr_0++) {
+ PyObject *py_share_name_0;
+ py_share_name_0 = PyInt_FromLong(object->share_name[share_name_cntr_0]);
+ PyList_SetItem(py_share_name, share_name_cntr_0, py_share_name_0);
+ }
+ }
+ return py_share_name;
+}
+
+static int py_rap_share_info_2_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int share_name_cntr_0;
+ for (share_name_cntr_0 = 0; share_name_cntr_0 < PyList_Size(value); share_name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, share_name_cntr_0), return -1;);
+ object->share_name[share_name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, share_name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_reserved1(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_reserved1;
+ py_reserved1 = PyInt_FromLong(object->reserved1);
+ return py_reserved1;
+}
+
+static int py_rap_share_info_2_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->reserved1 = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_share_type(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_share_type;
+ py_share_type = PyInt_FromLong(object->share_type);
+ return py_share_type;
+}
+
+static int py_rap_share_info_2_set_share_type(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->share_type = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_comment(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_comment;
+ if (object->comment == NULL) {
+ py_comment = Py_None;
+ } else {
+ py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
+ }
+ return py_comment;
+}
+
+static int py_rap_share_info_2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->comment = NULL;
+ } else {
+ object->comment = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->comment);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->comment = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_perms(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_perms;
+ py_perms = PyInt_FromLong(object->perms);
+ return py_perms;
+}
+
+static int py_rap_share_info_2_set_perms(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->perms = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_maximum_users(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_maximum_users;
+ py_maximum_users = PyInt_FromLong(object->maximum_users);
+ return py_maximum_users;
+}
+
+static int py_rap_share_info_2_set_maximum_users(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->maximum_users = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_active_users(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_active_users;
+ py_active_users = PyInt_FromLong(object->active_users);
+ return py_active_users;
+}
+
+static int py_rap_share_info_2_set_active_users(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->active_users = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_path(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_path;
+ if (object->path == NULL) {
+ py_path = Py_None;
+ } else {
+ py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
+ }
+ return py_path;
+}
+
+static int py_rap_share_info_2_set_path(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->path = NULL;
+ } else {
+ object->path = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->path);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->path = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_password(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_password;
+ py_password = PyList_New(9);
+ if (py_password == NULL) {
+ return NULL;
+ }
+ {
+ int password_cntr_0;
+ for (password_cntr_0 = 0; password_cntr_0 < 9; password_cntr_0++) {
+ PyObject *py_password_0;
+ py_password_0 = PyInt_FromLong(object->password[password_cntr_0]);
+ PyList_SetItem(py_password, password_cntr_0, py_password_0);
+ }
+ }
+ return py_password;
+}
+
+static int py_rap_share_info_2_set_password(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int password_cntr_0;
+ for (password_cntr_0 = 0; password_cntr_0 < PyList_Size(value); password_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, password_cntr_0), return -1;);
+ object->password[password_cntr_0] = PyInt_AsLong(PyList_GetItem(value, password_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_share_info_2_get_reserved2(PyObject *obj, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(obj);
+ PyObject *py_reserved2;
+ py_reserved2 = PyInt_FromLong(object->reserved2);
+ return py_reserved2;
+}
+
+static int py_rap_share_info_2_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_share_info_2 *object = (struct rap_share_info_2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->reserved2 = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_share_info_2_getsetters[] = {
+ { discard_const_p(char, "share_name"), py_rap_share_info_2_get_share_name, py_rap_share_info_2_set_share_name },
+ { discard_const_p(char, "reserved1"), py_rap_share_info_2_get_reserved1, py_rap_share_info_2_set_reserved1 },
+ { discard_const_p(char, "share_type"), py_rap_share_info_2_get_share_type, py_rap_share_info_2_set_share_type },
+ { discard_const_p(char, "comment"), py_rap_share_info_2_get_comment, py_rap_share_info_2_set_comment },
+ { discard_const_p(char, "perms"), py_rap_share_info_2_get_perms, py_rap_share_info_2_set_perms },
+ { discard_const_p(char, "maximum_users"), py_rap_share_info_2_get_maximum_users, py_rap_share_info_2_set_maximum_users },
+ { discard_const_p(char, "active_users"), py_rap_share_info_2_get_active_users, py_rap_share_info_2_set_active_users },
+ { discard_const_p(char, "path"), py_rap_share_info_2_get_path, py_rap_share_info_2_set_path },
+ { discard_const_p(char, "password"), py_rap_share_info_2_get_password, py_rap_share_info_2_set_password },
+ { discard_const_p(char, "reserved2"), py_rap_share_info_2_get_reserved2, py_rap_share_info_2_set_reserved2 },
+ { NULL }
+};
+
+static PyObject *py_rap_share_info_2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_share_info_2, type);
+}
+
+
+static PyTypeObject rap_share_info_2_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.share_info_2",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_share_info_2_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_share_info_2_new,
+};
+
+PyObject *py_import_rap_share_info(TALLOC_CTX *mem_ctx, int level, union rap_share_info *in)
+{
+ PyObject *ret;
+
+ switch (level) {
+ case 0:
+ ret = py_talloc_reference_ex(&rap_share_info_0_Type, mem_ctx, &in->info0);
+ return ret;
+
+ case 1:
+ ret = py_talloc_reference_ex(&rap_share_info_1_Type, mem_ctx, &in->info1);
+ return ret;
+
+ case 2:
+ ret = py_talloc_reference_ex(&rap_share_info_2_Type, mem_ctx, &in->info2);
+ return ret;
+
+ }
+ PyErr_SetString(PyExc_TypeError, "unknown union level");
+ return NULL;
+}
+
+union rap_share_info *py_export_rap_share_info(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+{
+ union rap_share_info *ret = talloc_zero(mem_ctx, union rap_share_info);
+ switch (level) {
+ case 0:
+ PY_CHECK_TYPE(&rap_share_info_0_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info0, (struct rap_share_info_0 *)py_talloc_get_ptr(in), sizeof(ret->info0));
+ break;
+
+ case 1:
+ PY_CHECK_TYPE(&rap_share_info_1_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info1, (struct rap_share_info_1 *)py_talloc_get_ptr(in), sizeof(ret->info1));
+ break;
+
+ case 2:
+ PY_CHECK_TYPE(&rap_share_info_2_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info2, (struct rap_share_info_2 *)py_talloc_get_ptr(in), sizeof(ret->info2));
+ break;
+
+ default:
+ PyErr_SetString(PyExc_TypeError, "invalid union level value");
+ talloc_free(ret);
+ ret = NULL;
+ }
+
+ return ret;
+}
+
+
+static PyObject *py_rap_server_info_0_get_name(PyObject *obj, void *closure)
+{
+ struct rap_server_info_0 *object = (struct rap_server_info_0 *)py_talloc_get_ptr(obj);
+ PyObject *py_name;
+ py_name = PyList_New(16);
+ if (py_name == NULL) {
+ return NULL;
+ }
+ {
+ int name_cntr_0;
+ for (name_cntr_0 = 0; name_cntr_0 < 16; name_cntr_0++) {
+ PyObject *py_name_0;
+ py_name_0 = PyInt_FromLong(object->name[name_cntr_0]);
+ PyList_SetItem(py_name, name_cntr_0, py_name_0);
+ }
+ }
+ return py_name;
+}
+
+static int py_rap_server_info_0_set_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_server_info_0 *object = (struct rap_server_info_0 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int name_cntr_0;
+ for (name_cntr_0 = 0; name_cntr_0 < PyList_Size(value); name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, name_cntr_0), return -1;);
+ object->name[name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_server_info_0_getsetters[] = {
+ { discard_const_p(char, "name"), py_rap_server_info_0_get_name, py_rap_server_info_0_set_name },
+ { NULL }
+};
+
+static PyObject *py_rap_server_info_0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_server_info_0, type);
+}
+
+
+static PyTypeObject rap_server_info_0_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.server_info_0",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_server_info_0_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_server_info_0_new,
+};
+
+
+static PyObject *py_rap_server_info_1_get_name(PyObject *obj, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_name;
+ py_name = PyList_New(16);
+ if (py_name == NULL) {
+ return NULL;
+ }
+ {
+ int name_cntr_0;
+ for (name_cntr_0 = 0; name_cntr_0 < 16; name_cntr_0++) {
+ PyObject *py_name_0;
+ py_name_0 = PyInt_FromLong(object->name[name_cntr_0]);
+ PyList_SetItem(py_name, name_cntr_0, py_name_0);
+ }
+ }
+ return py_name;
+}
+
+static int py_rap_server_info_1_set_name(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int name_cntr_0;
+ for (name_cntr_0 = 0; name_cntr_0 < PyList_Size(value); name_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, name_cntr_0), return -1;);
+ object->name[name_cntr_0] = PyInt_AsLong(PyList_GetItem(value, name_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_server_info_1_get_version_major(PyObject *obj, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_version_major;
+ py_version_major = PyInt_FromLong(object->version_major);
+ return py_version_major;
+}
+
+static int py_rap_server_info_1_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->version_major = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_server_info_1_get_version_minor(PyObject *obj, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_version_minor;
+ py_version_minor = PyInt_FromLong(object->version_minor);
+ return py_version_minor;
+}
+
+static int py_rap_server_info_1_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->version_minor = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_server_info_1_get_servertype(PyObject *obj, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_servertype;
+ py_servertype = PyInt_FromLong(object->servertype);
+ return py_servertype;
+}
+
+static int py_rap_server_info_1_set_servertype(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->servertype = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_server_info_1_get_comment(PyObject *obj, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(obj);
+ PyObject *py_comment;
+ if (object->comment == NULL) {
+ py_comment = Py_None;
+ } else {
+ py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
+ }
+ return py_comment;
+}
+
+static int py_rap_server_info_1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_server_info_1 *object = (struct rap_server_info_1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->comment = NULL;
+ } else {
+ object->comment = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->comment);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->comment = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_server_info_1_getsetters[] = {
+ { discard_const_p(char, "name"), py_rap_server_info_1_get_name, py_rap_server_info_1_set_name },
+ { discard_const_p(char, "version_major"), py_rap_server_info_1_get_version_major, py_rap_server_info_1_set_version_major },
+ { discard_const_p(char, "version_minor"), py_rap_server_info_1_get_version_minor, py_rap_server_info_1_set_version_minor },
+ { discard_const_p(char, "servertype"), py_rap_server_info_1_get_servertype, py_rap_server_info_1_set_servertype },
+ { discard_const_p(char, "comment"), py_rap_server_info_1_get_comment, py_rap_server_info_1_set_comment },
+ { NULL }
+};
+
+static PyObject *py_rap_server_info_1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_server_info_1, type);
+}
+
+
+static PyTypeObject rap_server_info_1_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.server_info_1",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_server_info_1_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_server_info_1_new,
+};
+
+PyObject *py_import_rap_server_info(TALLOC_CTX *mem_ctx, int level, union rap_server_info *in)
+{
+ PyObject *ret;
+
+ switch (level) {
+ case 0:
+ ret = py_talloc_reference_ex(&rap_server_info_0_Type, mem_ctx, &in->info0);
+ return ret;
+
+ case 1:
+ ret = py_talloc_reference_ex(&rap_server_info_1_Type, mem_ctx, &in->info1);
+ return ret;
+
+ }
+ PyErr_SetString(PyExc_TypeError, "unknown union level");
+ return NULL;
+}
+
+union rap_server_info *py_export_rap_server_info(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+{
+ union rap_server_info *ret = talloc_zero(mem_ctx, union rap_server_info);
+ switch (level) {
+ case 0:
+ PY_CHECK_TYPE(&rap_server_info_0_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info0, (struct rap_server_info_0 *)py_talloc_get_ptr(in), sizeof(ret->info0));
+ break;
+
+ case 1:
+ PY_CHECK_TYPE(&rap_server_info_1_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info1, (struct rap_server_info_1 *)py_talloc_get_ptr(in), sizeof(ret->info1));
+ break;
+
+ default:
+ PyErr_SetString(PyExc_TypeError, "invalid union level value");
+ talloc_free(ret);
+ ret = NULL;
+ }
+
+ return ret;
+}
+
+
+static PyObject *py_rap_PrintQueue0_get_PrintQName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue0 *object = (struct rap_PrintQueue0 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQName;
+ py_PrintQName = PyList_New(13);
+ if (py_PrintQName == NULL) {
+ return NULL;
+ }
+ {
+ int PrintQName_cntr_0;
+ for (PrintQName_cntr_0 = 0; PrintQName_cntr_0 < 13; PrintQName_cntr_0++) {
+ PyObject *py_PrintQName_0;
+ py_PrintQName_0 = PyInt_FromLong(object->PrintQName[PrintQName_cntr_0]);
+ PyList_SetItem(py_PrintQName, PrintQName_cntr_0, py_PrintQName_0);
+ }
+ }
+ return py_PrintQName;
+}
+
+static int py_rap_PrintQueue0_set_PrintQName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue0 *object = (struct rap_PrintQueue0 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int PrintQName_cntr_0;
+ for (PrintQName_cntr_0 = 0; PrintQName_cntr_0 < PyList_Size(value); PrintQName_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, PrintQName_cntr_0), return -1;);
+ object->PrintQName[PrintQName_cntr_0] = PyInt_AsLong(PyList_GetItem(value, PrintQName_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintQueue0_getsetters[] = {
+ { discard_const_p(char, "PrintQName"), py_rap_PrintQueue0_get_PrintQName, py_rap_PrintQueue0_set_PrintQName },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintQueue0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintQueue0, type);
+}
+
+
+static PyTypeObject rap_PrintQueue0_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintQueue0",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintQueue0_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintQueue0_new,
+};
+
+
+static PyObject *py_rap_PrintQueue1_get_PrintQName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQName;
+ py_PrintQName = PyList_New(13);
+ if (py_PrintQName == NULL) {
+ return NULL;
+ }
+ {
+ int PrintQName_cntr_0;
+ for (PrintQName_cntr_0 = 0; PrintQName_cntr_0 < 13; PrintQName_cntr_0++) {
+ PyObject *py_PrintQName_0;
+ py_PrintQName_0 = PyInt_FromLong(object->PrintQName[PrintQName_cntr_0]);
+ PyList_SetItem(py_PrintQName, PrintQName_cntr_0, py_PrintQName_0);
+ }
+ }
+ return py_PrintQName;
+}
+
+static int py_rap_PrintQueue1_set_PrintQName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int PrintQName_cntr_0;
+ for (PrintQName_cntr_0 = 0; PrintQName_cntr_0 < PyList_Size(value); PrintQName_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, PrintQName_cntr_0), return -1;);
+ object->PrintQName[PrintQName_cntr_0] = PyInt_AsLong(PyList_GetItem(value, PrintQName_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_Pad1(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_Pad1;
+ py_Pad1 = PyInt_FromLong(object->Pad1);
+ return py_Pad1;
+}
+
+static int py_rap_PrintQueue1_set_Pad1(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->Pad1 = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_Priority(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_Priority;
+ py_Priority = PyInt_FromLong(object->Priority);
+ return py_Priority;
+}
+
+static int py_rap_PrintQueue1_set_Priority(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->Priority = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_StartTime(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_StartTime;
+ py_StartTime = PyInt_FromLong(object->StartTime);
+ return py_StartTime;
+}
+
+static int py_rap_PrintQueue1_set_StartTime(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->StartTime = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_UntilTime(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_UntilTime;
+ py_UntilTime = PyInt_FromLong(object->UntilTime);
+ return py_UntilTime;
+}
+
+static int py_rap_PrintQueue1_set_UntilTime(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->UntilTime = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_SeparatorPageFilename(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_SeparatorPageFilename;
+ if (object->SeparatorPageFilename == NULL) {
+ py_SeparatorPageFilename = Py_None;
+ } else {
+ py_SeparatorPageFilename = PyUnicode_Decode(object->SeparatorPageFilename, strlen(object->SeparatorPageFilename), "utf-8", "ignore");
+ }
+ return py_SeparatorPageFilename;
+}
+
+static int py_rap_PrintQueue1_set_SeparatorPageFilename(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->SeparatorPageFilename = NULL;
+ } else {
+ object->SeparatorPageFilename = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->SeparatorPageFilename);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->SeparatorPageFilename = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_SeparatorPageFilenameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_SeparatorPageFilenameHigh;
+ py_SeparatorPageFilenameHigh = PyInt_FromLong(object->SeparatorPageFilenameHigh);
+ return py_SeparatorPageFilenameHigh;
+}
+
+static int py_rap_PrintQueue1_set_SeparatorPageFilenameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->SeparatorPageFilenameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintProcessorDllName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorDllName;
+ if (object->PrintProcessorDllName == NULL) {
+ py_PrintProcessorDllName = Py_None;
+ } else {
+ py_PrintProcessorDllName = PyUnicode_Decode(object->PrintProcessorDllName, strlen(object->PrintProcessorDllName), "utf-8", "ignore");
+ }
+ return py_PrintProcessorDllName;
+}
+
+static int py_rap_PrintQueue1_set_PrintProcessorDllName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintProcessorDllName = NULL;
+ } else {
+ object->PrintProcessorDllName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintProcessorDllName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintProcessorDllName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintProcessorDllNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorDllNameHigh;
+ py_PrintProcessorDllNameHigh = PyInt_FromLong(object->PrintProcessorDllNameHigh);
+ return py_PrintProcessorDllNameHigh;
+}
+
+static int py_rap_PrintQueue1_set_PrintProcessorDllNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintProcessorDllNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintDestinationsName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintDestinationsName;
+ if (object->PrintDestinationsName == NULL) {
+ py_PrintDestinationsName = Py_None;
+ } else {
+ py_PrintDestinationsName = PyUnicode_Decode(object->PrintDestinationsName, strlen(object->PrintDestinationsName), "utf-8", "ignore");
+ }
+ return py_PrintDestinationsName;
+}
+
+static int py_rap_PrintQueue1_set_PrintDestinationsName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintDestinationsName = NULL;
+ } else {
+ object->PrintDestinationsName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintDestinationsName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintDestinationsName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintDestinationsNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintDestinationsNameHigh;
+ py_PrintDestinationsNameHigh = PyInt_FromLong(object->PrintDestinationsNameHigh);
+ return py_PrintDestinationsNameHigh;
+}
+
+static int py_rap_PrintQueue1_set_PrintDestinationsNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintDestinationsNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintParameterString(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterString;
+ if (object->PrintParameterString == NULL) {
+ py_PrintParameterString = Py_None;
+ } else {
+ py_PrintParameterString = PyUnicode_Decode(object->PrintParameterString, strlen(object->PrintParameterString), "utf-8", "ignore");
+ }
+ return py_PrintParameterString;
+}
+
+static int py_rap_PrintQueue1_set_PrintParameterString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintParameterString = NULL;
+ } else {
+ object->PrintParameterString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintParameterString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintParameterString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintParameterStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterStringHigh;
+ py_PrintParameterStringHigh = PyInt_FromLong(object->PrintParameterStringHigh);
+ return py_PrintParameterStringHigh;
+}
+
+static int py_rap_PrintQueue1_set_PrintParameterStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintParameterStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_CommentString(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_CommentString;
+ if (object->CommentString == NULL) {
+ py_CommentString = Py_None;
+ } else {
+ py_CommentString = PyUnicode_Decode(object->CommentString, strlen(object->CommentString), "utf-8", "ignore");
+ }
+ return py_CommentString;
+}
+
+static int py_rap_PrintQueue1_set_CommentString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->CommentString = NULL;
+ } else {
+ object->CommentString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->CommentString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->CommentString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_CommentStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_CommentStringHigh;
+ py_CommentStringHigh = PyInt_FromLong(object->CommentStringHigh);
+ return py_CommentStringHigh;
+}
+
+static int py_rap_PrintQueue1_set_CommentStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->CommentStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintQStatus(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQStatus;
+ py_PrintQStatus = PyInt_FromLong(object->PrintQStatus);
+ return py_PrintQStatus;
+}
+
+static int py_rap_PrintQueue1_set_PrintQStatus(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintQStatus = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue1_get_PrintJobCount(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintJobCount;
+ py_PrintJobCount = PyInt_FromLong(object->PrintJobCount);
+ return py_PrintJobCount;
+}
+
+static int py_rap_PrintQueue1_set_PrintJobCount(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue1 *object = (struct rap_PrintQueue1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintJobCount = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintQueue1_getsetters[] = {
+ { discard_const_p(char, "PrintQName"), py_rap_PrintQueue1_get_PrintQName, py_rap_PrintQueue1_set_PrintQName },
+ { discard_const_p(char, "Pad1"), py_rap_PrintQueue1_get_Pad1, py_rap_PrintQueue1_set_Pad1 },
+ { discard_const_p(char, "Priority"), py_rap_PrintQueue1_get_Priority, py_rap_PrintQueue1_set_Priority },
+ { discard_const_p(char, "StartTime"), py_rap_PrintQueue1_get_StartTime, py_rap_PrintQueue1_set_StartTime },
+ { discard_const_p(char, "UntilTime"), py_rap_PrintQueue1_get_UntilTime, py_rap_PrintQueue1_set_UntilTime },
+ { discard_const_p(char, "SeparatorPageFilename"), py_rap_PrintQueue1_get_SeparatorPageFilename, py_rap_PrintQueue1_set_SeparatorPageFilename },
+ { discard_const_p(char, "SeparatorPageFilenameHigh"), py_rap_PrintQueue1_get_SeparatorPageFilenameHigh, py_rap_PrintQueue1_set_SeparatorPageFilenameHigh },
+ { discard_const_p(char, "PrintProcessorDllName"), py_rap_PrintQueue1_get_PrintProcessorDllName, py_rap_PrintQueue1_set_PrintProcessorDllName },
+ { discard_const_p(char, "PrintProcessorDllNameHigh"), py_rap_PrintQueue1_get_PrintProcessorDllNameHigh, py_rap_PrintQueue1_set_PrintProcessorDllNameHigh },
+ { discard_const_p(char, "PrintDestinationsName"), py_rap_PrintQueue1_get_PrintDestinationsName, py_rap_PrintQueue1_set_PrintDestinationsName },
+ { discard_const_p(char, "PrintDestinationsNameHigh"), py_rap_PrintQueue1_get_PrintDestinationsNameHigh, py_rap_PrintQueue1_set_PrintDestinationsNameHigh },
+ { discard_const_p(char, "PrintParameterString"), py_rap_PrintQueue1_get_PrintParameterString, py_rap_PrintQueue1_set_PrintParameterString },
+ { discard_const_p(char, "PrintParameterStringHigh"), py_rap_PrintQueue1_get_PrintParameterStringHigh, py_rap_PrintQueue1_set_PrintParameterStringHigh },
+ { discard_const_p(char, "CommentString"), py_rap_PrintQueue1_get_CommentString, py_rap_PrintQueue1_set_CommentString },
+ { discard_const_p(char, "CommentStringHigh"), py_rap_PrintQueue1_get_CommentStringHigh, py_rap_PrintQueue1_set_CommentStringHigh },
+ { discard_const_p(char, "PrintQStatus"), py_rap_PrintQueue1_get_PrintQStatus, py_rap_PrintQueue1_set_PrintQStatus },
+ { discard_const_p(char, "PrintJobCount"), py_rap_PrintQueue1_get_PrintJobCount, py_rap_PrintQueue1_set_PrintJobCount },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintQueue1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintQueue1, type);
+}
+
+
+static PyTypeObject rap_PrintQueue1_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintQueue1",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintQueue1_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintQueue1_new,
+};
+
+
+static PyObject *py_rap_PrintQueue2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintQueue2, type);
+}
+
+
+static PyTypeObject rap_PrintQueue2_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintQueue2",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = NULL,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintQueue2_new,
+};
+
+
+static PyObject *py_rap_PrintQueue3_get_PrintQueueName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQueueName;
+ if (object->PrintQueueName == NULL) {
+ py_PrintQueueName = Py_None;
+ } else {
+ py_PrintQueueName = PyUnicode_Decode(object->PrintQueueName, strlen(object->PrintQueueName), "utf-8", "ignore");
+ }
+ return py_PrintQueueName;
+}
+
+static int py_rap_PrintQueue3_set_PrintQueueName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintQueueName = NULL;
+ } else {
+ object->PrintQueueName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintQueueName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintQueueName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintQueueNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQueueNameHigh;
+ py_PrintQueueNameHigh = PyInt_FromLong(object->PrintQueueNameHigh);
+ return py_PrintQueueNameHigh;
+}
+
+static int py_rap_PrintQueue3_set_PrintQueueNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintQueueNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_Priority(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_Priority;
+ py_Priority = PyInt_FromLong(object->Priority);
+ return py_Priority;
+}
+
+static int py_rap_PrintQueue3_set_Priority(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->Priority = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_StartTime(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_StartTime;
+ py_StartTime = PyInt_FromLong(object->StartTime);
+ return py_StartTime;
+}
+
+static int py_rap_PrintQueue3_set_StartTime(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->StartTime = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_UntilTime(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_UntilTime;
+ py_UntilTime = PyInt_FromLong(object->UntilTime);
+ return py_UntilTime;
+}
+
+static int py_rap_PrintQueue3_set_UntilTime(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->UntilTime = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_Pad(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_Pad;
+ py_Pad = PyInt_FromLong(object->Pad);
+ return py_Pad;
+}
+
+static int py_rap_PrintQueue3_set_Pad(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->Pad = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_SeparatorPageFilename(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_SeparatorPageFilename;
+ if (object->SeparatorPageFilename == NULL) {
+ py_SeparatorPageFilename = Py_None;
+ } else {
+ py_SeparatorPageFilename = PyUnicode_Decode(object->SeparatorPageFilename, strlen(object->SeparatorPageFilename), "utf-8", "ignore");
+ }
+ return py_SeparatorPageFilename;
+}
+
+static int py_rap_PrintQueue3_set_SeparatorPageFilename(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->SeparatorPageFilename = NULL;
+ } else {
+ object->SeparatorPageFilename = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->SeparatorPageFilename);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->SeparatorPageFilename = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_SeparatorPageFilenameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_SeparatorPageFilenameHigh;
+ py_SeparatorPageFilenameHigh = PyInt_FromLong(object->SeparatorPageFilenameHigh);
+ return py_SeparatorPageFilenameHigh;
+}
+
+static int py_rap_PrintQueue3_set_SeparatorPageFilenameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->SeparatorPageFilenameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintProcessorDllName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorDllName;
+ if (object->PrintProcessorDllName == NULL) {
+ py_PrintProcessorDllName = Py_None;
+ } else {
+ py_PrintProcessorDllName = PyUnicode_Decode(object->PrintProcessorDllName, strlen(object->PrintProcessorDllName), "utf-8", "ignore");
+ }
+ return py_PrintProcessorDllName;
+}
+
+static int py_rap_PrintQueue3_set_PrintProcessorDllName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintProcessorDllName = NULL;
+ } else {
+ object->PrintProcessorDllName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintProcessorDllName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintProcessorDllName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintProcessorDllNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorDllNameHigh;
+ py_PrintProcessorDllNameHigh = PyInt_FromLong(object->PrintProcessorDllNameHigh);
+ return py_PrintProcessorDllNameHigh;
+}
+
+static int py_rap_PrintQueue3_set_PrintProcessorDllNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintProcessorDllNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintParameterString(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterString;
+ if (object->PrintParameterString == NULL) {
+ py_PrintParameterString = Py_None;
+ } else {
+ py_PrintParameterString = PyUnicode_Decode(object->PrintParameterString, strlen(object->PrintParameterString), "utf-8", "ignore");
+ }
+ return py_PrintParameterString;
+}
+
+static int py_rap_PrintQueue3_set_PrintParameterString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintParameterString = NULL;
+ } else {
+ object->PrintParameterString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintParameterString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintParameterString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintParameterStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterStringHigh;
+ py_PrintParameterStringHigh = PyInt_FromLong(object->PrintParameterStringHigh);
+ return py_PrintParameterStringHigh;
+}
+
+static int py_rap_PrintQueue3_set_PrintParameterStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintParameterStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_CommentString(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_CommentString;
+ if (object->CommentString == NULL) {
+ py_CommentString = Py_None;
+ } else {
+ py_CommentString = PyUnicode_Decode(object->CommentString, strlen(object->CommentString), "utf-8", "ignore");
+ }
+ return py_CommentString;
+}
+
+static int py_rap_PrintQueue3_set_CommentString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->CommentString = NULL;
+ } else {
+ object->CommentString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->CommentString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->CommentString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_CommentStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_CommentStringHigh;
+ py_CommentStringHigh = PyInt_FromLong(object->CommentStringHigh);
+ return py_CommentStringHigh;
+}
+
+static int py_rap_PrintQueue3_set_CommentStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->CommentStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintQStatus(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQStatus;
+ py_PrintQStatus = PyInt_FromLong(object->PrintQStatus);
+ return py_PrintQStatus;
+}
+
+static int py_rap_PrintQueue3_set_PrintQStatus(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintQStatus = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintJobCount(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintJobCount;
+ py_PrintJobCount = PyInt_FromLong(object->PrintJobCount);
+ return py_PrintJobCount;
+}
+
+static int py_rap_PrintQueue3_set_PrintJobCount(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintJobCount = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_Printers(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_Printers;
+ if (object->Printers == NULL) {
+ py_Printers = Py_None;
+ } else {
+ py_Printers = PyUnicode_Decode(object->Printers, strlen(object->Printers), "utf-8", "ignore");
+ }
+ return py_Printers;
+}
+
+static int py_rap_PrintQueue3_set_Printers(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->Printers = NULL;
+ } else {
+ object->Printers = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->Printers);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->Printers = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintersHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintersHigh;
+ py_PrintersHigh = PyInt_FromLong(object->PrintersHigh);
+ return py_PrintersHigh;
+}
+
+static int py_rap_PrintQueue3_set_PrintersHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintersHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_DriverName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DriverName;
+ if (object->DriverName == NULL) {
+ py_DriverName = Py_None;
+ } else {
+ py_DriverName = PyUnicode_Decode(object->DriverName, strlen(object->DriverName), "utf-8", "ignore");
+ }
+ return py_DriverName;
+}
+
+static int py_rap_PrintQueue3_set_DriverName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->DriverName = NULL;
+ } else {
+ object->DriverName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->DriverName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->DriverName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_DriverNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DriverNameHigh;
+ py_DriverNameHigh = PyInt_FromLong(object->DriverNameHigh);
+ return py_DriverNameHigh;
+}
+
+static int py_rap_PrintQueue3_set_DriverNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->DriverNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintDriverData(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintDriverData;
+ if (object->PrintDriverData == NULL) {
+ py_PrintDriverData = Py_None;
+ } else {
+ py_PrintDriverData = PyUnicode_Decode(object->PrintDriverData, strlen(object->PrintDriverData), "utf-8", "ignore");
+ }
+ return py_PrintDriverData;
+}
+
+static int py_rap_PrintQueue3_set_PrintDriverData(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintDriverData = NULL;
+ } else {
+ object->PrintDriverData = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintDriverData);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintDriverData = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue3_get_PrintDriverDataHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintDriverDataHigh;
+ py_PrintDriverDataHigh = PyInt_FromLong(object->PrintDriverDataHigh);
+ return py_PrintDriverDataHigh;
+}
+
+static int py_rap_PrintQueue3_set_PrintDriverDataHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue3 *object = (struct rap_PrintQueue3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintDriverDataHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintQueue3_getsetters[] = {
+ { discard_const_p(char, "PrintQueueName"), py_rap_PrintQueue3_get_PrintQueueName, py_rap_PrintQueue3_set_PrintQueueName },
+ { discard_const_p(char, "PrintQueueNameHigh"), py_rap_PrintQueue3_get_PrintQueueNameHigh, py_rap_PrintQueue3_set_PrintQueueNameHigh },
+ { discard_const_p(char, "Priority"), py_rap_PrintQueue3_get_Priority, py_rap_PrintQueue3_set_Priority },
+ { discard_const_p(char, "StartTime"), py_rap_PrintQueue3_get_StartTime, py_rap_PrintQueue3_set_StartTime },
+ { discard_const_p(char, "UntilTime"), py_rap_PrintQueue3_get_UntilTime, py_rap_PrintQueue3_set_UntilTime },
+ { discard_const_p(char, "Pad"), py_rap_PrintQueue3_get_Pad, py_rap_PrintQueue3_set_Pad },
+ { discard_const_p(char, "SeparatorPageFilename"), py_rap_PrintQueue3_get_SeparatorPageFilename, py_rap_PrintQueue3_set_SeparatorPageFilename },
+ { discard_const_p(char, "SeparatorPageFilenameHigh"), py_rap_PrintQueue3_get_SeparatorPageFilenameHigh, py_rap_PrintQueue3_set_SeparatorPageFilenameHigh },
+ { discard_const_p(char, "PrintProcessorDllName"), py_rap_PrintQueue3_get_PrintProcessorDllName, py_rap_PrintQueue3_set_PrintProcessorDllName },
+ { discard_const_p(char, "PrintProcessorDllNameHigh"), py_rap_PrintQueue3_get_PrintProcessorDllNameHigh, py_rap_PrintQueue3_set_PrintProcessorDllNameHigh },
+ { discard_const_p(char, "PrintParameterString"), py_rap_PrintQueue3_get_PrintParameterString, py_rap_PrintQueue3_set_PrintParameterString },
+ { discard_const_p(char, "PrintParameterStringHigh"), py_rap_PrintQueue3_get_PrintParameterStringHigh, py_rap_PrintQueue3_set_PrintParameterStringHigh },
+ { discard_const_p(char, "CommentString"), py_rap_PrintQueue3_get_CommentString, py_rap_PrintQueue3_set_CommentString },
+ { discard_const_p(char, "CommentStringHigh"), py_rap_PrintQueue3_get_CommentStringHigh, py_rap_PrintQueue3_set_CommentStringHigh },
+ { discard_const_p(char, "PrintQStatus"), py_rap_PrintQueue3_get_PrintQStatus, py_rap_PrintQueue3_set_PrintQStatus },
+ { discard_const_p(char, "PrintJobCount"), py_rap_PrintQueue3_get_PrintJobCount, py_rap_PrintQueue3_set_PrintJobCount },
+ { discard_const_p(char, "Printers"), py_rap_PrintQueue3_get_Printers, py_rap_PrintQueue3_set_Printers },
+ { discard_const_p(char, "PrintersHigh"), py_rap_PrintQueue3_get_PrintersHigh, py_rap_PrintQueue3_set_PrintersHigh },
+ { discard_const_p(char, "DriverName"), py_rap_PrintQueue3_get_DriverName, py_rap_PrintQueue3_set_DriverName },
+ { discard_const_p(char, "DriverNameHigh"), py_rap_PrintQueue3_get_DriverNameHigh, py_rap_PrintQueue3_set_DriverNameHigh },
+ { discard_const_p(char, "PrintDriverData"), py_rap_PrintQueue3_get_PrintDriverData, py_rap_PrintQueue3_set_PrintDriverData },
+ { discard_const_p(char, "PrintDriverDataHigh"), py_rap_PrintQueue3_get_PrintDriverDataHigh, py_rap_PrintQueue3_set_PrintDriverDataHigh },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintQueue3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintQueue3, type);
+}
+
+
+static PyTypeObject rap_PrintQueue3_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintQueue3",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintQueue3_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintQueue3_new,
+};
+
+
+static PyObject *py_rap_PrintQueue4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintQueue4, type);
+}
+
+
+static PyTypeObject rap_PrintQueue4_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintQueue4",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = NULL,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintQueue4_new,
+};
+
+
+static PyObject *py_rap_PrintQueue5_get_PrintQueueName(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue5 *object = (struct rap_PrintQueue5 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQueueName;
+ if (object->PrintQueueName == NULL) {
+ py_PrintQueueName = Py_None;
+ } else {
+ py_PrintQueueName = PyUnicode_Decode(object->PrintQueueName, strlen(object->PrintQueueName), "utf-8", "ignore");
+ }
+ return py_PrintQueueName;
+}
+
+static int py_rap_PrintQueue5_set_PrintQueueName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue5 *object = (struct rap_PrintQueue5 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintQueueName = NULL;
+ } else {
+ object->PrintQueueName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintQueueName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintQueueName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintQueue5_get_PrintQueueNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintQueue5 *object = (struct rap_PrintQueue5 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintQueueNameHigh;
+ py_PrintQueueNameHigh = PyInt_FromLong(object->PrintQueueNameHigh);
+ return py_PrintQueueNameHigh;
+}
+
+static int py_rap_PrintQueue5_set_PrintQueueNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintQueue5 *object = (struct rap_PrintQueue5 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintQueueNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintQueue5_getsetters[] = {
+ { discard_const_p(char, "PrintQueueName"), py_rap_PrintQueue5_get_PrintQueueName, py_rap_PrintQueue5_set_PrintQueueName },
+ { discard_const_p(char, "PrintQueueNameHigh"), py_rap_PrintQueue5_get_PrintQueueNameHigh, py_rap_PrintQueue5_set_PrintQueueNameHigh },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintQueue5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintQueue5, type);
+}
+
+
+static PyTypeObject rap_PrintQueue5_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintQueue5",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintQueue5_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintQueue5_new,
+};
+
+PyObject *py_import_rap_printq_info(TALLOC_CTX *mem_ctx, int level, union rap_printq_info *in)
+{
+ PyObject *ret;
+
+ switch (level) {
+ case 0:
+ ret = py_talloc_reference_ex(&rap_PrintQueue0_Type, mem_ctx, &in->info0);
+ return ret;
+
+ case 1:
+ ret = py_talloc_reference_ex(&rap_PrintQueue1_Type, mem_ctx, &in->info1);
+ return ret;
+
+ case 2:
+ ret = py_talloc_reference_ex(&rap_PrintQueue2_Type, mem_ctx, &in->info2);
+ return ret;
+
+ case 3:
+ ret = py_talloc_reference_ex(&rap_PrintQueue3_Type, mem_ctx, &in->info3);
+ return ret;
+
+ case 4:
+ ret = py_talloc_reference_ex(&rap_PrintQueue4_Type, mem_ctx, &in->info4);
+ return ret;
+
+ case 5:
+ ret = py_talloc_reference_ex(&rap_PrintQueue5_Type, mem_ctx, &in->info5);
+ return ret;
+
+ }
+ PyErr_SetString(PyExc_TypeError, "unknown union level");
+ return NULL;
+}
+
+union rap_printq_info *py_export_rap_printq_info(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+{
+ union rap_printq_info *ret = talloc_zero(mem_ctx, union rap_printq_info);
+ switch (level) {
+ case 0:
+ PY_CHECK_TYPE(&rap_PrintQueue0_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info0, (struct rap_PrintQueue0 *)py_talloc_get_ptr(in), sizeof(ret->info0));
+ break;
+
+ case 1:
+ PY_CHECK_TYPE(&rap_PrintQueue1_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info1, (struct rap_PrintQueue1 *)py_talloc_get_ptr(in), sizeof(ret->info1));
+ break;
+
+ case 2:
+ PY_CHECK_TYPE(&rap_PrintQueue2_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info2, (struct rap_PrintQueue2 *)py_talloc_get_ptr(in), sizeof(ret->info2));
+ break;
+
+ case 3:
+ PY_CHECK_TYPE(&rap_PrintQueue3_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info3, (struct rap_PrintQueue3 *)py_talloc_get_ptr(in), sizeof(ret->info3));
+ break;
+
+ case 4:
+ PY_CHECK_TYPE(&rap_PrintQueue4_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info4, (struct rap_PrintQueue4 *)py_talloc_get_ptr(in), sizeof(ret->info4));
+ break;
+
+ case 5:
+ PY_CHECK_TYPE(&rap_PrintQueue5_Type, in, talloc_free(ret); return NULL;);
+ memcpy(&ret->info5, (struct rap_PrintQueue5 *)py_talloc_get_ptr(in), sizeof(ret->info5));
+ break;
+
+ default:
+ PyErr_SetString(PyExc_TypeError, "invalid union level value");
+ talloc_free(ret);
+ ret = NULL;
+ }
+
+ return ret;
+}
+
+
+static PyObject *py_rap_PrintJobInfo0_get_JobID(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo0 *object = (struct rap_PrintJobInfo0 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobID;
+ py_JobID = PyInt_FromLong(object->JobID);
+ return py_JobID;
+}
+
+static int py_rap_PrintJobInfo0_set_JobID(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo0 *object = (struct rap_PrintJobInfo0 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobID = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintJobInfo0_getsetters[] = {
+ { discard_const_p(char, "JobID"), py_rap_PrintJobInfo0_get_JobID, py_rap_PrintJobInfo0_set_JobID },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintJobInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintJobInfo0, type);
+}
+
+
+static PyTypeObject rap_PrintJobInfo0_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintJobInfo0",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintJobInfo0_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintJobInfo0_new,
+};
+
+
+static PyObject *py_rap_PrintJobInfo1_get_JobID(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobID;
+ py_JobID = PyInt_FromLong(object->JobID);
+ return py_JobID;
+}
+
+static int py_rap_PrintJobInfo1_set_JobID(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobID = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_UserName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_UserName;
+ py_UserName = PyList_New(21);
+ if (py_UserName == NULL) {
+ return NULL;
+ }
+ {
+ int UserName_cntr_0;
+ for (UserName_cntr_0 = 0; UserName_cntr_0 < 21; UserName_cntr_0++) {
+ PyObject *py_UserName_0;
+ py_UserName_0 = PyInt_FromLong(object->UserName[UserName_cntr_0]);
+ PyList_SetItem(py_UserName, UserName_cntr_0, py_UserName_0);
+ }
+ }
+ return py_UserName;
+}
+
+static int py_rap_PrintJobInfo1_set_UserName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int UserName_cntr_0;
+ for (UserName_cntr_0 = 0; UserName_cntr_0 < PyList_Size(value); UserName_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, UserName_cntr_0), return -1;);
+ object->UserName[UserName_cntr_0] = PyInt_AsLong(PyList_GetItem(value, UserName_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_Pad(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_Pad;
+ py_Pad = PyInt_FromLong(object->Pad);
+ return py_Pad;
+}
+
+static int py_rap_PrintJobInfo1_set_Pad(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->Pad = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_NotifyName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_NotifyName;
+ py_NotifyName = PyList_New(16);
+ if (py_NotifyName == NULL) {
+ return NULL;
+ }
+ {
+ int NotifyName_cntr_0;
+ for (NotifyName_cntr_0 = 0; NotifyName_cntr_0 < 16; NotifyName_cntr_0++) {
+ PyObject *py_NotifyName_0;
+ py_NotifyName_0 = PyInt_FromLong(object->NotifyName[NotifyName_cntr_0]);
+ PyList_SetItem(py_NotifyName, NotifyName_cntr_0, py_NotifyName_0);
+ }
+ }
+ return py_NotifyName;
+}
+
+static int py_rap_PrintJobInfo1_set_NotifyName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int NotifyName_cntr_0;
+ for (NotifyName_cntr_0 = 0; NotifyName_cntr_0 < PyList_Size(value); NotifyName_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, NotifyName_cntr_0), return -1;);
+ object->NotifyName[NotifyName_cntr_0] = PyInt_AsLong(PyList_GetItem(value, NotifyName_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_DataType(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_DataType;
+ py_DataType = PyList_New(10);
+ if (py_DataType == NULL) {
+ return NULL;
+ }
+ {
+ int DataType_cntr_0;
+ for (DataType_cntr_0 = 0; DataType_cntr_0 < 10; DataType_cntr_0++) {
+ PyObject *py_DataType_0;
+ py_DataType_0 = PyInt_FromLong(object->DataType[DataType_cntr_0]);
+ PyList_SetItem(py_DataType, DataType_cntr_0, py_DataType_0);
+ }
+ }
+ return py_DataType;
+}
+
+static int py_rap_PrintJobInfo1_set_DataType(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyList_Type, value, return -1;);
+ {
+ int DataType_cntr_0;
+ for (DataType_cntr_0 = 0; DataType_cntr_0 < PyList_Size(value); DataType_cntr_0++) {
+ PY_CHECK_TYPE(&PyInt_Type, PyList_GetItem(value, DataType_cntr_0), return -1;);
+ object->DataType[DataType_cntr_0] = PyInt_AsLong(PyList_GetItem(value, DataType_cntr_0));
+ }
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_PrintParameterString(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterString;
+ if (object->PrintParameterString == NULL) {
+ py_PrintParameterString = Py_None;
+ } else {
+ py_PrintParameterString = PyUnicode_Decode(object->PrintParameterString, strlen(object->PrintParameterString), "utf-8", "ignore");
+ }
+ return py_PrintParameterString;
+}
+
+static int py_rap_PrintJobInfo1_set_PrintParameterString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintParameterString = NULL;
+ } else {
+ object->PrintParameterString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintParameterString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintParameterString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_PrintParameterStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterStringHigh;
+ py_PrintParameterStringHigh = PyInt_FromLong(object->PrintParameterStringHigh);
+ return py_PrintParameterStringHigh;
+}
+
+static int py_rap_PrintJobInfo1_set_PrintParameterStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintParameterStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_JobPosition(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobPosition;
+ py_JobPosition = PyInt_FromLong(object->JobPosition);
+ return py_JobPosition;
+}
+
+static int py_rap_PrintJobInfo1_set_JobPosition(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobPosition = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_JobStatus(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobStatus;
+ py_JobStatus = PyInt_FromLong(object->JobStatus);
+ return py_JobStatus;
+}
+
+static int py_rap_PrintJobInfo1_set_JobStatus(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobStatus = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_JobStatusString(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobStatusString;
+ if (object->JobStatusString == NULL) {
+ py_JobStatusString = Py_None;
+ } else {
+ py_JobStatusString = PyUnicode_Decode(object->JobStatusString, strlen(object->JobStatusString), "utf-8", "ignore");
+ }
+ return py_JobStatusString;
+}
+
+static int py_rap_PrintJobInfo1_set_JobStatusString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->JobStatusString = NULL;
+ } else {
+ object->JobStatusString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->JobStatusString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->JobStatusString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_JobStatusStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobStatusStringHigh;
+ py_JobStatusStringHigh = PyInt_FromLong(object->JobStatusStringHigh);
+ return py_JobStatusStringHigh;
+}
+
+static int py_rap_PrintJobInfo1_set_JobStatusStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobStatusStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_TimeSubmitted(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_TimeSubmitted;
+ py_TimeSubmitted = PyInt_FromLong(object->TimeSubmitted);
+ return py_TimeSubmitted;
+}
+
+static int py_rap_PrintJobInfo1_set_TimeSubmitted(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->TimeSubmitted = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_JobSize(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobSize;
+ py_JobSize = PyInt_FromLong(object->JobSize);
+ return py_JobSize;
+}
+
+static int py_rap_PrintJobInfo1_set_JobSize(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobSize = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_JobCommentString(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobCommentString;
+ if (object->JobCommentString == NULL) {
+ py_JobCommentString = Py_None;
+ } else {
+ py_JobCommentString = PyUnicode_Decode(object->JobCommentString, strlen(object->JobCommentString), "utf-8", "ignore");
+ }
+ return py_JobCommentString;
+}
+
+static int py_rap_PrintJobInfo1_set_JobCommentString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->JobCommentString = NULL;
+ } else {
+ object->JobCommentString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->JobCommentString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->JobCommentString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo1_get_JobCommentStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobCommentStringHigh;
+ py_JobCommentStringHigh = PyInt_FromLong(object->JobCommentStringHigh);
+ return py_JobCommentStringHigh;
+}
+
+static int py_rap_PrintJobInfo1_set_JobCommentStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo1 *object = (struct rap_PrintJobInfo1 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobCommentStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintJobInfo1_getsetters[] = {
+ { discard_const_p(char, "JobID"), py_rap_PrintJobInfo1_get_JobID, py_rap_PrintJobInfo1_set_JobID },
+ { discard_const_p(char, "UserName"), py_rap_PrintJobInfo1_get_UserName, py_rap_PrintJobInfo1_set_UserName },
+ { discard_const_p(char, "Pad"), py_rap_PrintJobInfo1_get_Pad, py_rap_PrintJobInfo1_set_Pad },
+ { discard_const_p(char, "NotifyName"), py_rap_PrintJobInfo1_get_NotifyName, py_rap_PrintJobInfo1_set_NotifyName },
+ { discard_const_p(char, "DataType"), py_rap_PrintJobInfo1_get_DataType, py_rap_PrintJobInfo1_set_DataType },
+ { discard_const_p(char, "PrintParameterString"), py_rap_PrintJobInfo1_get_PrintParameterString, py_rap_PrintJobInfo1_set_PrintParameterString },
+ { discard_const_p(char, "PrintParameterStringHigh"), py_rap_PrintJobInfo1_get_PrintParameterStringHigh, py_rap_PrintJobInfo1_set_PrintParameterStringHigh },
+ { discard_const_p(char, "JobPosition"), py_rap_PrintJobInfo1_get_JobPosition, py_rap_PrintJobInfo1_set_JobPosition },
+ { discard_const_p(char, "JobStatus"), py_rap_PrintJobInfo1_get_JobStatus, py_rap_PrintJobInfo1_set_JobStatus },
+ { discard_const_p(char, "JobStatusString"), py_rap_PrintJobInfo1_get_JobStatusString, py_rap_PrintJobInfo1_set_JobStatusString },
+ { discard_const_p(char, "JobStatusStringHigh"), py_rap_PrintJobInfo1_get_JobStatusStringHigh, py_rap_PrintJobInfo1_set_JobStatusStringHigh },
+ { discard_const_p(char, "TimeSubmitted"), py_rap_PrintJobInfo1_get_TimeSubmitted, py_rap_PrintJobInfo1_set_TimeSubmitted },
+ { discard_const_p(char, "JobSize"), py_rap_PrintJobInfo1_get_JobSize, py_rap_PrintJobInfo1_set_JobSize },
+ { discard_const_p(char, "JobCommentString"), py_rap_PrintJobInfo1_get_JobCommentString, py_rap_PrintJobInfo1_set_JobCommentString },
+ { discard_const_p(char, "JobCommentStringHigh"), py_rap_PrintJobInfo1_get_JobCommentStringHigh, py_rap_PrintJobInfo1_set_JobCommentStringHigh },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintJobInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintJobInfo1, type);
+}
+
+
+static PyTypeObject rap_PrintJobInfo1_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintJobInfo1",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintJobInfo1_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintJobInfo1_new,
+};
+
+
+static PyObject *py_rap_PrintJobInfo2_get_JobID(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobID;
+ py_JobID = PyInt_FromLong(object->JobID);
+ return py_JobID;
+}
+
+static int py_rap_PrintJobInfo2_set_JobID(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobID = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_Priority(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_Priority;
+ py_Priority = PyInt_FromLong(object->Priority);
+ return py_Priority;
+}
+
+static int py_rap_PrintJobInfo2_set_Priority(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->Priority = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_UserName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_UserName;
+ if (object->UserName == NULL) {
+ py_UserName = Py_None;
+ } else {
+ py_UserName = PyUnicode_Decode(object->UserName, strlen(object->UserName), "utf-8", "ignore");
+ }
+ return py_UserName;
+}
+
+static int py_rap_PrintJobInfo2_set_UserName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->UserName = NULL;
+ } else {
+ object->UserName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->UserName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->UserName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_UserNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_UserNameHigh;
+ py_UserNameHigh = PyInt_FromLong(object->UserNameHigh);
+ return py_UserNameHigh;
+}
+
+static int py_rap_PrintJobInfo2_set_UserNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->UserNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_JobPosition(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobPosition;
+ py_JobPosition = PyInt_FromLong(object->JobPosition);
+ return py_JobPosition;
+}
+
+static int py_rap_PrintJobInfo2_set_JobPosition(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobPosition = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_JobStatus(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobStatus;
+ py_JobStatus = PyInt_FromLong(object->JobStatus);
+ return py_JobStatus;
+}
+
+static int py_rap_PrintJobInfo2_set_JobStatus(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobStatus = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_TimeSubmitted(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_TimeSubmitted;
+ py_TimeSubmitted = PyInt_FromLong(object->TimeSubmitted);
+ return py_TimeSubmitted;
+}
+
+static int py_rap_PrintJobInfo2_set_TimeSubmitted(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->TimeSubmitted = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_JobSize(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobSize;
+ py_JobSize = PyInt_FromLong(object->JobSize);
+ return py_JobSize;
+}
+
+static int py_rap_PrintJobInfo2_set_JobSize(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobSize = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_JobCommentString(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobCommentString;
+ if (object->JobCommentString == NULL) {
+ py_JobCommentString = Py_None;
+ } else {
+ py_JobCommentString = PyUnicode_Decode(object->JobCommentString, strlen(object->JobCommentString), "utf-8", "ignore");
+ }
+ return py_JobCommentString;
+}
+
+static int py_rap_PrintJobInfo2_set_JobCommentString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->JobCommentString = NULL;
+ } else {
+ object->JobCommentString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->JobCommentString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->JobCommentString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_JobCommentStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobCommentStringHigh;
+ py_JobCommentStringHigh = PyInt_FromLong(object->JobCommentStringHigh);
+ return py_JobCommentStringHigh;
+}
+
+static int py_rap_PrintJobInfo2_set_JobCommentStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobCommentStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_DocumentName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_DocumentName;
+ if (object->DocumentName == NULL) {
+ py_DocumentName = Py_None;
+ } else {
+ py_DocumentName = PyUnicode_Decode(object->DocumentName, strlen(object->DocumentName), "utf-8", "ignore");
+ }
+ return py_DocumentName;
+}
+
+static int py_rap_PrintJobInfo2_set_DocumentName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->DocumentName = NULL;
+ } else {
+ object->DocumentName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->DocumentName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->DocumentName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo2_get_DocumentNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(obj);
+ PyObject *py_DocumentNameHigh;
+ py_DocumentNameHigh = PyInt_FromLong(object->DocumentNameHigh);
+ return py_DocumentNameHigh;
+}
+
+static int py_rap_PrintJobInfo2_set_DocumentNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo2 *object = (struct rap_PrintJobInfo2 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->DocumentNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintJobInfo2_getsetters[] = {
+ { discard_const_p(char, "JobID"), py_rap_PrintJobInfo2_get_JobID, py_rap_PrintJobInfo2_set_JobID },
+ { discard_const_p(char, "Priority"), py_rap_PrintJobInfo2_get_Priority, py_rap_PrintJobInfo2_set_Priority },
+ { discard_const_p(char, "UserName"), py_rap_PrintJobInfo2_get_UserName, py_rap_PrintJobInfo2_set_UserName },
+ { discard_const_p(char, "UserNameHigh"), py_rap_PrintJobInfo2_get_UserNameHigh, py_rap_PrintJobInfo2_set_UserNameHigh },
+ { discard_const_p(char, "JobPosition"), py_rap_PrintJobInfo2_get_JobPosition, py_rap_PrintJobInfo2_set_JobPosition },
+ { discard_const_p(char, "JobStatus"), py_rap_PrintJobInfo2_get_JobStatus, py_rap_PrintJobInfo2_set_JobStatus },
+ { discard_const_p(char, "TimeSubmitted"), py_rap_PrintJobInfo2_get_TimeSubmitted, py_rap_PrintJobInfo2_set_TimeSubmitted },
+ { discard_const_p(char, "JobSize"), py_rap_PrintJobInfo2_get_JobSize, py_rap_PrintJobInfo2_set_JobSize },
+ { discard_const_p(char, "JobCommentString"), py_rap_PrintJobInfo2_get_JobCommentString, py_rap_PrintJobInfo2_set_JobCommentString },
+ { discard_const_p(char, "JobCommentStringHigh"), py_rap_PrintJobInfo2_get_JobCommentStringHigh, py_rap_PrintJobInfo2_set_JobCommentStringHigh },
+ { discard_const_p(char, "DocumentName"), py_rap_PrintJobInfo2_get_DocumentName, py_rap_PrintJobInfo2_set_DocumentName },
+ { discard_const_p(char, "DocumentNameHigh"), py_rap_PrintJobInfo2_get_DocumentNameHigh, py_rap_PrintJobInfo2_set_DocumentNameHigh },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintJobInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintJobInfo2, type);
+}
+
+
+static PyTypeObject rap_PrintJobInfo2_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintJobInfo2",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintJobInfo2_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintJobInfo2_new,
+};
+
+
+static PyObject *py_rap_PrintJobInfo3_get_JobID(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobID;
+ py_JobID = PyInt_FromLong(object->JobID);
+ return py_JobID;
+}
+
+static int py_rap_PrintJobInfo3_set_JobID(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobID = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_Priority(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_Priority;
+ py_Priority = PyInt_FromLong(object->Priority);
+ return py_Priority;
+}
+
+static int py_rap_PrintJobInfo3_set_Priority(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->Priority = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_UserName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_UserName;
+ if (object->UserName == NULL) {
+ py_UserName = Py_None;
+ } else {
+ py_UserName = PyUnicode_Decode(object->UserName, strlen(object->UserName), "utf-8", "ignore");
+ }
+ return py_UserName;
+}
+
+static int py_rap_PrintJobInfo3_set_UserName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->UserName = NULL;
+ } else {
+ object->UserName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->UserName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->UserName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_UserNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_UserNameHigh;
+ py_UserNameHigh = PyInt_FromLong(object->UserNameHigh);
+ return py_UserNameHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_UserNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->UserNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_JobPosition(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobPosition;
+ py_JobPosition = PyInt_FromLong(object->JobPosition);
+ return py_JobPosition;
+}
+
+static int py_rap_PrintJobInfo3_set_JobPosition(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobPosition = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_JobStatus(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobStatus;
+ py_JobStatus = PyInt_FromLong(object->JobStatus);
+ return py_JobStatus;
+}
+
+static int py_rap_PrintJobInfo3_set_JobStatus(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobStatus = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_TimeSubmitted(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_TimeSubmitted;
+ py_TimeSubmitted = PyInt_FromLong(object->TimeSubmitted);
+ return py_TimeSubmitted;
+}
+
+static int py_rap_PrintJobInfo3_set_TimeSubmitted(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->TimeSubmitted = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_JobSize(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobSize;
+ py_JobSize = PyInt_FromLong(object->JobSize);
+ return py_JobSize;
+}
+
+static int py_rap_PrintJobInfo3_set_JobSize(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobSize = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_JobCommentString(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobCommentString;
+ if (object->JobCommentString == NULL) {
+ py_JobCommentString = Py_None;
+ } else {
+ py_JobCommentString = PyUnicode_Decode(object->JobCommentString, strlen(object->JobCommentString), "utf-8", "ignore");
+ }
+ return py_JobCommentString;
+}
+
+static int py_rap_PrintJobInfo3_set_JobCommentString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->JobCommentString = NULL;
+ } else {
+ object->JobCommentString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->JobCommentString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->JobCommentString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_JobCommentStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_JobCommentStringHigh;
+ py_JobCommentStringHigh = PyInt_FromLong(object->JobCommentStringHigh);
+ return py_JobCommentStringHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_JobCommentStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->JobCommentStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DocumentName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DocumentName;
+ if (object->DocumentName == NULL) {
+ py_DocumentName = Py_None;
+ } else {
+ py_DocumentName = PyUnicode_Decode(object->DocumentName, strlen(object->DocumentName), "utf-8", "ignore");
+ }
+ return py_DocumentName;
+}
+
+static int py_rap_PrintJobInfo3_set_DocumentName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->DocumentName = NULL;
+ } else {
+ object->DocumentName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->DocumentName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->DocumentName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DocumentNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DocumentNameHigh;
+ py_DocumentNameHigh = PyInt_FromLong(object->DocumentNameHigh);
+ return py_DocumentNameHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_DocumentNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->DocumentNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_NotifyName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_NotifyName;
+ if (object->NotifyName == NULL) {
+ py_NotifyName = Py_None;
+ } else {
+ py_NotifyName = PyUnicode_Decode(object->NotifyName, strlen(object->NotifyName), "utf-8", "ignore");
+ }
+ return py_NotifyName;
+}
+
+static int py_rap_PrintJobInfo3_set_NotifyName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->NotifyName = NULL;
+ } else {
+ object->NotifyName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->NotifyName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->NotifyName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_NotifyNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_NotifyNameHigh;
+ py_NotifyNameHigh = PyInt_FromLong(object->NotifyNameHigh);
+ return py_NotifyNameHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_NotifyNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->NotifyNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DataType(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DataType;
+ if (object->DataType == NULL) {
+ py_DataType = Py_None;
+ } else {
+ py_DataType = PyUnicode_Decode(object->DataType, strlen(object->DataType), "utf-8", "ignore");
+ }
+ return py_DataType;
+}
+
+static int py_rap_PrintJobInfo3_set_DataType(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->DataType = NULL;
+ } else {
+ object->DataType = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->DataType);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->DataType = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DataTypeHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DataTypeHigh;
+ py_DataTypeHigh = PyInt_FromLong(object->DataTypeHigh);
+ return py_DataTypeHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_DataTypeHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->DataTypeHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrintParameterString(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterString;
+ if (object->PrintParameterString == NULL) {
+ py_PrintParameterString = Py_None;
+ } else {
+ py_PrintParameterString = PyUnicode_Decode(object->PrintParameterString, strlen(object->PrintParameterString), "utf-8", "ignore");
+ }
+ return py_PrintParameterString;
+}
+
+static int py_rap_PrintJobInfo3_set_PrintParameterString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintParameterString = NULL;
+ } else {
+ object->PrintParameterString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintParameterString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintParameterString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrintParameterStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintParameterStringHigh;
+ py_PrintParameterStringHigh = PyInt_FromLong(object->PrintParameterStringHigh);
+ return py_PrintParameterStringHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_PrintParameterStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintParameterStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_StatusString(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_StatusString;
+ if (object->StatusString == NULL) {
+ py_StatusString = Py_None;
+ } else {
+ py_StatusString = PyUnicode_Decode(object->StatusString, strlen(object->StatusString), "utf-8", "ignore");
+ }
+ return py_StatusString;
+}
+
+static int py_rap_PrintJobInfo3_set_StatusString(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->StatusString = NULL;
+ } else {
+ object->StatusString = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->StatusString);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->StatusString = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_StatusStringHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_StatusStringHigh;
+ py_StatusStringHigh = PyInt_FromLong(object->StatusStringHigh);
+ return py_StatusStringHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_StatusStringHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->StatusStringHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_QueueName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_QueueName;
+ if (object->QueueName == NULL) {
+ py_QueueName = Py_None;
+ } else {
+ py_QueueName = PyUnicode_Decode(object->QueueName, strlen(object->QueueName), "utf-8", "ignore");
+ }
+ return py_QueueName;
+}
+
+static int py_rap_PrintJobInfo3_set_QueueName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->QueueName = NULL;
+ } else {
+ object->QueueName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->QueueName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->QueueName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_QueueNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_QueueNameHigh;
+ py_QueueNameHigh = PyInt_FromLong(object->QueueNameHigh);
+ return py_QueueNameHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_QueueNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->QueueNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrintProcessorName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorName;
+ if (object->PrintProcessorName == NULL) {
+ py_PrintProcessorName = Py_None;
+ } else {
+ py_PrintProcessorName = PyUnicode_Decode(object->PrintProcessorName, strlen(object->PrintProcessorName), "utf-8", "ignore");
+ }
+ return py_PrintProcessorName;
+}
+
+static int py_rap_PrintJobInfo3_set_PrintProcessorName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintProcessorName = NULL;
+ } else {
+ object->PrintProcessorName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintProcessorName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintProcessorName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrintProcessorNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorNameHigh;
+ py_PrintProcessorNameHigh = PyInt_FromLong(object->PrintProcessorNameHigh);
+ return py_PrintProcessorNameHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_PrintProcessorNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintProcessorNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrintProcessorParams(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorParams;
+ if (object->PrintProcessorParams == NULL) {
+ py_PrintProcessorParams = Py_None;
+ } else {
+ py_PrintProcessorParams = PyUnicode_Decode(object->PrintProcessorParams, strlen(object->PrintProcessorParams), "utf-8", "ignore");
+ }
+ return py_PrintProcessorParams;
+}
+
+static int py_rap_PrintJobInfo3_set_PrintProcessorParams(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrintProcessorParams = NULL;
+ } else {
+ object->PrintProcessorParams = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrintProcessorParams);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrintProcessorParams = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrintProcessorParamsHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrintProcessorParamsHigh;
+ py_PrintProcessorParamsHigh = PyInt_FromLong(object->PrintProcessorParamsHigh);
+ return py_PrintProcessorParamsHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_PrintProcessorParamsHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrintProcessorParamsHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DriverName(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DriverName;
+ if (object->DriverName == NULL) {
+ py_DriverName = Py_None;
+ } else {
+ py_DriverName = PyUnicode_Decode(object->DriverName, strlen(object->DriverName), "utf-8", "ignore");
+ }
+ return py_DriverName;
+}
+
+static int py_rap_PrintJobInfo3_set_DriverName(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->DriverName = NULL;
+ } else {
+ object->DriverName = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->DriverName);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->DriverName = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DriverNameHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DriverNameHigh;
+ py_DriverNameHigh = PyInt_FromLong(object->DriverNameHigh);
+ return py_DriverNameHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_DriverNameHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->DriverNameHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DriverDataOffset(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DriverDataOffset;
+ if (object->DriverDataOffset == NULL) {
+ py_DriverDataOffset = Py_None;
+ } else {
+ py_DriverDataOffset = PyUnicode_Decode(object->DriverDataOffset, strlen(object->DriverDataOffset), "utf-8", "ignore");
+ }
+ return py_DriverDataOffset;
+}
+
+static int py_rap_PrintJobInfo3_set_DriverDataOffset(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->DriverDataOffset = NULL;
+ } else {
+ object->DriverDataOffset = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->DriverDataOffset);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->DriverDataOffset = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_DriverDataOffsetHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_DriverDataOffsetHigh;
+ py_DriverDataOffsetHigh = PyInt_FromLong(object->DriverDataOffsetHigh);
+ return py_DriverDataOffsetHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_DriverDataOffsetHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->DriverDataOffsetHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrinterNameOffset(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrinterNameOffset;
+ if (object->PrinterNameOffset == NULL) {
+ py_PrinterNameOffset = Py_None;
+ } else {
+ py_PrinterNameOffset = PyUnicode_Decode(object->PrinterNameOffset, strlen(object->PrinterNameOffset), "utf-8", "ignore");
+ }
+ return py_PrinterNameOffset;
+}
+
+static int py_rap_PrintJobInfo3_set_PrinterNameOffset(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ if (value == Py_None) {
+ object->PrinterNameOffset = NULL;
+ } else {
+ object->PrinterNameOffset = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->PrinterNameOffset);
+ PY_CHECK_TYPE(&PyUnicode_Type, value, return -1;);
+ object->PrinterNameOffset = PyString_AsString(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
+ }
+ return 0;
+}
+
+static PyObject *py_rap_PrintJobInfo3_get_PrinterNameOffsetHigh(PyObject *obj, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(obj);
+ PyObject *py_PrinterNameOffsetHigh;
+ py_PrinterNameOffsetHigh = PyInt_FromLong(object->PrinterNameOffsetHigh);
+ return py_PrinterNameOffsetHigh;
+}
+
+static int py_rap_PrintJobInfo3_set_PrinterNameOffsetHigh(PyObject *py_obj, PyObject *value, void *closure)
+{
+ struct rap_PrintJobInfo3 *object = (struct rap_PrintJobInfo3 *)py_talloc_get_ptr(py_obj);
+ PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ object->PrinterNameOffsetHigh = PyInt_AsLong(value);
+ return 0;
+}
+
+static PyGetSetDef py_rap_PrintJobInfo3_getsetters[] = {
+ { discard_const_p(char, "JobID"), py_rap_PrintJobInfo3_get_JobID, py_rap_PrintJobInfo3_set_JobID },
+ { discard_const_p(char, "Priority"), py_rap_PrintJobInfo3_get_Priority, py_rap_PrintJobInfo3_set_Priority },
+ { discard_const_p(char, "UserName"), py_rap_PrintJobInfo3_get_UserName, py_rap_PrintJobInfo3_set_UserName },
+ { discard_const_p(char, "UserNameHigh"), py_rap_PrintJobInfo3_get_UserNameHigh, py_rap_PrintJobInfo3_set_UserNameHigh },
+ { discard_const_p(char, "JobPosition"), py_rap_PrintJobInfo3_get_JobPosition, py_rap_PrintJobInfo3_set_JobPosition },
+ { discard_const_p(char, "JobStatus"), py_rap_PrintJobInfo3_get_JobStatus, py_rap_PrintJobInfo3_set_JobStatus },
+ { discard_const_p(char, "TimeSubmitted"), py_rap_PrintJobInfo3_get_TimeSubmitted, py_rap_PrintJobInfo3_set_TimeSubmitted },
+ { discard_const_p(char, "JobSize"), py_rap_PrintJobInfo3_get_JobSize, py_rap_PrintJobInfo3_set_JobSize },
+ { discard_const_p(char, "JobCommentString"), py_rap_PrintJobInfo3_get_JobCommentString, py_rap_PrintJobInfo3_set_JobCommentString },
+ { discard_const_p(char, "JobCommentStringHigh"), py_rap_PrintJobInfo3_get_JobCommentStringHigh, py_rap_PrintJobInfo3_set_JobCommentStringHigh },
+ { discard_const_p(char, "DocumentName"), py_rap_PrintJobInfo3_get_DocumentName, py_rap_PrintJobInfo3_set_DocumentName },
+ { discard_const_p(char, "DocumentNameHigh"), py_rap_PrintJobInfo3_get_DocumentNameHigh, py_rap_PrintJobInfo3_set_DocumentNameHigh },
+ { discard_const_p(char, "NotifyName"), py_rap_PrintJobInfo3_get_NotifyName, py_rap_PrintJobInfo3_set_NotifyName },
+ { discard_const_p(char, "NotifyNameHigh"), py_rap_PrintJobInfo3_get_NotifyNameHigh, py_rap_PrintJobInfo3_set_NotifyNameHigh },
+ { discard_const_p(char, "DataType"), py_rap_PrintJobInfo3_get_DataType, py_rap_PrintJobInfo3_set_DataType },
+ { discard_const_p(char, "DataTypeHigh"), py_rap_PrintJobInfo3_get_DataTypeHigh, py_rap_PrintJobInfo3_set_DataTypeHigh },
+ { discard_const_p(char, "PrintParameterString"), py_rap_PrintJobInfo3_get_PrintParameterString, py_rap_PrintJobInfo3_set_PrintParameterString },
+ { discard_const_p(char, "PrintParameterStringHigh"), py_rap_PrintJobInfo3_get_PrintParameterStringHigh, py_rap_PrintJobInfo3_set_PrintParameterStringHigh },
+ { discard_const_p(char, "StatusString"), py_rap_PrintJobInfo3_get_StatusString, py_rap_PrintJobInfo3_set_StatusString },
+ { discard_const_p(char, "StatusStringHigh"), py_rap_PrintJobInfo3_get_StatusStringHigh, py_rap_PrintJobInfo3_set_StatusStringHigh },
+ { discard_const_p(char, "QueueName"), py_rap_PrintJobInfo3_get_QueueName, py_rap_PrintJobInfo3_set_QueueName },
+ { discard_const_p(char, "QueueNameHigh"), py_rap_PrintJobInfo3_get_QueueNameHigh, py_rap_PrintJobInfo3_set_QueueNameHigh },
+ { discard_const_p(char, "PrintProcessorName"), py_rap_PrintJobInfo3_get_PrintProcessorName, py_rap_PrintJobInfo3_set_PrintProcessorName },
+ { discard_const_p(char, "PrintProcessorNameHigh"), py_rap_PrintJobInfo3_get_PrintProcessorNameHigh, py_rap_PrintJobInfo3_set_PrintProcessorNameHigh },
+ { discard_const_p(char, "PrintProcessorParams"), py_rap_PrintJobInfo3_get_PrintProcessorParams, py_rap_PrintJobInfo3_set_PrintProcessorParams },
+ { discard_const_p(char, "PrintProcessorParamsHigh"), py_rap_PrintJobInfo3_get_PrintProcessorParamsHigh, py_rap_PrintJobInfo3_set_PrintProcessorParamsHigh },
+ { discard_const_p(char, "DriverName"), py_rap_PrintJobInfo3_get_DriverName, py_rap_PrintJobInfo3_set_DriverName },
+ { discard_const_p(char, "DriverNameHigh"), py_rap_PrintJobInfo3_get_DriverNameHigh, py_rap_PrintJobInfo3_set_DriverNameHigh },
+ { discard_const_p(char, "DriverDataOffset"), py_rap_PrintJobInfo3_get_DriverDataOffset, py_rap_PrintJobInfo3_set_DriverDataOffset },
+ { discard_const_p(char, "DriverDataOffsetHigh"), py_rap_PrintJobInfo3_get_DriverDataOffsetHigh, py_rap_PrintJobInfo3_set_DriverDataOffsetHigh },
+ { discard_const_p(char, "PrinterNameOffset"), py_rap_PrintJobInfo3_get_PrinterNameOffset, py_rap_PrintJobInfo3_set_PrinterNameOffset },
+ { discard_const_p(char, "PrinterNameOffsetHigh"), py_rap_PrintJobInfo3_get_PrinterNameOffsetHigh, py_rap_PrintJobInfo3_set_PrinterNameOffsetHigh },
+ { NULL }
+};
+
+static PyObject *py_rap_PrintJobInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ return py_talloc_new(struct rap_PrintJobInfo3, type);
+}
+
+
+static PyTypeObject rap_PrintJobInfo3_Type = {
+ PyObject_HEAD_INIT(NULL) 0,
+ .tp_name = "rap.PrintJobInfo3",
+ .tp_basicsize = sizeof(py_talloc_Object),
+ .tp_dealloc = py_talloc_dealloc,
+ .tp_getset = py_rap_PrintJobInfo3_getsetters,
+ .tp_repr = py_talloc_default_repr,
+ .tp_methods = NULL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_new = py_rap_PrintJobInfo3_new,
+};
+
+static PyMethodDef rap_methods[] = {
+ { NULL, NULL, 0, NULL }
+};
+
+void initrap(void)
+{
+ PyObject *m;
+
+ if (PyType_Ready(&rap_group_info_1_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_user_info_1_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_service_info_2_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_share_info_0_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_share_info_1_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_share_info_2_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_server_info_0_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_server_info_1_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintQueue0_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintQueue1_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintQueue2_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintQueue3_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintQueue4_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintQueue5_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintJobInfo0_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintJobInfo1_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintJobInfo2_Type) < 0)
+ return;
+ if (PyType_Ready(&rap_PrintJobInfo3_Type) < 0)
+ return;
+#ifdef PY_GROUP_INFO_1_PATCH
+ PY_GROUP_INFO_1_PATCH(&rap_group_info_1_Type);
+#endif
+#ifdef PY_USER_INFO_1_PATCH
+ PY_USER_INFO_1_PATCH(&rap_user_info_1_Type);
+#endif
+#ifdef PY_SERVICE_INFO_2_PATCH
+ PY_SERVICE_INFO_2_PATCH(&rap_service_info_2_Type);
+#endif
+#ifdef PY_SHARE_INFO_0_PATCH
+ PY_SHARE_INFO_0_PATCH(&rap_share_info_0_Type);
+#endif
+#ifdef PY_SHARE_INFO_1_PATCH
+ PY_SHARE_INFO_1_PATCH(&rap_share_info_1_Type);
+#endif
+#ifdef PY_SHARE_INFO_2_PATCH
+ PY_SHARE_INFO_2_PATCH(&rap_share_info_2_Type);
+#endif
+#ifdef PY_SERVER_INFO_0_PATCH
+ PY_SERVER_INFO_0_PATCH(&rap_server_info_0_Type);
+#endif
+#ifdef PY_SERVER_INFO_1_PATCH
+ PY_SERVER_INFO_1_PATCH(&rap_server_info_1_Type);
+#endif
+#ifdef PY_PRINTQUEUE0_PATCH
+ PY_PRINTQUEUE0_PATCH(&rap_PrintQueue0_Type);
+#endif
+#ifdef PY_PRINTQUEUE1_PATCH
+ PY_PRINTQUEUE1_PATCH(&rap_PrintQueue1_Type);
+#endif
+#ifdef PY_PRINTQUEUE2_PATCH
+ PY_PRINTQUEUE2_PATCH(&rap_PrintQueue2_Type);
+#endif
+#ifdef PY_PRINTQUEUE3_PATCH
+ PY_PRINTQUEUE3_PATCH(&rap_PrintQueue3_Type);
+#endif
+#ifdef PY_PRINTQUEUE4_PATCH
+ PY_PRINTQUEUE4_PATCH(&rap_PrintQueue4_Type);
+#endif
+#ifdef PY_PRINTQUEUE5_PATCH
+ PY_PRINTQUEUE5_PATCH(&rap_PrintQueue5_Type);
+#endif
+#ifdef PY_PRINTJOBINFO0_PATCH
+ PY_PRINTJOBINFO0_PATCH(&rap_PrintJobInfo0_Type);
+#endif
+#ifdef PY_PRINTJOBINFO1_PATCH
+ PY_PRINTJOBINFO1_PATCH(&rap_PrintJobInfo1_Type);
+#endif
+#ifdef PY_PRINTJOBINFO2_PATCH
+ PY_PRINTJOBINFO2_PATCH(&rap_PrintJobInfo2_Type);
+#endif
+#ifdef PY_PRINTJOBINFO3_PATCH
+ PY_PRINTJOBINFO3_PATCH(&rap_PrintJobInfo3_Type);
+#endif
+
+ m = Py_InitModule3("rap", rap_methods, "rap DCE/RPC");
+ if (m == NULL)
+ return;
+
+ PyModule_AddObject(m, "RAP_WLogonEnum", PyInt_FromLong(134));
+ PyModule_AddObject(m, "RAP_WUserAdd2", PyInt_FromLong(113));
+ PyModule_AddObject(m, "RAP_WPrintJobEnum", PyInt_FromLong(76));
+ PyModule_AddObject(m, "RAP_WDASDEnumTerminate", PyInt_FromLong(317));
+ PyModule_AddObject(m, "RAP_NetPrintQGetInfo_REQ", PyString_FromString("zWrLh"));
+ PyModule_AddObject(m, "RAP_WGroupAdd", PyInt_FromLong(48));
+ PyModule_AddObject(m, "RAP_WaliasAdd", PyInt_FromLong(252));
+ PyModule_AddObject(m, "RAP_NetSessionGetInfo_REQ", PyString_FromString("zWrLh"));
+ PyModule_AddObject(m, "RAP_NetConnectionEntryMake", PyInt_FromLong(176));
+ PyModule_AddObject(m, "RAP_WUserValidate2", PyInt_FromLong(146));
+ PyModule_AddObject(m, "RAP_TI_FTLockDisk", PyInt_FromLong(154));
+ PyModule_AddObject(m, "RAP_WprintDriverGetInfo", PyInt_FromLong(250));
+ PyModule_AddObject(m, "RAP_WConfigGet2", PyInt_FromLong(117));
+ PyModule_AddObject(m, "RAP_WaliasSetInfo", PyInt_FromLong(255));
+ PyModule_AddObject(m, "RAP_WappAdd", PyInt_FromLong(261));
+ PyModule_AddObject(m, "RAP_NetGroupAddUser_REQ", PyString_FromString("zz"));
+ PyModule_AddObject(m, "RAP_WPrintQSetInfo", PyInt_FromLong(71));
+ PyModule_AddObject(m, "RAP_W16RIPLMachineCreate", PyInt_FromLong(300));
+ PyModule_AddObject(m, "RAP_WsessionGetInfo", PyInt_FromLong(7));
+ PyModule_AddObject(m, "RAP_TI_FTGetInfo", PyInt_FromLong(152));
+ PyModule_AddObject(m, "RAP_WNetServerReqChallenge", PyInt_FromLong(126));
+ PyModule_AddObject(m, "RAP_WBuildGetInfo", PyInt_FromLong(123));
+ PyModule_AddObject(m, "RAP_SERVICE_INFO_L2", PyString_FromString("B16WDWB64"));
+ PyModule_AddObject(m, "RAP_WGetRIPLMachineInfo", PyInt_FromLong(278));
+ PyModule_AddObject(m, "RAP_W16AppParmAdd", PyInt_FromLong(296));
+ PyModule_AddObject(m, "RAP_W16WSLevelGetInfo", PyInt_FromLong(312));
+ PyModule_AddObject(m, "RAP_WPrintQContinue", PyInt_FromLong(75));
+ PyModule_AddObject(m, "PRQ_PENDING", PyInt_FromLong(PRQ_PENDING));
+ PyModule_AddObject(m, "RAP_NetShareCheck", PyInt_FromLong(5));
+ PyModule_AddObject(m, "RAP_WFileEnum2_REQ", PyString_FromString("zzWrLehb8g8"));
+ PyModule_AddObject(m, "RAP_W16RIPLMachineEnum", PyInt_FromLong(303));
+ PyModule_AddObject(m, "RAP_NetPathCanonicalize", PyInt_FromLong(137));
+ PyModule_AddObject(m, "RAP_WUseDel", PyInt_FromLong(67));
+ PyModule_AddObject(m, "RAP_NetErrorLogOpen", PyInt_FromLong(19));
+ PyModule_AddObject(m, "RAP_WDASDCtl", PyInt_FromLong(273));
+ PyModule_AddObject(m, "RAP_WaliasGetInfo", PyInt_FromLong(254));
+ PyModule_AddObject(m, "RAP_SERVER_INFO_L0", PyString_FromString("B16"));
+ PyModule_AddObject(m, "RAP_PRINTQ_INFO_L2", PyString_FromString("B13BWWWzzzzzWN"));
+ PyModule_AddObject(m, "RAP_WNetAccountConfirmUpdate", PyInt_FromLong(210));
+ PyModule_AddObject(m, "RAP_CONNECTION_INFO_L1", PyString_FromString("WWWWDzz"));
+ PyModule_AddObject(m, "RAP_wI_NetRplWkstaEnum", PyInt_FromLong(186));
+ PyModule_AddObject(m, "RAP_NetServerDeregister", PyInt_FromLong(171));
+ PyModule_AddObject(m, "RAP_TI_FTGetDriveStats", PyInt_FromLong(158));
+ PyModule_AddObject(m, "RAP_SESSION_INFO_L2", PyString_FromString("zzWWWDDDz"));
+ PyModule_AddObject(m, "RAP_WMessageNameFwd", PyInt_FromLong(33));
+ PyModule_AddObject(m, "RAP_NetFileEntrySetInfo", PyInt_FromLong(182));
+ PyModule_AddObject(m, "RAP_WGetDCName", PyInt_FromLong(119));
+ PyModule_AddObject(m, "RAP_W16RIPLMachineListParmEnum", PyInt_FromLong(304));
+ PyModule_AddObject(m, "RAP_NetServerRegister", PyInt_FromLong(170));
+ PyModule_AddObject(m, "RAP_WMessageLogFileGet", PyInt_FromLong(38));
+ PyModule_AddObject(m, "RAP_SERVER_INFO_L1", PyString_FromString("B16BBDz"));
+ PyModule_AddObject(m, "RAP_WaliasEnum", PyInt_FromLong(256));
+ PyModule_AddObject(m, "RAP_NetSessionDel_REQ", PyString_FromString("zW"));
+ PyModule_AddObject(m, "RAP_NetUserPasswordSet_REQ", PyString_FromString("zb16b16w"));
+ PyModule_AddObject(m, "RAP_WIServerSetInfo", PyInt_FromLong(201));
+ PyModule_AddObject(m, "RAP_NetGroupDel_REQ", PyString_FromString("z"));
+ PyModule_AddObject(m, "PRJ_QS_SPOOLING", PyInt_FromLong(PRJ_QS_SPOOLING));
+ PyModule_AddObject(m, "RAP_WDASDGetInfo", PyInt_FromLong(269));
+ PyModule_AddObject(m, "RAP_WPrintPortEnum", PyInt_FromLong(207));
+ PyModule_AddObject(m, "RAP_WDASDCheck", PyInt_FromLong(272));
+ PyModule_AddObject(m, "RAP_NetSessionEntryGetInfo", PyInt_FromLong(174));
+ PyModule_AddObject(m, "RAP_TI_FTErrorGetInfo", PyInt_FromLong(160));
+ PyModule_AddObject(m, "RAP_WuserGetAppSel", PyInt_FromLong(259));
+ PyModule_AddObject(m, "RAP_WWkstaSetInfo", PyInt_FromLong(64));
+ PyModule_AddObject(m, "RAP_NetGroupSetUsers_REQ", PyString_FromString("zWsTW"));
+ PyModule_AddObject(m, "RAP_SamOEMChgPasswordUser2_P", PyInt_FromLong(214));
+ PyModule_AddObject(m, "RAP_WCharDevQSetInfo", PyInt_FromLong(26));
+ PyModule_AddObject(m, "RAP_WserverGetInfo", PyInt_FromLong(13));
+ PyModule_AddObject(m, "RAP_NetPrintQEnum_REQ", PyString_FromString("WrLeh"));
+ PyModule_AddObject(m, "RAP_WPrintJobSetInfo", PyInt_FromLong(147));
+ PyModule_AddObject(m, "RAP_WUserModalsGet", PyInt_FromLong(110));
+ PyModule_AddObject(m, "RAP_WMessageFileSend", PyInt_FromLong(36));
+ PyModule_AddObject(m, "RAP_WAccessSetInfo", PyInt_FromLong(44));
+ PyModule_AddObject(m, "RAP_WMessageNameEnum", PyInt_FromLong(29));
+ PyModule_AddObject(m, "RAP_WGroupEnum", PyInt_FromLong(47));
+ PyModule_AddObject(m, "RAP_I_ShareAdd", PyInt_FromLong(281));
+ PyModule_AddObject(m, "RAP_WShareEnum_REQ", PyString_FromString("WrLeh"));
+ PyModule_AddObject(m, "RAP_NetUserValidate2_REQ", PyString_FromString("Wb62WWrLhWW"));
+ PyModule_AddObject(m, "PRQ_ACTIVE", PyInt_FromLong(PRQ_ACTIVE));
+ PyModule_AddObject(m, "RAP_W16AppParmDel", PyInt_FromLong(297));
+ PyModule_AddObject(m, "RAP_WWkstaUserLogoff", PyInt_FromLong(133));
+ PyModule_AddObject(m, "RAP_SMB_PRINT_JOB_L1", PyString_FromString("WB21BB16B10zWWzDDz"));
+ PyModule_AddObject(m, "RAP_NetGroupDelUser_REQ", PyString_FromString("zz"));
+ PyModule_AddObject(m, "RAP_WshareSetInfo", PyInt_FromLong(2));
+ PyModule_AddObject(m, "RAP_SHARENAME_LEN", PyInt_FromLong(13));
+ PyModule_AddObject(m, "RAP_W16RIPLMachClassLPEnum", PyInt_FromLong(310));
+ PyModule_AddObject(m, "RAP_NetSessionEntrySetInfo", PyInt_FromLong(175));
+ PyModule_AddObject(m, "RAP_WServiceControl", PyInt_FromLong(41));
+ PyModule_AddObject(m, "RAP_WUseAdd", PyInt_FromLong(66));
+ PyModule_AddObject(m, "RAP_SHARE_INFO_L1", PyString_FromString("B13BWz"));
+ PyModule_AddObject(m, "RAP_NetHandleGetInfo", PyInt_FromLong(120));
+ PyModule_AddObject(m, "RAP_WAccessGetUserPerms", PyInt_FromLong(105));
+ PyModule_AddObject(m, "RAP_W16RIPLMachClassEnum", PyInt_FromLong(306));
+ PyModule_AddObject(m, "RAP_GROUPNAME_LEN", PyInt_FromLong(21));
+ PyModule_AddObject(m, "PRJ_QS_ERROR", PyInt_FromLong(PRJ_QS_ERROR));
+ PyModule_AddObject(m, "RAP_WUserSetInfo2", PyInt_FromLong(114));
+ PyModule_AddObject(m, "RAP_WserverNameDel", PyInt_FromLong(314));
+ PyModule_AddObject(m, "RAP_NetAuditOpen", PyInt_FromLong(17));
+ PyModule_AddObject(m, "RAP_WKSTA_INFO_L1", PyString_FromString("WDzzzzBBDWDWWWWWWWWWWWWWWWWWWWzzWzzW"));
+ PyModule_AddObject(m, "RAP_NetAlertRaise", PyInt_FromLong(164));
+ PyModule_AddObject(m, "RAP_wI_NetRplProfileGetInfo", PyInt_FromLong(192));
+ PyModule_AddObject(m, "RAP_WMessageBufferSend", PyInt_FromLong(35));
+ PyModule_AddObject(m, "RAP_WMessageLogFileSet", PyInt_FromLong(37));
+ PyModule_AddObject(m, "RAP_WuserSetAppSel", PyInt_FromLong(260));
+ PyModule_AddObject(m, "RAP_WuserSetLogonAsn", PyInt_FromLong(258));
+ PyModule_AddObject(m, "RAP_wI_NetRplProfileEnum", PyInt_FromLong(191));
+ PyModule_AddObject(m, "RAP_NetFileEntryGetInfo", PyInt_FromLong(183));
+ PyModule_AddObject(m, "RAP_NetServerAdminCommand_REQ", PyString_FromString("zhrLeh"));
+ PyModule_AddObject(m, "RAP_WserverNameAdd", PyInt_FromLong(313));
+ PyModule_AddObject(m, "RAP_NetUserPasswordSet2_REQ", PyString_FromString("zb16b16WW"));
+ PyModule_AddObject(m, "RAP_NetConnectionEntryClear", PyInt_FromLong(177));
+ PyModule_AddObject(m, "RAP_WNetAccountUpdate", PyInt_FromLong(209));
+ PyModule_AddObject(m, "RAP_wI_NetRplWkstaDel", PyInt_FromLong(190));
+ PyModule_AddObject(m, "RAP_WGroupGetUsers", PyInt_FromLong(52));
+ PyModule_AddObject(m, "RAP_W16AppParmGet", PyInt_FromLong(298));
+ PyModule_AddObject(m, "RAP_WPrintJobContinue", PyInt_FromLong(83));
+ PyModule_AddObject(m, "RAP_NetGroupAdd_REQ", PyString_FromString("WsT"));
+ PyModule_AddObject(m, "RAP_AliasEnum", PyInt_FromLong(282));
+ PyModule_AddObject(m, "RAP_WsessionEnum", PyInt_FromLong(6));
+ PyModule_AddObject(m, "RAP_WFileGetInfo2_REQ", PyString_FromString("DWrLh"));
+ PyModule_AddObject(m, "RAP_WFileClose2_REQ", PyString_FromString("D"));
+ PyModule_AddObject(m, "RAP_USER_INFO_L1", PyString_FromString("B21BB16DWzzWz"));
+ PyModule_AddObject(m, "RAP_WshareAdd", PyInt_FromLong(3));
+ PyModule_AddObject(m, "RAP_WUseGetInfo", PyInt_FromLong(68));
+ PyModule_AddObject(m, "RAP_WPrintDestGetInfo", PyInt_FromLong(85));
+ PyModule_AddObject(m, "RAP_NetServiceStatus", PyInt_FromLong(169));
+ PyModule_AddObject(m, "RAP_WConfigGetAll2", PyInt_FromLong(118));
+ PyModule_AddObject(m, "RAP_DATATYPE_LEN", PyInt_FromLong(10));
+ PyModule_AddObject(m, "RAP_WRemoteTODSet", PyInt_FromLong(294));
+ PyModule_AddObject(m, "RAP_NetAlertStop", PyInt_FromLong(166));
+ PyModule_AddObject(m, "RAP_WDeleteRIPLMachine", PyInt_FromLong(277));
+ PyModule_AddObject(m, "RAP_WServiceEnum", PyInt_FromLong(39));
+ PyModule_AddObject(m, "RAP_SAMOEMChgPasswordUser2_REQ", PyString_FromString("B516B16"));
+ PyModule_AddObject(m, "RAP_NetAccessCheck", PyInt_FromLong(163));
+ PyModule_AddObject(m, "RAP_TI_FTVerifyMirror", PyInt_FromLong(150));
+ PyModule_AddObject(m, "RAP_WserverSetInfo", PyInt_FromLong(14));
+ PyModule_AddObject(m, "RAP_NetGroupGetUsers_REQ", PyString_FromString("zWrLeh"));
+ PyModule_AddObject(m, "RAP_FILE_INFO_L3", PyString_FromString("DWWzz"));
+ PyModule_AddObject(m, "RAP_WPrt16Query", PyInt_FromLong(284));
+ PyModule_AddObject(m, "RAP_NetWkstaUserLogoff_REQ", PyString_FromString("zzWb38WrLh"));
+ PyModule_AddObject(m, "RAP_SHARE_INFO_L2", PyString_FromString("B13BWzWWWzB9B"));
+ PyModule_AddObject(m, "RAP_wI_NetRplProfileSetInfo", PyInt_FromLong(193));
+ PyModule_AddObject(m, "RAP_TI_FTSetInfo", PyInt_FromLong(153));
+ PyModule_AddObject(m, "RAP_wI_NetRplProfileAdd", PyInt_FromLong(194));
+ PyModule_AddObject(m, "RAP_WserverNameEnum", PyInt_FromLong(315));
+ PyModule_AddObject(m, "RAP_W16RIPLMachineGetInfo", PyInt_FromLong(301));
+ PyModule_AddObject(m, "RAP_WStatisticsGet", PyInt_FromLong(89));
+ PyModule_AddObject(m, "RAP_SERVER_INFO_L3", PyString_FromString("B16BBDzDDDWWzWWWWWWWB21BzWWWWWWWWWWWWWWWWWWWWWWzDWz"));
+ PyModule_AddObject(m, "RAP_WuserGetLogonAsn", PyInt_FromLong(257));
+ PyModule_AddObject(m, "RAP_W16AppParmSet", PyInt_FromLong(299));
+ PyModule_AddObject(m, "RAP_WUserRemoteLogonCheck2", PyInt_FromLong(287));
+ PyModule_AddObject(m, "RAP_NetCharDevQEnum", PyInt_FromLong(24));
+ PyModule_AddObject(m, "RAP_NetCharDevGetInfo", PyInt_FromLong(22));
+ PyModule_AddObject(m, "RAP_WGroupGetInfo", PyInt_FromLong(106));
+ PyModule_AddObject(m, "RAP_WauditClear", PyInt_FromLong(18));
+ PyModule_AddObject(m, "RAP_wI_NetRplProfileDel", PyInt_FromLong(195));
+ PyModule_AddObject(m, "RAP_WsessionDel", PyInt_FromLong(8));
+ PyModule_AddObject(m, "RAP_NetWkstatGetInfo", PyString_FromString("WrLh"));
+ PyModule_AddObject(m, "RAP_GROUP_USERS_INFO_1", PyString_FromString("B21BN"));
+ PyModule_AddObject(m, "RAP_WConfigSet", PyInt_FromLong(211));
+ PyModule_AddObject(m, "RAP_WPrintQEnum", PyInt_FromLong(69));
+ PyModule_AddObject(m, "RAP_WGroupSetInfo", PyInt_FromLong(107));
+ PyModule_AddObject(m, "RAP_WCharDevQPurge", PyInt_FromLong(27));
+ PyModule_AddObject(m, "RAP_I_WDASDEnum", PyInt_FromLong(316));
+ PyModule_AddObject(m, "RAP_WCharDevControl", PyInt_FromLong(23));
+ PyModule_AddObject(m, "RAP_WappEnum", PyInt_FromLong(265));
+ PyModule_AddObject(m, "RAP_WUserDCDBInit", PyInt_FromLong(266));
+ PyModule_AddObject(m, "RAP_WUserEnum2", PyInt_FromLong(131));
+ PyModule_AddObject(m, "RAP_WWkstaSetUID", PyInt_FromLong(62));
+ PyModule_AddObject(m, "RAP_WUserGetInfo", PyInt_FromLong(56));
+ PyModule_AddObject(m, "RAP_WProfileLoad", PyInt_FromLong(88));
+ PyModule_AddObject(m, "RAP_TI_FTAbortVerify", PyInt_FromLong(151));
+ PyModule_AddObject(m, "RAP_NetUserSetGroups_REQ", PyString_FromString("zWsTW"));
+ PyModule_AddObject(m, "RAP_WServiceGetInfo", PyInt_FromLong(96));
+ PyModule_AddObject(m, "RAP_WKSTA_INFO_L10", PyString_FromString("zzzBBzz"));
+ PyModule_AddObject(m, "RAP_wI_NetRplBaseProfileEnum", PyInt_FromLong(197));
+ PyModule_AddObject(m, "RAP_WappDel", PyInt_FromLong(262));
+ PyModule_AddObject(m, "RAP_SRVCNAME_LEN", PyInt_FromLong(16));
+ PyModule_AddObject(m, "RAP_WStatisticsClear", PyInt_FromLong(90));
+ PyModule_AddObject(m, "RAP_NetUserEnum_REQ", PyString_FromString("WrLeh"));
+ PyModule_AddObject(m, "RAP_NetServerEnum2", PyInt_FromLong(104));
+ PyModule_AddObject(m, "RAP_WPrintQGetInfo", PyInt_FromLong(70));
+ PyModule_AddObject(m, "RAP_WNetServerAuthenticate", PyInt_FromLong(127));
+ PyModule_AddObject(m, "RAP_NetConnectionEntryGetInfo", PyInt_FromLong(179));
+ PyModule_AddObject(m, "RAP_NetFileEntryClear", PyInt_FromLong(181));
+ PyModule_AddObject(m, "RAP_WprintJobMoveAll", PyInt_FromLong(295));
+ PyModule_AddObject(m, "RAP_WDASDSetInfo2", PyInt_FromLong(318));
+ PyModule_AddObject(m, "RAP_W16RIPLMachClassSetInfo", PyInt_FromLong(308));
+ PyModule_AddObject(m, "RAP_UPASSWD_LEN", PyInt_FromLong(16));
+ PyModule_AddObject(m, "RAP_NetAlertStart", PyInt_FromLong(165));
+ PyModule_AddObject(m, "RAP_SHARE_INFO_L0", PyString_FromString("B13"));
+ PyModule_AddObject(m, "RAP_WUserModalsSet", PyInt_FromLong(111));
+ PyModule_AddObject(m, "RAP_WWkstaGetInfo_REQ", PyString_FromString("WrLh"));
+ PyModule_AddObject(m, "RAP_WPrintJobSetInfo_OLD", PyInt_FromLong(78));
+ PyModule_AddObject(m, "RAP_NetServerEnum2_REQ", PyString_FromString("WrLehDz"));
+ PyModule_AddObject(m, "RAP_WPrintDriverEnum", PyInt_FromLong(205));
+ PyModule_AddObject(m, "RAP_WPrintDestControl", PyInt_FromLong(86));
+ PyModule_AddObject(m, "RAP_WDASDSetInfo", PyInt_FromLong(270));
+ PyModule_AddObject(m, "RAP_USER_INFO_L0", PyString_FromString("B21"));
+ PyModule_AddObject(m, "RAP_WEnumRIPLMachine", PyInt_FromLong(280));
+ PyModule_AddObject(m, "RAP_TI_NetServerDiskGetInfo", PyInt_FromLong(149));
+ PyModule_AddObject(m, "RAP_NetServerEnum", PyInt_FromLong(94));
+ PyModule_AddObject(m, "RAP_WNetWriteUpdateLog", PyInt_FromLong(208));
+ PyModule_AddObject(m, "RAP_WappGetInfo", PyInt_FromLong(263));
+ PyModule_AddObject(m, "RAP_NetCharDevQGetInfo", PyInt_FromLong(25));
+ PyModule_AddObject(m, "RAP_SERVICE_INFO_L0", PyString_FromString("B16"));
+ PyModule_AddObject(m, "RAP_NetIRemoteAPI", PyInt_FromLong(168));
+ PyModule_AddObject(m, "RAP_WFileEnum2", PyInt_FromLong(112));
+ PyModule_AddObject(m, "RAP_WPrintDestSetInfo", PyInt_FromLong(144));
+ PyModule_AddObject(m, "RAP_NetSessionEnum_REQ", PyString_FromString("WrLeh"));
+ PyModule_AddObject(m, "RAP_NetNameCanonicalize", PyInt_FromLong(140));
+ PyModule_AddObject(m, "RAP_WserverAdminCommand", PyInt_FromLong(16));
+ PyModule_AddObject(m, "RAP_WFileClose2", PyInt_FromLong(125));
+ PyModule_AddObject(m, "RAP_TI_NetServerDiskEnum", PyInt_FromLong(148));
+ PyModule_AddObject(m, "RAP_WWkstaGetInfo", PyInt_FromLong(63));
+ PyModule_AddObject(m, "RAP_WGroupDelUser", PyInt_FromLong(51));
+ PyModule_AddObject(m, "RAP_WPrintJobPause", PyInt_FromLong(82));
+ PyModule_AddObject(m, "RAP_wI_NetRplWkstaSetInfo", PyInt_FromLong(188));
+ PyModule_AddObject(m, "RAP_WUserPasswordSet2", PyInt_FromLong(115));
+ PyModule_AddObject(m, "RAP_WSetRIPLMachineInfo", PyInt_FromLong(279));
+ PyModule_AddObject(m, "RAP_WshareGetInfo", PyInt_FromLong(1));
+ PyModule_AddObject(m, "RAP_NetAuditWrite", PyInt_FromLong(167));
+ PyModule_AddObject(m, "RAP_WProfileSave", PyInt_FromLong(87));
+ PyModule_AddObject(m, "PRQ_ERROR", PyInt_FromLong(PRQ_ERROR));
+ PyModule_AddObject(m, "RAP_WconnectionEnum", PyInt_FromLong(9));
+ PyModule_AddObject(m, "RAP_WDASDEnum", PyInt_FromLong(271));
+ PyModule_AddObject(m, "RAP_WAccessEnum", PyInt_FromLong(42));
+ PyModule_AddObject(m, "RAP_W16RIPLMachineDelete", PyInt_FromLong(311));
+ PyModule_AddObject(m, "RAP_WNetAccountSync", PyInt_FromLong(130));
+ PyModule_AddObject(m, "RAP_AltSrvMessageBufferSend", PyInt_FromLong(184));
+ PyModule_AddObject(m, "RAP_WPrintDestAdd", PyInt_FromLong(143));
+ PyModule_AddObject(m, "RAP_WCreateRIPLMachine", PyInt_FromLong(276));
+ PyModule_AddObject(m, "RAP_WPrintQPause", PyInt_FromLong(74));
+ PyModule_AddObject(m, "RAP_WserverGetInfo_REQ", PyString_FromString("WrLh"));
+ PyModule_AddObject(m, "RAP_WNetAccountDeltas", PyInt_FromLong(129));
+ PyModule_AddObject(m, "RAP_NetUserAdd2_REQ", PyString_FromString("WsTWW"));
+ PyModule_AddObject(m, "RAP_wI_NetRplProfileClone", PyInt_FromLong(196));
+ PyModule_AddObject(m, "RAP_MACHNAME_LEN", PyInt_FromLong(16));
+ PyModule_AddObject(m, "RAP_WPrintJobGetInfo", PyInt_FromLong(77));
+ PyModule_AddObject(m, "RAP_WappSetInfo", PyInt_FromLong(264));
+ PyModule_AddObject(m, "RAP_WMessageNameGetInfo", PyInt_FromLong(30));
+ PyModule_AddObject(m, "RAP_W16RIPLMachClassGetInfo", PyInt_FromLong(305));
+ PyModule_AddObject(m, "RAP_SRVCCMNT_LEN", PyInt_FromLong(64));
+ PyModule_AddObject(m, "RAP_TI_FTAbortFix", PyInt_FromLong(156));
+ PyModule_AddObject(m, "RAP_NetServiceGetInfo_REQ", PyString_FromString("zWrLh"));
+ PyModule_AddObject(m, "RAP_W16RIPLMachineSetInfo", PyInt_FromLong(302));
+ PyModule_AddObject(m, "RAP_WAuditRead", PyInt_FromLong(142));
+ PyModule_AddObject(m, "RAP_WDASDAdd", PyInt_FromLong(267));
+ PyModule_AddObject(m, "RAP_NetServiceEnum_REQ", PyString_FromString("WrLeh"));
+ PyModule_AddObject(m, "RAP_WNetBiosEnum", PyInt_FromLong(92));
+ PyModule_AddObject(m, "RAP_WUserDel", PyInt_FromLong(55));
+ PyModule_AddObject(m, "RAP_wI_NetRplWkstaAdd", PyInt_FromLong(189));
+ PyModule_AddObject(m, "RAP_USERNAME_LEN", PyInt_FromLong(21));
+ PyModule_AddObject(m, "RAP_NetNameCompare", PyInt_FromLong(141));
+ PyModule_AddObject(m, "RAP_WaliasDel", PyInt_FromLong(253));
+ PyModule_AddObject(m, "RAP_WUserSetInfo", PyInt_FromLong(57));
+ PyModule_AddObject(m, "RAP_WMessageNameUnFwd", PyInt_FromLong(34));
+ PyModule_AddObject(m, "RAP_WShareAdd_REQ", PyString_FromString("WsT"));
+ PyModule_AddObject(m, "RAP_NetNameValidate", PyInt_FromLong(139));
+ PyModule_AddObject(m, "RAP_WAccessAdd", PyInt_FromLong(45));
+ PyModule_AddObject(m, "RAP_WDASDDel", PyInt_FromLong(268));
+ PyModule_AddObject(m, "RAP_NetServerEnum3", PyInt_FromLong(215));
+ PyModule_AddObject(m, "RAP_WPrintQAdd", PyInt_FromLong(72));
+ PyModule_AddObject(m, "MAX_API", PyInt_FromLong(318));
+ PyModule_AddObject(m, "RAP_WGroupSetUsers", PyInt_FromLong(108));
+ PyModule_AddObject(m, "RAP_NetSessionEntryMake", PyInt_FromLong(172));
+ PyModule_AddObject(m, "RAP_NetHandleSetInfo", PyInt_FromLong(121));
+ PyModule_AddObject(m, "RAP_NetRemoteTOD", PyInt_FromLong(91));
+ PyModule_AddObject(m, "RAP_WCharDevQPurgeSelf", PyInt_FromLong(28));
+ PyModule_AddObject(m, "RAP_WPrintDestDel", PyInt_FromLong(145));
+ PyModule_AddObject(m, "RAP_WUseEnum", PyInt_FromLong(65));
+ PyModule_AddObject(m, "RAP_WGroupAddUser", PyInt_FromLong(50));
+ PyModule_AddObject(m, "RAP_WaccessApply", PyInt_FromLong(283));
+ PyModule_AddObject(m, "RAP_NetConnectionEnum_REQ", PyString_FromString("zWrLeh"));
+ PyModule_AddObject(m, "RAP_NetSessionEntryClear", PyInt_FromLong(173));
+ PyModule_AddObject(m, "RAP_WUserEnum", PyInt_FromLong(53));
+ PyModule_AddObject(m, "RAP_WshareDel", PyInt_FromLong(4));
+ PyModule_AddObject(m, "RAP_AltSrvMessageFileSend", PyInt_FromLong(185));
+ PyModule_AddObject(m, "RAP_NetUserEnum2_REQ", PyString_FromString("WrLDieh"));
+ PyModule_AddObject(m, "RAP_WfileGetInfo", PyInt_FromLong(11));
+ PyModule_AddObject(m, "RAP_WuserRemoteLogonCheck", PyInt_FromLong(274));
+ PyModule_AddObject(m, "RAP_NetUserGetGroups_REQ", PyString_FromString("zWrLeh"));
+ PyModule_AddObject(m, "RAP_WNetBiosGetInfo", PyInt_FromLong(93));
+ PyModule_AddObject(m, "RAP_WPrintDestEnum", PyInt_FromLong(84));
+ PyModule_AddObject(m, "RAP_WServiceInstall", PyInt_FromLong(40));
+ PyModule_AddObject(m, "RAP_WshareEnum", PyInt_FromLong(0));
+ PyModule_AddObject(m, "RAP_GROUP_INFO_L0", PyString_FromString("B21"));
+ PyModule_AddObject(m, "RAP_WPrt16Set", PyInt_FromLong(285));
+ PyModule_AddObject(m, "RAP_FILE_INFO_L2", PyString_FromString("D"));
+ PyModule_AddObject(m, "RAP_WUserSetGroups", PyInt_FromLong(109));
+ PyModule_AddObject(m, "RAP_WAccessGetInfo", PyInt_FromLong(43));
+ PyModule_AddObject(m, "RAP_W16RIPLMachClassDelete", PyInt_FromLong(309));
+ PyModule_AddObject(m, "RAP_WAccountsReplicate", PyInt_FromLong(212));
+ PyModule_AddObject(m, "RAP_WprintDriverSetInfo", PyInt_FromLong(251));
+ PyModule_AddObject(m, "RAP_TI_FTFixError", PyInt_FromLong(155));
+ PyModule_AddObject(m, "RAP_WNetServerPasswordSet", PyInt_FromLong(128));
+ PyModule_AddObject(m, "RAP_WerrorLogClear", PyInt_FromLong(20));
+ PyModule_AddObject(m, "PRJ_QS_QUEUED", PyInt_FromLong(PRJ_QS_QUEUED));
+ PyModule_AddObject(m, "RAP_WPrintJobDel", PyInt_FromLong(81));
+ PyModule_AddObject(m, "RAP_WStatisticsGet2", PyInt_FromLong(122));
+ PyModule_AddObject(m, "RAP_WAccessDel", PyInt_FromLong(46));
+ PyModule_AddObject(m, "PRJ_QS_PRINTING", PyInt_FromLong(PRJ_QS_PRINTING));
+ PyModule_AddObject(m, "RAP_WserverDiskEnum", PyInt_FromLong(15));
+ PyModule_AddObject(m, "PRJ_QS_PAUSED", PyInt_FromLong(PRJ_QS_PAUSED));
+ PyModule_AddObject(m, "RAP_I_NetServerEnum", PyInt_FromLong(95));
+ PyModule_AddObject(m, "RAP_wI_NetRplWkstaGetInfo", PyInt_FromLong(187));
+ PyModule_AddObject(m, "RAP_USER_LOGOFF_INFO_L1", PyString_FromString("WDW"));
+ PyModule_AddObject(m, "RAP_WGroupDel", PyInt_FromLong(49));
+ PyModule_AddObject(m, "RAP_NetConnectionEntrySetInfo", PyInt_FromLong(178));
+ PyModule_AddObject(m, "RAP_SERVER_INFO_L2", PyString_FromString("B16BBDzDDDWWzWWWWWWWB21BzWWWWWWWWWWWWWWWWWWWWWWz"));
+ PyModule_AddObject(m, "RAP_WUserAdd", PyInt_FromLong(54));
+ PyModule_AddObject(m, "RAP_WfileClose", PyInt_FromLong(12));
+ PyModule_AddObject(m, "RAP_WFileGetInfo2", PyInt_FromLong(124));
+ PyModule_AddObject(m, "RAP_WPrintQPurge", PyInt_FromLong(103));
+ PyModule_AddObject(m, "RAP_NetCharDevEnum", PyInt_FromLong(21));
+ PyModule_AddObject(m, "RAP_SPASSWD_LEN", PyInt_FromLong(9));
+ PyModule_AddObject(m, "RAP_GROUP_USERS_INFO_0", PyString_FromString("B21"));
+ PyModule_AddObject(m, "RAP_NetServiceInstall_REQ", PyString_FromString("zF88sg88T"));
+ PyModule_AddObject(m, "RAP_NetGroupEnum_REQ", PyString_FromString("WrLeh"));
+ PyModule_AddObject(m, "RAP_NetFileEntryMake", PyInt_FromLong(180));
+ PyModule_AddObject(m, "RAP_WPrintQProcessorEnum", PyInt_FromLong(206));
+ PyModule_AddObject(m, "RAP_WPrintQDel", PyInt_FromLong(73));
+ PyModule_AddObject(m, "RAP_WWkstaUserLogon", PyInt_FromLong(132));
+ PyModule_AddObject(m, "PRQ_PAUSE", PyInt_FromLong(PRQ_PAUSE));
+ PyModule_AddObject(m, "RAP_NetPathType", PyInt_FromLong(136));
+ PyModule_AddObject(m, "RAP_W16RIPLMachClassCreate", PyInt_FromLong(307));
+ PyModule_AddObject(m, "RAP_WUserDel100", PyInt_FromLong(286));
+ PyModule_AddObject(m, "RAP_TI_FTDiagnoseError", PyInt_FromLong(157));
+ PyModule_AddObject(m, "RAP_I_NetServerEnum2", PyInt_FromLong(116));
+ PyModule_AddObject(m, "RAP_NetServiceControl_REQ", PyString_FromString("zWWrL"));
+ PyModule_AddObject(m, "RAP_WUserPasswordSet", PyInt_FromLong(58));
+ PyModule_AddObject(m, "RAP_WUserGetGroups", PyInt_FromLong(59));
+ PyModule_AddObject(m, "RAP_WUserPasswordSet3", PyInt_FromLong(275));
+ PyModule_AddObject(m, "RAP_WShareDel_REQ", PyString_FromString("zW"));
+ PyModule_AddObject(m, "RAP_WMessageNameDel", PyInt_FromLong(32));
+ PyModule_AddObject(m, "RAP_WfileEnum", PyInt_FromLong(10));
+ PyModule_AddObject(m, "RAP_NetPathCompare", PyInt_FromLong(138));
+ PyModule_AddObject(m, "RAP_WErrorLogRead", PyInt_FromLong(135));
+ PyModule_AddObject(m, "RAP_WMessageNameAdd", PyInt_FromLong(31));
+ PyModule_AddObject(m, "RAP_GROUP_INFO_L1", PyString_FromString("B21Bz"));
+ Py_INCREF((PyObject *)(void *)&rap_group_info_1_Type);
+ PyModule_AddObject(m, "group_info_1", (PyObject *)(void *)&rap_group_info_1_Type);
+ Py_INCREF((PyObject *)(void *)&rap_user_info_1_Type);
+ PyModule_AddObject(m, "user_info_1", (PyObject *)(void *)&rap_user_info_1_Type);
+ Py_INCREF((PyObject *)(void *)&rap_service_info_2_Type);
+ PyModule_AddObject(m, "service_info_2", (PyObject *)(void *)&rap_service_info_2_Type);
+ Py_INCREF((PyObject *)(void *)&rap_share_info_0_Type);
+ PyModule_AddObject(m, "share_info_0", (PyObject *)(void *)&rap_share_info_0_Type);
+ Py_INCREF((PyObject *)(void *)&rap_share_info_1_Type);
+ PyModule_AddObject(m, "share_info_1", (PyObject *)(void *)&rap_share_info_1_Type);
+ Py_INCREF((PyObject *)(void *)&rap_share_info_2_Type);
+ PyModule_AddObject(m, "share_info_2", (PyObject *)(void *)&rap_share_info_2_Type);
+ Py_INCREF((PyObject *)(void *)&rap_server_info_0_Type);
+ PyModule_AddObject(m, "server_info_0", (PyObject *)(void *)&rap_server_info_0_Type);
+ Py_INCREF((PyObject *)(void *)&rap_server_info_1_Type);
+ PyModule_AddObject(m, "server_info_1", (PyObject *)(void *)&rap_server_info_1_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintQueue0_Type);
+ PyModule_AddObject(m, "PrintQueue0", (PyObject *)(void *)&rap_PrintQueue0_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintQueue1_Type);
+ PyModule_AddObject(m, "PrintQueue1", (PyObject *)(void *)&rap_PrintQueue1_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintQueue2_Type);
+ PyModule_AddObject(m, "PrintQueue2", (PyObject *)(void *)&rap_PrintQueue2_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintQueue3_Type);
+ PyModule_AddObject(m, "PrintQueue3", (PyObject *)(void *)&rap_PrintQueue3_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintQueue4_Type);
+ PyModule_AddObject(m, "PrintQueue4", (PyObject *)(void *)&rap_PrintQueue4_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintQueue5_Type);
+ PyModule_AddObject(m, "PrintQueue5", (PyObject *)(void *)&rap_PrintQueue5_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintJobInfo0_Type);
+ PyModule_AddObject(m, "PrintJobInfo0", (PyObject *)(void *)&rap_PrintJobInfo0_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintJobInfo1_Type);
+ PyModule_AddObject(m, "PrintJobInfo1", (PyObject *)(void *)&rap_PrintJobInfo1_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintJobInfo2_Type);
+ PyModule_AddObject(m, "PrintJobInfo2", (PyObject *)(void *)&rap_PrintJobInfo2_Type);
+ Py_INCREF((PyObject *)(void *)&rap_PrintJobInfo3_Type);
+ PyModule_AddObject(m, "PrintJobInfo3", (PyObject *)(void *)&rap_PrintJobInfo3_Type);
+#ifdef PY_MOD_RAP_PATCH
+ PY_MOD_RAP_PATCH(m);
+#endif
+
+}
diff --git a/librpc/gen_ndr/srv_rap.c b/librpc/gen_ndr/srv_rap.c
new file mode 100644
index 0000000000..5a06dc2545
--- /dev/null
+++ b/librpc/gen_ndr/srv_rap.c
@@ -0,0 +1,398 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/srv_rap.h"
+
+static bool api_rap_NetShareEnum(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct rap_NetShareEnum *r;
+
+ call = &ndr_table_rap.calls[NDR_RAP_NETSHAREENUM];
+
+ r = talloc(talloc_tos(), struct rap_NetShareEnum);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(rap_NetShareEnum, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(r, union rap_share_info);
+ if (r->out.info == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ _rap_NetShareEnum(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(rap_NetShareEnum, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_rap_NetServerEnum2(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct rap_NetServerEnum2 *r;
+
+ call = &ndr_table_rap.calls[NDR_RAP_NETSERVERENUM2];
+
+ r = talloc(talloc_tos(), struct rap_NetServerEnum2);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(rap_NetServerEnum2, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(r, union rap_server_info);
+ if (r->out.info == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ _rap_NetServerEnum2(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(rap_NetServerEnum2, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_rap_WserverGetInfo(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct rap_WserverGetInfo *r;
+
+ call = &ndr_table_rap.calls[NDR_RAP_WSERVERGETINFO];
+
+ r = talloc(talloc_tos(), struct rap_WserverGetInfo);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(rap_WserverGetInfo, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ _rap_WserverGetInfo(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(rap_WserverGetInfo, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_rap_NetPrintQEnum(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct rap_NetPrintQEnum *r;
+
+ call = &ndr_table_rap.calls[NDR_RAP_NETPRINTQENUM];
+
+ r = talloc(talloc_tos(), struct rap_NetPrintQEnum);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(rap_NetPrintQEnum, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(r, union rap_printq_info);
+ if (r->out.info == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ _rap_NetPrintQEnum(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(rap_NetPrintQEnum, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+
+/* Tables */
+static struct api_struct api_rap_cmds[] =
+{
+ {"RAP_NETSHAREENUM", NDR_RAP_NETSHAREENUM, api_rap_NetShareEnum},
+ {"RAP_NETSERVERENUM2", NDR_RAP_NETSERVERENUM2, api_rap_NetServerEnum2},
+ {"RAP_WSERVERGETINFO", NDR_RAP_WSERVERGETINFO, api_rap_WserverGetInfo},
+ {"RAP_NETPRINTQENUM", NDR_RAP_NETPRINTQENUM, api_rap_NetPrintQEnum},
+};
+
+void rap_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_rap_cmds;
+ *n_fns = sizeof(api_rap_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_rap_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
+{
+ if (cli->pipes_struct == NULL) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ switch (opnum)
+ {
+ case NDR_RAP_NETSHAREENUM: {
+ struct rap_NetShareEnum *r = (struct rap_NetShareEnum *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union rap_share_info);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ _rap_NetShareEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_RAP_NETSERVERENUM2: {
+ struct rap_NetServerEnum2 *r = (struct rap_NetServerEnum2 *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union rap_server_info);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ _rap_NetServerEnum2(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_RAP_WSERVERGETINFO: {
+ struct rap_WserverGetInfo *r = (struct rap_WserverGetInfo *)_r;
+ ZERO_STRUCT(r->out);
+ _rap_WserverGetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_RAP_NETPRINTQENUM: {
+ struct rap_NetPrintQEnum *r = (struct rap_NetPrintQEnum *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union rap_printq_info);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ _rap_NetPrintQEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ default:
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+}
+
+NTSTATUS rpc_rap_init(void)
+{
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "rap", "rap", &ndr_table_rap, api_rap_cmds, sizeof(api_rap_cmds) / sizeof(struct api_struct));
+}
diff --git a/librpc/gen_ndr/srv_rap.h b/librpc/gen_ndr/srv_rap.h
new file mode 100644
index 0000000000..594ddd1b0e
--- /dev/null
+++ b/librpc/gen_ndr/srv_rap.h
@@ -0,0 +1,15 @@
+#include "../librpc/gen_ndr/ndr_rap.h"
+#ifndef __SRV_RAP__
+#define __SRV_RAP__
+void _rap_NetShareEnum(pipes_struct *p, struct rap_NetShareEnum *r);
+void _rap_NetServerEnum2(pipes_struct *p, struct rap_NetServerEnum2 *r);
+void _rap_WserverGetInfo(pipes_struct *p, struct rap_WserverGetInfo *r);
+void _rap_NetPrintQEnum(pipes_struct *p, struct rap_NetPrintQEnum *r);
+void rap_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_rap_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r);
+void _rap_NetShareEnum(pipes_struct *p, struct rap_NetShareEnum *r);
+void _rap_NetServerEnum2(pipes_struct *p, struct rap_NetServerEnum2 *r);
+void _rap_WserverGetInfo(pipes_struct *p, struct rap_WserverGetInfo *r);
+void _rap_NetPrintQEnum(pipes_struct *p, struct rap_NetPrintQEnum *r);
+NTSTATUS rpc_rap_init(void);
+#endif /* __SRV_RAP__ */