xmllite/tests: Fix a memory leak (Valgrind).
[wine.git] / include / netlistmgr.idl
blobe098f7225ab52f8fa6d95f940d4873c52c807e77
1 /*
2 * Copyright 2014 Hans Leidekker for CodeWeavers
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.
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.
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
19 import "oaidl.idl";
20 import "objidl.idl";
22 #ifndef __WIDL__
23 #define threading(model)
24 #endif
26 interface IEnumNetworks;
27 interface IEnumNetworkConnections;
28 interface INetwork;
29 interface INetworkConnection;
30 interface INetworkCostManager;
31 interface INetworkListManager;
32 interface INetworkListManagerEvents;
34 typedef [v1_enum] enum NLM_CONNECTIVITY
36 NLM_CONNECTIVITY_DISCONNECTED = 0x0000,
37 NLM_CONNECTIVITY_IPV4_NOTRAFFIC = 0x0001,
38 NLM_CONNECTIVITY_IPV6_NOTRAFFIC = 0x0002,
39 NLM_CONNECTIVITY_IPV4_SUBNET = 0x0010,
40 NLM_CONNECTIVITY_IPV4_LOCALNETWORK = 0x0020,
41 NLM_CONNECTIVITY_IPV4_INTERNET = 0x0040,
42 NLM_CONNECTIVITY_IPV6_SUBNET = 0x0100,
43 NLM_CONNECTIVITY_IPV6_LOCALNETWORK = 0x0200,
44 NLM_CONNECTIVITY_IPV6_INTERNET = 0x0400
45 } NLM_CONNECTIVITY;
47 typedef [v1_enum] enum NLM_DOMAIN_TYPE
49 NLM_DOMAIN_TYPE_NON_DOMAIN_NETWORK = 0x00,
50 NLM_DOMAIN_TYPE_DOMAIN_NETWORK = 0x01,
51 NLM_DOMAIN_TYPE_DOMAIN_AUTHENTICATED = 0x02
52 } NLM_DOMAIN_TYPE;
54 typedef [v1_enum] enum NLM_ENUM_NETWORK
56 NLM_ENUM_NETWORK_CONNECTED = 0x01,
57 NLM_ENUM_NETWORK_DISCONNECTED = 0x02,
58 NLM_ENUM_NETWORK_ALL = 0x03
59 } NLM_ENUM_NETWORK;
61 typedef [v1_enum] enum NLM_CONNECTION_COST
63 NLM_CONNECTION_COST_UNKNOWN = 0x0,
64 NLM_CONNECTION_COST_UNRESTRICTED = 0x1,
65 NLM_CONNECTION_COST_FIXED = 0x2,
66 NLM_CONNECTION_COST_VARIABLE = 0x4,
67 NLM_CONNECTION_COST_OVERDATALIMIT = 0x10000,
68 NLM_CONNECTION_COST_CONGESTED = 0x20000,
69 NLM_CONNECTION_COST_ROAMING = 0x40000,
70 NLM_CONNECTION_COST_APPROACHINGDATALIMIT = 0x80000
71 } NLM_CONNECTION_COST;
73 typedef struct NLM_SOCKADDR
75 BYTE data[128];
76 } NLM_SOCKADDR;
78 const UINT32 NLM_UNKNOWN_DATAPLAN_STATUS = 0xffffffff;
80 typedef struct NLM_USAGE_DATA
82 DWORD UsageInMegabytes;
83 FILETIME LastSyncTime;
84 } NLM_USAGE_DATA;
86 typedef struct NLM_DATAPLAN_STATUS
88 GUID InterfaceGuid;
89 NLM_USAGE_DATA UsageData;
90 DWORD DataLimitInMegabytes;
91 DWORD InboundBandwidthInKbps;
92 DWORD OutboundBandwidthInKbps;
93 FILETIME NextBillingCycle;
94 DWORD MaxTransferSizeInMegabytes;
95 DWORD Reserved;
96 } NLM_DATAPLAN_STATUS;
99 object,
100 pointer_default(unique),
101 uuid(dcb00008-570f-4a9b-8d69-199fdba5723b)
103 interface INetworkCostManager : IUnknown
105 HRESULT GetCost(
106 [out] DWORD *pCost,
107 [in, unique] NLM_SOCKADDR *pDestIPAddr);
109 HRESULT GetDataPlanStatus(
110 [out] NLM_DATAPLAN_STATUS *pDataPlanStatus,
111 [in, unique] NLM_SOCKADDR *pDestIPAddr);
113 HRESULT SetDestinationAddresses(
114 [in] UINT32 length,
115 [in, unique, size_is(length)] NLM_SOCKADDR *pDestIPAddrList,
116 [in] VARIANT_BOOL bAppend);
120 object,
121 pointer_default(unique),
122 uuid(dcb0000a-570f-4a9b-8d69-199fdba5723b)
124 interface INetworkConnectionCost : IUnknown
126 HRESULT GetCost(
127 [out] DWORD *pCost);
129 HRESULT GetDataPlanStatus(
130 [out] NLM_DATAPLAN_STATUS *pDataPlanStatus);
134 object,
135 pointer_default(unique),
136 uuid(dcb00009-570f-4a9b-8d69-199fdba5723b)
138 interface INetworkCostManagerEvents : IUnknown
140 HRESULT CostChanged(
141 [in] DWORD newCost,
142 [in, unique] NLM_SOCKADDR *pDestAddr);
144 HRESULT DataPlanStatusChanged(
145 [in, unique] NLM_SOCKADDR *pDestAddr);
149 object,
150 oleautomation,
151 pointer_default(unique),
152 dual,
153 uuid(dcb00003-570f-4a9b-8d69-199fdba5723b)
155 interface IEnumNetworks : IDispatch
157 [id(DISPID_NEWENUM), propget, hidden, restricted]
158 HRESULT _NewEnum(
159 [out, retval] IEnumVARIANT **ppEnumVar);
161 [id(1)]
162 HRESULT Next(
163 [in] ULONG celt,
164 [out, size_is(celt), length_is(*pceltFetched)] INetwork **rgelt,
165 [in, out] ULONG *pceltFetched);
167 [id(2)]
168 HRESULT Skip(
169 [in] ULONG celt);
171 [id(3)]
172 HRESULT Reset();
174 [id(4)]
175 HRESULT Clone(
176 [out, retval] IEnumNetworks **ppEnumNetwork);
180 object,
181 oleautomation,
182 pointer_default(unique),
183 dual,
184 uuid(dcb00006-570f-4a9b-8d69-199fdba5723b)
186 interface IEnumNetworkConnections : IDispatch
188 [id(DISPID_NEWENUM), propget, hidden, restricted]
189 HRESULT _NewEnum(
190 [out, retval] IEnumVARIANT **ppEnumVar);
192 [id(1)]
193 HRESULT Next(
194 [in] ULONG celt,
195 [out, size_is(celt), length_is(*pceltFetched)] INetworkConnection **rgelt,
196 [in, out] ULONG *pceltFetched);
198 [id(2)]
199 HRESULT Skip(
200 [in] ULONG celt);
202 [id(3)]
203 HRESULT Reset();
205 [id(4)]
206 HRESULT Clone(
207 [out, retval] IEnumNetworkConnections **ppEnumNetwork);
211 dual,
212 object,
213 oleautomation,
214 pointer_default(unique),
215 uuid(dcb00000-570f-4a9b-8d69-199fdba5723b)
217 interface INetworkListManager : IDispatch
219 HRESULT GetNetworks(
220 [in] NLM_ENUM_NETWORK Flags,
221 [out, retval] IEnumNetworks **ppEnumNetwork);
223 HRESULT GetNetwork(
224 [in] GUID gdNetworkId,
225 [out, retval] INetwork **ppNetwork);
227 HRESULT GetNetworkConnections(
228 [out, retval] IEnumNetworkConnections **ppEnum);
230 HRESULT GetNetworkConnection(
231 [in] GUID gdNetworkConnectionId,
232 [out, retval] INetworkConnection **ppNetworkConnection);
234 HRESULT IsConnectedToInternet(
235 [out, retval] VARIANT_BOOL *pbIsConnected);
237 HRESULT IsConnected(
238 [out, retval] VARIANT_BOOL *pbIsConnected);
240 HRESULT GetConnectivity(
241 [out, retval] NLM_CONNECTIVITY *pConnectivity);
245 threading(both),
246 uuid(dcb00c01-570f-4a9b-8d69-199fdba5723b)
248 coclass NetworkListManager { interface INetworkListManager; }
251 object,
252 oleautomation,
253 pointer_default(unique),
254 uuid(DCB00001-570F-4A9B-8D69-199FDBA5723B)
256 interface INetworkListManagerEvents : IUnknown
258 HRESULT ConnectivityChanged(
259 [in] NLM_CONNECTIVITY newConnectivity);
263 object,
264 oleautomation,
265 pointer_default(unique),
266 uuid(dcb00007-570f-4a9b-8d69-199fdba5723b)
268 interface INetworkConnectionEvents : IUnknown
270 typedef enum NLM_CONNECTION_PROPERTY_CHANGE
272 NLM_CONNECTION_PROPERTY_CHANGE_AUTHENTICATION = 1
273 } NLM_CONNECTION_PROPERTY_CHANGE;
275 HRESULT NetworkConnectionConnectivityChanged(
276 [in] GUID connectionId,
277 [in] NLM_CONNECTIVITY newConnectivity);
279 HRESULT NetworkConnectionPropertyChanged(
280 [in] GUID connectionId,
281 [in] NLM_CONNECTION_PROPERTY_CHANGE flags);
285 object,
286 oleautomation,
287 pointer_default(unique),
288 dual,
289 uuid(dcb00005-570f-4a9b-8d69-199fdba5723b)
291 interface INetworkConnection : IDispatch
293 [id(1)]
294 HRESULT GetNetwork(
295 [out, retval] INetwork **ppNetwork);
297 [propget, id(2)]
298 HRESULT IsConnectedToInternet(
299 [out, retval] VARIANT_BOOL *pbIsConnected);
301 [propget, id(3)]
302 HRESULT IsConnected(
303 [out, retval] VARIANT_BOOL *pbIsConnected);
305 [id(4)]
306 HRESULT GetConnectivity(
307 [out, retval] NLM_CONNECTIVITY *pConnectivity);
309 [id(5)]
310 HRESULT GetConnectionId(
311 [out, retval] GUID *pgdConnectionId);
313 [id(6)]
314 HRESULT GetAdapterId(
315 [out, retval] GUID *pgdAdapterId);
317 [id(7)]
318 HRESULT GetDomainType(
319 [out, retval] NLM_DOMAIN_TYPE *pDomainType);
323 object,
324 oleautomation,
325 pointer_default(unique),
326 dual,
327 uuid(dcb00002-570f-4a9b-8d69-199fdba5723b)
329 interface INetwork : IDispatch
331 typedef enum NLM_NETWORK_CATEGORY
333 NLM_NETWORK_CATEGORY_PUBLIC = 0x00,
334 NLM_NETWORK_CATEGORY_PRIVATE = 0x01,
335 NLM_NETWORK_CATEGORY_DOMAIN_AUTHENTICATED = 0x02
336 } NLM_NETWORK_CATEGORY;
338 [id(1)]
339 HRESULT GetName(
340 [out, string, retval] BSTR *pszNetworkName);
342 [id(2)]
343 HRESULT SetName(
344 [in, string] BSTR szNetworkNewName);
346 [id(3)]
347 HRESULT GetDescription(
348 [out, string, retval] BSTR *pszDescription);
350 [id(4)]
351 HRESULT SetDescription(
352 [in, string] BSTR szDescription);
354 [id(5)]
355 HRESULT GetNetworkId(
356 [out, retval] GUID *pgdGuidNetworkId);
358 [id(6)]
359 HRESULT GetDomainType(
360 [out, retval] NLM_DOMAIN_TYPE *pNetworkType);
362 [id(7)]
363 HRESULT GetNetworkConnections(
364 [out, retval] IEnumNetworkConnections **ppEnumNetworkConnection);
366 [id(8)]
367 HRESULT GetTimeCreatedAndConnected(
368 [out] DWORD *pdwLowDateTimeCreated,
369 [out] DWORD *pdwHighDateTimeCreated,
370 [out] DWORD *pdwLowDateTimeConnected,
371 [out] DWORD *pdwHighDateTimeConnected);
373 [propget, id(9)]
374 HRESULT IsConnectedToInternet(
375 [out, retval] VARIANT_BOOL *pbIsConnected);
377 [propget, id(10)]
378 HRESULT IsConnected(
379 [out, retval] VARIANT_BOOL *pbIsConnected);
381 [id(11)]
382 HRESULT GetConnectivity(
383 [out, retval] NLM_CONNECTIVITY *pConnectivity);
385 [id(12)]
386 HRESULT GetCategory(
387 [out, retval] NLM_NETWORK_CATEGORY *pCategory);
389 [id(13)]
390 HRESULT SetCategory(
391 [in] NLM_NETWORK_CATEGORY NewCategory);