/**
 * @file lmbrowsr.h
 * Copyright 2012, 2013 MinGW.org project
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
#ifndef _LMBROWSR_H
#define _LMBROWSR_H
#pragma GCC system_header
#include <_mingw.h>

#ifdef __cplusplus
extern "C" {
#endif

#define BROWSER_ROLE_PDC 1
#define BROWSER_ROLE_BDC 2
typedef struct _BROWSER_STATISTICS {
	LARGE_INTEGER StatisticsStartTime;
	LARGE_INTEGER NumberOfServerAnnouncements;
	LARGE_INTEGER NumberOfDomainAnnouncements;
	ULONG NumberOfElectionPackets;
	ULONG NumberOfMailslotWrites;
	ULONG NumberOfGetBrowserServerListRequests;
	ULONG NumberOfServerEnumerations;
	ULONG NumberOfDomainEnumerations;
	ULONG NumberOfOtherEnumerations;
	ULONG NumberOfMissedServerAnnouncements;
	ULONG NumberOfMissedMailslotDatagrams;
	ULONG NumberOfMissedGetBrowserServerListRequests;
	ULONG NumberOfFailedServerAnnounceAllocations;
	ULONG NumberOfFailedMailslotAllocations;
	ULONG NumberOfFailedMailslotReceives;
	ULONG NumberOfFailedMailslotWrites;
	ULONG NumberOfFailedMailslotOpens;
	ULONG NumberOfDuplicateMasterAnnouncements;
LARGE_INTEGER NumberOfIllegalDatagrams;
} BROWSER_STATISTICS,*PBROWSER_STATISTICS,*LPBROWSER_STATISTICS;
typedef struct _BROWSER_STATISTICS_100 {
	LARGE_INTEGER StartTime;
	LARGE_INTEGER NumberOfServerAnnouncements;
	LARGE_INTEGER NumberOfDomainAnnouncements;
	ULONG NumberOfElectionPackets;
	ULONG NumberOfMailslotWrites;
	ULONG NumberOfGetBrowserServerListRequests;
	LARGE_INTEGER NumberOfIllegalDatagrams;
} BROWSER_STATISTICS_100,*PBROWSER_STATISTICS_100;
typedef struct _BROWSER_STATISTICS_101 {
	LARGE_INTEGER StartTime;
	LARGE_INTEGER NumberOfServerAnnouncements;
	LARGE_INTEGER NumberOfDomainAnnouncements;
	ULONG NumberOfElectionPackets;
	ULONG NumberOfMailslotWrites;
	ULONG NumberOfGetBrowserServerListRequests;
	LARGE_INTEGER NumberOfIllegalDatagrams;
	ULONG NumberOfMissedServerAnnouncements;
	ULONG NumberOfMissedMailslotDatagrams;
	ULONG NumberOfMissedGetBrowserServerListRequests;
	ULONG NumberOfFailedServerAnnounceAllocations;
	ULONG NumberOfFailedMailslotAllocations;
	ULONG NumberOfFailedMailslotReceives;
	ULONG NumberOfFailedMailslotWrites;
	ULONG NumberOfFailedMailslotOpens;
	ULONG NumberOfDuplicateMasterAnnouncements;
} BROWSER_STATISTICS_101,*PBROWSER_STATISTICS_101;

NET_API_STATUS WINAPI I_BrowserServerEnum(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,PDWORD);
NET_API_STATUS WINAPI I_BrowserServerEnumEx(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,LPCWSTR);
NET_API_STATUS I_BrowserQueryEmulatedDomains(LPWSTR,PBYTE*,PDWORD);
NET_API_STATUS I_BrowserQueryOtherDomains(LPCWSTR,PBYTE*,PDWORD,PDWORD);
NET_API_STATUS I_BrowserResetNetlogonState(LPCWSTR);
NET_API_STATUS I_BrowserSetNetlogonState(LPWSTR,LPWSTR,LPWSTR,DWORD);
NET_API_STATUS I_BrowserQueryStatistics(LPCWSTR,LPBROWSER_STATISTICS*);
NET_API_STATUS I_BrowserResetStatistics(LPCWSTR);
WORD I_BrowserServerEnumForXactsrv(LPCWSTR,LPCWSTR,ULONG,USHORT,PVOID,WORD,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,LPCWSTR,PWORD);
NET_API_STATUS I_BrowserDebugTrace(PWCHAR,PCHAR);

#ifdef __cplusplus
}
#endif

#endif 
