/*
 * Copyright (C) Centeris Corporation 2004-2007
 * Copyright (C) Likewise Software 2007
 * All rights reserved.
 *
 * Authors: Krishna Ganugapati (krishnag@likewisesoftware.com)
 *          Sriram Nambakam (snambakam@likewisesoftware.com)
 *
 * Server Service IDL
 *
 * Permission to use, copy, modify, and distribute these interface
 * definitions for any purpose is hereby granted without fee.
 *
 * This work is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 */
#ifndef __SRVSVC_IDL__
#define __SRVSVC_IDL__

[
    uuid(4b324fc8-1670-01d3-1278-5a47bf6ee188),
    pointer_default(unique),
    version(3.0)
]
interface srvsvc
{
    cpp_quote("#ifdef DCERPC_STUB_BUILD")

#include <lw/srvsvc.h>

    typedef [switch_type(UINT32) ] union {
        [case(0)] srvsvc_NetConnCtr0 *ctr0;
        [case(1)] srvsvc_NetConnCtr1 *ctr1;
        [default] ;
    } srvsvc_NetConnCtr;

    typedef [switch_type(UINT32)] union {
        [case(2)] srvsvc_NetFileCtr2 *ctr2;
        [case(3)] srvsvc_NetFileCtr3 *ctr3;
        [default] ;
    } srvsvc_NetFileCtr;

    typedef [switch_type(UINT32)] union {
        [case(2)] FILE_INFO_2 *info2;
        [case(3)] FILE_INFO_3 *info3;
        [default] ;
    } srvsvc_NetFileInfo;

    typedef [switch_type(UINT32)] union {
        [case(0)] srvsvc_NetSessCtr0 *ctr0;
        [case(1)] srvsvc_NetSessCtr1 *ctr1;
        [case(2)] srvsvc_NetSessCtr2 *ctr2;
        [case(10)] srvsvc_NetSessCtr10 *ctr10;
        [case(502)] srvsvc_NetSessCtr502 *ctr502;
        [default] ;
    } srvsvc_NetSessCtr;

    typedef [switch_type(UINT32)] union {
        [case(0)] SHARE_INFO_0 *info0;
        [case(1)] SHARE_INFO_1 *info1;
        [case(2)] SHARE_INFO_2 *info2;
        [case(501)] SHARE_INFO_501 *info501;
        [case(502)] SHARE_INFO_502_I *info502;
        [case(1004)] SHARE_INFO_1004 *info1004;
        [case(1005)] SHARE_INFO_1005 *info1005;
        [case(1006)] SHARE_INFO_1006 *info1006;
        [case(1501)] SHARE_INFO_1501_I *info1501;
        [default] ;
    } srvsvc_NetShareInfo;

    typedef [switch_type(UINT32)] union {
        [case(0)] srvsvc_NetShareCtr0 *ctr0;
        [case(1)] srvsvc_NetShareCtr1 *ctr1;
        [case(2)] srvsvc_NetShareCtr2 *ctr2;
        [case(501)] srvsvc_NetShareCtr501 *ctr501;
        [case(502)] srvsvc_NetShareCtr502 *ctr502;
        [default] ;
    } srvsvc_NetShareCtr;

    typedef [switch_type(UINT32)] union {
        [case(100)]     SERVER_INFO_100 *info100;
        [case(101)]     SERVER_INFO_101 *info101;
        [case(102)]     SERVER_INFO_102 *info102;
        [case(402)]     SERVER_INFO_402 *info402;
        [case(403)]     SERVER_INFO_403 *info403;
        [case(502)]     SERVER_INFO_502 *info502;
        [case(503)]     SERVER_INFO_503 *info503;
        [case(599)]     SERVER_INFO_599 *info599;
        [case(1005)]    SERVER_INFO_1005 *info1005;
        [case(1010)]    SERVER_INFO_1010 *info1010;
        [case(1016)]    SERVER_INFO_1016 *info1016;
        [case(1017)]    SERVER_INFO_1017 *info1017;
        [case(1018)]    SERVER_INFO_1018 *info1018;
        [case(1107)]    SERVER_INFO_1107 *info1107;
        [case(1501)]    SERVER_INFO_1501 *info1501;
        [case(1502)]    SERVER_INFO_1502 *info1502;
        [case(1503)]    SERVER_INFO_1503 *info1503;
        [case(1506)]    SERVER_INFO_1506 *info1506;
        [case(1509)]    SERVER_INFO_1509 *info1509;
        [case(1510)]    SERVER_INFO_1510 *info1510;
        [case(1511)]    SERVER_INFO_1511 *info1511;
        [case(1512)]    SERVER_INFO_1512 *info1512;
        [case(1513)]    SERVER_INFO_1513 *info1513;
        [case(1514)]    SERVER_INFO_1514 *info1514;
        [case(1515)]    SERVER_INFO_1515 *info1515;
        [case(1516)]    SERVER_INFO_1516 *info1516;
        [case(1518)]    SERVER_INFO_1518 *info1518;
        [case(1520)]    SERVER_INFO_1520 *info1520;
        [case(1521)]    SERVER_INFO_1521 *info1521;
        [case(1522)]    SERVER_INFO_1522 *info1522;
        [case(1523)]    SERVER_INFO_1523 *info1523;
        [case(1524)]    SERVER_INFO_1524 *info1524;
        [case(1525)]    SERVER_INFO_1525 *info1525;
        [case(1528)]    SERVER_INFO_1528 *info1528;
        [case(1529)]    SERVER_INFO_1529 *info1529;
        [case(1530)]    SERVER_INFO_1530 *info1530;
        [case(1533)]    SERVER_INFO_1533 *info1533;
        [case(1534)]    SERVER_INFO_1534 *info1534;
        [case(1535)]    SERVER_INFO_1535 *info1535;
        [case(1536)]    SERVER_INFO_1536 *info1536;
        [case(1537)]    SERVER_INFO_1537 *info1537;
        [case(1538)]    SERVER_INFO_1538 *info1538;
        [case(1539)]    SERVER_INFO_1539 *info1539;
        [case(1540)]    SERVER_INFO_1540 *info1540;
        [case(1541)]    SERVER_INFO_1541 *info1541;
        [case(1542)]    SERVER_INFO_1542 *info1542;
        [case(1543)]    SERVER_INFO_1543 *info1543;
        [case(1544)]    SERVER_INFO_1544 *info1544;
        [case(1545)]    SERVER_INFO_1545 *info1545;
        [case(1546)]    SERVER_INFO_1546 *info1546;
        [case(1547)]    SERVER_INFO_1547 *info1547;
        [case(1548)]    SERVER_INFO_1548 *info1548;
        [case(1549)]    SERVER_INFO_1549 *info1549;
        [case(1550)]    SERVER_INFO_1550 *info1550;
        [case(1552)]    SERVER_INFO_1552 *info1552;
        [case(1553)]    SERVER_INFO_1553 *info1553;
        [case(1554)]    SERVER_INFO_1554 *info1554;
        [case(1555)]    SERVER_INFO_1555 *info1555;
        [case(1556)]    SERVER_INFO_1556 *info1556;
        [default];
    } srvsvc_NetSrvInfo;

cpp_quote("#else")
cpp_quote("#include <lw/srvsvc.h>")
cpp_quote("#endif")

    void _srvsvc_Function0();
    void _srvsvc_Function1();
    void _srvsvc_Function2();
    void _srvsvc_Function3();
    void _srvsvc_Function4();
    void _srvsvc_Function5();
    void _srvsvc_Function6();
    void _srvsvc_Function7();

    /* Function: 0x08 */
    WINERROR _NetrConnectionEnum(
        [in,string,unique] wchar16_t *server_name,
        [in,string,unique] wchar16_t *qualifier,
        [in,out,ref] UINT32 *level,
        [in,out,ref,switch_is(level)] srvsvc_NetConnCtr *ctr,
        [in] UINT32 prefered_maximum_length,
        [out,ref] UINT32 *total_entries,
        [in,out,unique] UINT32 *resume_handle
    );

    /* Function: 0x09 */
    WINERROR _NetrFileEnum(
        [in,string,unique] wchar16_t *server_name,
        [in,string,unique] wchar16_t *basepath,
        [in,string,unique] wchar16_t *username,
        [in,out,ref] UINT32 *level,
        [in,out,ref,switch_is(level)] srvsvc_NetFileCtr *ctr,
        [in] UINT32 prefered_maximum_length,
        [out,ref] UINT32 *total_entries,
        [in,out,unique] UINT32 *resume_handle
        );

    /* Function: 0x0a */
    WINERROR _NetrFileGetInfo(
        [in,string,unique] wchar16_t *server_name,
        [in] UINT32 fileid,
        [in] UINT32 level,
        [out,ref,switch_is(level)] srvsvc_NetFileInfo *info
        );

    /* Function: 0x0b */
    WINERROR _NetrFileClose(
        [in,string,unique] wchar16_t *server_name,
        [in] UINT32 fileid
        );

    /* Function: 0x0c */
    WINERROR _NetrSessionEnum(
        [in,string,unique] wchar16_t *server_name,
        [in,string,unique] wchar16_t *unc_client_name,
        [in,string,unique] wchar16_t *username,
        [in,out,ref] UINT32 *level,
        [in,out,ref,switch_is(level)] srvsvc_NetSessCtr *ctr,
        [in] UINT32 prefered_maximum_length,
        [out,ref] UINT32 *total_entries,
        [in,out,unique] UINT32 *resume_handle
    );

    /* Function: 0x0d */
    WINERROR _NetrSessionDel(
        [in,string,unique] wchar16_t *server_name,
        [in,string,unique] wchar16_t *unc_client_name,
        [in,string,unique] wchar16_t *username
    );

    /* Function: 0x0e */
    WINERROR _NetrShareAdd(
        [in,string,unique] wchar16_t *server_name,
        [in] UINT32 level,
        [in,switch_is(level)] srvsvc_NetShareInfo info,
        [in,out,unique] UINT32 *parm_error
    );

    /* Function: 0x0f */
    WINERROR _NetrShareEnum(
        [in,string,unique] wchar16_t *server_name,
        [in,out] UINT32 *level,
        [in,out,switch_is(*level)] srvsvc_NetShareCtr *ctr,
        [in] UINT32 prefered_maximum_length,
        [out] UINT32 *total_entries,
        [in,out,unique] UINT32 *resume_handle
    );

    /* Function: 0x10 */
    WINERROR _NetrShareGetInfo(
        [in,string,unique] wchar16_t *server_name,
        [in,string,ref] wchar16_t *netname,
        [in] UINT32 level,
        [out,ref,switch_is(level)] srvsvc_NetShareInfo *info
    );

    /* Function: 0x11 */
    WINERROR _NetrShareSetInfo(
        [in,string,unique] wchar16_t *server_name,
        [in,string,ref] wchar16_t *netname,
        [in] UINT32 level,
        [in,switch_is(level)] srvsvc_NetShareInfo info,
        [in,out,unique] UINT32 *parm_error
    );

    /* Function: 0x12 */
    WINERROR _NetrShareDel(
        [in,string,unique] wchar16_t *server_name,
        [in,string,ref] wchar16_t *netname,
        [in] UINT32 reserved
    );

    void _srvsvc_Function13();
    void _srvsvc_Function14();

    /* Function: 0x15 */
    WINERROR _NetrServerGetInfo(
        [in,string,unique] wchar16_t *server_name,
        [in] UINT32 level,
        [out,ref,switch_is(level)] srvsvc_NetSrvInfo *info
    );

    /* Function: 0x16 */
    WINERROR _NetrServerSetInfo(
        [in,string,unique] wchar16_t *server_name,
        [in] UINT32 level,
        [in,switch_is(level)] srvsvc_NetSrvInfo info,
        [in,out,unique] UINT32 *parm_error
    );

    void _srvsvc_Function17();
    void _srvsvc_Function18();
    void _srvsvc_Function19();
    void _srvsvc_Function1a();
    void _srvsvc_Function1b();

    /* Function: 0x1c */
    WINERROR _NetrRemoteTOD(
        [in,string,unique] wchar16_t *server_name,
        [out] TIME_OF_DAY_INFO **info
    );

    void _srvsvc_Function1d();
    void _srvsvc_Function1e();
    void _srvsvc_Function1f();
    void _srvsvc_Function20();

    /* Function: 0x21 */
    WINERROR _NetrNameValidate(
        [in,string,unique] wchar16_t *server_name,
	[in,string] wchar16_t *name,
	[in] UINT32 type,
	[in] UINT32 flags
	);
}

#endif /* __SRVSVC_IDL__ */
