[NETAPI32]
[reactos.git] / reactos / sdk / include / reactos / idl / browser.idl
1 /*
2 * Computer Browser service interface definition
3 */
4
5 #include <ms-dtyp.idl>
6
7 typedef [handle] wchar_t *BROWSER_IDENTIFY_HANDLE;
8
9 cpp_quote("#ifndef _LMBROWSR_H")
10 typedef struct _BROWSER_EMULATED_DOMAIN
11 {
12 LPWSTR DomainName;
13 LPWSTR EmulatedServerName;
14 DWORD Role;
15 } BROWSER_EMULATED_DOMAIN, *PBROWSER_EMULATED_DOMAIN;
16 cpp_quote("#endif")
17
18 typedef struct _BROWSER_EMULATED_DOMAIN_CONTAINER
19 {
20 DWORD EntriesRead;
21 [size_is(EntriesRead)] PBROWSER_EMULATED_DOMAIN Buffer;
22 } BROWSER_EMULATED_DOMAIN_CONTAINER, *PBROWSER_EMULATED_DOMAIN_CONTAINER;
23
24 cpp_quote("#ifndef _LMSERVER_H")
25 typedef struct _SERVER_INFO_100
26 {
27 DWORD sv100_platform_id;
28 LPWSTR sv100_name;
29 } SERVER_INFO_100, *PSERVER_INFO_100, *LPSERVER_INFO_100;
30 cpp_quote("#endif")
31
32 typedef struct _SERVER_INFO_100_CONTAINER
33 {
34 DWORD EntriesRead;
35 [size_is(EntriesRead)] LPSERVER_INFO_100 Buffer;
36 } SERVER_INFO_100_CONTAINER, *PSERVER_INFO_100_CONTAINER, *LPSERVER_INFO_100_CONTAINER;
37
38 typedef struct _SERVER_ENUM_STRUCT
39 {
40 DWORD Level;
41 [switch_is(Level)] union _SERVER_ENUM_UNION
42 {
43 [case(100)] LPSERVER_INFO_100_CONTAINER Level100;
44 [default] ;
45 } ServerInfo;
46 } SERVER_ENUM_STRUCT, *PSERVER_ENUM_STRUCT, *LPSERVER_ENUM_STRUCT;
47
48 cpp_quote("#ifndef _LMBROWSR_H")
49 typedef struct _BROWSER_STATISTICS
50 {
51 LARGE_INTEGER StatisticsStartTime;
52 LARGE_INTEGER NumberOfServerAnnouncements;
53 LARGE_INTEGER NumberOfDomainAnnouncements;
54 ULONG NumberOfElectionPackets;
55 ULONG NumberOfMailslotWrites;
56 ULONG NumberOfGetBrowserServerListRequests;
57 ULONG NumberOfServerEnumerations;
58 ULONG NumberOfDomainEnumerations;
59 ULONG NumberOfOtherEnumerations;
60 ULONG NumberOfMissedServerAnnouncements;
61 ULONG NumberOfMissedMailslotDatagrams;
62 ULONG NumberOfMissedGetBrowserServerListRequests;
63 ULONG NumberOfFailedServerAnnounceAllocations;
64 ULONG NumberOfFailedMailslotAllocations;
65 ULONG NumberOfFailedMailslotReceives;
66 ULONG NumberOfFailedMailslotWrites;
67 ULONG NumberOfFailedMailslotOpens;
68 ULONG NumberOfDuplicateMasterAnnouncements;
69 LARGE_INTEGER NumberOfIllegalDatagrams;
70 } BROWSER_STATISTICS,*PBROWSER_STATISTICS,*LPBROWSER_STATISTICS;
71
72 typedef struct _BROWSER_STATISTICS_100
73 {
74 LARGE_INTEGER StartTime;
75 LARGE_INTEGER NumberOfServerAnnouncements;
76 LARGE_INTEGER NumberOfDomainAnnouncements;
77 ULONG NumberOfElectionPackets;
78 ULONG NumberOfMailslotWrites;
79 ULONG NumberOfGetBrowserServerListRequests;
80 LARGE_INTEGER NumberOfIllegalDatagrams;
81 } BROWSER_STATISTICS_100,*PBROWSER_STATISTICS_100;
82
83 typedef struct _BROWSER_STATISTICS_101
84 {
85 LARGE_INTEGER StartTime;
86 LARGE_INTEGER NumberOfServerAnnouncements;
87 LARGE_INTEGER NumberOfDomainAnnouncements;
88 ULONG NumberOfElectionPackets;
89 ULONG NumberOfMailslotWrites;
90 ULONG NumberOfGetBrowserServerListRequests;
91 LARGE_INTEGER NumberOfIllegalDatagrams;
92 ULONG NumberOfMissedServerAnnouncements;
93 ULONG NumberOfMissedMailslotDatagrams;
94 ULONG NumberOfMissedGetBrowserServerListRequests;
95 ULONG NumberOfFailedServerAnnounceAllocations;
96 ULONG NumberOfFailedMailslotAllocations;
97 ULONG NumberOfFailedMailslotReceives;
98 ULONG NumberOfFailedMailslotWrites;
99 ULONG NumberOfFailedMailslotOpens;
100 ULONG NumberOfDuplicateMasterAnnouncements;
101 } BROWSER_STATISTICS_101,*PBROWSER_STATISTICS_101;
102 cpp_quote("#endif")
103
104 typedef struct _BROWSER_STATISTICS_100_CONTAINER
105 {
106 DWORD EntriesRead;
107 [size_is(EntriesRead)] PBROWSER_STATISTICS_100 Buffer;
108 } BROWSER_STATISTICS_100_CONTAINER, *PBROWSER_STATISTICS_100_CONTAINER;
109
110 typedef struct _BROWSER_STATISTICS_101_CONTAINER
111 {
112 DWORD EntriesRead;
113 [size_is(EntriesRead)] PBROWSER_STATISTICS_101 Buffer;
114 } BROWSER_STATISTICS_101_CONTAINER, *PBROWSER_STATISTICS_101_CONTAINER;
115
116 typedef struct _BROWSER_STATISTICS_STRUCT
117 {
118 DWORD Level;
119 [switch_is(Level)] union _BROWSER_STATISTICS_UNION
120 {
121 [case(100)] PBROWSER_STATISTICS_100_CONTAINER Level100;
122 [case(101)] PBROWSER_STATISTICS_101_CONTAINER Level101;
123 [default] ;
124 } Statistics;
125 } BROWSER_STATISTICS_STRUCT, *PBROWSER_STATISTICS_STRUCT, *LPBROWSER_STATISTICS_STRUCT;
126
127 [
128 uuid(6BFFD098-A112-3610-9833-012892020162),
129 version(0.0),
130 pointer_default(unique),
131 #ifdef __midl
132 ms_union,
133 #endif
134 endpoint("ncacn_np:[\\pipe\\browser]")
135 #ifndef __midl
136 ,implicit_handle(handle_t hBinding)
137 #endif
138 ]
139 interface browser
140 {
141 /* Function 0 */
142 NET_API_STATUS
143 __stdcall
144 I_BrowserrServerEnum(
145 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
146 [in, string, unique] LPWSTR Transport,
147 [in, string, unique] LPWSTR ClientName,
148 [in, out] LPSERVER_ENUM_STRUCT EnumStruct,
149 [in] DWORD PreferedMaximumLength,
150 [out] LPDWORD TotalEntries,
151 [in] DWORD ServerType,
152 [in, string, unique] LPWSTR Domain,
153 [in, out, unique] LPDWORD ResumeHandle);
154
155 /* Function 1 (BrowserrDebugCall) */
156 NET_API_STATUS
157 __stdcall
158 BrowserOpnum1NotUsedOnWire(void);
159
160 /* Function 2 */
161 NET_API_STATUS
162 __stdcall
163 I_BrowserrQueryOtherDomains(
164 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
165 [in, out] LPSERVER_ENUM_STRUCT EnumStruct,
166 [out] LPDWORD TotalEntries);
167
168 /* Function 3 */
169 NET_API_STATUS
170 __stdcall
171 I_BrowserrResetNetlogonState(
172 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName);
173
174 /* Function 4 */
175 NET_API_STATUS
176 __stdcall
177 I_BrowserrDebugTrace(
178 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
179 [in, string] LPSTR String);
180
181 /* Function 5 */
182 NET_API_STATUS
183 __stdcall
184 I_BrowserrQueryStatistics(
185 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
186 [out] LPBROWSER_STATISTICS *Statistics);
187
188 /* Function 6 */
189 NET_API_STATUS
190 __stdcall
191 I_BrowserrResetStatistics(
192 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName);
193
194 /* Function 7 (NetrBrowserStatisticsClear) */
195 NET_API_STATUS
196 __stdcall
197 BrowserOpnum7NotUsedOnWire(void);
198
199 /* Function 8 */
200 NET_API_STATUS
201 __stdcall
202 NetrBrowserStatisticsGet(
203 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
204 [in] DWORD Level,
205 [in, out] LPBROWSER_STATISTICS_STRUCT StatisticsStruct);
206
207 /* Function 9 */
208 NET_API_STATUS
209 __stdcall
210 I_BrowserrSetNetlogonState(
211 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
212 [in, string] LPWSTR DomainName,
213 [in, string, unique] LPWSTR EmulatedComputerName,
214 [in] DWORD Role);
215
216 /* Function 10 */
217 NET_API_STATUS
218 __stdcall
219 I_BrowserrQueryEmulatedDomains(
220 [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
221 [in, out] PBROWSER_EMULATED_DOMAIN_CONTAINER EmulatedDomains);
222
223 /* Function 11 (BrowserrServerEnumEx) */
224 NET_API_STATUS
225 __stdcall
226 BrowserOpnum11NotUsedOnWire(void);
227 }