diff options
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.c | 48 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.h | 26 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 248 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.h | 15 | ||||
-rw-r--r-- | librpc/gen_ndr/spoolss.h | 32 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.c | 57 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.h | 8 | ||||
-rw-r--r-- | librpc/idl/spoolss.idl | 37 |
8 files changed, 380 insertions, 91 deletions
diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index 492f2c2a71..2f15cb30bb 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -3107,23 +3107,34 @@ NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_cli return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + uint32_t color /* [in] */, + uint32_t flags /* [in] */, + uint32_t *reply_result /* [out] [ref] */, + uint32_t reply_type /* [in] */, + union spoolss_ReplyPrinterInfo info /* [in] [switch_is(reply_type)] */, + WERROR *werror) { - struct spoolss_RouterRefreshPrinterChangeNotification r; + struct spoolss_RouterReplyPrinterEx r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.color = color; + r.in.flags = flags; + r.in.reply_type = reply_type; + r.in.info = info; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, &r); + NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, &r); } status = cli->dispatch(cli, mem_ctx, &ndr_table_spoolss, - NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION, + NDR_SPOOLSS_ROUTERREPLYPRINTEREX, &r); if (!NT_STATUS_IS_OK(status)) { @@ -3131,7 +3142,7 @@ NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_c } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, &r); + NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -3139,6 +3150,7 @@ NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_c } /* Return variables */ + *reply_result = *r.out.reply_result; /* Return result */ if (werror) { @@ -3148,15 +3160,15 @@ NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_c return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - struct policy_handle *handle /* [in] [ref] */, - uint32_t change_low /* [in] */, - struct spoolss_NotifyOptionsContainer *container /* [in] [unique] */, - struct spoolss_NotifyInfo **info /* [out] [ref] */, - WERROR *werror) +NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + uint32_t change_low /* [in] */, + struct spoolss_NotifyOptionsContainer *container /* [in] [unique] */, + struct spoolss_NotifyInfo **info /* [out] [ref] */, + WERROR *werror) { - struct spoolss_RemoteFindNextPrinterChangeNotifyEx r; + struct spoolss_RouterRefreshPrinterChangeNotify r; NTSTATUS status; /* In parameters */ @@ -3165,13 +3177,13 @@ NTSTATUS rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_clie r.in.container = container; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, &r); + NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r); } status = cli->dispatch(cli, mem_ctx, &ndr_table_spoolss, - NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX, + NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY, &r); if (!NT_STATUS_IS_OK(status)) { @@ -3179,7 +3191,7 @@ NTSTATUS rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_clie } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, &r); + NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r); } if (NT_STATUS_IS_ERR(status)) { diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h index 25000a4cc4..6903aa6909 100644 --- a/librpc/gen_ndr/cli_spoolss.h +++ b/librpc/gen_ndr/cli_spoolss.h @@ -382,16 +382,22 @@ NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_cli uint32_t printer_local /* [in] */, struct spoolss_NotifyOptionsContainer *t1 /* [in] [unique] */, WERROR *werror); -NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); -NTSTATUS rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - struct policy_handle *handle /* [in] [ref] */, - uint32_t change_low /* [in] */, - struct spoolss_NotifyOptionsContainer *container /* [in] [unique] */, - struct spoolss_NotifyInfo **info /* [out] [ref] */, - WERROR *werror); +NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + uint32_t color /* [in] */, + uint32_t flags /* [in] */, + uint32_t *reply_result /* [out] [ref] */, + uint32_t reply_type /* [in] */, + union spoolss_ReplyPrinterInfo info /* [in] [switch_is(reply_type)] */, + WERROR *werror); +NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + uint32_t change_low /* [in] */, + struct spoolss_NotifyOptionsContainer *container /* [in] [unique] */, + struct spoolss_NotifyInfo **info /* [out] [ref] */, + WERROR *werror); NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index 9ef5d37336..5525ad4586 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -10602,6 +10602,124 @@ _PUBLIC_ void ndr_print_spoolss_NotifyInfo(struct ndr_print *ndr, const char *na ndr->depth--; } +static enum ndr_err_code ndr_push_spoolss_ReplyPrinterInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_ReplyPrinterInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + switch (level) { + case 0: { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); + break; } + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 0: + if (r->info0) { + NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0)); + } + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_spoolss_ReplyPrinterInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_ReplyPrinterInfo *r) +{ + int level; + uint32_t _level; + TALLOC_CTX *_mem_save_info0_0; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case 0: { + uint32_t _ptr_info0; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0)); + if (_ptr_info0) { + NDR_PULL_ALLOC(ndr, r->info0); + } else { + r->info0 = NULL; + } + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 0: + if (r->info0) { + _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0); + NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0); + } + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_spoolss_ReplyPrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_ReplyPrinterInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "spoolss_ReplyPrinterInfo"); + switch (level) { + case 0: + ndr_print_ptr(ndr, "info0", r->info0); + ndr->depth++; + if (r->info0) { + ndr_print_spoolss_NotifyInfo(ndr, "info0", r->info0); + } + ndr->depth--; + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_spoolss_PrinterNotifyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_spoolss_PrinterNotifyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_spoolss_PrinterNotifyFlags(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDED", PRINTER_NOTIFY_INFO_DISCARDED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDNOTED", PRINTER_NOTIFY_INFO_DISCARDNOTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_COLOR_MISMATCH", PRINTER_NOTIFY_INFO_COLOR_MISMATCH, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_spoolss_UserLevel1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_UserLevel1 *r) { if (ndr_flags & NDR_SCALARS) { @@ -10828,6 +10946,35 @@ _PUBLIC_ void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print *ndr, const c ndr->depth--; } +static enum ndr_err_code ndr_push_spoolss_AddPrinterDriverExFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_spoolss_AddPrinterDriverExFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_spoolss_AddPrinterDriverExFlags(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_STRICT_UPGRADE", APD_STRICT_UPGRADE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_STRICT_DOWNGRADE", APD_STRICT_DOWNGRADE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_ALL_FILES", APD_COPY_ALL_FILES, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_NEW_FILES", APD_COPY_NEW_FILES, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_FROM_DIRECTORY", APD_COPY_FROM_DIRECTORY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_DONT_COPY_FILES_TO_CLUSTER", APD_DONT_COPY_FILES_TO_CLUSTER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_TO_ALL_SPOOLERS", APD_COPY_TO_ALL_SPOOLERS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_RETURN_BLOCKING_STATUS_CODE", APD_RETURN_BLOCKING_STATUS_CODE, r); + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrinters *r) { if (flags & NDR_IN) { @@ -16638,48 +16785,99 @@ _PUBLIC_ void ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_ ndr->depth--; } -static enum ndr_err_code ndr_push_spoolss_RouterRefreshPrinterChangeNotification(struct ndr_push *ndr, int flags, const struct spoolss_RouterRefreshPrinterChangeNotification *r) +static enum ndr_err_code ndr_push_spoolss_RouterReplyPrinterEx(struct ndr_push *ndr, int flags, const struct spoolss_RouterReplyPrinterEx *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.color)); + NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reply_type)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.reply_type)); + NDR_CHECK(ndr_push_spoolss_ReplyPrinterInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info)); } if (flags & NDR_OUT) { + if (r->out.reply_result == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_spoolss_PrinterNotifyFlags(ndr, NDR_SCALARS, *r->out.reply_result)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_spoolss_RouterRefreshPrinterChangeNotification(struct ndr_pull *ndr, int flags, struct spoolss_RouterRefreshPrinterChangeNotification *r) +static enum ndr_err_code ndr_pull_spoolss_RouterReplyPrinterEx(struct ndr_pull *ndr, int flags, struct spoolss_RouterReplyPrinterEx *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_reply_result_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.color)); + NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reply_type)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.reply_type)); + NDR_CHECK(ndr_pull_spoolss_ReplyPrinterInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info)); + NDR_PULL_ALLOC(ndr, r->out.reply_result); + ZERO_STRUCTP(r->out.reply_result); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.reply_result); + } + _mem_save_reply_result_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.reply_result, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_spoolss_PrinterNotifyFlags(ndr, NDR_SCALARS, r->out.reply_result)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reply_result_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_spoolss_RouterRefreshPrinterChangeNotification(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterRefreshPrinterChangeNotification *r) +_PUBLIC_ void ndr_print_spoolss_RouterReplyPrinterEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterReplyPrinterEx *r) { - ndr_print_struct(ndr, name, "spoolss_RouterRefreshPrinterChangeNotification"); + ndr_print_struct(ndr, name, "spoolss_RouterReplyPrinterEx"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_RouterRefreshPrinterChangeNotification"); + ndr_print_struct(ndr, "in", "spoolss_RouterReplyPrinterEx"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_uint32(ndr, "color", r->in.color); + ndr_print_spoolss_PrinterChangeFlags(ndr, "flags", r->in.flags); + ndr_print_uint32(ndr, "reply_type", r->in.reply_type); + ndr_print_set_switch_value(ndr, &r->in.info, r->in.reply_type); + ndr_print_spoolss_ReplyPrinterInfo(ndr, "info", &r->in.info); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_RouterRefreshPrinterChangeNotification"); + ndr_print_struct(ndr, "out", "spoolss_RouterReplyPrinterEx"); + ndr->depth++; + ndr_print_ptr(ndr, "reply_result", r->out.reply_result); ndr->depth++; + ndr_print_spoolss_PrinterNotifyFlags(ndr, "reply_result", *r->out.reply_result); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; } -_PUBLIC_ enum ndr_err_code ndr_push_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct ndr_push *ndr, int flags, const struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r) +_PUBLIC_ enum ndr_err_code ndr_push_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_push *ndr, int flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -16705,7 +16903,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_RemoteFindNextPrinterChangeNotifyEx( return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct ndr_pull *ndr, int flags, struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r) +_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_pull *ndr, int flags, struct spoolss_RouterRefreshPrinterChangeNotify *r) { uint32_t _ptr_container; uint32_t _ptr_info; @@ -16763,15 +16961,15 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_RemoteFindNextPrinterChangeNotifyEx( return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r) +_PUBLIC_ void ndr_print_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r) { - ndr_print_struct(ndr, name, "spoolss_RemoteFindNextPrinterChangeNotifyEx"); + ndr_print_struct(ndr, name, "spoolss_RouterRefreshPrinterChangeNotify"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_RemoteFindNextPrinterChangeNotifyEx"); + ndr_print_struct(ndr, "in", "spoolss_RouterRefreshPrinterChangeNotify"); ndr->depth++; ndr_print_ptr(ndr, "handle", r->in.handle); ndr->depth++; @@ -16787,7 +16985,7 @@ _PUBLIC_ void ndr_print_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct ndr_p ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_RemoteFindNextPrinterChangeNotifyEx"); + ndr_print_struct(ndr, "out", "spoolss_RouterRefreshPrinterChangeNotify"); ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; @@ -18580,7 +18778,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_AddPrinterDriverEx(struct ndr_push * NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level)); NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_spoolss_AddPrinterDriverExFlags(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -18601,7 +18799,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_AddPrinterDriverEx(struct ndr_pull * NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level)); NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_spoolss_AddPrinterDriverExFlags(ndr, NDR_SCALARS, &r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -18626,7 +18824,7 @@ _PUBLIC_ void ndr_print_spoolss_AddPrinterDriverEx(struct ndr_print *ndr, const ndr_print_uint32(ndr, "level", r->in.level); ndr_print_set_switch_value(ndr, &r->in.info, r->in.level); ndr_print_spoolss_AddDriverInfo(ndr, "info", &r->in.info); - ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_spoolss_AddPrinterDriverExFlags(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -19414,19 +19612,19 @@ static const struct ndr_interface_call spoolss_calls[] = { false, }, { - "spoolss_RouterRefreshPrinterChangeNotification", - sizeof(struct spoolss_RouterRefreshPrinterChangeNotification), - (ndr_push_flags_fn_t) ndr_push_spoolss_RouterRefreshPrinterChangeNotification, - (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterRefreshPrinterChangeNotification, - (ndr_print_function_t) ndr_print_spoolss_RouterRefreshPrinterChangeNotification, + "spoolss_RouterReplyPrinterEx", + sizeof(struct spoolss_RouterReplyPrinterEx), + (ndr_push_flags_fn_t) ndr_push_spoolss_RouterReplyPrinterEx, + (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterReplyPrinterEx, + (ndr_print_function_t) ndr_print_spoolss_RouterReplyPrinterEx, false, }, { - "spoolss_RemoteFindNextPrinterChangeNotifyEx", - sizeof(struct spoolss_RemoteFindNextPrinterChangeNotifyEx), - (ndr_push_flags_fn_t) ndr_push_spoolss_RemoteFindNextPrinterChangeNotifyEx, - (ndr_pull_flags_fn_t) ndr_pull_spoolss_RemoteFindNextPrinterChangeNotifyEx, - (ndr_print_function_t) ndr_print_spoolss_RemoteFindNextPrinterChangeNotifyEx, + "spoolss_RouterRefreshPrinterChangeNotify", + sizeof(struct spoolss_RouterRefreshPrinterChangeNotify), + (ndr_push_flags_fn_t) ndr_push_spoolss_RouterRefreshPrinterChangeNotify, + (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterRefreshPrinterChangeNotify, + (ndr_print_function_t) ndr_print_spoolss_RouterRefreshPrinterChangeNotify, false, }, { diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h index 6240290e4c..ef97a01ecd 100644 --- a/librpc/gen_ndr/ndr_spoolss.h +++ b/librpc/gen_ndr/ndr_spoolss.h @@ -144,9 +144,9 @@ extern const struct ndr_interface_table ndr_table_spoolss; #define NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX (0x41) -#define NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION (0x42) +#define NDR_SPOOLSS_ROUTERREPLYPRINTEREX (0x42) -#define NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX (0x43) +#define NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY (0x43) #define NDR_SPOOLSS_44 (0x44) @@ -315,11 +315,14 @@ void ndr_print_spoolss_NotifyBlob(struct ndr_print *ndr, const char *name, const void ndr_print_spoolss_NotifyData(struct ndr_print *ndr, const char *name, const union spoolss_NotifyData *r); void ndr_print_spoolss_Notify(struct ndr_print *ndr, const char *name, const struct spoolss_Notify *r); void ndr_print_spoolss_NotifyInfo(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyInfo *r); +void ndr_print_spoolss_ReplyPrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_ReplyPrinterInfo *r); +void ndr_print_spoolss_PrinterNotifyFlags(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_spoolss_UserLevel1(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevel1 *r); void ndr_print_spoolss_UserLevel(struct ndr_print *ndr, const char *name, const union spoolss_UserLevel *r); enum ndr_err_code ndr_push_spoolss_DeleteDriverFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r); enum ndr_err_code ndr_pull_spoolss_DeleteDriverFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_spoolss_AddPrinterDriverExFlags(struct ndr_print *ndr, const char *name, uint32_t r); enum ndr_err_code ndr_push__spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrinters *r); enum ndr_err_code ndr_pull__spoolss_EnumPrinters(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrinters *r); void ndr_print__spoolss_EnumPrinters(struct ndr_print *ndr, const char *name, int flags, const struct _spoolss_EnumPrinters *r); @@ -473,10 +476,10 @@ void ndr_print_spoolss_ResetPrinterEx(struct ndr_print *ndr, const char *name, i enum ndr_err_code ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_push *ndr, int flags, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r); enum ndr_err_code ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_pull *ndr, int flags, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r); void ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r); -void ndr_print_spoolss_RouterRefreshPrinterChangeNotification(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterRefreshPrinterChangeNotification *r); -enum ndr_err_code ndr_push_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct ndr_push *ndr, int flags, const struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r); -enum ndr_err_code ndr_pull_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct ndr_pull *ndr, int flags, struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r); -void ndr_print_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r); +void ndr_print_spoolss_RouterReplyPrinterEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterReplyPrinterEx *r); +enum ndr_err_code ndr_push_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_push *ndr, int flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r); +enum ndr_err_code ndr_pull_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_pull *ndr, int flags, struct spoolss_RouterRefreshPrinterChangeNotify *r); +void ndr_print_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r); void ndr_print_spoolss_44(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_44 *r); enum ndr_err_code ndr_push_spoolss_OpenPrinterEx(struct ndr_push *ndr, int flags, const struct spoolss_OpenPrinterEx *r); enum ndr_err_code ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull *ndr, int flags, struct spoolss_OpenPrinterEx *r); diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index 4e854db009..3554d37b39 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -877,6 +877,15 @@ struct spoolss_NotifyInfo { struct spoolss_Notify *notifies;/* [size_is(count)] */ }; +union spoolss_ReplyPrinterInfo { + struct spoolss_NotifyInfo *info0;/* [unique,case(0)] */ +}/* [switch_type(uint32)] */; + +/* bitmap spoolss_PrinterNotifyFlags */ +#define PRINTER_NOTIFY_INFO_DISCARDED ( 0x00000001 ) +#define PRINTER_NOTIFY_INFO_DISCARDNOTED ( 0x00010000 ) +#define PRINTER_NOTIFY_INFO_COLOR_MISMATCH ( 0x00080000 ) + struct spoolss_UserLevel1 { uint32_t size; const char *client;/* [unique,charset(UTF16)] */ @@ -903,6 +912,16 @@ union spoolss_UserLevel { #define DPD_DELETE_SPECIFIC_VERSION ( 0x00000002 ) #define DPD_DELETE_ALL_FILES ( 0x00000004 ) +/* bitmap spoolss_AddPrinterDriverExFlags */ +#define APD_STRICT_UPGRADE ( 0x00000001 ) +#define APD_STRICT_DOWNGRADE ( 0x00000002 ) +#define APD_COPY_ALL_FILES ( 0x00000004 ) +#define APD_COPY_NEW_FILES ( 0x00000008 ) +#define APD_COPY_FROM_DIRECTORY ( 0x00000010 ) +#define APD_DONT_COPY_FILES_TO_CLUSTER ( 0x00001000 ) +#define APD_COPY_TO_ALL_SPOOLERS ( 0x00002000 ) +#define APD_RETURN_BLOCKING_STATUS_CODE ( 0x00010000 ) + struct _spoolss_EnumPrinters { struct { @@ -2017,15 +2036,24 @@ struct spoolss_RemoteFindFirstPrinterChangeNotifyEx { }; -struct spoolss_RouterRefreshPrinterChangeNotification { +struct spoolss_RouterReplyPrinterEx { + struct { + struct policy_handle *handle;/* [ref] */ + uint32_t color; + uint32_t flags; + uint32_t reply_type; + union spoolss_ReplyPrinterInfo info;/* [switch_is(reply_type)] */ + } in; + struct { + uint32_t *reply_result;/* [ref] */ WERROR result; } out; }; -struct spoolss_RemoteFindNextPrinterChangeNotifyEx { +struct spoolss_RouterRefreshPrinterChangeNotify { struct { struct policy_handle *handle;/* [ref] */ uint32_t change_low; diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index c6f5d62b32..1f8c89a53f 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -5058,18 +5058,18 @@ static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p) return true; } -static bool api_spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p) +static bool api_spoolss_RouterReplyPrinterEx(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 spoolss_RouterRefreshPrinterChangeNotification *r; + struct spoolss_RouterReplyPrinterEx *r; - call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION]; + call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTEREX]; - r = talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotification); + r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinterEx); if (r == NULL) { return false; } @@ -5093,10 +5093,17 @@ static bool api_spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, r); + NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, r); } - r->out.result = _spoolss_RouterRefreshPrinterChangeNotification(p, r); + ZERO_STRUCT(r->out); + r->out.reply_result = talloc_zero(r, uint32_t); + if (r->out.reply_result == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _spoolss_RouterReplyPrinterEx(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -5105,7 +5112,7 @@ static bool api_spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, r); + NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, r); } push = ndr_push_init_ctx(r, NULL); @@ -5131,18 +5138,18 @@ static bool api_spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p) return true; } -static bool api_spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p) +static bool api_spoolss_RouterRefreshPrinterChangeNotify(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 spoolss_RemoteFindNextPrinterChangeNotifyEx *r; + struct spoolss_RouterRefreshPrinterChangeNotify *r; - call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX]; + call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY]; - r = talloc(talloc_tos(), struct spoolss_RemoteFindNextPrinterChangeNotifyEx); + r = talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotify); if (r == NULL) { return false; } @@ -5166,7 +5173,7 @@ static bool api_spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, r); + NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r); } ZERO_STRUCT(r->out); @@ -5176,7 +5183,7 @@ static bool api_spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p) return false; } - r->out.result = _spoolss_RemoteFindNextPrinterChangeNotifyEx(p, r); + r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -5185,7 +5192,7 @@ static bool api_spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, r); + NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r); } push = ndr_push_init_ctx(r, NULL); @@ -7428,8 +7435,8 @@ static struct api_struct api_spoolss_cmds[] = {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT, api_spoolss_SpoolerInit}, {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX, api_spoolss_ResetPrinterEx}, {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx}, - {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION, api_spoolss_RouterRefreshPrinterChangeNotification}, - {"SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindNextPrinterChangeNotifyEx}, + {"SPOOLSS_ROUTERREPLYPRINTEREX", NDR_SPOOLSS_ROUTERREPLYPRINTEREX, api_spoolss_RouterReplyPrinterEx}, + {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY, api_spoolss_RouterRefreshPrinterChangeNotify}, {"SPOOLSS_44", NDR_SPOOLSS_44, api_spoolss_44}, {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX, api_spoolss_OpenPrinterEx}, {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX, api_spoolss_AddPrinterEx}, @@ -8069,21 +8076,27 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } - case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION: { - struct spoolss_RouterRefreshPrinterChangeNotification *r = (struct spoolss_RouterRefreshPrinterChangeNotification *)_r; - r->out.result = _spoolss_RouterRefreshPrinterChangeNotification(cli->pipes_struct, r); + case NDR_SPOOLSS_ROUTERREPLYPRINTEREX: { + struct spoolss_RouterReplyPrinterEx *r = (struct spoolss_RouterReplyPrinterEx *)_r; + ZERO_STRUCT(r->out); + r->out.reply_result = talloc_zero(mem_ctx, uint32_t); + if (r->out.reply_result == NULL) { + return NT_STATUS_NO_MEMORY; + } + + r->out.result = _spoolss_RouterReplyPrinterEx(cli->pipes_struct, r); return NT_STATUS_OK; } - case NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX: { - struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r = (struct spoolss_RemoteFindNextPrinterChangeNotifyEx *)_r; + case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY: { + struct spoolss_RouterRefreshPrinterChangeNotify *r = (struct spoolss_RouterRefreshPrinterChangeNotify *)_r; ZERO_STRUCT(r->out); r->out.info = talloc_zero(mem_ctx, struct spoolss_NotifyInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } - r->out.result = _spoolss_RemoteFindNextPrinterChangeNotifyEx(cli->pipes_struct, r); + r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(cli->pipes_struct, r); return NT_STATUS_OK; } diff --git a/librpc/gen_ndr/srv_spoolss.h b/librpc/gen_ndr/srv_spoolss.h index 82e9faf993..da31eb78b6 100644 --- a/librpc/gen_ndr/srv_spoolss.h +++ b/librpc/gen_ndr/srv_spoolss.h @@ -67,8 +67,8 @@ WERROR _spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p, struct WERROR _spoolss_SpoolerInit(pipes_struct *p, struct spoolss_SpoolerInit *r); WERROR _spoolss_ResetPrinterEx(pipes_struct *p, struct spoolss_ResetPrinterEx *r); WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r); -WERROR _spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p, struct spoolss_RouterRefreshPrinterChangeNotification *r); -WERROR _spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p, struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r); +WERROR _spoolss_RouterReplyPrinterEx(pipes_struct *p, struct spoolss_RouterReplyPrinterEx *r); +WERROR _spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p, struct spoolss_RouterRefreshPrinterChangeNotify *r); WERROR _spoolss_44(pipes_struct *p, struct spoolss_44 *r); WERROR _spoolss_OpenPrinterEx(pipes_struct *p, struct spoolss_OpenPrinterEx *r); WERROR _spoolss_AddPrinterEx(pipes_struct *p, struct spoolss_AddPrinterEx *r); @@ -165,8 +165,8 @@ WERROR _spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p, struct WERROR _spoolss_SpoolerInit(pipes_struct *p, struct spoolss_SpoolerInit *r); WERROR _spoolss_ResetPrinterEx(pipes_struct *p, struct spoolss_ResetPrinterEx *r); WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r); -WERROR _spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p, struct spoolss_RouterRefreshPrinterChangeNotification *r); -WERROR _spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p, struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r); +WERROR _spoolss_RouterReplyPrinterEx(pipes_struct *p, struct spoolss_RouterReplyPrinterEx *r); +WERROR _spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p, struct spoolss_RouterRefreshPrinterChangeNotify *r); WERROR _spoolss_44(pipes_struct *p, struct spoolss_44 *r); WERROR _spoolss_OpenPrinterEx(pipes_struct *p, struct spoolss_OpenPrinterEx *r); WERROR _spoolss_AddPrinterEx(pipes_struct *p, struct spoolss_AddPrinterEx *r); diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index 294ab50aaf..3e1d6620f7 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -1442,8 +1442,6 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x42 */ - [todo] WERROR spoolss_RouterRefreshPrinterChangeNotification( - ); typedef struct { uint32 size; @@ -1487,9 +1485,28 @@ import "misc.idl", "security.idl", "winreg.idl"; [size_is(count)] spoolss_Notify notifies[]; } spoolss_NotifyInfo; + typedef [switch_type(uint32)] union { + [case(0)] spoolss_NotifyInfo *info0; + } spoolss_ReplyPrinterInfo; + + typedef [bitmap32bit] bitmap { + PRINTER_NOTIFY_INFO_DISCARDED = 0x00000001, + PRINTER_NOTIFY_INFO_DISCARDNOTED = 0x00010000, + PRINTER_NOTIFY_INFO_COLOR_MISMATCH = 0x00080000 + } spoolss_PrinterNotifyFlags; + + WERROR spoolss_RouterReplyPrinterEx( + [in,ref] policy_handle *handle, + [in] uint32 color, + [in] spoolss_PrinterChangeFlags flags, + [out,ref] spoolss_PrinterNotifyFlags *reply_result, + [in] uint32 reply_type, + [in,switch_is(reply_type)] spoolss_ReplyPrinterInfo info + ); + /******************/ /* Function: 0x43 */ - [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx( + [public] WERROR spoolss_RouterRefreshPrinterChangeNotify( [in,ref] policy_handle *handle, [in] uint32 change_low, [in,unique] spoolss_NotifyOptionsContainer *container, @@ -1751,11 +1768,23 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x59 */ + + typedef [bitmap32bit] bitmap { + APD_STRICT_UPGRADE = 0x00000001, + APD_STRICT_DOWNGRADE = 0x00000002, + APD_COPY_ALL_FILES = 0x00000004, + APD_COPY_NEW_FILES = 0x00000008, + APD_COPY_FROM_DIRECTORY = 0x00000010, + APD_DONT_COPY_FILES_TO_CLUSTER = 0x00001000, + APD_COPY_TO_ALL_SPOOLERS = 0x00002000, + APD_RETURN_BLOCKING_STATUS_CODE = 0x00010000 + } spoolss_AddPrinterDriverExFlags; + [public] WERROR spoolss_AddPrinterDriverEx( [in] [string,charset(UTF16)] uint16 *servername, [in] uint32 level, [in,switch_is(level)] spoolss_AddDriverInfo info, - [in] uint32 flags + [in] spoolss_AddPrinterDriverExFlags flags ); /******************/ |