r5672: Use switch_type() and the token storage mechanism for unions:
[samba.git] / source4 / librpc / idl / samr.idl
index 85f032c41481bdc4896edb41ea8d6d9a7f1a9a71..e8b269dc66194ede58aca5b352a64149322b45cb 100644 (file)
                uint32 unknown2;
        } samr_DomInfo13;
 
-       typedef union {
+       typedef [switch_type(uint16)] union {
                [case(1)] samr_DomInfo1 info1;
                [case(2)] samr_DomInfo2 info2;
                [case(3)] samr_DomInfo3 info3;
                GROUPINFOALL2         = 5
        } samr_GroupInfoEnum;
 
-       typedef union {
+       typedef [switch_type(samr_GroupInfoEnum)] union {
                [case(GROUPINFOALL)]         samr_GroupInfoAll    all;
                [case(GROUPINFONAME)]        samr_String            name;
                [case(GROUPINFOX)]           samr_GroupInfoX      unknown;
                ALIASINFODESCRIPTION  = 3
        } samr_AliasInfoEnum;
 
-       typedef union {
+       typedef [switch_type(samr_AliasInfoEnum)] union {
                [case(ALIASINFOALL)] samr_AliasInfoAll all;
                [case(ALIASINFONAME)] samr_String name;
                [case(ALIASINFODESCRIPTION)] samr_String description;
                uint8 pw_len;
        } samr_UserInfo26;
 
-       typedef union {
+       typedef [switch_type(uint16)] union {
                [case(1)] samr_UserInfo1 info1;
                [case(2)] samr_UserInfo2 info2;
                [case(3)] samr_UserInfo3 info3;
                [size_is(count)] samr_DispEntryAscii *entries[];
        } samr_DispInfoAscii;
 
-       typedef union {
+       typedef [switch_type(uint16)] union {
                [case(1)] samr_DispInfoGeneral info1;/* users */
                [case(2)] samr_DispInfoFull info2; /* trust accounts? */
                [case(3)] samr_DispInfoFull info3; /* groups */