librpc-idl: replace int32 by the enumeration as it's the type that we use in union...
authorMatthieu Patou <mat@matws.net>
Mon, 21 Oct 2013 03:16:27 +0000 (20:16 -0700)
committerStefan Metzmacher <metze@samba.org>
Tue, 10 Mar 2015 09:55:44 +0000 (10:55 +0100)
Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 568bf16dfadb4bd3003ed18b19098a3d1473f2fe)

librpc/idl/drsuapi.idl

index 063d13574aa34a6c2ba22916b75a5c674bafa559..297db08e067f47317dc985b76caade82822a7fe9 100644 (file)
@@ -1107,9 +1107,16 @@ interface drsuapi
 
        /*****************/
         /* Function 0x10 */
+       typedef [v1_enum] enum {
+               DRSUAPI_DC_INFO_CTR_1  = 1,
+               DRSUAPI_DC_INFO_CTR_2  = 2,
+               DRSUAPI_DC_INFO_CTR_3  = 3,
+               DRSUAPI_DC_CONNECTION_CTR_01 = 0xFFFFFFFF
+       } drsuapi_DsGetDCInfoCtrLevels;
+
        typedef struct {
                [charset(UTF16),string] uint16 *domain_name; /* netbios or dns */
-               int32 level; /* specifies the switch level for the request */
+               drsuapi_DsGetDCInfoCtrLevels level; /* specifies the switch level for the request */
        } drsuapi_DsGetDCInfoRequest1;
 
        typedef [switch_type(int32)] union {
@@ -1204,14 +1211,7 @@ interface drsuapi
                [size_is(count)] drsuapi_DsGetDCConnection01 *array;
        } drsuapi_DsGetDCConnectionCtr01;
 
-       typedef [v1_enum] enum {
-               DRSUAPI_DC_INFO_CTR_1  = 1,
-               DRSUAPI_DC_INFO_CTR_2  = 2,
-               DRSUAPI_DC_INFO_CTR_3  = 3,
-               DRSUAPI_DC_CONNECTION_CTR_01 = -1
-       } drsuapi_DsGetDCInfoCtrLevels;
-
-        typedef [switch_type(int32)] union {
+        typedef [switch_type(drsuapi_DsGetDCInfoCtrLevels)] union {
                [case(DRSUAPI_DC_INFO_CTR_1)]  drsuapi_DsGetDCInfoCtr1  ctr1;
                [case(DRSUAPI_DC_INFO_CTR_2)]  drsuapi_DsGetDCInfoCtr2  ctr2;
                [case(DRSUAPI_DC_INFO_CTR_3)]  drsuapi_DsGetDCInfoCtr3  ctr3;
@@ -1222,7 +1222,7 @@ interface drsuapi
                [in] policy_handle *bind_handle,
                [in] int32 level,
                [in,ref,switch_is(level)] drsuapi_DsGetDCInfoRequest *req,
-               [out,ref] int32 *level_out,
+               [out,ref] drsuapi_DsGetDCInfoCtrLevels *level_out,
                [out,ref,switch_is(*level_out)] drsuapi_DsGetDCInfoCtr *ctr
                );