source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/computenetwork.h@ 1167

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

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

File size: 6.7 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7#ifndef HCN_CLIENT_H
8#define HCN_CLIENT_H
9
10#include <apiset.h>
11#include <apisetcconv.h>
12#include <minwindef.h>
13
14#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20typedef enum HCN_NOTIFICATIONS {
21 HcnNotificationInvalid = 0x00000000,
22 HcnNotificationNetworkPreCreate = 0x00000001,
23 HcnNotificationNetworkCreate = 0x00000002,
24 HcnNotificationNetworkPreDelete = 0x00000003,
25 HcnNotificationNetworkDelete = 0x00000004,
26 HcnNotificationNamespaceCreate = 0x00000005,
27 HcnNotificationNamespaceDelete = 0x00000006,
28 HcnNotificationGuestNetworkServiceCreate = 0x00000007,
29 HcnNotificationGuestNetworkServiceDelete = 0x00000008,
30 HcnNotificationNetworkEndpointAttached = 0x00000009,
31 HcnNotificationNetworkEndpointDetached = 0x00000010,
32 HcnNotificationGuestNetworkServiceStateChanged = 0x00000011,
33 HcnNotificationGuestNetworkServiceInterfaceStateChanged = 0x00000012,
34 HcnNotificationServiceDisconnect = 0x01000000,
35 HcnNotificationFlagsReserved = 0xF0000000
36} HCN_NOTIFICATIONS;
37
38typedef void* HCN_CALLBACK;
39
40typedef void (CALLBACK *HCN_NOTIFICATION_CALLBACK)(DWORD NotificationType, void *Context, HRESULT NotificationStatus, PCWSTR NotificationData);
41
42typedef void* HCN_NETWORK;
43typedef HCN_NETWORK* PHCN_NETWORK;
44
45HRESULT WINAPI HcnEnumerateNetworks (PCWSTR Query, PWSTR *Networks, PWSTR *ErrorRecord);
46HRESULT WINAPI HcnCreateNetwork (REFGUID Id, PCWSTR Settings, PHCN_NETWORK Network, PWSTR *ErrorRecord);
47HRESULT WINAPI HcnOpenNetwork (REFGUID Id, PHCN_NETWORK Network, PWSTR *ErrorRecord);
48HRESULT WINAPI HcnModifyNetwork (HCN_NETWORK Network, PCWSTR Settings, PWSTR *ErrorRecord);
49HRESULT WINAPI HcnQueryNetworkProperties (HCN_NETWORK Network, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
50HRESULT WINAPI HcnDeleteNetwork (REFGUID Id, PWSTR *ErrorRecord);
51HRESULT WINAPI HcnCloseNetwork (HCN_NETWORK Network);
52
53typedef void* HCN_NAMESPACE;
54typedef HCN_NAMESPACE* PHCN_NAMESPACE;
55
56HRESULT WINAPI HcnEnumerateNamespaces (PCWSTR Query, PWSTR *Namespaces, PWSTR *ErrorRecord);
57HRESULT WINAPI HcnCreateNamespace (REFGUID Id, PCWSTR Settings, PHCN_NAMESPACE Namespace, PWSTR *ErrorRecord);
58HRESULT WINAPI HcnOpenNamespace (REFGUID Id, PHCN_NAMESPACE Namespace, PWSTR *ErrorRecord);
59HRESULT WINAPI HcnModifyNamespace (HCN_NAMESPACE Namespace, PCWSTR Settings, PWSTR *ErrorRecord);
60HRESULT WINAPI HcnQueryNamespaceProperties (HCN_NAMESPACE Namespace, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
61HRESULT WINAPI HcnDeleteNamespace (REFGUID Id, PWSTR *ErrorRecord);
62HRESULT WINAPI HcnCloseNamespace (HCN_NAMESPACE Namespace);
63
64typedef void* HCN_ENDPOINT;
65typedef HCN_ENDPOINT* PHCN_ENDPOINT;
66
67HRESULT WINAPI HcnEnumerateEndpoints (PCWSTR Query, PWSTR *Endpoints, PWSTR *ErrorRecord);
68HRESULT WINAPI HcnCreateEndpoint (HCN_NETWORK Network, REFGUID Id, PCWSTR Settings, PHCN_ENDPOINT Endpoint, PWSTR *ErrorRecord);
69HRESULT WINAPI HcnOpenEndpoint (REFGUID Id, PHCN_ENDPOINT Endpoint, PWSTR *ErrorRecord);
70HRESULT WINAPI HcnModifyEndpoint (HCN_ENDPOINT Endpoint, PCWSTR Settings, PWSTR *ErrorRecord);
71HRESULT WINAPI HcnQueryEndpointProperties (HCN_ENDPOINT Endpoint, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
72HRESULT WINAPI HcnDeleteEndpoint (REFGUID Id, PWSTR *ErrorRecord);
73HRESULT WINAPI HcnCloseEndpoint (HCN_ENDPOINT Endpoint);
74
75typedef void* HCN_LOADBALANCER;
76typedef HCN_LOADBALANCER* PHCN_LOADBALANCER;
77
78HRESULT WINAPI HcnEnumerateLoadBalancers (PCWSTR Query, PWSTR *LoadBalancer, PWSTR *ErrorRecord);
79HRESULT WINAPI HcnCreateLoadBalancer (REFGUID Id, PCWSTR Settings, PHCN_LOADBALANCER LoadBalancer, PWSTR *ErrorRecord);
80HRESULT WINAPI HcnOpenLoadBalancer (REFGUID Id, PHCN_LOADBALANCER LoadBalancer, PWSTR *ErrorRecord);
81HRESULT WINAPI HcnModifyLoadBalancer (HCN_LOADBALANCER LoadBalancer, PCWSTR Settings, PWSTR *ErrorRecord);
82HRESULT WINAPI HcnQueryLoadBalancerProperties (HCN_LOADBALANCER LoadBalancer, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
83HRESULT WINAPI HcnDeleteLoadBalancer (REFGUID Id, PWSTR *ErrorRecord);
84HRESULT WINAPI HcnCloseLoadBalancer (HCN_LOADBALANCER LoadBalancer);
85
86typedef void* HCN_SERVICE;
87typedef HCN_SERVICE* PHCN_SERVICE;
88
89HRESULT WINAPI HcnRegisterServiceCallback (HCN_NOTIFICATION_CALLBACK Callback, void *Context, HCN_CALLBACK *CallbackHandle);
90HRESULT WINAPI HcnUnregisterServiceCallback (HCN_CALLBACK CallbackHandle);
91
92typedef void* HCN_GUESTNETWORKSERVICE;
93typedef HCN_GUESTNETWORKSERVICE* PHCN_GUESTNETWORKSERVICE;
94
95HRESULT WINAPI HcnRegisterGuestNetworkServiceCallback (HCN_GUESTNETWORKSERVICE GuestNetworkService, HCN_NOTIFICATION_CALLBACK Callback, void* Context, HCN_CALLBACK* CallbackHandle);
96HRESULT WINAPI HcnUnregisterGuestNetworkServiceCallback (HCN_CALLBACK CallbackHandle);
97HRESULT WINAPI HcnCreateGuestNetworkService (REFGUID Id, PCWSTR Settings, PHCN_GUESTNETWORKSERVICE GuestNetworkService, PWSTR* ErrorRecord);
98HRESULT WINAPI HcnCloseGuestNetworkService (HCN_GUESTNETWORKSERVICE GuestNetworkService);
99HRESULT WINAPI HcnModifyGuestNetworkService (HCN_GUESTNETWORKSERVICE GuestNetworkService, PCWSTR Settings, PWSTR* ErrorRecord);
100HRESULT WINAPI HcnDeleteGuestNetworkService (REFGUID Id, PWSTR* ErrorRecord);
101
102typedef enum tagHCN_PORT_PROTOCOL {
103 HCN_PORT_PROTOCOL_TCP = 0x01,
104 HCN_PORT_PROTOCOL_UDP = 0x02,
105 HCN_PORT_PROTOCOL_BOTH = 0x03
106} HCN_PORT_PROTOCOL;
107
108typedef enum tagHCN_PORT_ACCESS {
109 HCN_PORT_ACCESS_EXCLUSIVE = 0x01,
110 HCN_PORT_ACCESS_SHARED = 0x02
111} HCN_PORT_ACCESS;
112
113typedef struct tagHCN_PORT_RANGE_RESERVATION {
114 USHORT startingPort;
115 USHORT endingPort;
116} HCN_PORT_RANGE_RESERVATION;
117
118typedef struct tagHCN_PORT_RANGE_ENTRY {
119 GUID OwningPartitionId;
120 GUID TargetPartitionId;
121 HCN_PORT_PROTOCOL Protocol;
122 UINT64 Priority;
123 UINT32 ReservationType;
124 UINT32 SharingFlags;
125 UINT32 DeliveryMode;
126 UINT16 StartingPort;
127 UINT16 EndingPort;
128} HCN_PORT_RANGE_ENTRY, *PHCN_PORT_RANGE_ENTRY;
129
130HRESULT WINAPI HcnReserveGuestNetworkServicePort (HCN_GUESTNETWORKSERVICE GuestNetworkService, HCN_PORT_PROTOCOL Protocol, HCN_PORT_ACCESS Access, USHORT Port, HANDLE* PortReservationHandle);
131HRESULT WINAPI HcnReserveGuestNetworkServicePortRange (HCN_GUESTNETWORKSERVICE GuestNetworkService, USHORT PortCount, HCN_PORT_RANGE_RESERVATION* PortRangeReservation, HANDLE* PortReservationHandle);
132HRESULT WINAPI HcnReleaseGuestNetworkServicePortReservationHandle (HANDLE PortReservationHandle);
133HRESULT WINAPI HcnEnumerateGuestNetworkPortReservations (ULONG* ReturnCount, HCN_PORT_RANGE_ENTRY** PortEntries);
134VOID WINAPI HcnFreeGuestNetworkPortReservations (HCN_PORT_RANGE_ENTRY* PortEntries);
135
136#ifdef __cplusplus
137}
138#endif
139
140#endif /* WINAPI_PARTITION_DESKTOP */
141
142#endif /* HCN_CLIENT_H */
Note: See TracBrowser for help on using the repository browser.