diff options
author | Günther Deschner <gd@samba.org> | 2009-07-02 19:39:36 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-07-02 22:00:42 +0200 |
commit | c4416684f148f494a103fc85a0d54d0e16059735 (patch) | |
tree | 304f55cbc883c90092cb4c15b7a7e2fab93a6edd /librpc | |
parent | f729abaa94e4b77fe2028d8d5ee38f9eff462fd6 (diff) | |
download | samba-c4416684f148f494a103fc85a0d54d0e16059735.tar.gz samba-c4416684f148f494a103fc85a0d54d0e16059735.tar.bz2 samba-c4416684f148f494a103fc85a0d54d0e16059735.zip |
spoolss: the flags in spoolss_PrinterInfo1 are in fact spoolss_PrinterAttributes.
Guenther
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 80 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.h | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/spoolss.h | 14 | ||||
-rw-r--r-- | librpc/idl/spoolss.idl | 14 |
4 files changed, 55 insertions, 55 deletions
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index d4195e4ae4..fca622865f 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -763,11 +763,48 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print *ndr, const ch ndr->depth--; } +static enum ndr_err_code ndr_push_spoolss_PrinterAttributes(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_PrinterAttributes(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_PrinterAttributes(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_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS, r); + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo1 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->flags)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); @@ -829,7 +866,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, i TALLOC_CTX *_mem_save_comment_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->flags)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); @@ -921,7 +958,7 @@ _PUBLIC_ void ndr_print_spoolss_PrinterInfo1(struct ndr_print *ndr, const char * { ndr_print_struct(ndr, name, "spoolss_PrinterInfo1"); ndr->depth++; - ndr_print_spoolss_EnumPrinterFlags(ndr, "flags", r->flags); + ndr_print_spoolss_PrinterAttributes(ndr, "flags", r->flags); ndr_print_ptr(ndr, "description", r->description); ndr->depth++; if (r->description) { @@ -948,43 +985,6 @@ _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo1, ic); } -static enum ndr_err_code ndr_push_spoolss_PrinterAttributes(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_PrinterAttributes(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_PrinterAttributes(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_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS, r); - ndr->depth--; -} - _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo2 *r) { if (ndr_flags & NDR_SCALARS) { diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h index 204aad85a5..1e6baa4ca6 100644 --- a/librpc/gen_ndr/ndr_spoolss.h +++ b/librpc/gen_ndr/ndr_spoolss.h @@ -225,11 +225,11 @@ size_t ndr_size_spoolss_DeviceMode(const struct spoolss_DeviceMode *r, struct sm enum ndr_err_code ndr_push_spoolss_EnumPrinterFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r); enum ndr_err_code ndr_pull_spoolss_EnumPrinterFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_spoolss_PrinterAttributes(struct ndr_print *ndr, const char *name, uint32_t r); enum ndr_err_code ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo1 *r); enum ndr_err_code ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo1 *r); void ndr_print_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo1 *r); size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1 *r, struct smb_iconv_convenience *ic, int flags); -void ndr_print_spoolss_PrinterAttributes(struct ndr_print *ndr, const char *name, uint32_t r); enum ndr_err_code ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo2 *r); enum ndr_err_code ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo2 *r); void ndr_print_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo2 *r); diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index a9f7aaf1e4..95734602d4 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -296,13 +296,6 @@ struct spoolss_DeviceMode { #define PRINTER_ENUM_ICON8 ( 0x00800000 ) #define PRINTER_ENUM_HIDE ( 0x01000000 ) -struct spoolss_PrinterInfo1 { - uint32_t flags; - const char * description;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * comment;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ -}/* [gensize,public] */; - /* bitmap spoolss_PrinterAttributes */ #define PRINTER_ATTRIBUTE_QUEUED ( 0x00000001 ) #define PRINTER_ATTRIBUTE_DIRECT ( 0x00000002 ) @@ -321,6 +314,13 @@ struct spoolss_PrinterInfo1 { #define PRINTER_ATTRIBUTE_FAX ( 0x00004000 ) #define PRINTER_ATTRIBUTE_TS ( 0x00008000 ) +struct spoolss_PrinterInfo1 { + uint32_t flags; + const char * description;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ + const char * name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ + const char * comment;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ +}/* [gensize,public] */; + struct spoolss_PrinterInfo2 { const char * servername;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ const char * printername;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index f3064625a8..7dad7c92de 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -248,13 +248,6 @@ import "misc.idl", "security.idl", "winreg.idl"; PRINTER_ENUM_ICON7 | PRINTER_ENUM_ICON8); /* 0x00ff0000 */ - typedef [public,gensize] struct { - spoolss_EnumPrinterFlags flags; - [relative] nstring *description; - [relative] nstring *name; - [relative] nstring *comment; - } spoolss_PrinterInfo1; - typedef bitmap { PRINTER_ATTRIBUTE_QUEUED = 0x00000001, PRINTER_ATTRIBUTE_DIRECT = 0x00000002, @@ -275,6 +268,13 @@ import "misc.idl", "security.idl", "winreg.idl"; } spoolss_PrinterAttributes; typedef [public,gensize] struct { + spoolss_PrinterAttributes flags; + [relative] nstring *description; + [relative] nstring *name; + [relative] nstring *comment; + } spoolss_PrinterInfo1; + + typedef [public,gensize] struct { [relative] nstring *servername; [relative] nstring *printername; [relative] nstring *sharename; |