[1166] | 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
|
---|
| 17 | extern "C" {
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
| 20 | typedef 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 |
|
---|
| 38 | typedef void* HCN_CALLBACK;
|
---|
| 39 |
|
---|
| 40 | typedef void (CALLBACK *HCN_NOTIFICATION_CALLBACK)(DWORD NotificationType, void *Context, HRESULT NotificationStatus, PCWSTR NotificationData);
|
---|
| 41 |
|
---|
| 42 | typedef void* HCN_NETWORK;
|
---|
| 43 | typedef HCN_NETWORK* PHCN_NETWORK;
|
---|
| 44 |
|
---|
| 45 | HRESULT WINAPI HcnEnumerateNetworks (PCWSTR Query, PWSTR *Networks, PWSTR *ErrorRecord);
|
---|
| 46 | HRESULT WINAPI HcnCreateNetwork (REFGUID Id, PCWSTR Settings, PHCN_NETWORK Network, PWSTR *ErrorRecord);
|
---|
| 47 | HRESULT WINAPI HcnOpenNetwork (REFGUID Id, PHCN_NETWORK Network, PWSTR *ErrorRecord);
|
---|
| 48 | HRESULT WINAPI HcnModifyNetwork (HCN_NETWORK Network, PCWSTR Settings, PWSTR *ErrorRecord);
|
---|
| 49 | HRESULT WINAPI HcnQueryNetworkProperties (HCN_NETWORK Network, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
|
---|
| 50 | HRESULT WINAPI HcnDeleteNetwork (REFGUID Id, PWSTR *ErrorRecord);
|
---|
| 51 | HRESULT WINAPI HcnCloseNetwork (HCN_NETWORK Network);
|
---|
| 52 |
|
---|
| 53 | typedef void* HCN_NAMESPACE;
|
---|
| 54 | typedef HCN_NAMESPACE* PHCN_NAMESPACE;
|
---|
| 55 |
|
---|
| 56 | HRESULT WINAPI HcnEnumerateNamespaces (PCWSTR Query, PWSTR *Namespaces, PWSTR *ErrorRecord);
|
---|
| 57 | HRESULT WINAPI HcnCreateNamespace (REFGUID Id, PCWSTR Settings, PHCN_NAMESPACE Namespace, PWSTR *ErrorRecord);
|
---|
| 58 | HRESULT WINAPI HcnOpenNamespace (REFGUID Id, PHCN_NAMESPACE Namespace, PWSTR *ErrorRecord);
|
---|
| 59 | HRESULT WINAPI HcnModifyNamespace (HCN_NAMESPACE Namespace, PCWSTR Settings, PWSTR *ErrorRecord);
|
---|
| 60 | HRESULT WINAPI HcnQueryNamespaceProperties (HCN_NAMESPACE Namespace, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
|
---|
| 61 | HRESULT WINAPI HcnDeleteNamespace (REFGUID Id, PWSTR *ErrorRecord);
|
---|
| 62 | HRESULT WINAPI HcnCloseNamespace (HCN_NAMESPACE Namespace);
|
---|
| 63 |
|
---|
| 64 | typedef void* HCN_ENDPOINT;
|
---|
| 65 | typedef HCN_ENDPOINT* PHCN_ENDPOINT;
|
---|
| 66 |
|
---|
| 67 | HRESULT WINAPI HcnEnumerateEndpoints (PCWSTR Query, PWSTR *Endpoints, PWSTR *ErrorRecord);
|
---|
| 68 | HRESULT WINAPI HcnCreateEndpoint (HCN_NETWORK Network, REFGUID Id, PCWSTR Settings, PHCN_ENDPOINT Endpoint, PWSTR *ErrorRecord);
|
---|
| 69 | HRESULT WINAPI HcnOpenEndpoint (REFGUID Id, PHCN_ENDPOINT Endpoint, PWSTR *ErrorRecord);
|
---|
| 70 | HRESULT WINAPI HcnModifyEndpoint (HCN_ENDPOINT Endpoint, PCWSTR Settings, PWSTR *ErrorRecord);
|
---|
| 71 | HRESULT WINAPI HcnQueryEndpointProperties (HCN_ENDPOINT Endpoint, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
|
---|
| 72 | HRESULT WINAPI HcnDeleteEndpoint (REFGUID Id, PWSTR *ErrorRecord);
|
---|
| 73 | HRESULT WINAPI HcnCloseEndpoint (HCN_ENDPOINT Endpoint);
|
---|
| 74 |
|
---|
| 75 | typedef void* HCN_LOADBALANCER;
|
---|
| 76 | typedef HCN_LOADBALANCER* PHCN_LOADBALANCER;
|
---|
| 77 |
|
---|
| 78 | HRESULT WINAPI HcnEnumerateLoadBalancers (PCWSTR Query, PWSTR *LoadBalancer, PWSTR *ErrorRecord);
|
---|
| 79 | HRESULT WINAPI HcnCreateLoadBalancer (REFGUID Id, PCWSTR Settings, PHCN_LOADBALANCER LoadBalancer, PWSTR *ErrorRecord);
|
---|
| 80 | HRESULT WINAPI HcnOpenLoadBalancer (REFGUID Id, PHCN_LOADBALANCER LoadBalancer, PWSTR *ErrorRecord);
|
---|
| 81 | HRESULT WINAPI HcnModifyLoadBalancer (HCN_LOADBALANCER LoadBalancer, PCWSTR Settings, PWSTR *ErrorRecord);
|
---|
| 82 | HRESULT WINAPI HcnQueryLoadBalancerProperties (HCN_LOADBALANCER LoadBalancer, PCWSTR Query, PWSTR *Properties, PWSTR *ErrorRecord);
|
---|
| 83 | HRESULT WINAPI HcnDeleteLoadBalancer (REFGUID Id, PWSTR *ErrorRecord);
|
---|
| 84 | HRESULT WINAPI HcnCloseLoadBalancer (HCN_LOADBALANCER LoadBalancer);
|
---|
| 85 |
|
---|
| 86 | typedef void* HCN_SERVICE;
|
---|
| 87 | typedef HCN_SERVICE* PHCN_SERVICE;
|
---|
| 88 |
|
---|
| 89 | HRESULT WINAPI HcnRegisterServiceCallback (HCN_NOTIFICATION_CALLBACK Callback, void *Context, HCN_CALLBACK *CallbackHandle);
|
---|
| 90 | HRESULT WINAPI HcnUnregisterServiceCallback (HCN_CALLBACK CallbackHandle);
|
---|
| 91 |
|
---|
| 92 | typedef void* HCN_GUESTNETWORKSERVICE;
|
---|
| 93 | typedef HCN_GUESTNETWORKSERVICE* PHCN_GUESTNETWORKSERVICE;
|
---|
| 94 |
|
---|
| 95 | HRESULT WINAPI HcnRegisterGuestNetworkServiceCallback (HCN_GUESTNETWORKSERVICE GuestNetworkService, HCN_NOTIFICATION_CALLBACK Callback, void* Context, HCN_CALLBACK* CallbackHandle);
|
---|
| 96 | HRESULT WINAPI HcnUnregisterGuestNetworkServiceCallback (HCN_CALLBACK CallbackHandle);
|
---|
| 97 | HRESULT WINAPI HcnCreateGuestNetworkService (REFGUID Id, PCWSTR Settings, PHCN_GUESTNETWORKSERVICE GuestNetworkService, PWSTR* ErrorRecord);
|
---|
| 98 | HRESULT WINAPI HcnCloseGuestNetworkService (HCN_GUESTNETWORKSERVICE GuestNetworkService);
|
---|
| 99 | HRESULT WINAPI HcnModifyGuestNetworkService (HCN_GUESTNETWORKSERVICE GuestNetworkService, PCWSTR Settings, PWSTR* ErrorRecord);
|
---|
| 100 | HRESULT WINAPI HcnDeleteGuestNetworkService (REFGUID Id, PWSTR* ErrorRecord);
|
---|
| 101 |
|
---|
| 102 | typedef 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 |
|
---|
| 108 | typedef enum tagHCN_PORT_ACCESS {
|
---|
| 109 | HCN_PORT_ACCESS_EXCLUSIVE = 0x01,
|
---|
| 110 | HCN_PORT_ACCESS_SHARED = 0x02
|
---|
| 111 | } HCN_PORT_ACCESS;
|
---|
| 112 |
|
---|
| 113 | typedef struct tagHCN_PORT_RANGE_RESERVATION {
|
---|
| 114 | USHORT startingPort;
|
---|
| 115 | USHORT endingPort;
|
---|
| 116 | } HCN_PORT_RANGE_RESERVATION;
|
---|
| 117 |
|
---|
| 118 | typedef 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 |
|
---|
| 130 | HRESULT WINAPI HcnReserveGuestNetworkServicePort (HCN_GUESTNETWORKSERVICE GuestNetworkService, HCN_PORT_PROTOCOL Protocol, HCN_PORT_ACCESS Access, USHORT Port, HANDLE* PortReservationHandle);
|
---|
| 131 | HRESULT WINAPI HcnReserveGuestNetworkServicePortRange (HCN_GUESTNETWORKSERVICE GuestNetworkService, USHORT PortCount, HCN_PORT_RANGE_RESERVATION* PortRangeReservation, HANDLE* PortReservationHandle);
|
---|
| 132 | HRESULT WINAPI HcnReleaseGuestNetworkServicePortReservationHandle (HANDLE PortReservationHandle);
|
---|
| 133 | HRESULT WINAPI HcnEnumerateGuestNetworkPortReservations (ULONG* ReturnCount, HCN_PORT_RANGE_ENTRY** PortEntries);
|
---|
| 134 | VOID 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 */
|
---|