2 * Copyright 2021 Gijs Vermeulen
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
20 #pragma winrt ns_prefix
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";
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
;
36 interface IDeviceInformation
;
37 interface IDeviceInformationStatics
;
38 interface IDeviceInformationStatics2
;
39 interface IDeviceInformationUpdate
;
40 interface IEnclosureLocation
;
42 runtimeclass DeviceInformation
;
43 runtimeclass DeviceInformationCollection
;
44 runtimeclass DeviceInformationUpdate
;
45 runtimeclass DeviceThumbnail
;
46 runtimeclass DeviceWatcher
;
47 runtimeclass EnclosureLocation
;
51 interface Windows.Foundation.Collections.IVectorView
<Windows.Devices.Enumeration.DeviceInformation
*>;
52 interface Windows.Foundation.Collections.IIterable
<Windows.Devices.Enumeration.DeviceInformation
*>;
53 interface Windows.Foundation.Collections.IIterator
<Windows.Devices.Enumeration.DeviceInformation
*>;
54 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Devices.Enumeration.DeviceInformation
*>;
55 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Devices.Enumeration.DeviceInformationCollection
*>;
56 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Devices.Enumeration.DeviceThumbnail
*>;
57 interface Windows.Foundation.Collections.IMapView
<HSTRING
, IInspectable
*>;
58 interface Windows.Foundation.IAsyncOperation
<Windows.Devices.Enumeration.DeviceInformation
*>;
59 interface Windows.Foundation.IAsyncOperation
<Windows.Devices.Enumeration.DeviceInformationCollection
*>;
60 interface Windows.Foundation.IAsyncOperation
<Windows.Devices.Enumeration.DeviceThumbnail
*>;
61 interface Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*, IInspectable
*>;
62 interface Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*, Windows.Devices.Enumeration.DeviceInformation
*>;
63 interface Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*, Windows.Devices.Enumeration.DeviceInformationUpdate
*>;
67 namespace Windows.Devices.Enumeration
{
68 [contract
(Windows.Foundation.UniversalApiContract
, 1.0)]
74 PortableStorageDevice
= 3,
76 [contract
(Windows.Foundation.UniversalApiContract
, 1.0)]
78 [contract
(Windows.Foundation.UniversalApiContract
, 1.0)]
82 [contract
(Windows.Foundation.UniversalApiContract
, 1.0)]
83 enum DeviceInformationKind
89 DeviceInterfaceClass
= 4,
90 AssociationEndpoint
= 5,
91 AssociationEndpointContainer
= 6,
92 AssociationEndpointService
= 7,
93 [contract
(Windows.Foundation.UniversalApiContract
, 7.0)]
97 enum DeviceWatcherStatus
101 EnumerationCompleted
= 2,
119 exclusiveto
(Windows.Devices.Enumeration.DeviceInformation
),
120 uuid(aba0fb95
-4398-489d
-8e44
-e6130927011f
)
122 interface IDeviceInformation
: IInspectable
124 [propget] HRESULT Id([out, retval] HSTRING
*value
);
125 [propget] HRESULT Name
([out, retval] HSTRING
*value
);
126 [propget] HRESULT IsEnabled
([out, retval] boolean *value
);
127 [propget] HRESULT IsDefault
([out, retval] boolean *value
);
128 [propget] HRESULT EnclosureLocation
([out, retval] Windows.Devices.Enumeration.EnclosureLocation
**value
);
129 [propget] HRESULT Properties
([out, retval] Windows.Foundation.Collections.IMapView
<HSTRING
, IInspectable
*> **value
);
130 HRESULT Update
([in] Windows.Devices.Enumeration.DeviceInformationUpdate
*info
);
131 HRESULT GetThumbnailAsync
([out, retval] Windows.Foundation.IAsyncOperation
<Windows.Devices.Enumeration.DeviceThumbnail
*> **operation
);
132 HRESULT GetGlyphThumbnailAsync
([out, retval] Windows.Foundation.IAsyncOperation
<Windows.Devices.Enumeration.DeviceThumbnail
*> **operation
);
136 exclusiveto
(Windows.Devices.Enumeration.DeviceInformationUpdate
),
137 uuid(8f315305
-d972
-44b7
-a37e
-9e822c78213b
)
139 interface IDeviceInformationUpdate
: IInspectable
141 [propget] HRESULT Id([out, retval] HSTRING
*value
);
142 [propget] HRESULT Properties
([out, retval] Windows.Foundation.Collections.IMapView
<HSTRING
, IInspectable
*> **value
);
146 exclusiveto
(Windows.Devices.Enumeration.DeviceWatcher
),
147 uuid(c9eab97d
-8f6b
-4f96
-a9f4
-abc814e22271
),
149 interface IDeviceWatcher
: IInspectable
151 [eventadd
] HRESULT Added
([in] Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*,
152 Windows.Devices.Enumeration.DeviceInformation
*> *handler
, [out, retval] EventRegistrationToken
*token
);
153 [eventremove
] HRESULT Added
([in] EventRegistrationToken token
);
154 [eventadd
] HRESULT Updated
([in] Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*,
155 Windows.Devices.Enumeration.DeviceInformationUpdate
*> *handler
, [out, retval] EventRegistrationToken
*token
);
156 [eventremove
] HRESULT Updated
([in] EventRegistrationToken token
);
157 [eventadd
] HRESULT Removed
([in] Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*,
158 Windows.Devices.Enumeration.DeviceInformationUpdate
*> *handler
, [out, retval] EventRegistrationToken
*token
);
159 [eventremove
] HRESULT Removed
([in] EventRegistrationToken token
);
160 [eventadd
] HRESULT EnumerationCompleted
([in] Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*,
161 IInspectable
*> *handler
, [out, retval] EventRegistrationToken
*token
);
162 [eventremove
] HRESULT EnumerationCompleted
([in] EventRegistrationToken token
);
163 [eventadd
] HRESULT Stopped
([in] Windows.Foundation.TypedEventHandler
<Windows.Devices.Enumeration.DeviceWatcher
*,
164 IInspectable
*> *handler
, [out, retval] EventRegistrationToken
*token
);
165 [eventremove
] HRESULT Stopped
([in] EventRegistrationToken token
);
166 [propget] HRESULT Status
([out, retval] Windows.Devices.Enumeration.DeviceWatcherStatus
*status
);
172 exclusiveto
(Windows.Devices.Enumeration.EnclosureLocation
),
173 uuid(42340a27
-5810-459c
-aabb
-c65e1f813ecf
)
175 interface IEnclosureLocation
: IInspectable
177 [propget] HRESULT InDock
([out, retval] boolean *value
);
178 [propget] HRESULT InLid
([out, retval] boolean *value
);
179 [propget] HRESULT Panel
([out, retval] Windows.Devices.Enumeration.Panel
*value
);
183 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
184 exclusiveto
(Windows.Devices.Enumeration.DeviceInformation
),
185 uuid(493b4f34
-a84f
-45fd
-9167-15d1cb1bd1f9
)
187 interface IDeviceInformationStatics2
: IInspectable
189 HRESULT GetAqsFilterFromDeviceClass
([in] Windows.Devices.Enumeration.DeviceClass device_class
, [out, retval] HSTRING
*filter
);
190 [overload
("CreateFromIdAsync")]
191 HRESULT CreateFromIdAsyncWithKindAndAdditionalProperties
([in] HSTRING device_id
,
192 [in] Windows.Foundation.Collections.IIterable
<HSTRING
> *additional_properties
,
193 [in] Windows.Devices.Enumeration.DeviceInformationKind kind
,
194 [out, retval] Windows.Foundation.IAsyncOperation
<Windows.Devices.Enumeration.DeviceInformation
*> **async_operation
);
195 [overload
("FindAllAsync")]
196 HRESULT FindAllAsyncWithKindAqsFilterAndAdditionalProperties
([in] HSTRING filter
,
197 [in] Windows.Foundation.Collections.IIterable
<HSTRING
> *additional_properties
,
198 [in] Windows.Devices.Enumeration.DeviceInformationKind kind
,
199 [out, retval] Windows.Foundation.IAsyncOperation
<Windows.Devices.Enumeration.DeviceInformationCollection
*> **async_operation
);
200 [overload
("CreateWatcher")]
201 HRESULT CreateWatcherWithKindAqsFilterAndAdditionalProperties
([in] HSTRING filter
,
202 [in] Windows.Foundation.Collections.IIterable
<HSTRING
> *additional_properties
,
203 [in] Windows.Devices.Enumeration.DeviceInformationKind kind
,
204 [out, retval] Windows.Devices.Enumeration.DeviceWatcher
**watcher
);
208 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
209 marshaling_behavior
(agile
),
210 static
(Windows.Devices.Enumeration.IDeviceInformationStatics
, Windows.Foundation.UniversalApiContract
, 1.0),
211 static
(Windows.Devices.Enumeration.IDeviceInformationStatics2
, Windows.Foundation.UniversalApiContract
, 1.0),
214 runtimeclass DeviceInformation
216 [default] interface Windows.Devices.Enumeration.IDeviceInformation
;
217 [contract
(Windows.Foundation.UniversalApiContract
, 1.0)] interface Windows.Devices.Enumeration.IDeviceInformation2
;
221 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
222 marshaling_behavior
(agile
),
224 runtimeclass DeviceInformationCollection
226 [default] interface Windows.Foundation.Collections.IVectorView
<Windows.Devices.Enumeration.DeviceInformation
*>;
227 interface Windows.Foundation.Collections.IIterable
<Windows.Devices.Enumeration.DeviceInformation
*>;
231 marshaling_behavior
(agile
),
233 runtimeclass DeviceInformationUpdate
235 [default] interface Windows.Devices.Enumeration.IDeviceInformationUpdate
;
236 interface Windows.Devices.Enumeration.IDeviceInformationUpdate2
;
240 marshaling_behavior
(agile
),
242 runtimeclass DeviceThumbnail
244 [default] interface Windows.Storage.Streams.IRandomAccessStreamWithContentType
;
245 interface Windows.Storage.Streams.IContentTypeProvider
;
246 interface Windows.Storage.Streams.IRandomAccessStream
;
247 interface Windows.Storage.Streams.IOutputStream
;
248 interface Windows.Foundation.IClosable
;
249 interface Windows.Storage.Streams.IInputStream
;
253 marshaling_behavior
(agile
),
255 runtimeclass DeviceWatcher
257 [default] interface Windows.Devices.Enumeration.IDeviceWatcher
;
258 interface Windows.Devices.Enumeration.IDeviceWatcher2
;
262 marshaling_behavior
(agile
)
264 runtimeclass EnclosureLocation
266 [default] interface Windows.Devices.Enumeration.IEnclosureLocation
;