diff options
author | Günther Deschner <gd@samba.org> | 2009-03-18 15:48:06 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-18 16:45:59 +0100 |
commit | f9ddc6ae4ac750dd349f8103d045eb23bc4416a0 (patch) | |
tree | 9410ce3f08c6d4ccdbe3b69a59e249a25c8030bc /librpc | |
parent | 9ab8953d74491d7ab4a30c242aa0935efb38f857 (diff) | |
download | samba-f9ddc6ae4ac750dd349f8103d045eb23bc4416a0.tar.gz samba-f9ddc6ae4ac750dd349f8103d045eb23bc4416a0.tar.bz2 samba-f9ddc6ae4ac750dd349f8103d045eb23bc4416a0.zip |
spoolss: make spoolss_Field a nodiscriminant union of 2 sets of notify flag enums.
Guenther
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/idl/spoolss.idl | 95 |
1 files changed, 65 insertions, 30 deletions
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index 2406394416..a1bb95aa9f 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -1892,40 +1892,75 @@ import "misc.idl", "security.idl", "winreg.idl"; [todo] WERROR spoolss_ResetPrinterEx( ); - typedef [enum16bit] enum { - SPOOLSS_FIELD_SERVER_NAME = 0, - SPOOLSS_FIELD_PRINTER_NAME = 1, - SPOOLSS_FIELD_SHARE_NAME = 2, - SPOOLSS_FIELD_PORT_NAME = 3, - SPOOLSS_FIELD_DRIVER_NAME = 4, - SPOOLSS_FIELD_COMMENT = 5, - SPOOLSS_FIELD_LOCATION = 6, - SPOOLSS_FIELD_DEVMODE = 7, - SPOOLSS_FIELD_SEPFILE = 8, - SPOOLSS_FIELD_PRINT_PROCESSOR = 9, - SPOOLSS_FIELD_PARAMETERS = 10, - SPOOLSS_FIELD_DATATYPE = 11, - SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12, - SPOOLSS_FIELD_ATTRIBUTES = 13, - SPOOLSS_FIELD_PRIORITY = 14, - SPOOLSS_FIELD_DEFAULT_PRIORITY = 15, - SPOOLSS_FIELD_START_TIME = 16, - SPOOLSS_FIELD_UNTIL_TIME = 17, - SPOOLSS_FIELD_STATUS = 18, - SPOOLSS_FIELD_STATUS_STRING = 19, - SPOOLSS_FIELD_CJOBS = 20, - SPOOLSS_FIELD_AVERAGE_PPM = 21, - SPOOLSS_FIELD_TOTAL_PAGES = 22, - SPOOLSS_FIELD_PAGES_PRINTED = 23, - SPOOLSS_FIELD_TOTAL_BYTES = 24, - SPOOLSS_FIELD_BYTES_PRINTED = 25 - } spoolss_Field; + typedef [enum16bit,public] enum { + JOB_NOTIFY_FIELD_PRINTER_NAME = 0x00, + JOB_NOTIFY_FIELD_MACHINE_NAME = 0x01, + JOB_NOTIFY_FIELD_PORT_NAME = 0x02, + JOB_NOTIFY_FIELD_USER_NAME = 0x03, + JOB_NOTIFY_FIELD_NOTIFY_NAME = 0x04, + JOB_NOTIFY_FIELD_DATATYPE = 0x05, + JOB_NOTIFY_FIELD_PRINT_PROCESSOR = 0x06, + JOB_NOTIFY_FIELD_PARAMETERS = 0x07, + JOB_NOTIFY_FIELD_DRIVER_NAME = 0x08, + JOB_NOTIFY_FIELD_DEVMODE = 0x09, + JOB_NOTIFY_FIELD_STATUS = 0x0a, + JOB_NOTIFY_FIELD_STATUS_STRING = 0x0b, + JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0c, + JOB_NOTIFY_FIELD_DOCUMENT = 0x0d, + JOB_NOTIFY_FIELD_PRIORITY = 0x0e, + JOB_NOTIFY_FIELD_POSITION = 0x0f, + JOB_NOTIFY_FIELD_SUBMITTED = 0x10, + JOB_NOTIFY_FIELD_START_TIME = 0x11, + JOB_NOTIFY_FIELD_UNTIL_TIME = 0x12, + JOB_NOTIFY_FIELD_TIME = 0x13, + JOB_NOTIFY_FIELD_TOTAL_PAGES = 0x14, + JOB_NOTIFY_FIELD_PAGES_PRINTED = 0x15, + JOB_NOTIFY_FIELD_TOTAL_BYTES = 0x16, + JOB_NOTIFY_FIELD_BYTES_PRINTED = 0x17 + } spoolss_JobNotifyField; + + typedef [enum16bit,public] enum { + PRINTER_NOTIFY_FIELD_SERVER_NAME = 0x00, + PRINTER_NOTIFY_FIELD_PRINTER_NAME = 0x01, + PRINTER_NOTIFY_FIELD_SHARE_NAME = 0x02, + PRINTER_NOTIFY_FIELD_PORT_NAME = 0x03, + PRINTER_NOTIFY_FIELD_DRIVER_NAME = 0x04, + PRINTER_NOTIFY_FIELD_COMMENT = 0x05, + PRINTER_NOTIFY_FIELD_LOCATION = 0x06, + PRINTER_NOTIFY_FIELD_DEVMODE = 0x07, + PRINTER_NOTIFY_FIELD_SEPFILE = 0x08, + PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR = 0x09, + PRINTER_NOTIFY_FIELD_PARAMETERS = 0x0a, + PRINTER_NOTIFY_FIELD_DATATYPE = 0x0b, + PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0c, + PRINTER_NOTIFY_FIELD_ATTRIBUTES = 0x0d, + PRINTER_NOTIFY_FIELD_PRIORITY = 0x0e, + PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY = 0x0f, + PRINTER_NOTIFY_FIELD_START_TIME = 0x10, + PRINTER_NOTIFY_FIELD_UNTIL_TIME = 0x11, + PRINTER_NOTIFY_FIELD_STATUS = 0x12, + PRINTER_NOTIFY_FIELD_STATUS_STRING = 0x13, + PRINTER_NOTIFY_FIELD_CJOBS = 0x14, + PRINTER_NOTIFY_FIELD_AVERAGE_PPM = 0x15, + PRINTER_NOTIFY_FIELD_TOTAL_PAGES = 0x16, + PRINTER_NOTIFY_FIELD_PAGES_PRINTED = 0x17, + PRINTER_NOTIFY_FIELD_TOTAL_BYTES = 0x18, + PRINTER_NOTIFY_FIELD_BYTES_PRINTED = 0x19, + PRINTER_NOTIFY_FIELD_OBJECT_GUID = 0x1a, + PRINTER_NOTIFY_FIELD_FRIENDLY_NAME = 0x1b + } spoolss_PrintNotifyField; typedef [enum16bit] enum { PRINTER_NOTIFY_TYPE = 0x00, JOB_NOTIFY_TYPE = 0x01 } spoolss_NotifyType; + typedef [nodiscriminant,noprint] union { + [case(PRINTER_NOTIFY_TYPE)] uint16 field; + [case(JOB_NOTIFY_TYPE)] uint16 field; + [default] uint16 field; + } spoolss_Field; + /******************/ /* Function: 0x41 */ typedef struct { @@ -1934,7 +1969,7 @@ import "misc.idl", "security.idl", "winreg.idl"; uint32 u2; uint32 u3; uint32 count; - [size_is(count)] spoolss_Field *fields; + [size_is(count),switch_is(type)] spoolss_Field *fields; } spoolss_NotifyOptionType; typedef [bitmap32bit] bitmap { @@ -1983,7 +2018,7 @@ import "misc.idl", "security.idl", "winreg.idl"; typedef struct { spoolss_NotifyType type; - spoolss_Field field; + [switch_is(type)] spoolss_Field field; spoolss_NotifyTable variable_type; uint32 job_id; [switch_is(variable_type)] spoolss_NotifyData data; |