Debian Codegraph @

mingw-w64-headers/include/windows.devices.enumeration.idl

raw
1 /*
2 * Copyright 2021 Gijs Vermeulen
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 winrt ns_prefix
21 #endif
22
23 import "inspectable.idl";
24 import "asyncinfo.idl";
25 import "eventtoken.idl";
26 import "windowscontracts.idl";
27 import "windows.storage.streams.idl";
28 import "windows.foundation.idl";
29
30 namespace Windows.Devices.Enumeration {
31 typedef enum DeviceClass DeviceClass;
32 typedef enum DeviceInformationKind DeviceInformationKind;
33 typedef enum DeviceWatcherStatus DeviceWatcherStatus;
34 typedef enum Panel Panel;
35 typedef enum DeviceAccessStatus DeviceAccessStatus;
36
37 interface IDeviceInformation;
38 interface IDeviceInformationStatics;
39 interface IDeviceInformationStatics2;
40 interface IDeviceInformationUpdate;
41 interface IEnclosureLocation;
42
43 runtimeclass DeviceInformation;
44 runtimeclass DeviceInformationCollection;
45 runtimeclass DeviceInformationUpdate;
46 runtimeclass DeviceThumbnail;
47 runtimeclass DeviceWatcher;
48 runtimeclass EnclosureLocation;
49 runtimeclass DeviceAccessChangedEventArgs;
50 runtimeclass DeviceAccessInformation;
51
52 declare
53 {
54 interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Enumeration.DeviceInformation *>;
55 interface Windows.Foundation.Collections.IIterable<Windows.Devices.Enumeration.DeviceInformation *>;
56 interface Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.DeviceInformation *>;
57 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceInformation *>;
58 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceInformationCollection *>;
59 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceThumbnail *>;
60 interface Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *>;
61 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformation *>;
62 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection *>;
63 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceThumbnail *>;
64 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, IInspectable *>;
65 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, Windows.Devices.Enumeration.DeviceInformation *>;
66 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *, Windows.Devices.Enumeration.DeviceInformationUpdate *>;
67 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceAccessInformation *, Windows.Devices.Enumeration.DeviceAccessChangedEventArgs *>;
68 }
69 }
70
71 namespace Windows.Devices.Enumeration {
72 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
73 enum DeviceClass
74 {
75 All = 0,
76 AudioCapture = 1,
77 AudioRender = 2,
78 PortableStorageDevice = 3,
79 VideoCapture = 4,
80 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
81 ImageScanner = 5,
82 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
83 Location = 6,
84 };
85
86 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
87 enum DeviceInformationKind
88 {
89 Unknown = 0,
90 DeviceInterface = 1,
91 DeviceContainer = 2,
92 Device = 3,
93 DeviceInterfaceClass = 4,
94 AssociationEndpoint = 5,
95 AssociationEndpointContainer = 6,
96 AssociationEndpointService = 7,
97 [contract(Windows.Foundation.UniversalApiContract, 7.0)]
98 DevicePanel = 8,
99 };
100
101 enum DeviceWatcherStatus
102 {
103 Created = 0,
104 Started = 1,
105 EnumerationCompleted = 2,
106 Stopping = 3,
107 Stopped = 4,
108 Aborted = 5,
109 };
110
111 enum Panel
112 {
113 Unknown = 0,
114 Front = 1,
115 Back = 2,
116 Top = 3,
117 Bottom = 4,
118 Left = 5,
119 Right = 6,
120 };
121
122 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
123 enum DeviceAccessStatus
124 {
125 Unspecified = 0,
126 Allowed = 1,
127 DeniedByUser = 2,
128 DeniedBySystem = 3,
129 };
130
131 [
132 exclusiveto(Windows.Devices.Enumeration.DeviceInformation),
133 uuid(aba0fb95-4398-489d-8e44-e6130927011f)
134 ]
135 interface IDeviceInformation : IInspectable
136 {
137 [propget] HRESULT Id([out, retval] HSTRING *value);
138 [propget] HRESULT Name([out, retval] HSTRING *value);
139 [propget] HRESULT IsEnabled([out, retval] boolean *value);
140 [propget] HRESULT IsDefault([out, retval] boolean *value);
141 [propget] HRESULT EnclosureLocation([out, retval] Windows.Devices.Enumeration.EnclosureLocation **value);
142 [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *> **value);
143 HRESULT Update([in] Windows.Devices.Enumeration.DeviceInformationUpdate *info);
144 HRESULT GetThumbnailAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceThumbnail *> **operation);
145 HRESULT GetGlyphThumbnailAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceThumbnail *> **operation);
146 }
147
148 [
149 exclusiveto(Windows.Devices.Enumeration.DeviceInformationUpdate),
150 uuid(8f315305-d972-44b7-a37e-9e822c78213b)
151 ]
152 interface IDeviceInformationUpdate : IInspectable
153 {
154 [propget] HRESULT Id([out, retval] HSTRING *value);
155 [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, IInspectable *> **value);
156 }
157
158 [
159 exclusiveto(Windows.Devices.Enumeration.DeviceWatcher),
160 uuid(c9eab97d-8f6b-4f96-a9f4-abc814e22271),
161 ]
162 interface IDeviceWatcher : IInspectable
163 {
164 [eventadd] HRESULT Added([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *,
165 Windows.Devices.Enumeration.DeviceInformation *> *handler, [out, retval] EventRegistrationToken *token);
166 [eventremove] HRESULT Added([in] EventRegistrationToken token);
167 [eventadd] HRESULT Updated([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *,
168 Windows.Devices.Enumeration.DeviceInformationUpdate *> *handler, [out, retval] EventRegistrationToken *token);
169 [eventremove] HRESULT Updated([in] EventRegistrationToken token);
170 [eventadd] HRESULT Removed([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *,
171 Windows.Devices.Enumeration.DeviceInformationUpdate *> *handler, [out, retval] EventRegistrationToken *token);
172 [eventremove] HRESULT Removed([in] EventRegistrationToken token);
173 [eventadd] HRESULT EnumerationCompleted([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *,
174 IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
175 [eventremove] HRESULT EnumerationCompleted([in] EventRegistrationToken token);
176 [eventadd] HRESULT Stopped([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceWatcher *,
177 IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
178 [eventremove] HRESULT Stopped([in] EventRegistrationToken token);
179 [propget] HRESULT Status([out, retval] Windows.Devices.Enumeration.DeviceWatcherStatus *status);
180 HRESULT Start();
181 HRESULT Stop();
182 }
183
184 [
185 exclusiveto(Windows.Devices.Enumeration.EnclosureLocation),
186 uuid(42340a27-5810-459c-aabb-c65e1f813ecf)
187 ]
188 interface IEnclosureLocation : IInspectable
189 {
190 [propget] HRESULT InDock([out, retval] boolean *value);
191 [propget] HRESULT InLid([out, retval] boolean *value);
192 [propget] HRESULT Panel([out, retval] Windows.Devices.Enumeration.Panel *value);
193 }
194
195 [
196 contract(Windows.Foundation.UniversalApiContract, 1.0),
197 exclusiveto(Windows.Devices.Enumeration.DeviceInformation),
198 uuid(c17f100e-3a46-4a78-8013-769dc9b97390)
199 ]
200 interface IDeviceInformationStatics : IInspectable
201 {
202 [overload("CreateFromIdAsync")]
203 HRESULT CreateFromIdAsync([in] HSTRING id,
204 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformation *> **op);
205 [overload("CreateFromIdAsync")]
206 HRESULT CreateFromIdAsyncAdditionalProperties([in] HSTRING id,
207 [in] Windows.Foundation.Collections.IIterable<HSTRING> *additional_properties,
208 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformation *> **op);
209 [overload("FindAllAsync")]
210 HRESULT FindAllAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection *> **op);
211 [overload("FindAllAsync"), default_overload]
212 HRESULT FindAllAsyncDeviceClass([in] Windows.Devices.Enumeration.DeviceClass device_class,
213 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection *> **op);
214 [overload("FindAllAsync")]
215 HRESULT FindAllAsyncAqsFilter([in] HSTRING filter,
216 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection *> **op);
217 [overload("FindAllAsync")]
218 HRESULT FindAllAsyncAqsFilterAndAdditionalProperties([in] HSTRING filter,
219 [in] Windows.Foundation.Collections.IIterable<HSTRING> *additional_properties,
220 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection *> **op);
221 [overload("CreateWatcher")]
222 HRESULT CreateWatcher([out, retval] Windows.Devices.Enumeration.DeviceWatcher **watcher);
223 [overload("CreateWatcher"), default_overload]
224 HRESULT CreateWatcherDeviceClass([in] Windows.Devices.Enumeration.DeviceClass device_class,
225 [out, retval] Windows.Devices.Enumeration.DeviceWatcher **watcher);
226 [overload("CreateWatcher")]
227 HRESULT CreateWatcherAqsFilter([in] HSTRING filter, [out, retval] Windows.Devices.Enumeration.DeviceWatcher **watcher);
228 [overload("CreateWatcher")]
229 HRESULT CreateWatcherAqsFilterAndAdditionalProperties([in] HSTRING filter,
230 [in] Windows.Foundation.Collections.IIterable<HSTRING> *additional_properties, [out, retval] Windows.Devices.Enumeration.DeviceWatcher **watcher);
231 }
232
233 [
234 contract(Windows.Foundation.UniversalApiContract, 1.0),
235 exclusiveto(Windows.Devices.Enumeration.DeviceInformation),
236 uuid(493b4f34-a84f-45fd-9167-15d1cb1bd1f9)
237 ]
238 interface IDeviceInformationStatics2 : IInspectable
239 {
240 HRESULT GetAqsFilterFromDeviceClass([in] Windows.Devices.Enumeration.DeviceClass device_class, [out, retval] HSTRING *filter);
241 [overload("CreateFromIdAsync")]
242 HRESULT CreateFromIdAsyncWithKindAndAdditionalProperties([in] HSTRING device_id,
243 [in] Windows.Foundation.Collections.IIterable<HSTRING> *additional_properties,
244 [in] Windows.Devices.Enumeration.DeviceInformationKind kind,
245 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformation *> **async_operation);
246 [overload("FindAllAsync")]
247 HRESULT FindAllAsyncWithKindAqsFilterAndAdditionalProperties([in] HSTRING filter,
248 [in] Windows.Foundation.Collections.IIterable<HSTRING> *additional_properties,
249 [in] Windows.Devices.Enumeration.DeviceInformationKind kind,
250 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection *> **async_operation);
251 [overload("CreateWatcher")]
252 HRESULT CreateWatcherWithKindAqsFilterAndAdditionalProperties([in] HSTRING filter,
253 [in] Windows.Foundation.Collections.IIterable<HSTRING> *additional_properties,
254 [in] Windows.Devices.Enumeration.DeviceInformationKind kind,
255 [out, retval] Windows.Devices.Enumeration.DeviceWatcher **watcher);
256 }
257
258 [
259 contract(Windows.Foundation.UniversalApiContract, 1.0),
260 exclusiveto(Windows.Devices.Enumeration.DeviceAccessChangedEventArgs),
261 uuid(deda0bcc-4f9d-4f58-9dba-a9bc800408d5)
262 ]
263 interface IDeviceAccessChangedEventArgs : IInspectable
264 {
265 [propget] HRESULT Status([out, retval] Windows.Devices.Enumeration.DeviceAccessStatus *value);
266 }
267
268 [
269 contract(Windows.Foundation.UniversalApiContract, 3.0),
270 exclusiveto(Windows.Devices.Enumeration.DeviceAccessChangedEventArgs),
271 uuid(82523262-934b-4b30-a178-adc39f2f2be3)
272 ]
273 interface IDeviceAccessChangedEventArgs2 : IInspectable
274 requires Windows.Devices.Enumeration.IDeviceAccessChangedEventArgs
275 {
276 [propget] HRESULT Id([out, retval] HSTRING *value);
277 }
278
279 [
280 contract(Windows.Foundation.UniversalApiContract, 1.0),
281 exclusiveto(Windows.Devices.Enumeration.DeviceAccessInformation),
282 uuid(0baa9a73-6de5-4915-8ddd-9a0554a6f545)
283 ]
284 interface IDeviceAccessInformation : IInspectable
285 {
286 [eventadd] HRESULT AccessChanged([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Enumeration.DeviceAccessInformation *, Windows.Devices.Enumeration.DeviceAccessChangedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
287 [eventremove] HRESULT AccessChanged([in] EventRegistrationToken cookie);
288 [propget] HRESULT CurrentStatus([out, retval] Windows.Devices.Enumeration.DeviceAccessStatus *status);
289 }
290
291 [
292 contract(Windows.Foundation.UniversalApiContract, 1.0),
293 exclusiveto(Windows.Devices.Enumeration.DeviceAccessInformation),
294 uuid(574bd3d3-5f30-45cd-8a94-724fe5973084),
295 ]
296 interface IDeviceAccessInformationStatics : IInspectable
297 {
298 HRESULT CreateFromId([in] HSTRING device_id, [out, retval] Windows.Devices.Enumeration.DeviceAccessInformation **value);
299 HRESULT CreateFromDeviceClassId([in] GUID device_class_id, [out, retval] Windows.Devices.Enumeration.DeviceAccessInformation **value);
300 HRESULT CreateFromDeviceClass([in] Windows.Devices.Enumeration.DeviceClass device_class, [out, retval] Windows.Devices.Enumeration.DeviceAccessInformation **value);
301 }
302
303 [
304 contract(Windows.Foundation.UniversalApiContract, 1.0),
305 marshaling_behavior(agile),
306 static(Windows.Devices.Enumeration.IDeviceInformationStatics, Windows.Foundation.UniversalApiContract, 1.0),
307 static(Windows.Devices.Enumeration.IDeviceInformationStatics2, Windows.Foundation.UniversalApiContract, 1.0),
308 threading(both)
309 ]
310 runtimeclass DeviceInformation
311 {
312 [default] interface Windows.Devices.Enumeration.IDeviceInformation;
313 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.Enumeration.IDeviceInformation2; */
314 }
315
316 [
317 contract(Windows.Foundation.UniversalApiContract, 1.0),
318 marshaling_behavior(agile),
319 ]
320 runtimeclass DeviceInformationCollection
321 {
322 [default] interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Enumeration.DeviceInformation *>;
323 interface Windows.Foundation.Collections.IIterable<Windows.Devices.Enumeration.DeviceInformation *>;
324 }
325
326 [
327 contract(Windows.Foundation.UniversalApiContract, 1.0),
328 marshaling_behavior(agile),
329 ]
330 runtimeclass DeviceInformationUpdate
331 {
332 [default] interface Windows.Devices.Enumeration.IDeviceInformationUpdate;
333 /* interface Windows.Devices.Enumeration.IDeviceInformationUpdate2; */
334 }
335
336 [
337 contract(Windows.Foundation.UniversalApiContract, 1.0),
338 marshaling_behavior(agile),
339 ]
340 runtimeclass DeviceThumbnail
341 {
342 [default] interface Windows.Storage.Streams.IRandomAccessStreamWithContentType;
343 interface Windows.Storage.Streams.IContentTypeProvider;
344 interface Windows.Storage.Streams.IRandomAccessStream;
345 interface Windows.Storage.Streams.IOutputStream;
346 interface Windows.Foundation.IClosable;
347 interface Windows.Storage.Streams.IInputStream;
348 }
349
350 [
351 contract(Windows.Foundation.UniversalApiContract, 1.0),
352 marshaling_behavior(agile),
353 ]
354 runtimeclass DeviceWatcher
355 {
356 [default] interface Windows.Devices.Enumeration.IDeviceWatcher;
357 /* interface Windows.Devices.Enumeration.IDeviceWatcher2; */
358 }
359
360 [
361 contract(Windows.Foundation.UniversalApiContract, 1.0),
362 marshaling_behavior(agile)
363 ]
364 runtimeclass EnclosureLocation
365 {
366 [default] interface Windows.Devices.Enumeration.IEnclosureLocation;
367 }
368
369 [
370 contract(Windows.Foundation.UniversalApiContract, 1.0),
371 marshaling_behavior(agile)
372 ]
373 runtimeclass DeviceAccessChangedEventArgs
374 {
375 [default] interface Windows.Devices.Enumeration.IDeviceAccessChangedEventArgs;
376 [contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.Devices.Enumeration.IDeviceAccessChangedEventArgs2;
377 }
378
379 [
380 contract(Windows.Foundation.UniversalApiContract, 1.0),
381 marshaling_behavior(agile),
382 static(Windows.Devices.Enumeration.IDeviceAccessInformationStatics, Windows.Foundation.UniversalApiContract, 1.0),
383 threading(both)
384 ]
385 runtimeclass DeviceAccessInformation
386 {
387 [default] interface Windows.Devices.Enumeration.IDeviceAccessInformation;
388 }
389
390 }