summaryrefslogtreecommitdiff
path: root/librpc/idl/spoolss.idl
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/idl/spoolss.idl')
-rw-r--r--librpc/idl/spoolss.idl202
1 files changed, 130 insertions, 72 deletions
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index f837afbd5d..a1bb95aa9f 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -289,7 +289,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[relative] nstring *parameters;
[relative,subcontext(0)] security_descriptor *secdesc;
spoolss_PrinterAttributes attributes;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 defaultpriority;
uint32 starttime;
uint32 untiltime;
@@ -410,7 +410,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[relative] nstring *data_type;
[relative] nstring *text_status;
spoolss_JobStatus status;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 position;
uint32 total_pages;
uint32 pages_printed;
@@ -432,7 +432,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[relative] nstring *text_status;
[relative] security_descriptor *secdesc;
spoolss_JobStatus status;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 position;
uint32 start_time;
uint32 until_time;
@@ -464,7 +464,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[relative] nstring *text_status;
[relative] security_descriptor *secdesc;
spoolss_JobStatus status;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 position;
uint32 start_time;
uint32 until_time;
@@ -493,7 +493,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[string,charset(UTF16)] uint16 *data_type;
[string,charset(UTF16)] uint16 *text_status;
spoolss_JobStatus status;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 position;
uint32 total_pages;
uint32 pages_printed;
@@ -515,7 +515,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[string,charset(UTF16)] uint16 *text_status;
uint32 _secdesc_ptr;
spoolss_JobStatus status;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 position;
uint32 start_time;
uint32 until_time;
@@ -541,7 +541,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[string,charset(UTF16)] uint16 *text_status;
uint32 _secdesc_ptr;
spoolss_JobStatus status;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 position;
uint32 start_time;
uint32 until_time;
@@ -704,7 +704,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[string,charset(UTF16)] uint16 *parameters;
[subcontext(0)] security_descriptor *secdesc;
spoolss_PrinterAttributes attributes;
- uint32 priority;
+ [range(0,99)] uint32 priority;
uint32 defaultpriority;
uint32 starttime;
uint32 untiltime;
@@ -1302,20 +1302,12 @@ import "misc.idl", "security.idl", "winreg.idl";
uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */
} spoolss_OSVersionEx;
- typedef [v1_enum] enum {
- SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
- SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
- SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3,
- SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4,
- SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7
- } spoolss_PrinterDataType;
-
typedef [nodiscriminant,public,gensize] union {
- [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
- [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
- [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
- [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
- [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array;
+ [case(REG_NONE)];
+ [case(REG_SZ)] nstring string;
+ [case(REG_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
+ [case(REG_DWORD)] uint32 value;
+ [case(REG_MULTI_SZ)] nstring_array string_array;
[default,flag(NDR_REMAINING)] DATA_BLOB data;
} spoolss_PrinterData;
@@ -1323,20 +1315,20 @@ import "misc.idl", "security.idl", "winreg.idl";
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
[in] uint32 offered,
- [out,ref] spoolss_PrinterDataType *type,
- [out] DATA_BLOB data,
+ [out,ref] winreg_Type *type,
+ [out,ref] DATA_BLOB *data,
[out,ref] uint32 *needed
);
[noopnum,noprint,public] void __spoolss_GetPrinterData(
- [in] spoolss_PrinterDataType type,
- [out,switch_is(type)] spoolss_PrinterData data
+ [in] winreg_Type type,
+ [out,ref,switch_is(type)] spoolss_PrinterData *data
);
[nopull,nopush,public] WERROR spoolss_GetPrinterData(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
[in] uint32 offered,
- [out,ref] spoolss_PrinterDataType *type,
- [out,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData data,
+ [out,ref] winreg_Type *type,
+ [out,ref,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData *data,
[out,ref] uint32 *needed
);
@@ -1345,18 +1337,18 @@ import "misc.idl", "security.idl", "winreg.idl";
[noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
- [in] spoolss_PrinterDataType type,
+ [in] winreg_Type type,
[in] DATA_BLOB data,
[in] uint32 _offered
);
[noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
- [in] spoolss_PrinterDataType type,
- [out,switch_is(type)] spoolss_PrinterData data
+ [in] winreg_Type type,
+ [out,ref,switch_is(type)] spoolss_PrinterData *data
);
[nopush] WERROR spoolss_SetPrinterData(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
- [in] spoolss_PrinterDataType type,
+ [in] winreg_Type type,
[in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
[in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
);
@@ -1509,6 +1501,16 @@ import "misc.idl", "security.idl", "winreg.idl";
[out,ref] uint32 *needed
);
+ /*
+ * Special strings for the OpenPrinter() call. See the MSDN DDK
+ * docs on the XcvDataPort() for more details.
+ */
+
+ const string SPL_LOCAL_PORT = "Local Port";
+ const string SPL_TCPIP_PORT = "Standard TCP/IP Port";
+ const string SPL_XCV_MONITOR_LOCALMON = ",XcvMonitor Local Port";
+ const string SPL_XCV_MONITOR_TCPMON = ",XcvMonitor Standard TCP/IP Port";
+
typedef [public,gensize] struct {
[relative] nstring *port_name;
} spoolss_PortInfo1;
@@ -1890,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 {
- SPOOLSS_NOTIFY_PRINTER = 0,
- SPOOLSS_NOTIFY_JOB = 1
+ 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 {
@@ -1932,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 {
@@ -1981,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;
@@ -2163,8 +2200,8 @@ import "misc.idl", "security.idl", "winreg.idl";
[out,size_is(value_offered/2),charset(UTF16)] uint16 value_name[],
[in] uint32 value_offered,
[out,ref] uint32 *value_needed,
- [out,ref] uint32 *printerdata_type,
- [out,ref] DATA_BLOB *buffer,
+ [out,ref] winreg_Type *type,
+ [out,ref,size_is(data_offered),flag(LIBNDR_PRINT_ARRAY_HEX)] uint8 *data,
[in] uint32 data_offered,
[out,ref] uint32 *data_needed
);
@@ -2197,7 +2234,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 key_name[],
[in] [string,charset(UTF16)] uint16 value_name[],
- [in] uint32 type,
+ [in] winreg_Type type,
[in,ref] [size_is(offered)] uint8 *buffer,
[in] uint32 offered
);
@@ -2208,7 +2245,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 key_name[],
[in] [string,charset(UTF16)] uint16 value_name[],
- [out,ref] uint32 *type,
+ [out,ref] winreg_Type *type,
[out,ref] [size_is(offered)] uint8 *buffer,
[in] uint32 offered,
[out,ref] uint32 *needed
@@ -2216,22 +2253,43 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x4f */
- [public] WERROR spoolss_EnumPrinterDataEx(
+
+ typedef [relative_base,public,gensize] struct {
+ [relative] nstring *value_name;
+ [value(2*strlen_m_term(value_name))] uint32 value_name_len;
+ winreg_Type type;
+ [relative,switch_is(type),subcontext(0),subcontext_size(r->data_length)] spoolss_PrinterData *data;
+ [value(ndr_size_spoolss_PrinterData(data, type, ndr->iconv_convenience, ndr->flags))] uint32 data_length;
+ } spoolss_PrinterEnumValues;
+
+ [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDataEx(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 key_name[],
- [out,ref] [size_is(offered)] uint8 *buffer,
- [in] uint32 offered,
+ [out] DATA_BLOB info,
+ [in] uint32 offered,
[out,ref] uint32 *needed,
[out,ref] uint32 *count
);
+ [public,noopnum,noprint] void __spoolss_EnumPrinterDataEx(
+ [in] uint32 count,
+ [out] spoolss_PrinterEnumValues info[count]
+ );
+ [nopull,nopush] WERROR spoolss_EnumPrinterDataEx(
+ [in,ref] policy_handle *handle,
+ [in] [string,charset(UTF16)] uint16 key_name[],
+ [in] uint32 offered,
+ [out,ref] uint32 *count,
+ [out,ref,size_is(,*count)] spoolss_PrinterEnumValues **info,
+ [out,ref] uint32 *needed
+ );
/******************/
/* Function: 0x50 */
[public] WERROR spoolss_EnumPrinterKey(
[in, ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 key_name[],
- [out,ref] [size_is(key_buffer_size/2)] uint16 *key_buffer,
- [in] uint32 key_buffer_size,
+ [out,ref] [subcontext(0),subcontext_size(offered)] nstring_array **key_buffer,
+ [in] uint32 offered,
[out,ref] uint32 *needed
);