source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/netlistmgr.idl@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 11.0 KB
RevLine 
[1166]1/*
2 * Copyright 2014 Hans Leidekker for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19import "oaidl.idl";
20import "objidl.idl";
21
22#ifndef __WIDL__
23#define threading(model)
24#endif
25
26interface IEnumNetworks;
27interface IEnumNetworkConnections;
28interface INetwork;
29interface INetworkConnection;
30interface INetworkConnectionEvents;
31interface INetworkCostManager;
32interface INetworkEvents;
33interface INetworkListManager;
34interface INetworkListManagerEvents;
35
36typedef [v1_enum] enum NLM_NETWORK_CLASS
37{
38 NLM_NETWORK_IDENTIFYING = 0x01,
39 NLM_NETWORK_IDENTIFIED = 0x02,
40 NLM_NETWORK_UNIDENTIFIED = 0x03
41} NLM_NETWORK_CLASS;
42
43typedef [v1_enum] enum NLM_INTERNET_CONNECTIVITY
44{
45 NLM_INTERNET_CONNECTIVITY_WEBHIJACK = 0x01,
46 NLM_INTERNET_CONNECTIVITY_PROXIED = 0x02,
47 NLM_INTERNET_CONNECTIVITY_CORPORATE = 0x04
48} NLM_INTERNET_CONNECTIVITY;
49
50typedef [v1_enum] enum NLM_CONNECTIVITY
51{
52 NLM_CONNECTIVITY_DISCONNECTED = 0x0000,
53 NLM_CONNECTIVITY_IPV4_NOTRAFFIC = 0x0001,
54 NLM_CONNECTIVITY_IPV6_NOTRAFFIC = 0x0002,
55 NLM_CONNECTIVITY_IPV4_SUBNET = 0x0010,
56 NLM_CONNECTIVITY_IPV4_LOCALNETWORK = 0x0020,
57 NLM_CONNECTIVITY_IPV4_INTERNET = 0x0040,
58 NLM_CONNECTIVITY_IPV6_SUBNET = 0x0100,
59 NLM_CONNECTIVITY_IPV6_LOCALNETWORK = 0x0200,
60 NLM_CONNECTIVITY_IPV6_INTERNET = 0x0400
61} NLM_CONNECTIVITY;
62
63typedef [v1_enum] enum NLM_DOMAIN_TYPE
64{
65 NLM_DOMAIN_TYPE_NON_DOMAIN_NETWORK = 0x00,
66 NLM_DOMAIN_TYPE_DOMAIN_NETWORK = 0x01,
67 NLM_DOMAIN_TYPE_DOMAIN_AUTHENTICATED = 0x02
68} NLM_DOMAIN_TYPE;
69
70typedef [v1_enum] enum NLM_ENUM_NETWORK
71{
72 NLM_ENUM_NETWORK_CONNECTED = 0x01,
73 NLM_ENUM_NETWORK_DISCONNECTED = 0x02,
74 NLM_ENUM_NETWORK_ALL = 0x03
75} NLM_ENUM_NETWORK;
76
77typedef [v1_enum] enum NLM_CONNECTION_COST
78{
79 NLM_CONNECTION_COST_UNKNOWN = 0x0,
80 NLM_CONNECTION_COST_UNRESTRICTED = 0x1,
81 NLM_CONNECTION_COST_FIXED = 0x2,
82 NLM_CONNECTION_COST_VARIABLE = 0x4,
83 NLM_CONNECTION_COST_OVERDATALIMIT = 0x10000,
84 NLM_CONNECTION_COST_CONGESTED = 0x20000,
85 NLM_CONNECTION_COST_ROAMING = 0x40000,
86 NLM_CONNECTION_COST_APPROACHINGDATALIMIT = 0x80000
87} NLM_CONNECTION_COST;
88
89typedef struct NLM_SOCKADDR
90{
91 BYTE data[128];
92} NLM_SOCKADDR;
93
94const UINT32 NLM_UNKNOWN_DATAPLAN_STATUS = 0xffffffff;
95
96typedef struct NLM_USAGE_DATA
97{
98 DWORD UsageInMegabytes;
99 FILETIME LastSyncTime;
100} NLM_USAGE_DATA;
101
102typedef struct NLM_DATAPLAN_STATUS
103{
104 GUID InterfaceGuid;
105 NLM_USAGE_DATA UsageData;
106 DWORD DataLimitInMegabytes;
107 DWORD InboundBandwidthInKbps;
108 DWORD OutboundBandwidthInKbps;
109 FILETIME NextBillingCycle;
110 DWORD MaxTransferSizeInMegabytes;
111 DWORD Reserved;
112} NLM_DATAPLAN_STATUS;
113
114[
115 object,
116 pointer_default(unique),
117 uuid(dcb00008-570f-4a9b-8d69-199fdba5723b)
118]
119interface INetworkCostManager : IUnknown
120{
121 HRESULT GetCost(
122 [out] DWORD *pCost,
123 [in, unique] NLM_SOCKADDR *pDestIPAddr);
124
125 HRESULT GetDataPlanStatus(
126 [out] NLM_DATAPLAN_STATUS *pDataPlanStatus,
127 [in, unique] NLM_SOCKADDR *pDestIPAddr);
128
129 HRESULT SetDestinationAddresses(
130 [in] UINT32 length,
131 [in, unique, size_is(length)] NLM_SOCKADDR *pDestIPAddrList,
132 [in] VARIANT_BOOL bAppend);
133}
134
135[
136 object,
137 pointer_default(unique),
138 uuid(dcb0000a-570f-4a9b-8d69-199fdba5723b)
139]
140interface INetworkConnectionCost : IUnknown
141{
142 HRESULT GetCost(
143 [out] DWORD *pCost);
144
145 HRESULT GetDataPlanStatus(
146 [out] NLM_DATAPLAN_STATUS *pDataPlanStatus);
147}
148
149[
150 object,
151 pointer_default(unique),
152 uuid(dcb00009-570f-4a9b-8d69-199fdba5723b)
153]
154interface INetworkCostManagerEvents : IUnknown
155{
156 HRESULT CostChanged(
157 [in] DWORD newCost,
158 [in, unique] NLM_SOCKADDR *pDestAddr);
159
160 HRESULT DataPlanStatusChanged(
161 [in, unique] NLM_SOCKADDR *pDestAddr);
162}
163
164[
165 object,
166 oleautomation,
167 pointer_default(unique),
168 dual,
169 uuid(dcb00003-570f-4a9b-8d69-199fdba5723b)
170]
171interface IEnumNetworks : IDispatch
172{
173 [id(DISPID_NEWENUM), propget, hidden, restricted]
174 HRESULT _NewEnum(
175 [out, retval] IEnumVARIANT **ppEnumVar);
176
177 [id(1)]
178 HRESULT Next(
179 [in] ULONG celt,
180 [out, size_is(celt), length_is(*pceltFetched)] INetwork **rgelt,
181 [in, out] ULONG *pceltFetched);
182
183 [id(2)]
184 HRESULT Skip(
185 [in] ULONG celt);
186
187 [id(3)]
188 HRESULT Reset();
189
190 [id(4)]
191 HRESULT Clone(
192 [out, retval] IEnumNetworks **ppEnumNetwork);
193}
194
195[
196 object,
197 oleautomation,
198 pointer_default(unique),
199 dual,
200 uuid(dcb00006-570f-4a9b-8d69-199fdba5723b)
201]
202interface IEnumNetworkConnections : IDispatch
203{
204 [id(DISPID_NEWENUM), propget, hidden, restricted]
205 HRESULT _NewEnum(
206 [out, retval] IEnumVARIANT **ppEnumVar);
207
208 [id(1)]
209 HRESULT Next(
210 [in] ULONG celt,
211 [out, size_is(celt), length_is(*pceltFetched)] INetworkConnection **rgelt,
212 [in, out] ULONG *pceltFetched);
213
214 [id(2)]
215 HRESULT Skip(
216 [in] ULONG celt);
217
218 [id(3)]
219 HRESULT Reset();
220
221 [id(4)]
222 HRESULT Clone(
223 [out, retval] IEnumNetworkConnections **ppEnumNetwork);
224}
225
226[
227 dual,
228 object,
229 oleautomation,
230 pointer_default(unique),
231 uuid(dcb00000-570f-4a9b-8d69-199fdba5723b)
232]
233interface INetworkListManager : IDispatch
234{
235 HRESULT GetNetworks(
236 [in] NLM_ENUM_NETWORK Flags,
237 [out, retval] IEnumNetworks **ppEnumNetwork);
238
239 HRESULT GetNetwork(
240 [in] GUID gdNetworkId,
241 [out, retval] INetwork **ppNetwork);
242
243 HRESULT GetNetworkConnections(
244 [out, retval] IEnumNetworkConnections **ppEnum);
245
246 HRESULT GetNetworkConnection(
247 [in] GUID gdNetworkConnectionId,
248 [out, retval] INetworkConnection **ppNetworkConnection);
249
250 HRESULT IsConnectedToInternet(
251 [out, retval] VARIANT_BOOL *pbIsConnected);
252
253 HRESULT IsConnected(
254 [out, retval] VARIANT_BOOL *pbIsConnected);
255
256 HRESULT GetConnectivity(
257 [out, retval] NLM_CONNECTIVITY *pConnectivity);
258}
259
260[
261 threading(both),
262 uuid(dcb00c01-570f-4a9b-8d69-199fdba5723b)
263]
264coclass NetworkListManager { interface INetworkListManager; }
265
266[
267 object,
268 oleautomation,
269 pointer_default(unique),
270 uuid(DCB00001-570F-4A9B-8D69-199FDBA5723B)
271]
272interface INetworkListManagerEvents : IUnknown
273{
274 HRESULT ConnectivityChanged(
275 [in] NLM_CONNECTIVITY newConnectivity);
276}
277
278[
279 object,
280 oleautomation,
281 pointer_default(unique),
282 uuid(dcb00007-570f-4a9b-8d69-199fdba5723b)
283]
284interface INetworkConnectionEvents : IUnknown
285{
286 typedef enum NLM_CONNECTION_PROPERTY_CHANGE
287 {
288 NLM_CONNECTION_PROPERTY_CHANGE_AUTHENTICATION = 1
289 } NLM_CONNECTION_PROPERTY_CHANGE;
290
291 HRESULT NetworkConnectionConnectivityChanged(
292 [in] GUID connectionId,
293 [in] NLM_CONNECTIVITY newConnectivity);
294
295 HRESULT NetworkConnectionPropertyChanged(
296 [in] GUID connectionId,
297 [in] NLM_CONNECTION_PROPERTY_CHANGE flags);
298}
299
300[
301 object,
302 oleautomation,
303 pointer_default(unique),
304 dual,
305 uuid(dcb00005-570f-4a9b-8d69-199fdba5723b)
306]
307interface INetworkConnection : IDispatch
308{
309 [id(1)]
310 HRESULT GetNetwork(
311 [out, retval] INetwork **ppNetwork);
312
313 [propget, id(2)]
314 HRESULT IsConnectedToInternet(
315 [out, retval] VARIANT_BOOL *pbIsConnected);
316
317 [propget, id(3)]
318 HRESULT IsConnected(
319 [out, retval] VARIANT_BOOL *pbIsConnected);
320
321 [id(4)]
322 HRESULT GetConnectivity(
323 [out, retval] NLM_CONNECTIVITY *pConnectivity);
324
325 [id(5)]
326 HRESULT GetConnectionId(
327 [out, retval] GUID *pgdConnectionId);
328
329 [id(6)]
330 HRESULT GetAdapterId(
331 [out, retval] GUID *pgdAdapterId);
332
333 [id(7)]
334 HRESULT GetDomainType(
335 [out, retval] NLM_DOMAIN_TYPE *pDomainType);
336}
337
338[
339 object,
340 oleautomation,
341 pointer_default(unique),
342 dual,
343 uuid(dcb00002-570f-4a9b-8d69-199fdba5723b)
344]
345interface INetwork : IDispatch
346{
347 typedef enum NLM_NETWORK_CATEGORY
348 {
349 NLM_NETWORK_CATEGORY_PUBLIC = 0x00,
350 NLM_NETWORK_CATEGORY_PRIVATE = 0x01,
351 NLM_NETWORK_CATEGORY_DOMAIN_AUTHENTICATED = 0x02
352 } NLM_NETWORK_CATEGORY;
353
354 [id(1)]
355 HRESULT GetName(
356 [out, string, retval] BSTR *pszNetworkName);
357
358 [id(2)]
359 HRESULT SetName(
360 [in, string] BSTR szNetworkNewName);
361
362 [id(3)]
363 HRESULT GetDescription(
364 [out, string, retval] BSTR *pszDescription);
365
366 [id(4)]
367 HRESULT SetDescription(
368 [in, string] BSTR szDescription);
369
370 [id(5)]
371 HRESULT GetNetworkId(
372 [out, retval] GUID *pgdGuidNetworkId);
373
374 [id(6)]
375 HRESULT GetDomainType(
376 [out, retval] NLM_DOMAIN_TYPE *pNetworkType);
377
378 [id(7)]
379 HRESULT GetNetworkConnections(
380 [out, retval] IEnumNetworkConnections **ppEnumNetworkConnection);
381
382 [id(8)]
383 HRESULT GetTimeCreatedAndConnected(
384 [out] DWORD *pdwLowDateTimeCreated,
385 [out] DWORD *pdwHighDateTimeCreated,
386 [out] DWORD *pdwLowDateTimeConnected,
387 [out] DWORD *pdwHighDateTimeConnected);
388
389 [propget, id(9)]
390 HRESULT IsConnectedToInternet(
391 [out, retval] VARIANT_BOOL *pbIsConnected);
392
393 [propget, id(10)]
394 HRESULT IsConnected(
395 [out, retval] VARIANT_BOOL *pbIsConnected);
396
397 [id(11)]
398 HRESULT GetConnectivity(
399 [out, retval] NLM_CONNECTIVITY *pConnectivity);
400
401 [id(12)]
402 HRESULT GetCategory(
403 [out, retval] NLM_NETWORK_CATEGORY *pCategory);
404
405 [id(13)]
406 HRESULT SetCategory(
407 [in] NLM_NETWORK_CATEGORY NewCategory);
408}
409
410[
411 object,
412 oleautomation,
413 pointer_default(unique),
414 uuid(dcb00004-570f-4a9b-8d69-199fdba5723b)
415]
416interface INetworkEvents : IUnknown
417{
418 typedef enum NLM_NETWORK_PROPERTY_CHANGE
419 {
420 NLM_NETWORK_PROPERTY_CHANGE_CONNECTION = 0x01,
421 NLM_NETWORK_PROPERTY_CHANGE_DESCRIPTION = 0x02,
422 NLM_NETWORK_PROPERTY_CHANGE_NAME = 0x04,
423 NLM_NETWORK_PROPERTY_CHANGE_ICON = 0x08,
424 NLM_NETWORK_PROPERTY_CHANGE_CATEGORY_VALUE = 0x10
425 } NLM_NETWORK_PROPERTY_CHANGE;
426
427 HRESULT NetworkAdded (
428 [in] GUID networkId);
429
430 HRESULT NetworkDeleted (
431 [in] GUID networkId);
432
433 HRESULT NetworkConnectivityChanged (
434 [in] GUID networkId,
435 [in] NLM_CONNECTIVITY newConnectivity);
436
437 HRESULT NetworkPropertyChanged(
438 [in] GUID networkId,
439 [in] NLM_NETWORK_PROPERTY_CHANGE flags);
440}
Note: See TracBrowser for help on using the repository browser.