#include "idl_types.h"

/*
  wkssvc interface definitions
*/

[ uuid(6bffd098-a112-3610-9833-46c3f87e345a),
  version(1.0),
  pointer_default(unique)
] interface wkssvc
{

#define BOOL uint32

	/******************/
	/* Function: 0x00 */

	typedef struct {
		uint32 platform_id;
		unistr *server;
		unistr *domain;
		uint32 ver_major;
		uint32 ver_minor;
	} wkssvc_Info100;

	typedef struct {
		uint32 platform_id;
		unistr *server;
		unistr *domain;
		uint32 ver_major;
		uint32 ver_minor;
		unistr *lan_root;
	} wkssvc_Info101;

	typedef struct {
		uint32 platform_id;
		unistr *server;
		unistr *domain;
		uint32 ver_major;
		uint32 ver_minor;
		unistr *lan_root;
		uint32 logged_on_users;
	} wkssvc_Info102;

	typedef struct {
		uint32 char_wait;
		uint32 collection_time;
		uint32 maximum_collection_count;
		uint32 keep_connection;
		uint32 max_commands;
		uint32 session_timeout;
		uint32 size_char_buf;
		uint32 max_threads;
		uint32 lock_quota;
		uint32 lock_increment;
		uint32 lock_maximum;
		uint32 pipe_increment;
		uint32 pipe_maximum;
		uint32 cache_file_timeout;
		uint32 dormant_file_limit;
		uint32 read_ahead_throughput;
		uint32 num_mailslot_buffers;
		uint32 num_srv_announce_buffers;
		uint32 max_illegal_dgram_events;
		uint32 dgram_event_reset_freq;
		BOOL log_election_packets;
		BOOL use_opportunistic_locking;
		BOOL use_unlock_behind;
		BOOL use_close_behind;
		BOOL buf_named_pipes;
		BOOL use_lock_read_unlock;
		BOOL utilize_nt_caching;
		BOOL use_raw_read;
		BOOL use_raw_write;
		BOOL use_write_raw_data;
		BOOL use_encryption;
		BOOL buf_files_deny_write;
		BOOL buf_read_only_files;
		BOOL force_core_create_mode;
		BOOL use_512_byte_max_transfer;
	} wkssvc_Info502;

	typedef union {
		[case(100)] wkssvc_Info100 *info100;
		[case(101)] wkssvc_Info101 *info101;
		[case(102)] wkssvc_Info102 *info102;
		[case(502)] wkssvc_Info502 *info502;
	} wkssvc_Info;

	WERROR wkssvc_QueryInfo(
		[in]   unistr *server_name,
		[in]   uint32 level,
		[out,switch_is(level)]  wkssvc_Info info
		);


	/******************/
	/* Function: 0x01 */
	WERROR wkssvc_SetInfo();

	/*****************************/
	/* Function        0x02      */
	WERROR WKSSVC_NETRWKSTAUSERENUM ();

	/*****************************/
	/* Function        0x03      */
	WERROR WKSSVC_NETRWKSTAUSERGETINFO ();

	/*****************************/
	/* Function        0x04      */
	WERROR WKSSVC_NETRWKSTAUSERSETINFO ();


	/*****************************/
	/* Function        0x05      */

	typedef struct {
		uint32 quality_of_service;
		uint32 vc_count;
		unistr *name;
		unistr *address;
		uint32 wan_link;
	} wkssvc_TransportInfo0;

	typedef struct {
		uint32 count;
		[size_is(count)] wkssvc_TransportInfo0 *transports;
	} wkssvc_TransportInfoArray;

	typedef union {
		[case(0)] wkssvc_TransportInfoArray *array;
		[default] ;
	} wkssvc_TransportInfo;

	WERROR wkssvc_TransportEnum (
		[in]         unistr *server_name,
		[in,out]     uint32 level,
		[in,out,switch_is(level)] wkssvc_TransportInfo info,
		[in]         uint32 max_buffer,
		[out]        uint32 totalentries,
		[in,out]     uint32 *resume_handle
		);


	/*****************************/
	/* Function        0x06      */
	WERROR WKSSVC_NETRWKSTATRANSPORTADD ();

	/*****************************/
	/* Function        0x07      */
	WERROR WKSSVC_NETRWKSTATRANSPORTDEL ();

	/*****************************/
	/* Function        0x08      */
	WERROR WKSSVC_NETRUSEADD ();

	/*****************************/
	/* Function        0x09      */
	WERROR WKSSVC_NETRUSEGETINFO ();

	/*****************************/
	/* Function        0x0a      */
	WERROR WKSSVC_NETRUSEDEL ();

	/*****************************/
	/* Function        0x0b      */
	WERROR WKSSVC_NETRUSEENUM ();

	/*****************************/
	/* Function        0x0c      */
	WERROR WKSSVC_NETRMESSAGEBUFFERSEND ();

	/*****************************/
	/* Function        0x0d      */
	WERROR WKSSVC_NETRWORKSTATIONSTATISTICSGET ();

	/*****************************/
	/* Function        0x0e      */
	WERROR WKSSVC_NETRLOGONDOMAINNAMEADD ();

	/*****************************/
	/* Function        0x0f      */
	WERROR WKSSVC_NETRLOGONDOMAINNAMEDEL ();

	/*****************************/
	/* Function        0x10      */
	WERROR WKSSVC_NETRJOINDOMAIN ();

	/*****************************/
	/* Function        0x11      */
	WERROR WKSSVC_NETRUNJOINDOMAIN ();

	/*****************************/
	/* Function        0x12      */
	WERROR WKSSVC_NETRRENAMEMACHINEINDOMAIN ();

	/*****************************/
	/* Function        0x13      */
	WERROR WKSSVC_NETRVALIDATENAME ();

	/*****************************/
	/* Function        0x14      */
	WERROR WKSSVC_NETRGETJOININFORMATION ();

	/*****************************/
	/* Function        0x15      */
	WERROR WKSSVC_NETRGETJOINABLEOUS ();

	/*****************************/
	/* Function        0x16      */
	WERROR WKSSVC_NETRJOINDOMAIN2 ();

	/*****************************/
	/* Function        0x17      */
	WERROR WKSSVC_NETRUNJOINDOMAIN2 ();

	/*****************************/
	/* Function        0x18      */
	WERROR WKSSVC_NETRRENAMEMACHINEINDOMAIN2 ();

	/*****************************/
	/* Function        0x19      */
	WERROR WKSSVC_NETRVALIDATENAME2 ();

	/*****************************/
	/* Function        0x1a      */
	WERROR WKSSVC_NETRGETJOINABLEOUS2 ();

	/*****************************/
	/* Function        0x1b      */
	WERROR WKSSVC_NETRADDALTERNATECOMPUTERNAME ();

	/*****************************/
	/* Function        0x1c      */
	WERROR WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME ();

	/*****************************/
	/* Function        0x1d      */
	WERROR WKSSVC_NETRSETPRIMARYCOMPUTERNAME ();

	/*****************************/
	/* Function        0x1e      */
	WERROR WKSSVC_NETRENUMERATECOMPUTERNAMES ();
}