[
 uuid(4b324fc8-1670-01d3-1278-5a47bf6ee188),
 version(3.0)
]

interface srvsvc
{

/*
 * These aren't documented in "DCE/RPC over SMB".
 */
unsigned32 NetrCharDevEnum(
    [in] handle_t h
);
unsigned32 NetrCharDevGetInfo(
    [in] handle_t h
);
unsigned32 NetrCharDevControl(
    [in] handle_t h
);
unsigned32 NetrCharDevQEnum(
    [in] handle_t h
);
unsigned32 NetrCharDevQGetInfo(
    [in] handle_t h
);
unsigned32 NetrCharDevQSetInfo(
    [in] handle_t h
);
unsigned32 NetrCharDevQPurge(
    [in] handle_t h
);
unsigned32 NetrCharDevQPurgeSelf(
    [in] handle_t h
);

/*
 * These aren't curently used.
 */
unsigned32 NetrConnectionEnum(
    [in] handle_t h
);
unsigned32 NetrFileEnum(
    [in] handle_t h
);

/*
 * This isn't documented in "DCE/RPC over SMB".
 */
unsigned32 NetrFileGetInfo(
    [in] handle_t h
);

/*
 * These aren't curently used.
 */
unsigned32 NetrFileClose(
    [in] handle_t h
);
unsigned32 NetrSessionEnum(
    [in] handle_t h
);

/*
 * This isn't documented in "DCE/RPC over SMB".
 */
unsigned32 NetrSessionDel(
    [in] handle_t h
);

/*
 * This is based on "DCE/RPC over SMB" and on what's seen over the wire.
 * ("DCE/RPC over SMB" describes information level 2, but that's more
 * than what we need.)
 */
typedef struct {
    [string, ref] unsigned short *shi1_share;
    unsigned32 shi1_type;
    [string, ref] unsigned short *shi1_remark;
} SHARE_INFO_1;

typedef struct {
    unsigned32 share_count;
    [size_is(share_count), unique] SHARE_INFO_1 *shares;
} SHARE_INFO_1_CONTAINER;

/*
 * This isn't currently used.
 */
unsigned32 NetrShareAdd(
    [in] handle_t h
);

typedef union switch (unsigned32 level) {
    case 1: [ptr] SHARE_INFO_1_CONTAINER *share1;
} SHARE_ENUM_UNION;

typedef struct {
    SHARE_ENUM_UNION share_union;
} SHARE_ENUM_STRUCT;

unsigned32 NetrShareEnum(
    [in] handle_t h,
    [in, string, unique] unsigned short *ServerName,
    [in, out, ref] unsigned32 *Level,
    [in, out, ref] SHARE_ENUM_STRUCT *ShareInfo,
    [in] unsigned32 PreferredMaximumLength,
    [out, ref] unsigned32 *TotalEntries,
    [in, out, unique] unsigned32 *ResumeHandle
);

/*
 * These aren't curently used.
 */
unsigned32 NetrShareGetInfo(
    [in] handle_t h
);
unsigned32 NetrShareSetInfo(
    [in] handle_t h
);
unsigned32 NetrShareDel(
    [in] handle_t h
);

/*
 * These aren't documented in "DCE/RPC over SMB".
 */
unsigned32 NetrShareDelSticky(
    [in] handle_t h
);
unsigned32 NetrShareCheck(
    [in] handle_t h
);


/*
 * These aren't curently used.
 */
unsigned32 NetrServerGetInfo(
    [in] handle_t h
);
unsigned32 NetrServerSetInfo(
    [in] handle_t h
);

/*
 * These aren't documented in "DCE/RPC over SMB".
 */
unsigned32 NetrServerDiskEnum(
    [in] handle_t h
);
unsigned32 NetrServerStatisticsGet(
    [in] handle_t h
);
unsigned32 NetrServerTransportAdd(
    [in] handle_t h
);
unsigned32 NetrServerTransportEnum(
    [in] handle_t h
);
unsigned32 NetrServerTransportDel(
    [in] handle_t h
);
unsigned32 NetrSetServerServiceBits(
    [in] handle_t h
);
unsigned32 NetrPathType(
    [in] handle_t h
);
unsigned32 NetrPathCanonicalize(
    [in] handle_t h
);
unsigned32 NetrPathCompare(
    [in] handle_t h
);
unsigned32 NetrNameValidate(
    [in] handle_t h
);
unsigned32 NetrNameCanonicalize(
    [in] handle_t h
);
unsigned32 NetrNameCompare(
    [in] handle_t h
);

unsigned32 NetrShareEnumSticky(
    [in] handle_t h,
    [in, string, unique] unsigned short *ServerName,
    [in] unsigned32 Level,
    [in, out, ref] SHARE_ENUM_STRUCT *ShareInfo,
    [in] unsigned32 PreferredMaximumLength,
    [out, ref] unsigned32 *TotalEntries,
    [in, out, unique] unsigned32 *ResumeHandle
);

/*
 * These aren't documented in "DCE/RPC over SMB".
 */
unsigned32 NetrShareDelStart(
    [in] handle_t h
);
unsigned32 NetrShareDelCommit(
    [in] handle_t h
);
unsigned32 NetrGetFileSecurity(
    [in] handle_t h
);
unsigned32 NetrSetFileSecurity(
    [in] handle_t h
);
unsigned32 NetrServerTransportAddEx(
    [in] handle_t h
);
unsigned32 NetrServerSetServiceBitsEx(
    [in] handle_t h
);

}
