s3-srvsvc-idl: fix srvsvc_NetCharDevQEnum.
[ira/wip.git] / source3 / librpc / idl / srvsvc.idl
index 4ad7bebdbd6411c31c6bed2b1d6c917b98f3f1fd..c60b4a4ce597de830e239eae3e2f2da037a4b16c 100644 (file)
@@ -3,7 +3,6 @@
 /*
   srvsvc interface definitions
 */
-
 import "security.idl", "svcctl.idl";
 
 [ uuid("4b324fc8-1670-01d3-1278-5a47bf6ee188"),
@@ -52,12 +51,16 @@ import "security.idl", "svcctl.idl";
                [default] ;
        } srvsvc_NetCharDevCtr;
 
+       typedef struct {
+               uint32 level;
+               [switch_is(level)] srvsvc_NetCharDevCtr ctr;
+       } srvsvc_NetCharDevInfoCtr;
+
        /******************/
        /* Function: 0x00 */
        WERROR srvsvc_NetCharDevEnum(
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
-               [in,out,ref]   uint32 *level,
-               [in,out,ref,switch_is(*level)]   srvsvc_NetCharDevCtr *ctr,
+               [in,out,ref]  srvsvc_NetCharDevInfoCtr *info_ctr,
                [in]   uint32 max_buffer,
                [out,ref]   uint32 *totalentries,
                [in,out,unique]   uint32 *resume_handle
@@ -117,13 +120,17 @@ import "security.idl", "svcctl.idl";
                [default] ;
        } srvsvc_NetCharDevQCtr;
 
+       typedef struct {
+               uint32 level;
+               [switch_is(level)] srvsvc_NetCharDevQCtr ctr;
+       } srvsvc_NetCharDevQInfoCtr;
+
        /******************/
        /* Function: 0x03 */
        WERROR srvsvc_NetCharDevQEnum(
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
                [in,unique]   [string,charset(UTF16)] uint16 *user,
-               [in,out,ref]   uint32 *level,
-               [in,out,switch_is(*level),ref]   srvsvc_NetCharDevQCtr *ctr,
+               [in,out,ref]  srvsvc_NetCharDevQInfoCtr *info_ctr,
                [in]   uint32 max_buffer,
                [out,ref]   uint32 *totalentries,
                [in,out,unique]   uint32 *resume_handle
@@ -197,13 +204,17 @@ import "security.idl", "svcctl.idl";
                [default] ;
        } srvsvc_NetConnCtr;
 
+       typedef struct {
+               uint32 level;
+               [switch_is(level)] srvsvc_NetConnCtr ctr;
+       } srvsvc_NetConnInfoCtr;
+
        /******************/
        /* Function: 0x08 */
        WERROR srvsvc_NetConnEnum(
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
                [in,unique]   [string,charset(UTF16)] uint16 *path,
-               [in,out,ref]   uint32 *level,
-               [in,out,switch_is(*level),ref]   srvsvc_NetConnCtr *ctr,
+               [in,out,ref]  srvsvc_NetConnInfoCtr *info_ctr,
                [in]   uint32 max_buffer,
                [out,ref]   uint32 *totalentries,
                [in,out,unique]   uint32 *resume_handle
@@ -246,14 +257,18 @@ import "security.idl", "svcctl.idl";
                [default] ;
        } srvsvc_NetFileCtr;
 
+       typedef struct {
+               uint32 level;
+               [switch_is(level)] srvsvc_NetFileCtr ctr;
+       } srvsvc_NetFileInfoCtr;
+
        /******************/
        /* Function: 0x09 */
        WERROR srvsvc_NetFileEnum(
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
                [in,unique]   [string,charset(UTF16)] uint16 *path,
                [in,unique]   [string,charset(UTF16)] uint16 *user,
-               [in,out,ref]   uint32 *level,
-               [in,out,switch_is(*level),ref]   srvsvc_NetFileCtr *ctr,
+               [in,out,ref]   srvsvc_NetFileInfoCtr *info_ctr,
                [in]   uint32 max_buffer,
                [out,ref]   uint32 *totalentries,
                [in,out,unique]   uint32 *resume_handle
@@ -355,12 +370,17 @@ import "security.idl", "svcctl.idl";
 
        /******************/
        /* Function: 0x0c */
+
+       typedef struct {
+               uint32 level;
+               [switch_is(level)] srvsvc_NetSessCtr ctr;
+       } srvsvc_NetSessInfoCtr;
+
        WERROR srvsvc_NetSessEnum(
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
                [in,unique]   [string,charset(UTF16)] uint16 *client,
                [in,unique]   [string,charset(UTF16)] uint16 *user,
-               [in,out,ref]   uint32 *level,
-               [in,out,switch_is(*level),ref]   srvsvc_NetSessCtr *ctr,
+               [in,out,ref]   srvsvc_NetSessInfoCtr *info_ctr,
                [in]   uint32 max_buffer,
                [out,ref]   uint32 *totalentries,
                [in,out,unique]   uint32 *resume_handle
@@ -450,13 +470,11 @@ import "security.idl", "svcctl.idl";
                srvsvc_ShareType type;
                [string,charset(UTF16)] uint16 *comment;
                uint32 permissions;
-               int32 max_users;
+               uint32 max_users;
                uint32 current_users;
                [string,charset(UTF16)] uint16 *path;
                [string,charset(UTF16)] uint16 *password;
-               /* maybe here is a struct sec_desc_buf following */
-               uint32 unknown;
-               [subcontext(4)] security_descriptor *sd;
+               sec_desc_buf sd_buf;
        } srvsvc_NetShareInfo502;
 
        typedef struct {
@@ -491,7 +509,7 @@ import "security.idl", "svcctl.idl";
        } srvsvc_NetShareCtr1005;
 
        typedef struct {
-               int32 max_users;
+               uint32 max_users;
        } srvsvc_NetShareInfo1006;
 
        typedef struct {
@@ -542,12 +560,17 @@ import "security.idl", "svcctl.idl";
                [default] ;
        } srvsvc_NetShareCtr;
 
+       typedef struct {
+               uint32 level;
+               [switch_is(level)] srvsvc_NetShareCtr ctr;
+       } srvsvc_NetShareInfoCtr;
+
        /******************/
        /* Function: 0x0e */
        WERROR srvsvc_NetShareAdd(
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
                [in]   uint32 level,
-               [in,switch_is(level)] srvsvc_NetShareInfo info,
+               [in,ref,switch_is(level)] srvsvc_NetShareInfo *info,
                [in,out,unique]   uint32 *parm_error
                );
 
@@ -555,8 +578,7 @@ import "security.idl", "svcctl.idl";
        /* Function: 0x0f */
        WERROR srvsvc_NetShareEnumAll (
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
-               [in,out,ref]   uint32 *level,
-               [in,out,ref,switch_is(*level)] srvsvc_NetShareCtr *ctr,
+               [in,out,ref] srvsvc_NetShareInfoCtr *info_ctr,
                [in]   uint32 max_buffer,
                [out,ref]  uint32 *totalentries,
                [in,out,unique]   uint32 *resume_handle
@@ -666,6 +688,7 @@ import "security.idl", "svcctl.idl";
                uint32 sessreqs;
                uint32 opensearch;
                uint32 activelocks;
+               uint32 numreqbufs;
                uint32 sizereqbufs;
                uint32 numbigbufs;
                uint32 numfiletasks;
@@ -699,6 +722,7 @@ import "security.idl", "svcctl.idl";
                uint32 sessreqs;
                uint32 opensearch;
                uint32 activelocks;
+               uint32 numreqbufs;
                uint32 sizereqbufs;
                uint32 numbigbufs;
                uint32 numfiletasks;
@@ -1128,7 +1152,16 @@ import "security.idl", "svcctl.idl";
 /* srvsvc_NetDisk         */
 /**************************/
        typedef struct {
-               [flag(STR_LEN4)] string disk;
+               /*
+                * In theory this should be:
+                *      [charset(UTF16),string] uint16 annotation[3]
+                * But midl treats this as:
+                *      [charset(UTF16),string] uint16 annotation[]
+                * and pidl doesn't support this yet
+                */
+               [value(0)] uint32 __disk_offset;
+               [value(strlen(disk)+1)] uint32 __disk_length;
+               [charset(UTF16)] uint16 disk[__disk_length];
        } srvsvc_NetDiskInfo0;
 
        typedef struct {
@@ -1362,7 +1395,7 @@ import "security.idl", "svcctl.idl";
 
        /******************/
        /* Function: 0x22 */
-       WERROR srvsvc_NETRPRNAMECANONICALIZE(
+       [todo] WERROR srvsvc_NETRPRNAMECANONICALIZE(
                );
 
        /******************/
@@ -1384,8 +1417,7 @@ import "security.idl", "svcctl.idl";
           total entries ... */
        WERROR srvsvc_NetShareEnum(
                [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
-               [in,out,ref]   uint32 *level,
-               [in,out,ref,switch_is(*level)]   srvsvc_NetShareCtr *ctr,
+               [in,out,ref]   srvsvc_NetShareInfoCtr *info_ctr,
                [in]       uint32 max_buffer,
                [out,ref]      uint32 *totalentries,
                [in,out,unique]   uint32 *resume_handle
@@ -1413,7 +1445,7 @@ import "security.idl", "svcctl.idl";
                [in,unique]       [string,charset(UTF16)] uint16 *share,
                [in]       [string,charset(UTF16)] uint16 file[],
                [in]       security_secinfo securityinformation,
-               [out,unique]       sec_desc_buf *sd_buf
+               [out,ref]  sec_desc_buf **sd_buf
                );
 
        /******************/
@@ -1423,7 +1455,7 @@ import "security.idl", "svcctl.idl";
                [in,unique]       [string,charset(UTF16)] uint16 *share,
                [in]       [string,charset(UTF16)] uint16 file[],
                [in]       security_secinfo securityinformation,
-               [in]       sec_desc_buf sd_buf
+               [in,ref]   sec_desc_buf *sd_buf
                );
 
 
@@ -1456,56 +1488,56 @@ import "security.idl", "svcctl.idl";
 
        /******************/
        /* Function: 0x2b */
-       WERROR srvsvc_NETRDFSGETVERSION(
+       [todo] WERROR srvsvc_NETRDFSGETVERSION(
                );
 
        /******************/
        /* Function: 0x2c */
-       WERROR srvsvc_NETRDFSCREATELOCALPARTITION(
+       [todo] WERROR srvsvc_NETRDFSCREATELOCALPARTITION(
                );
 
        /******************/
        /* Function: 0x2d */
-       WERROR srvsvc_NETRDFSDELETELOCALPARTITION(
+       [todo] WERROR srvsvc_NETRDFSDELETELOCALPARTITION(
                );
 
        /******************/
        /* Function: 0x2e */
-       WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(
+       [todo] WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(
                );
 
        /******************/
        /* Function: 0x2f */
-       WERROR srvsvc_NETRDFSSETSERVERINFO(
+       [todo] WERROR srvsvc_NETRDFSSETSERVERINFO(
                );
 
        /******************/
        /* Function: 0x30 */
-       WERROR srvsvc_NETRDFSCREATEEXITPOINT(
+       [todo] WERROR srvsvc_NETRDFSCREATEEXITPOINT(
                );
 
        /******************/
        /* Function: 0x31 */
-       WERROR srvsvc_NETRDFSDELETEEXITPOINT(
+       [todo] WERROR srvsvc_NETRDFSDELETEEXITPOINT(
                );
 
        /******************/
        /* Function: 0x32 */
-       WERROR srvsvc_NETRDFSMODIFYPREFIX(
+       [todo] WERROR srvsvc_NETRDFSMODIFYPREFIX(
                );
 
        /******************/
        /* Function: 0x33 */
-       WERROR srvsvc_NETRDFSFIXLOCALVOLUME(
+       [todo] WERROR srvsvc_NETRDFSFIXLOCALVOLUME(
                );
 
        /******************/
        /* Function: 0x34 */
-       WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(
+       [todo] WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(
                );
 
        /******************/
        /* Function: 0x35 */
-       WERROR srvsvc_NETRSERVERTRANSPORTDELEX(
+       [todo] WERROR srvsvc_NETRSERVERTRANSPORTDELEX(
                );
 }