spoolss: fill in spoolss_AddPrinter IDL.
[samba.git] / librpc / gen_ndr / spoolss.h
index 2c6e9a682d727eeef48f6fa5e5786e309ace4d4d..6bc5cd7d0279429aa6016d0ccd4a38e75a37a8e3 100644 (file)
 #define PRINTER_STATUS_OK      ( 0x00000000 )
 #define JOB_STATUS_QUEUED      ( 0x0000 )
 #define PRINTER_ENUM_ICONMASK  ( (PRINTER_ENUM_ICON1|PRINTER_ENUM_ICON2|PRINTER_ENUM_ICON3|PRINTER_ENUM_ICON4|PRINTER_ENUM_ICON5|PRINTER_ENUM_ICON6|PRINTER_ENUM_ICON7|PRINTER_ENUM_ICON8) )
+#define SPL_ARCH_WIN40 ( "WIN40" )
+#define SPL_ARCH_W32X86        ( "W32X86" )
+#define SPL_ARCH_W32MIPS       ( "W32MIPS" )
+#define SPL_ARCH_W32ALPHA      ( "W32ALPHA" )
+#define SPL_ARCH_W32PPC        ( "W32PPC" )
+#define SPL_ARCH_IA64  ( "IA64" )
+#define SPL_ARCH_X64   ( "x64" )
+#define SPOOLSS_ARCHITECTURE_ALL       ( "all" )
 #define SPOOLSS_ARCHITECTURE_NT_X86    ( "Windows NT x86" )
 #define SPOOLSS_DEFAULT_SERVER_PATH    ( "C:\\WINDOWS\\system32\\spool" )
 #define SPL_LOCAL_PORT ( "Local Port" )
@@ -288,13 +296,6 @@ struct spoolss_DeviceMode {
 #define PRINTER_ENUM_ICON8 ( 0x00800000 )
 #define PRINTER_ENUM_HIDE ( 0x01000000 )
 
-struct spoolss_PrinterInfo1 {
-       uint32_t flags;
-       const char * name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
-       const char * description;/* [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 )
@@ -313,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)] */
@@ -636,8 +644,8 @@ struct spoolss_SetPrinterInfo0 {
 
 struct spoolss_SetPrinterInfo1 {
        uint32_t flags;
-       const char *name;/* [unique,charset(UTF16)] */
        const char *description;/* [unique,charset(UTF16)] */
+       const char *name;/* [unique,charset(UTF16)] */
        const char *comment;/* [unique,charset(UTF16)] */
 };
 
@@ -775,6 +783,9 @@ struct spoolss_AddDriverInfo4 {
        struct spoolss_StringArray *previous_names;/* [unique] */
 };
 
+/* bitmap spoolss_DriverAttributes */
+#define PRINTER_DRIVER_PACKAGE_AWARE ( 0x00000002 )
+
 struct spoolss_AddDriverInfo5 {
        enum spoolss_DriverOSVersion version;
        const char *driver_name;/* [unique,charset(UTF16)] */
@@ -1284,64 +1295,125 @@ union spoolss_PrintProcDataTypesInfo {
 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER ( 0x40000000 )
 #define PRINTER_CHANGE_TIMEOUT ( 0x80000000 )
 
-enum spoolss_Field
+enum spoolss_JobNotifyField
+#ifndef USE_UINT_ENUMS
+ {
+       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
+}
+#else
+ { __donnot_use_enum_spoolss_JobNotifyField=0x7FFFFFFF}
+#define JOB_NOTIFY_FIELD_PRINTER_NAME ( 0x00 )
+#define JOB_NOTIFY_FIELD_MACHINE_NAME ( 0x01 )
+#define JOB_NOTIFY_FIELD_PORT_NAME ( 0x02 )
+#define JOB_NOTIFY_FIELD_USER_NAME ( 0x03 )
+#define JOB_NOTIFY_FIELD_NOTIFY_NAME ( 0x04 )
+#define JOB_NOTIFY_FIELD_DATATYPE ( 0x05 )
+#define JOB_NOTIFY_FIELD_PRINT_PROCESSOR ( 0x06 )
+#define JOB_NOTIFY_FIELD_PARAMETERS ( 0x07 )
+#define JOB_NOTIFY_FIELD_DRIVER_NAME ( 0x08 )
+#define JOB_NOTIFY_FIELD_DEVMODE ( 0x09 )
+#define JOB_NOTIFY_FIELD_STATUS ( 0x0a )
+#define JOB_NOTIFY_FIELD_STATUS_STRING ( 0x0b )
+#define JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR ( 0x0c )
+#define JOB_NOTIFY_FIELD_DOCUMENT ( 0x0d )
+#define JOB_NOTIFY_FIELD_PRIORITY ( 0x0e )
+#define JOB_NOTIFY_FIELD_POSITION ( 0x0f )
+#define JOB_NOTIFY_FIELD_SUBMITTED ( 0x10 )
+#define JOB_NOTIFY_FIELD_START_TIME ( 0x11 )
+#define JOB_NOTIFY_FIELD_UNTIL_TIME ( 0x12 )
+#define JOB_NOTIFY_FIELD_TIME ( 0x13 )
+#define JOB_NOTIFY_FIELD_TOTAL_PAGES ( 0x14 )
+#define JOB_NOTIFY_FIELD_PAGES_PRINTED ( 0x15 )
+#define JOB_NOTIFY_FIELD_TOTAL_BYTES ( 0x16 )
+#define JOB_NOTIFY_FIELD_BYTES_PRINTED ( 0x17 )
+#endif
+;
+
+enum spoolss_PrintNotifyField
 #ifndef USE_UINT_ENUMS
  {
-       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
+       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
 }
 #else
- { __donnot_use_enum_spoolss_Field=0x7FFFFFFF}
-#define SPOOLSS_FIELD_SERVER_NAME ( 0 )
-#define SPOOLSS_FIELD_PRINTER_NAME ( 1 )
-#define SPOOLSS_FIELD_SHARE_NAME ( 2 )
-#define SPOOLSS_FIELD_PORT_NAME ( 3 )
-#define SPOOLSS_FIELD_DRIVER_NAME ( 4 )
-#define SPOOLSS_FIELD_COMMENT ( 5 )
-#define SPOOLSS_FIELD_LOCATION ( 6 )
-#define SPOOLSS_FIELD_DEVMODE ( 7 )
-#define SPOOLSS_FIELD_SEPFILE ( 8 )
-#define SPOOLSS_FIELD_PRINT_PROCESSOR ( 9 )
-#define SPOOLSS_FIELD_PARAMETERS ( 10 )
-#define SPOOLSS_FIELD_DATATYPE ( 11 )
-#define SPOOLSS_FIELD_SECURITY_DESCRIPTOR ( 12 )
-#define SPOOLSS_FIELD_ATTRIBUTES ( 13 )
-#define SPOOLSS_FIELD_PRIORITY ( 14 )
-#define SPOOLSS_FIELD_DEFAULT_PRIORITY ( 15 )
-#define SPOOLSS_FIELD_START_TIME ( 16 )
-#define SPOOLSS_FIELD_UNTIL_TIME ( 17 )
-#define SPOOLSS_FIELD_STATUS ( 18 )
-#define SPOOLSS_FIELD_STATUS_STRING ( 19 )
-#define SPOOLSS_FIELD_CJOBS ( 20 )
-#define SPOOLSS_FIELD_AVERAGE_PPM ( 21 )
-#define SPOOLSS_FIELD_TOTAL_PAGES ( 22 )
-#define SPOOLSS_FIELD_PAGES_PRINTED ( 23 )
-#define SPOOLSS_FIELD_TOTAL_BYTES ( 24 )
-#define SPOOLSS_FIELD_BYTES_PRINTED ( 25 )
+ { __donnot_use_enum_spoolss_PrintNotifyField=0x7FFFFFFF}
+#define PRINTER_NOTIFY_FIELD_SERVER_NAME ( 0x00 )
+#define PRINTER_NOTIFY_FIELD_PRINTER_NAME ( 0x01 )
+#define PRINTER_NOTIFY_FIELD_SHARE_NAME ( 0x02 )
+#define PRINTER_NOTIFY_FIELD_PORT_NAME ( 0x03 )
+#define PRINTER_NOTIFY_FIELD_DRIVER_NAME ( 0x04 )
+#define PRINTER_NOTIFY_FIELD_COMMENT ( 0x05 )
+#define PRINTER_NOTIFY_FIELD_LOCATION ( 0x06 )
+#define PRINTER_NOTIFY_FIELD_DEVMODE ( 0x07 )
+#define PRINTER_NOTIFY_FIELD_SEPFILE ( 0x08 )
+#define PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR ( 0x09 )
+#define PRINTER_NOTIFY_FIELD_PARAMETERS ( 0x0a )
+#define PRINTER_NOTIFY_FIELD_DATATYPE ( 0x0b )
+#define PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR ( 0x0c )
+#define PRINTER_NOTIFY_FIELD_ATTRIBUTES ( 0x0d )
+#define PRINTER_NOTIFY_FIELD_PRIORITY ( 0x0e )
+#define PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY ( 0x0f )
+#define PRINTER_NOTIFY_FIELD_START_TIME ( 0x10 )
+#define PRINTER_NOTIFY_FIELD_UNTIL_TIME ( 0x11 )
+#define PRINTER_NOTIFY_FIELD_STATUS ( 0x12 )
+#define PRINTER_NOTIFY_FIELD_STATUS_STRING ( 0x13 )
+#define PRINTER_NOTIFY_FIELD_CJOBS ( 0x14 )
+#define PRINTER_NOTIFY_FIELD_AVERAGE_PPM ( 0x15 )
+#define PRINTER_NOTIFY_FIELD_TOTAL_PAGES ( 0x16 )
+#define PRINTER_NOTIFY_FIELD_PAGES_PRINTED ( 0x17 )
+#define PRINTER_NOTIFY_FIELD_TOTAL_BYTES ( 0x18 )
+#define PRINTER_NOTIFY_FIELD_BYTES_PRINTED ( 0x19 )
+#define PRINTER_NOTIFY_FIELD_OBJECT_GUID ( 0x1a )
+#define PRINTER_NOTIFY_FIELD_FRIENDLY_NAME ( 0x1b )
 #endif
 ;
 
@@ -1358,13 +1430,17 @@ enum spoolss_NotifyType
 #endif
 ;
 
+union spoolss_Field {
+       uint16_t field;/* [case(PRINTER_NOTIFY_TYPE)] */
+}/* [noprint,nodiscriminant] */;
+
 struct spoolss_NotifyOptionType {
        enum spoolss_NotifyType type;
        uint16_t u1;
        uint32_t u2;
        uint32_t u3;
        uint32_t count;
-       enum spoolss_Field *fields;/* [unique,size_is(count)] */
+       union spoolss_Field *fields;/* [unique,switch_is(type),size_is(count)] */
 };
 
 /* bitmap spoolssNotifyOptionFlags */
@@ -1411,7 +1487,7 @@ union spoolss_NotifyData {
 
 struct spoolss_Notify {
        enum spoolss_NotifyType type;
-       enum spoolss_Field field;
+       union spoolss_Field field;/* [switch_is(type)] */
        enum spoolss_NotifyTable variable_type;
        uint32_t job_id;
        union spoolss_NotifyData data;/* [switch_is(variable_type)] */
@@ -1483,7 +1559,7 @@ struct spoolss_PrinterEnumValues {
        const char * value_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
        uint32_t value_name_len;/* [value(2*strlen_m_term(value_name))] */
        enum winreg_Type type;
-       union spoolss_PrinterData *data;/* [relative,subcontext_size(data_length),subcontext(0),switch_is(type)] */
+       union spoolss_PrinterData *data;/* [relative,subcontext_size(r->data_length),subcontext(0),switch_is(type)] */
        uint32_t data_length;/* [value(ndr_size_spoolss_PrinterData(data,type,ndr->iconv_convenience,ndr->flags))] */
 }/* [relative_base,gensize,public] */;
 
@@ -1710,6 +1786,14 @@ struct spoolss_EnumJobs {
 
 struct spoolss_AddPrinter {
        struct {
+               const char *server;/* [unique,charset(UTF16)] */
+               struct spoolss_SetPrinterInfoCtr *info_ctr;/* [ref] */
+               struct spoolss_DevmodeContainer *devmode_ctr;/* [ref] */
+               struct sec_desc_buf *secdesc_ctr;/* [ref] */
+       } in;
+
+       struct {
+               struct policy_handle *handle;/* [ref] */
                WERROR result;
        } out;
 
@@ -2900,7 +2984,7 @@ struct spoolss_GetPrinterDataEx {
 };
 
 
-struct spoolss_EnumPrinterDataEx {
+struct _spoolss_EnumPrinterDataEx {
        struct {
                struct policy_handle *handle;/* [ref] */
                const char *key_name;/* [charset(UTF16)] */
@@ -2908,7 +2992,7 @@ struct spoolss_EnumPrinterDataEx {
        } in;
 
        struct {
-               uint8_t *buffer;/* [ref,size_is(offered)] */
+               DATA_BLOB info;
                uint32_t *needed;/* [ref] */
                uint32_t *count;/* [ref] */
                WERROR result;
@@ -2917,6 +3001,35 @@ struct spoolss_EnumPrinterDataEx {
 };
 
 
+struct __spoolss_EnumPrinterDataEx {
+       struct {
+               uint32_t count;
+       } in;
+
+       struct {
+               struct spoolss_PrinterEnumValues *info;
+       } out;
+
+};
+
+
+struct spoolss_EnumPrinterDataEx {
+       struct {
+               struct policy_handle *handle;/* [ref] */
+               const char *key_name;/* [charset(UTF16)] */
+               uint32_t offered;
+       } in;
+
+       struct {
+               uint32_t *count;/* [ref] */
+               struct spoolss_PrinterEnumValues **info;/* [ref,size_is(,*count)] */
+               uint32_t *needed;/* [ref] */
+               WERROR result;
+       } out;
+
+};
+
+
 struct spoolss_EnumPrinterKey {
        struct {
                struct policy_handle *handle;/* [ref] */