diff options
author | Günther Deschner <gd@samba.org> | 2009-03-18 16:06:40 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-18 16:46:14 +0100 |
commit | 65151077b31e8cc4a8bfedd8fb4a186804d36b9a (patch) | |
tree | 7405a9794f6cccf7a49639093c261d2670c74f46 /librpc | |
parent | 0e21ea39d51583d9395628255dc34c173629a724 (diff) | |
download | samba-65151077b31e8cc4a8bfedd8fb4a186804d36b9a.tar.gz samba-65151077b31e8cc4a8bfedd8fb4a186804d36b9a.tar.bz2 samba-65151077b31e8cc4a8bfedd8fb4a186804d36b9a.zip |
spoolss: add custom ndr_print_spoolss_Field.
Guenther
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/ndr/ndr_spoolss_buf.c | 22 | ||||
-rw-r--r-- | librpc/ndr/ndr_spoolss_buf.h | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c index f30c17b569..06f9b6f6f5 100644 --- a/librpc/ndr/ndr_spoolss_buf.c +++ b/librpc/ndr/ndr_spoolss_buf.c @@ -1185,3 +1185,25 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo101(struct ndr_pull *ndr, } return NDR_ERR_SUCCESS; } + +void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const union spoolss_Field *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "spoolss_Field"); + switch (level) { + case PRINTER_NOTIFY_TYPE: + ndr_print_spoolss_PrintNotifyField(ndr, "field", r->field); + break; + + case JOB_NOTIFY_TYPE: + ndr_print_spoolss_JobNotifyField(ndr, "field", r->field); + break; + + default: + ndr_print_uint16(ndr, "field", r->field); + break; + + } +} + diff --git a/librpc/ndr/ndr_spoolss_buf.h b/librpc/ndr/ndr_spoolss_buf.h index 842d8c4d09..aa6e277c5f 100644 --- a/librpc/ndr/ndr_spoolss_buf.h +++ b/librpc/ndr/ndr_spoolss_buf.h @@ -49,6 +49,7 @@ uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, struct smb_iconv_convenience *ic, int flags); _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo101 *r); _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo101(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo101 *r); +void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const union spoolss_Field *r); #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) |