Debian Codegraph @

mingw-w64-headers/include/windows.networking.idl

raw
1 /*
2 * Copyright (C) 2023 Mohamad Al-Jaf
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
19 #ifdef __WIDL__
20 #pragma makedep header install winmd
21 #pragma winrt ns_prefix
22 #endif
23
24 import "inspectable.idl";
25 import "asyncinfo.idl";
26 import "eventtoken.idl";
27 import "windowscontracts.idl";
28 import "windows.foundation.idl";
29 import "windows.networking.connectivity.idl";
30
31 namespace Windows.Networking.Connectivity
32 {
33 runtimeclass IPInformation;
34 }
35
36 namespace Windows.Networking {
37 typedef enum DomainNameType DomainNameType;
38 typedef enum HostNameSortOptions HostNameSortOptions;
39 typedef enum HostNameType HostNameType;
40
41 interface IEndpointPair;
42 interface IEndpointPairFactory;
43 interface IHostName;
44 interface IHostNameFactory;
45 interface IHostNameStatics;
46
47 runtimeclass EndpointPair;
48 runtimeclass HostName;
49
50 declare {
51 interface Windows.Foundation.Collections.IIterable<Windows.Networking.EndpointPair *>;
52 interface Windows.Foundation.Collections.IIterable<Windows.Networking.HostName *>;
53 interface Windows.Foundation.Collections.IIterator<Windows.Networking.EndpointPair *>;
54 interface Windows.Foundation.Collections.IIterator<Windows.Networking.HostName *>;
55 interface Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair *>;
56 interface Windows.Foundation.Collections.IVectorView<Windows.Networking.HostName *>;
57 interface Windows.Foundation.Collections.IVector<Windows.Networking.HostName *>;
58 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair *> *>;
59 interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair *> *>;
60 }
61
62 [
63 contract(Windows.Foundation.UniversalApiContract, 1.0)
64 ]
65 enum DomainNameType
66 {
67 Suffix = 0,
68 FullyQualified = 1,
69 };
70
71 [
72 contract(Windows.Foundation.UniversalApiContract, 1.0),
73 flags
74 ]
75 enum HostNameSortOptions
76 {
77 None = 0x0,
78 OptimizeForLongConnections = 0x2,
79 };
80
81 [
82 contract(Windows.Foundation.UniversalApiContract, 1.0)
83 ]
84 enum HostNameType
85 {
86 DomainName = 0,
87 Ipv4 = 1,
88 Ipv6 = 2,
89 Bluetooth = 3,
90 };
91
92 [
93 contract(Windows.Foundation.UniversalApiContract, 1.0),
94 exclusiveto(Windows.Networking.EndpointPair),
95 uuid(33a0aa36-f8fa-4b30-b856-76517c3bd06d)
96 ]
97 interface IEndpointPair : IInspectable
98 {
99 [propget] HRESULT LocalHostName([out, retval] Windows.Networking.HostName **value);
100 [propput] HRESULT LocalHostName([in] Windows.Networking.HostName *value);
101 [propget] HRESULT LocalServiceName([out, retval] HSTRING *value);
102 [propput] HRESULT LocalServiceName([in] HSTRING value);
103 [propget] HRESULT RemoteHostName([out, retval] Windows.Networking.HostName **value);
104 [propput] HRESULT RemoteHostName([in] Windows.Networking.HostName *value);
105 [propget] HRESULT RemoteServiceName([out, retval] HSTRING *value);
106 [propput] HRESULT RemoteServiceName([in] HSTRING value);
107 }
108
109 [
110 contract(Windows.Foundation.UniversalApiContract, 1.0),
111 exclusiveto(Windows.Networking.EndpointPair),
112 uuid(b609d971-64e0-442b-aa6f-cc8c8f181f78)
113 ]
114 interface IEndpointPairFactory : IInspectable
115 {
116 HRESULT CreateEndpointPair([in] Windows.Networking.HostName *host, [in] HSTRING service,
117 [in] Windows.Networking.HostName *remote_host, [in] HSTRING remote_service,
118 [out, retval] Windows.Networking.EndpointPair **value);
119 }
120
121 [
122 contract(Windows.Foundation.UniversalApiContract, 1.0),
123 exclusiveto(Windows.Networking.HostName),
124 uuid(bf8ecaad-ed96-49a7-9084-d416cae88dcb)
125 ]
126 interface IHostName : IInspectable
127 {
128 [propget] HRESULT IPInformation([out, retval] Windows.Networking.Connectivity.IPInformation **value);
129 [propget] HRESULT RawName([out, retval] HSTRING *value);
130 [propget] HRESULT DisplayName([out, retval] HSTRING *value);
131 [propget] HRESULT CanonicalName([out, retval] HSTRING *value);
132 [propget] HRESULT Type([out, retval] Windows.Networking.HostNameType *value);
133 HRESULT IsEqual([in] Windows.Networking.HostName *name, [out, retval] boolean *equal);
134 }
135
136 [
137 contract(Windows.Foundation.UniversalApiContract, 1.0),
138 exclusiveto(Windows.Networking.HostName),
139 uuid(458c23ed-712f-4576-adf1-c20b2c643558)
140 ]
141 interface IHostNameFactory : IInspectable
142 {
143 HRESULT CreateHostName([in] HSTRING name, [out, retval] Windows.Networking.HostName **value);
144 }
145
146 [
147 contract(Windows.Foundation.UniversalApiContract, 1.0),
148 exclusiveto(Windows.Networking.HostName),
149 uuid(f68cd4bf-a388-4e8b-91ea-54dd6dd901c0)
150 ]
151 interface IHostNameStatics : IInspectable
152 {
153 HRESULT Compare([in] HSTRING value1, [in] HSTRING value2, [out, retval] INT32 *result);
154 }
155
156 [
157 activatable(Windows.Networking.IEndpointPairFactory, Windows.Foundation.UniversalApiContract, 1.0),
158 contract(Windows.Foundation.UniversalApiContract, 1.0),
159 marshaling_behavior(agile),
160 threading(both)
161 ]
162 runtimeclass EndpointPair
163 {
164 [default] interface Windows.Networking.IEndpointPair;
165 }
166
167 [
168 activatable(Windows.Networking.IHostNameFactory, Windows.Foundation.UniversalApiContract, 1.0),
169 contract(Windows.Foundation.UniversalApiContract, 1.0),
170 marshaling_behavior(agile),
171 static(Windows.Networking.IHostNameStatics, Windows.Foundation.UniversalApiContract, 1.0),
172 threading(both)
173 ]
174 runtimeclass HostName
175 {
176 [default] interface Windows.Networking.IHostName;
177 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable;
178 }
179 }