| 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 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.foundation.idl"; |
| 28 |
import "windows.storage.streams.idl"; |
| 29 |
|
| 30 |
namespace Windows.Devices.Usb { |
| 31 |
typedef enum UsbControlRecipient UsbControlRecipient; |
| 32 |
typedef enum UsbControlTransferType UsbControlTransferType; |
| 33 |
typedef enum UsbReadOptions UsbReadOptions; |
| 34 |
typedef enum UsbTransferDirection UsbTransferDirection; |
| 35 |
typedef enum UsbWriteOptions UsbWriteOptions; |
| 36 |
|
| 37 |
interface IUsbBulkInEndpointDescriptor; |
| 38 |
interface IUsbBulkInPipe; |
| 39 |
interface IUsbDevice; |
| 40 |
interface IUsbDeviceClass; |
| 41 |
interface IUsbConfiguration; |
| 42 |
interface IUsbConfigurationDescriptor; |
| 43 |
interface IUsbConfigurationDescriptorStatics; |
| 44 |
interface IUsbControlRequestType; |
| 45 |
interface IUsbDeviceDescriptor; |
| 46 |
interface IUsbDeviceStatics; |
| 47 |
interface IUsbInterface; |
| 48 |
interface IUsbInterfaceDescriptor; |
| 49 |
interface IUsbInterfaceDescriptorStatics; |
| 50 |
interface IUsbInterruptInEndpointDescriptor; |
| 51 |
interface IUsbInterruptInEventArgs; |
| 52 |
interface IUsbInterruptInPipe; |
| 53 |
interface IUsbInterruptOutEndpointDescriptor; |
| 54 |
interface IUsbInterruptOutPipe; |
| 55 |
interface IUsbSetupPacket; |
| 56 |
interface IUsbSetupPacketFactory; |
| 57 |
|
| 58 |
runtimeclass UsbBulkInEndpointDescriptor; |
| 59 |
runtimeclass UsbBulkInPipe; |
| 60 |
runtimeclass UsbBulkOutEndpointDescriptor; |
| 61 |
runtimeclass UsbBulkOutPipe; |
| 62 |
runtimeclass UsbConfiguration; |
| 63 |
runtimeclass UsbConfigurationDescriptor; |
| 64 |
runtimeclass UsbControlRequestType; |
| 65 |
runtimeclass UsbDescriptor; |
| 66 |
runtimeclass UsbDevice; |
| 67 |
runtimeclass UsbDeviceClass; |
| 68 |
runtimeclass UsbDeviceDescriptor; |
| 69 |
runtimeclass UsbInterface; |
| 70 |
runtimeclass UsbInterfaceDescriptor; |
| 71 |
runtimeclass UsbInterfaceSetting; |
| 72 |
runtimeclass UsbInterruptInEndpointDescriptor; |
| 73 |
runtimeclass UsbInterruptInEventArgs; |
| 74 |
runtimeclass UsbInterruptInPipe; |
| 75 |
runtimeclass UsbInterruptOutEndpointDescriptor; |
| 76 |
runtimeclass UsbInterruptOutPipe; |
| 77 |
runtimeclass UsbSetupPacket; |
| 78 |
|
| 79 |
declare { |
| 80 |
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Usb.UsbDevice *>; |
| 81 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInEndpointDescriptor *>; |
| 82 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInPipe *>; |
| 83 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutEndpointDescriptor *>; |
| 84 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutPipe *>; |
| 85 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *>; |
| 86 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterface *>; |
| 87 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterfaceSetting *>; |
| 88 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInEndpointDescriptor *>; |
| 89 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInPipe *>; |
| 90 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor *>; |
| 91 |
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutPipe *>; |
| 92 |
interface Windows.Foundation.IAsyncOperation<Windows.Devices.Usb.UsbDevice *>; |
| 93 |
interface Windows.Foundation.TypedEventHandler<Windows.Devices.Usb.UsbInterruptInPipe *, Windows.Devices.Usb.UsbInterruptInEventArgs *>; |
| 94 |
} |
| 95 |
|
| 96 |
[ |
| 97 |
contract(Windows.Foundation.UniversalApiContract, 1.0) |
| 98 |
] |
| 99 |
enum UsbControlRecipient |
| 100 |
{ |
| 101 |
Device = 0, |
| 102 |
SpecifiedInterface = 1, |
| 103 |
Endpoint = 2, |
| 104 |
Other = 3, |
| 105 |
DefaultInterface = 4, |
| 106 |
}; |
| 107 |
|
| 108 |
[ |
| 109 |
contract(Windows.Foundation.UniversalApiContract, 1.0) |
| 110 |
] |
| 111 |
enum UsbControlTransferType |
| 112 |
{ |
| 113 |
Standard = 0, |
| 114 |
Class = 1, |
| 115 |
Vendor = 2, |
| 116 |
}; |
| 117 |
|
| 118 |
[ |
| 119 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 120 |
flags |
| 121 |
] |
| 122 |
enum UsbReadOptions |
| 123 |
{ |
| 124 |
None = 0x0, |
| 125 |
AutoClearStall = 0x1, |
| 126 |
OverrideAutomaticBufferManagement = 0x2, |
| 127 |
IgnoreShortPacket = 0x4, |
| 128 |
AllowPartialReads = 0x8, |
| 129 |
}; |
| 130 |
|
| 131 |
[ |
| 132 |
contract(Windows.Foundation.UniversalApiContract, 1.0) |
| 133 |
] |
| 134 |
enum UsbTransferDirection |
| 135 |
{ |
| 136 |
Out = 0, |
| 137 |
In = 1, |
| 138 |
}; |
| 139 |
|
| 140 |
[ |
| 141 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 142 |
flags |
| 143 |
] |
| 144 |
enum UsbWriteOptions |
| 145 |
{ |
| 146 |
None = 0x0, |
| 147 |
AutoClearStall = 0x1, |
| 148 |
ShortPacketTerminate = 0x2, |
| 149 |
}; |
| 150 |
|
| 151 |
[ |
| 152 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 153 |
exclusiveto(Windows.Devices.Usb.UsbBulkInEndpointDescriptor), |
| 154 |
uuid(3c6e4846-06cf-42a9-9dc2-971c1b14b6e3) |
| 155 |
] |
| 156 |
interface IUsbBulkInEndpointDescriptor : IInspectable |
| 157 |
{ |
| 158 |
[propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); |
| 159 |
[propget] HRESULT EndpointNumber([out, retval] BYTE *value); |
| 160 |
[propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbBulkInPipe **value); |
| 161 |
} |
| 162 |
|
| 163 |
[ |
| 164 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 165 |
exclusiveto(Windows.Devices.Usb.UsbBulkInPipe), |
| 166 |
uuid(f01d2d3b-4548-4d50-b326-d82cdabe1220) |
| 167 |
] |
| 168 |
interface IUsbBulkInPipe : IInspectable |
| 169 |
{ |
| 170 |
[propget] HRESULT MaxTransferSizeBytes([out, retval] UINT32 *value); |
| 171 |
[propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbBulkInEndpointDescriptor **value); |
| 172 |
HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); |
| 173 |
[propput] HRESULT ReadOptions([in] Windows.Devices.Usb.UsbReadOptions value); |
| 174 |
[propget] HRESULT ReadOptions([out, retval] Windows.Devices.Usb.UsbReadOptions *value); |
| 175 |
HRESULT FlushBuffer(); |
| 176 |
[propget] HRESULT InputStream([out, retval] Windows.Storage.Streams.IInputStream **value); |
| 177 |
} |
| 178 |
|
| 179 |
[ |
| 180 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 181 |
exclusiveto(Windows.Devices.Usb.UsbBulkOutEndpointDescriptor), |
| 182 |
uuid(2820847a-ffee-4f60-9be1-956cac3ecb65) |
| 183 |
] |
| 184 |
interface IUsbBulkOutEndpointDescriptor : IInspectable |
| 185 |
{ |
| 186 |
[propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); |
| 187 |
[propget] HRESULT EndpointNumber([out, retval] BYTE *value); |
| 188 |
[propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbBulkOutPipe **value); |
| 189 |
} |
| 190 |
|
| 191 |
[ |
| 192 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 193 |
exclusiveto(Windows.Devices.Usb.UsbBulkOutPipe), |
| 194 |
uuid(a8e9ee6e-0115-45aa-8b21-37b225bccee7) |
| 195 |
] |
| 196 |
interface IUsbBulkOutPipe : IInspectable |
| 197 |
{ |
| 198 |
[propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbBulkOutEndpointDescriptor **value); |
| 199 |
HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); |
| 200 |
[propput] HRESULT WriteOptions([in] Windows.Devices.Usb.UsbWriteOptions value); |
| 201 |
[propget] HRESULT WriteOptions([out, retval] Windows.Devices.Usb.UsbWriteOptions *value); |
| 202 |
[propget] HRESULT OutputStream([out, retval] Windows.Storage.Streams.IOutputStream **value); |
| 203 |
} |
| 204 |
|
| 205 |
[ |
| 206 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 207 |
exclusiveto(Windows.Devices.Usb.UsbConfiguration), |
| 208 |
uuid(68177429-36a9-46d7-b873-fc689251ec30) |
| 209 |
] |
| 210 |
interface IUsbConfiguration : IInspectable |
| 211 |
{ |
| 212 |
[propget] HRESULT UsbInterfaces([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterface *> **value); |
| 213 |
[propget] HRESULT ConfigurationDescriptor([out, retval] Windows.Devices.Usb.UsbConfigurationDescriptor **value); |
| 214 |
[propget] HRESULT Descriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *> **value); |
| 215 |
} |
| 216 |
|
| 217 |
[ |
| 218 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 219 |
exclusiveto(Windows.Devices.Usb.UsbConfigurationDescriptor), |
| 220 |
uuid(f2176d92-b442-407a-8207-7d646c0385f3) |
| 221 |
] |
| 222 |
interface IUsbConfigurationDescriptor : IInspectable |
| 223 |
{ |
| 224 |
[propget] HRESULT ConfigurationValue([out, retval] BYTE *value); |
| 225 |
[propget] HRESULT MaxPowerMilliamps([out, retval] UINT32 *value); |
| 226 |
[propget] HRESULT SelfPowered([out, retval] boolean *value); |
| 227 |
[propget] HRESULT RemoteWakeup([out, retval] boolean *value); |
| 228 |
} |
| 229 |
|
| 230 |
[ |
| 231 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 232 |
exclusiveto(Windows.Devices.Usb.UsbConfigurationDescriptor), |
| 233 |
uuid(424ced93-e740-40a1-92bd-da120ea04914) |
| 234 |
] |
| 235 |
interface IUsbConfigurationDescriptorStatics : IInspectable |
| 236 |
{ |
| 237 |
HRESULT TryParse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out] Windows.Devices.Usb.UsbConfigurationDescriptor **parsed, [out, retval] boolean *success); |
| 238 |
HRESULT Parse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out, retval] Windows.Devices.Usb.UsbConfigurationDescriptor **parsed); |
| 239 |
} |
| 240 |
|
| 241 |
[ |
| 242 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 243 |
exclusiveto(Windows.Devices.Usb.UsbControlRequestType), |
| 244 |
uuid(8e9465a6-d73d-46de-94be-aae7f07c0f5c) |
| 245 |
] |
| 246 |
interface IUsbControlRequestType : IInspectable |
| 247 |
{ |
| 248 |
[propget] HRESULT Direction([out, retval] Windows.Devices.Usb.UsbTransferDirection *value); |
| 249 |
[propput] HRESULT Direction([in] Windows.Devices.Usb.UsbTransferDirection value); |
| 250 |
[propget] HRESULT ControlTransferType([out, retval] Windows.Devices.Usb.UsbControlTransferType *value); |
| 251 |
[propput] HRESULT ControlTransferType([in] Windows.Devices.Usb.UsbControlTransferType value); |
| 252 |
[propget] HRESULT Recipient([out, retval] Windows.Devices.Usb.UsbControlRecipient *value); |
| 253 |
[propput] HRESULT Recipient([in] Windows.Devices.Usb.UsbControlRecipient value); |
| 254 |
[propget] HRESULT AsByte([out, retval] BYTE *value); |
| 255 |
[propput] HRESULT AsByte([in] BYTE value); |
| 256 |
} |
| 257 |
|
| 258 |
[ |
| 259 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 260 |
exclusiveto(Windows.Devices.Usb.UsbDescriptor), |
| 261 |
uuid(0a89f216-5f9d-4874-8904-da9ad3f5528f) |
| 262 |
] |
| 263 |
interface IUsbDescriptor : IInspectable |
| 264 |
{ |
| 265 |
[propget] HRESULT Length([out, retval] BYTE *value); |
| 266 |
[propget] HRESULT DescriptorType([out, retval] BYTE *value); |
| 267 |
HRESULT ReadDescriptorBuffer([in] Windows.Storage.Streams.IBuffer *buffer); |
| 268 |
} |
| 269 |
|
| 270 |
[ |
| 271 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 272 |
exclusiveto(Windows.Devices.Usb.UsbDevice), |
| 273 |
uuid(5249b992-c456-44d5-ad5e-24f5a089f63b) |
| 274 |
] |
| 275 |
interface IUsbDevice : IInspectable |
| 276 |
requires Windows.Foundation.IClosable |
| 277 |
{ |
| 278 |
[overload("SendControlOutTransferAsync")] |
| 279 |
HRESULT SendControlOutTransferAsync( |
| 280 |
[in] Windows.Devices.Usb.UsbSetupPacket *packet, |
| 281 |
[in] Windows.Storage.Streams.IBuffer *buffer, |
| 282 |
[out, retval] Windows.Foundation.IAsyncOperation<UINT32> **operation |
| 283 |
); |
| 284 |
[overload("SendControlOutTransferAsync")] |
| 285 |
HRESULT SendControlOutTransferAsyncNoBuffer( |
| 286 |
[in] Windows.Devices.Usb.UsbSetupPacket *packet, |
| 287 |
[out, retval] Windows.Foundation.IAsyncOperation<UINT32> **operation |
| 288 |
); |
| 289 |
[overload("SendControlInTransferAsync")] |
| 290 |
HRESULT SendControlInTransferAsync( |
| 291 |
[in] Windows.Devices.Usb.UsbSetupPacket *packet, |
| 292 |
[in] Windows.Storage.Streams.IBuffer *buffer, |
| 293 |
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer *> **operation |
| 294 |
); |
| 295 |
[overload("SendControlInTransferAsync")] |
| 296 |
HRESULT SendControlInTransferAsyncNoBuffer( |
| 297 |
[in] Windows.Devices.Usb.UsbSetupPacket *packet, |
| 298 |
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer *> **operation |
| 299 |
); |
| 300 |
[propget] HRESULT DefaultInterface([out, retval] Windows.Devices.Usb.UsbInterface **value); |
| 301 |
[propget] HRESULT DeviceDescriptor([out, retval] Windows.Devices.Usb.UsbDeviceDescriptor **value); |
| 302 |
[propget] HRESULT Configuration([out, retval] Windows.Devices.Usb.UsbConfiguration **value); |
| 303 |
} |
| 304 |
|
| 305 |
[ |
| 306 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 307 |
exclusiveto(Windows.Devices.Usb.UsbDeviceClass), |
| 308 |
uuid(051942f9-845e-47eb-b12a-38f2f617afe7) |
| 309 |
] |
| 310 |
interface IUsbDeviceClass : IInspectable |
| 311 |
{ |
| 312 |
[propget] HRESULT ClassCode([out, retval] BYTE *value); |
| 313 |
[propput] HRESULT ClassCode([in] BYTE value); |
| 314 |
[propget] HRESULT SubclassCode([out, retval] Windows.Foundation.IReference<BYTE> **value); |
| 315 |
[propput] HRESULT SubclassCode([in] Windows.Foundation.IReference<BYTE> *value); |
| 316 |
[propget] HRESULT ProtocolCode([out, retval] Windows.Foundation.IReference<BYTE> **value); |
| 317 |
[propput] HRESULT ProtocolCode([in] Windows.Foundation.IReference<BYTE> *value); |
| 318 |
} |
| 319 |
|
| 320 |
[ |
| 321 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 322 |
exclusiveto(Windows.Devices.Usb.UsbDeviceDescriptor), |
| 323 |
uuid(1f48d1f6-ba97-4322-b92c-b5b189216588) |
| 324 |
] |
| 325 |
interface IUsbDeviceDescriptor : IInspectable |
| 326 |
{ |
| 327 |
[propget] HRESULT BcdUsb([out, retval] UINT32 *value); |
| 328 |
[propget] HRESULT MaxPacketSize0([out, retval] BYTE *value); |
| 329 |
[propget] HRESULT VendorId([out, retval] UINT32 *value); |
| 330 |
[propget] HRESULT ProductId([out, retval] UINT32 *value); |
| 331 |
[propget] HRESULT BcdDeviceRevision([out, retval] UINT32 *value); |
| 332 |
[propget] HRESULT NumberOfConfigurations([out, retval] BYTE *value); |
| 333 |
} |
| 334 |
|
| 335 |
[ |
| 336 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 337 |
exclusiveto(Windows.Devices.Usb.UsbDevice), |
| 338 |
uuid(066b85a2-09b7-4446-8502-6fe6dcaa7309) |
| 339 |
] |
| 340 |
interface IUsbDeviceStatics : IInspectable |
| 341 |
{ |
| 342 |
[overload("GetDeviceSelector")] |
| 343 |
HRESULT GetDeviceSelector([in] UINT32 vendor, [in] UINT32 product, [in] GUID class, [out, retval] HSTRING *value); |
| 344 |
[overload("GetDeviceSelector")] |
| 345 |
HRESULT GetDeviceSelectorGuidOnly([in] GUID class, [out, retval] HSTRING *value); |
| 346 |
[overload("GetDeviceSelector")] |
| 347 |
HRESULT GetDeviceSelectorVidPidOnly([in] UINT32 vendor, [in] UINT32 product, [out, retval] HSTRING *value); |
| 348 |
HRESULT GetDeviceClassSelector([in] Windows.Devices.Usb.UsbDeviceClass *class, [out, retval] HSTRING *value); |
| 349 |
HRESULT FromIdAsync([in] HSTRING id, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Usb.UsbDevice *> **operation); |
| 350 |
} |
| 351 |
|
| 352 |
[ |
| 353 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 354 |
exclusiveto(Windows.Devices.Usb.UsbInterface), |
| 355 |
uuid(a0322b95-7f47-48ab-a727-678c25be2112) |
| 356 |
] |
| 357 |
interface IUsbInterface : IInspectable |
| 358 |
{ |
| 359 |
[propget] HRESULT BulkInPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInPipe *> **value); |
| 360 |
[propget] HRESULT InterruptInPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInPipe *> **value); |
| 361 |
[propget] HRESULT BulkOutPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutPipe *> **value); |
| 362 |
[propget] HRESULT InterruptOutPipes([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutPipe *> **value); |
| 363 |
[propget] HRESULT InterfaceSettings([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterfaceSetting *> **value); |
| 364 |
[propget] HRESULT InterfaceNumber([out, retval] BYTE *value); |
| 365 |
[propget] HRESULT Descriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *> **value); |
| 366 |
} |
| 367 |
|
| 368 |
[ |
| 369 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 370 |
exclusiveto(Windows.Devices.Usb.UsbInterfaceDescriptor), |
| 371 |
uuid(199670c7-b7ee-4f90-8cd5-94a2e257598a) |
| 372 |
] |
| 373 |
interface IUsbInterfaceDescriptor : IInspectable |
| 374 |
{ |
| 375 |
[propget] HRESULT ClassCode([out, retval] BYTE *value); |
| 376 |
[propget] HRESULT SubclassCode([out, retval] BYTE *value); |
| 377 |
[propget] HRESULT ProtocolCode([out, retval] BYTE *value); |
| 378 |
[propget] HRESULT AlternateSettingNumber([out, retval] BYTE *value); |
| 379 |
[propget] HRESULT InterfaceNumber([out, retval] BYTE *value); |
| 380 |
} |
| 381 |
|
| 382 |
[ |
| 383 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 384 |
exclusiveto(Windows.Devices.Usb.UsbInterfaceDescriptor), |
| 385 |
uuid(e34a9ff5-77d6-48b6-b0be-16c6422316fe) |
| 386 |
] |
| 387 |
interface IUsbInterfaceDescriptorStatics : IInspectable |
| 388 |
{ |
| 389 |
HRESULT TryParse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out] Windows.Devices.Usb.UsbInterfaceDescriptor **parsed, [out, retval] boolean *success); |
| 390 |
HRESULT Parse([in] Windows.Devices.Usb.UsbDescriptor *descriptor, [out, retval] Windows.Devices.Usb.UsbInterfaceDescriptor **parsed); |
| 391 |
} |
| 392 |
|
| 393 |
[ |
| 394 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 395 |
exclusiveto(Windows.Devices.Usb.UsbInterfaceSetting), |
| 396 |
uuid(1827bba7-8da7-4af7-8f4c-7f3032e781f5) |
| 397 |
] |
| 398 |
interface IUsbInterfaceSetting : IInspectable |
| 399 |
{ |
| 400 |
[propget] HRESULT BulkInEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkInEndpointDescriptor *> **value); |
| 401 |
[propget] HRESULT InterruptInEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptInEndpointDescriptor *> **value); |
| 402 |
[propget] HRESULT BulkOutEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbBulkOutEndpointDescriptor *> **value); |
| 403 |
[propget] HRESULT InterruptOutEndpoints([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor *> **value); |
| 404 |
[propget] HRESULT Selected([out, retval] boolean *value); |
| 405 |
HRESULT SelectSettingAsync([out, retval] Windows.Foundation.IAsyncAction **operation); |
| 406 |
[propget] HRESULT InterfaceDescriptor([out, retval] Windows.Devices.Usb.UsbInterfaceDescriptor **value); |
| 407 |
[propget] HRESULT Descriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Usb.UsbDescriptor *> **value); |
| 408 |
} |
| 409 |
|
| 410 |
[ |
| 411 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 412 |
exclusiveto(Windows.Devices.Usb.UsbInterruptInEndpointDescriptor), |
| 413 |
uuid(c0528967-c911-4c3a-86b2-419c2da89039) |
| 414 |
] |
| 415 |
interface IUsbInterruptInEndpointDescriptor : IInspectable |
| 416 |
{ |
| 417 |
[propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); |
| 418 |
[propget] HRESULT EndpointNumber([out, retval] BYTE *value); |
| 419 |
[propget] HRESULT Interval([out, retval] Windows.Foundation.TimeSpan *value); |
| 420 |
[propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbInterruptInPipe **value); |
| 421 |
} |
| 422 |
|
| 423 |
[ |
| 424 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 425 |
exclusiveto(Windows.Devices.Usb.UsbInterruptInEventArgs), |
| 426 |
uuid(b7b04092-1418-4936-8209-299cf5605583) |
| 427 |
] |
| 428 |
interface IUsbInterruptInEventArgs : IInspectable |
| 429 |
{ |
| 430 |
[propget] HRESULT InterruptData([out, retval] Windows.Storage.Streams.IBuffer **value); |
| 431 |
} |
| 432 |
|
| 433 |
[ |
| 434 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 435 |
exclusiveto(Windows.Devices.Usb.UsbInterruptInPipe), |
| 436 |
uuid(fa007116-84d7-48c7-8a3f-4c0b235f2ea6) |
| 437 |
] |
| 438 |
interface IUsbInterruptInPipe : IInspectable |
| 439 |
{ |
| 440 |
[propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbInterruptInEndpointDescriptor **value); |
| 441 |
HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); |
| 442 |
[eventadd] HRESULT DataReceived([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Usb.UsbInterruptInPipe *, Windows.Devices.Usb.UsbInterruptInEventArgs *> *handler, [out, retval] EventRegistrationToken *token); |
| 443 |
[eventremove] HRESULT DataReceived([in] EventRegistrationToken token); |
| 444 |
} |
| 445 |
|
| 446 |
[ |
| 447 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 448 |
exclusiveto(Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor), |
| 449 |
uuid(cc9fed81-10ca-4533-952d-9e278341e80f) |
| 450 |
] |
| 451 |
interface IUsbInterruptOutEndpointDescriptor : IInspectable |
| 452 |
{ |
| 453 |
[propget] HRESULT MaxPacketSize([out, retval] UINT32 *value); |
| 454 |
[propget] HRESULT EndpointNumber([out, retval] BYTE *value); |
| 455 |
[propget] HRESULT Interval([out, retval] Windows.Foundation.TimeSpan *value); |
| 456 |
[propget] HRESULT Pipe([out, retval] Windows.Devices.Usb.UsbInterruptOutPipe **value); |
| 457 |
} |
| 458 |
|
| 459 |
[ |
| 460 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 461 |
exclusiveto(Windows.Devices.Usb.UsbInterruptOutPipe), |
| 462 |
uuid(e984c8a9-aaf9-49d0-b96c-f661ab4a7f95) |
| 463 |
] |
| 464 |
interface IUsbInterruptOutPipe : IInspectable |
| 465 |
{ |
| 466 |
[propget] HRESULT EndpointDescriptor([out, retval] Windows.Devices.Usb.UsbInterruptOutEndpointDescriptor **value); |
| 467 |
HRESULT ClearStallAsync([out, retval] Windows.Foundation.IAsyncAction **operation); |
| 468 |
[propput] HRESULT WriteOptions([in] Windows.Devices.Usb.UsbWriteOptions value); |
| 469 |
[propget] HRESULT WriteOptions([out, retval] Windows.Devices.Usb.UsbWriteOptions *value); |
| 470 |
[propget] HRESULT OutputStream([out, retval] Windows.Storage.Streams.IOutputStream **value); |
| 471 |
} |
| 472 |
|
| 473 |
[ |
| 474 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 475 |
exclusiveto(Windows.Devices.Usb.UsbSetupPacket), |
| 476 |
uuid(104ba132-c78f-4c51-b654-e49d02f2cb03) |
| 477 |
] |
| 478 |
interface IUsbSetupPacket : IInspectable |
| 479 |
{ |
| 480 |
[propget] HRESULT RequestType([out, retval] Windows.Devices.Usb.UsbControlRequestType **value); |
| 481 |
[propput] HRESULT RequestType([in] Windows.Devices.Usb.UsbControlRequestType *value); |
| 482 |
[propget] HRESULT Request([out, retval] BYTE *value); |
| 483 |
[propput] HRESULT Request([in] BYTE value); |
| 484 |
[propget] HRESULT Value([out, retval] UINT32 *value); |
| 485 |
[propput] HRESULT Value([in] UINT32 value); |
| 486 |
[propget] HRESULT Index([out, retval] UINT32 *value); |
| 487 |
[propput] HRESULT Index([in] UINT32 value); |
| 488 |
[propget] HRESULT Length([out, retval] UINT32 *value); |
| 489 |
[propput] HRESULT Length([in] UINT32 value); |
| 490 |
} |
| 491 |
|
| 492 |
[ |
| 493 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 494 |
marshaling_behavior(agile) |
| 495 |
] |
| 496 |
runtimeclass UsbBulkInEndpointDescriptor |
| 497 |
{ |
| 498 |
[default] interface Windows.Devices.Usb.IUsbBulkInEndpointDescriptor; |
| 499 |
} |
| 500 |
|
| 501 |
[ |
| 502 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 503 |
marshaling_behavior(agile) |
| 504 |
] |
| 505 |
runtimeclass UsbBulkInPipe |
| 506 |
{ |
| 507 |
[default] interface Windows.Devices.Usb.IUsbBulkInPipe; |
| 508 |
} |
| 509 |
|
| 510 |
[ |
| 511 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 512 |
marshaling_behavior(agile) |
| 513 |
] |
| 514 |
runtimeclass UsbBulkOutEndpointDescriptor |
| 515 |
{ |
| 516 |
[default] interface Windows.Devices.Usb.IUsbBulkOutEndpointDescriptor; |
| 517 |
} |
| 518 |
|
| 519 |
[ |
| 520 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 521 |
marshaling_behavior(agile) |
| 522 |
] |
| 523 |
runtimeclass UsbBulkOutPipe |
| 524 |
{ |
| 525 |
[default] interface Windows.Devices.Usb.IUsbBulkOutPipe; |
| 526 |
} |
| 527 |
|
| 528 |
[ |
| 529 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 530 |
marshaling_behavior(agile) |
| 531 |
] |
| 532 |
runtimeclass UsbConfiguration |
| 533 |
{ |
| 534 |
[default] interface Windows.Devices.Usb.IUsbConfiguration; |
| 535 |
} |
| 536 |
|
| 537 |
[ |
| 538 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 539 |
marshaling_behavior(agile), |
| 540 |
static(Windows.Devices.Usb.IUsbConfigurationDescriptorStatics, Windows.Foundation.UniversalApiContract, 1.0) |
| 541 |
] |
| 542 |
runtimeclass UsbConfigurationDescriptor |
| 543 |
{ |
| 544 |
[default] interface Windows.Devices.Usb.IUsbConfigurationDescriptor; |
| 545 |
} |
| 546 |
|
| 547 |
[ |
| 548 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 549 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 550 |
marshaling_behavior(agile) |
| 551 |
] |
| 552 |
runtimeclass UsbControlRequestType |
| 553 |
{ |
| 554 |
[default] interface Windows.Devices.Usb.IUsbControlRequestType; |
| 555 |
} |
| 556 |
|
| 557 |
[ |
| 558 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 559 |
marshaling_behavior(agile) |
| 560 |
] |
| 561 |
runtimeclass UsbDescriptor |
| 562 |
{ |
| 563 |
[default] interface Windows.Devices.Usb.IUsbDescriptor; |
| 564 |
} |
| 565 |
|
| 566 |
[ |
| 567 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 568 |
marshaling_behavior(agile), |
| 569 |
static(Windows.Devices.Usb.IUsbDeviceStatics, Windows.Foundation.UniversalApiContract, 1.0) |
| 570 |
] |
| 571 |
runtimeclass UsbDevice |
| 572 |
{ |
| 573 |
[default] interface Windows.Devices.Usb.IUsbDevice; |
| 574 |
interface Windows.Foundation.IClosable; |
| 575 |
} |
| 576 |
|
| 577 |
[ |
| 578 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 579 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 580 |
marshaling_behavior(agile) |
| 581 |
] |
| 582 |
runtimeclass UsbDeviceClass |
| 583 |
{ |
| 584 |
[default] interface Windows.Devices.Usb.IUsbDeviceClass; |
| 585 |
} |
| 586 |
|
| 587 |
[ |
| 588 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 589 |
marshaling_behavior(agile) |
| 590 |
] |
| 591 |
runtimeclass UsbDeviceDescriptor |
| 592 |
{ |
| 593 |
[default] interface Windows.Devices.Usb.IUsbDeviceDescriptor; |
| 594 |
} |
| 595 |
|
| 596 |
[ |
| 597 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 598 |
marshaling_behavior(agile) |
| 599 |
] |
| 600 |
runtimeclass UsbInterface |
| 601 |
{ |
| 602 |
[default] interface Windows.Devices.Usb.IUsbInterface; |
| 603 |
} |
| 604 |
|
| 605 |
[ |
| 606 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 607 |
marshaling_behavior(agile), |
| 608 |
static(Windows.Devices.Usb.IUsbInterfaceDescriptorStatics, Windows.Foundation.UniversalApiContract, 1.0) |
| 609 |
] |
| 610 |
runtimeclass UsbInterfaceDescriptor |
| 611 |
{ |
| 612 |
[default] interface Windows.Devices.Usb.IUsbInterfaceDescriptor; |
| 613 |
} |
| 614 |
|
| 615 |
[ |
| 616 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 617 |
marshaling_behavior(agile) |
| 618 |
] |
| 619 |
runtimeclass UsbInterfaceSetting |
| 620 |
{ |
| 621 |
[default] interface Windows.Devices.Usb.IUsbInterfaceSetting; |
| 622 |
} |
| 623 |
|
| 624 |
[ |
| 625 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 626 |
marshaling_behavior(agile) |
| 627 |
] |
| 628 |
runtimeclass UsbInterruptInEventArgs |
| 629 |
{ |
| 630 |
[default] interface Windows.Devices.Usb.IUsbInterruptInEventArgs; |
| 631 |
} |
| 632 |
|
| 633 |
[ |
| 634 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 635 |
marshaling_behavior(agile) |
| 636 |
] |
| 637 |
runtimeclass UsbInterruptInEndpointDescriptor |
| 638 |
{ |
| 639 |
[default] interface Windows.Devices.Usb.IUsbInterruptInEndpointDescriptor; |
| 640 |
} |
| 641 |
|
| 642 |
[ |
| 643 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 644 |
marshaling_behavior(agile) |
| 645 |
] |
| 646 |
runtimeclass UsbInterruptInPipe |
| 647 |
{ |
| 648 |
[default] interface Windows.Devices.Usb.IUsbInterruptInPipe; |
| 649 |
} |
| 650 |
|
| 651 |
[ |
| 652 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 653 |
marshaling_behavior(agile) |
| 654 |
] |
| 655 |
runtimeclass UsbInterruptOutEndpointDescriptor |
| 656 |
{ |
| 657 |
[default] interface Windows.Devices.Usb.IUsbInterruptOutEndpointDescriptor; |
| 658 |
} |
| 659 |
|
| 660 |
[ |
| 661 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 662 |
marshaling_behavior(agile) |
| 663 |
] |
| 664 |
runtimeclass UsbInterruptOutPipe |
| 665 |
{ |
| 666 |
[default] interface Windows.Devices.Usb.IUsbInterruptOutPipe; |
| 667 |
} |
| 668 |
|
| 669 |
[ |
| 670 |
/* activatable(Windows.Devices.Usb.IUsbSetupPacketFactory, Windows.Foundation.UniversalApiContract, 1.0), */ |
| 671 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 672 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 673 |
marshaling_behavior(agile) |
| 674 |
] |
| 675 |
runtimeclass UsbSetupPacket |
| 676 |
{ |
| 677 |
[default] interface Windows.Devices.Usb.IUsbSetupPacket; |
| 678 |
} |
| 679 |
} |