// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 // swiftlint:disable all import Foundation @_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation import CWinRT private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation: WindowsFoundation.IID { .init(Data1: 0xABA0FB95, Data2: 0x4398, Data3: 0x489D, Data4: ( 0x8E,0x44,0xE6,0x13,0x09,0x27,0x01,0x1F ))// ABA0FB95-4398-489D-8E44-E6130927011F } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation2: WindowsFoundation.IID { .init(Data1: 0xF156A638, Data2: 0x7997, Data3: 0x48D9, Data4: ( 0xA1,0x0C,0x26,0x9D,0x46,0x53,0x3F,0x48 ))// F156A638-7997-48D9-A10C-269D46533F48 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing: WindowsFoundation.IID { .init(Data1: 0x85138C02, Data2: 0x4EE6, Data3: 0x4914, Data4: ( 0x83,0x70,0x10,0x7A,0x39,0x14,0x4C,0x0E ))// 85138C02-4EE6-4914-8370-107A39144C0E } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing: WindowsFoundation.IID { .init(Data1: 0x2C4769F5, Data2: 0xF684, Data3: 0x40D5, Data4: ( 0x84,0x69,0xE8,0xDB,0xAA,0xB7,0x04,0x85 ))// 2C4769F5-F684-40D5-8469-E8DBAAB70485 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing2: WindowsFoundation.IID { .init(Data1: 0xF68612FD, Data2: 0x0AEE, Data3: 0x4328, Data4: ( 0x85,0xCC,0x1C,0x74,0x2B,0xB1,0x79,0x0D ))// F68612FD-0AEE-4328-85CC-1C742BB1790D } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairingStatics: WindowsFoundation.IID { .init(Data1: 0xE915C408, Data2: 0x36D4, Data3: 0x49A1, Data4: ( 0xBF,0x13,0x51,0x41,0x73,0x79,0x9B,0x6B ))// E915C408-36D4-49A1-BF13-514173799B6B } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairingStatics2: WindowsFoundation.IID { .init(Data1: 0x04DE5372, Data2: 0xB7B7, Data3: 0x476B, Data4: ( 0xA7,0x4F,0xC5,0x83,0x6A,0x70,0x4D,0x98 ))// 04DE5372-B7B7-476B-A74F-C5836A704D98 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics: WindowsFoundation.IID { .init(Data1: 0xC17F100E, Data2: 0x3A46, Data3: 0x4A78, Data4: ( 0x80,0x13,0x76,0x9D,0xC9,0xB9,0x73,0x90 ))// C17F100E-3A46-4A78-8013-769DC9B97390 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics2: WindowsFoundation.IID { .init(Data1: 0x493B4F34, Data2: 0xA84F, Data3: 0x45FD, Data4: ( 0x91,0x67,0x15,0xD1,0xCB,0x1B,0xD1,0xF9 ))// 493B4F34-A84F-45FD-9167-15D1CB1BD1F9 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate: WindowsFoundation.IID { .init(Data1: 0x8F315305, Data2: 0xD972, Data3: 0x44B7, Data4: ( 0xA3,0x7E,0x9E,0x82,0x2C,0x78,0x21,0x3B ))// 8F315305-D972-44B7-A37E-9E822C78213B } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate2: WindowsFoundation.IID { .init(Data1: 0x5D9D148C, Data2: 0xA873, Data3: 0x485E, Data4: ( 0xBA,0xA6,0xAA,0x62,0x07,0x88,0xE3,0xCC ))// 5D9D148C-A873-485E-BAA6-AA620788E3CC } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs: WindowsFoundation.IID { .init(Data1: 0xF717FC56, Data2: 0xDE6B, Data3: 0x487F, Data4: ( 0x83,0x76,0x01,0x80,0xAC,0xA6,0x99,0x63 ))// F717FC56-DE6B-487F-8376-0180ACA69963 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs2: WindowsFoundation.IID { .init(Data1: 0xC83752D9, Data2: 0xE4D3, Data3: 0x4DB0, Data4: ( 0xA3,0x60,0xA1,0x05,0xE4,0x37,0xDB,0xDC ))// C83752D9-E4D3-4DB0-A360-A105E437DBDC } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingResult: WindowsFoundation.IID { .init(Data1: 0x072B02BF, Data2: 0xDD95, Data3: 0x4025, Data4: ( 0x9B,0x37,0xDE,0x51,0xAD,0xBA,0x37,0xB7 ))// 072B02BF-DD95-4025-9B37-DE51ADBA37B7 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingSettings: WindowsFoundation.IID { .init(Data1: 0x482CB27C, Data2: 0x83BB, Data3: 0x420E, Data4: ( 0xBE,0x51,0x66,0x02,0xB2,0x22,0xDE,0x54 ))// 482CB27C-83BB-420E-BE51-6602B222DE54 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance: WindowsFoundation.IID { .init(Data1: 0xE69A12C6, Data2: 0xE627, Data3: 0x4ED8, Data4: ( 0x9B,0x6C,0x46,0x0A,0xF4,0x45,0xE5,0x6D ))// E69A12C6-E627-4ED8-9B6C-460AF445E56D } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceUnpairingResult: WindowsFoundation.IID { .init(Data1: 0x66F44AD3, Data2: 0x79D9, Data3: 0x444B, Data4: ( 0x92,0xCF,0xA9,0x2E,0xF7,0x25,0x71,0xC7 ))// 66F44AD3-79D9-444B-92CF-A92EF72571C7 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher: WindowsFoundation.IID { .init(Data1: 0xC9EAB97D, Data2: 0x8F6B, Data3: 0x4F96, Data4: ( 0xA9,0xF4,0xAB,0xC8,0x14,0xE2,0x22,0x71 ))// C9EAB97D-8F6B-4F96-A9F4-ABC814E22271 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher2: WindowsFoundation.IID { .init(Data1: 0xFF08456E, Data2: 0xED14, Data3: 0x49E9, Data4: ( 0x9A,0x69,0x81,0x17,0xC5,0x4A,0xE9,0x71 ))// FF08456E-ED14-49E9-9A69-8117C54AE971 } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation: WindowsFoundation.IID { .init(Data1: 0x42340A27, Data2: 0x5810, Data3: 0x459C, Data4: ( 0xAA,0xBB,0xC6,0x5E,0x1F,0x81,0x3E,0xCF ))// 42340A27-5810-459C-AABB-C65E1F813ECF } private var IID___x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation2: WindowsFoundation.IID { .init(Data1: 0x2885995B, Data2: 0xE07D, Data3: 0x485D, Data4: ( 0x8A,0x9E,0xBD,0xF2,0x9A,0xEF,0x4F,0x66 ))// 2885995B-E07D-485D-8A9E-BDF29AEF4F66 } public enum __ABI_Windows_Devices_Enumeration { public class IDeviceInformation: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation } internal func get_IdImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Id(pThis, &value)) } return .init(from: value) } internal func get_NameImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Name(pThis, &value)) } return .init(from: value) } internal func get_IsEnabledImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsEnabled(pThis, &value)) } return .init(from: value) } internal func get_IsDefaultImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsDefault(pThis, &value)) } return .init(from: value) } internal func get_EnclosureLocationImpl() throws -> UWP.EnclosureLocation? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_EnclosureLocation(pThis, &valueAbi)) } } return .from(abi: value) } internal func get_PropertiesImpl() throws -> WindowsFoundation.AnyIMapView? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Properties(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: value) } internal func UpdateImpl(_ updateInfo: UWP.DeviceInformationUpdate?) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Update(pThis, RawPointer(updateInfo))) } } internal func GetThumbnailAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetThumbnailAsync(pThis, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceThumbnailWrapper.unwrapFrom(abi: asyncOp) } internal func GetGlyphThumbnailAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetGlyphThumbnailAsync(pThis, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceThumbnailWrapper.unwrapFrom(abi: asyncOp) } } public class IDeviceInformation2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation2 } internal func get_KindImpl() throws -> UWP.DeviceInformationKind { var value: __x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Kind(pThis, &value)) } return value } internal func get_PairingImpl() throws -> UWP.DeviceInformationPairing? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Pairing(pThis, &valueAbi)) } } return .from(abi: value) } } public class IDeviceInformationCustomPairing: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing } internal func PairAsyncImpl(_ pairingKindsSupported: UWP.DevicePairingKinds) throws -> WindowsFoundation.AnyIAsyncOperation? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.PairAsync(pThis, pairingKindsSupported, &resultAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDevicePairingResultWrapper.unwrapFrom(abi: result) } internal func PairWithProtectionLevelAsyncImpl(_ pairingKindsSupported: UWP.DevicePairingKinds, _ minProtectionLevel: UWP.DevicePairingProtectionLevel) throws -> WindowsFoundation.AnyIAsyncOperation? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.PairWithProtectionLevelAsync(pThis, pairingKindsSupported, minProtectionLevel, &resultAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDevicePairingResultWrapper.unwrapFrom(abi: result) } internal func PairWithProtectionLevelAndSettingsAsyncImpl(_ pairingKindsSupported: UWP.DevicePairingKinds, _ minProtectionLevel: UWP.DevicePairingProtectionLevel, _ devicePairingSettings: UWP.AnyIDevicePairingSettings?) throws -> WindowsFoundation.AnyIAsyncOperation? { let (result) = try ComPtrs.initialize { resultAbi in let devicePairingSettingsWrapper = __ABI_Windows_Devices_Enumeration.IDevicePairingSettingsWrapper(devicePairingSettings) let _devicePairingSettings = try! devicePairingSettingsWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.PairWithProtectionLevelAndSettingsAsync(pThis, pairingKindsSupported, minProtectionLevel, _devicePairingSettings, &resultAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDevicePairingResultWrapper.unwrapFrom(abi: result) } internal func add_PairingRequestedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationCustomPairing___x_ABI_CWindows__CDevices__CEnumeration__CDevicePairingRequestedEventArgsWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_PairingRequested(pThis, _handler, &token)) } return token } internal func remove_PairingRequestedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PairingRequested(pThis, token)) } } } public class IDeviceInformationPairing: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing } internal func get_IsPairedImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsPaired(pThis, &value)) } return .init(from: value) } internal func get_CanPairImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_CanPair(pThis, &value)) } return .init(from: value) } internal func PairAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperation? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.PairAsync(pThis, &resultAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDevicePairingResultWrapper.unwrapFrom(abi: result) } internal func PairWithProtectionLevelAsyncImpl(_ minProtectionLevel: UWP.DevicePairingProtectionLevel) throws -> WindowsFoundation.AnyIAsyncOperation? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.PairWithProtectionLevelAsync(pThis, minProtectionLevel, &resultAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDevicePairingResultWrapper.unwrapFrom(abi: result) } } public class IDeviceInformationPairing2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing2 } internal func get_ProtectionLevelImpl() throws -> UWP.DevicePairingProtectionLevel { var value: __x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingProtectionLevel = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ProtectionLevel(pThis, &value)) } return value } internal func get_CustomImpl() throws -> UWP.DeviceInformationCustomPairing? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Custom(pThis, &valueAbi)) } } return .from(abi: value) } internal func PairWithProtectionLevelAndSettingsAsyncImpl(_ minProtectionLevel: UWP.DevicePairingProtectionLevel, _ devicePairingSettings: UWP.AnyIDevicePairingSettings?) throws -> WindowsFoundation.AnyIAsyncOperation? { let (result) = try ComPtrs.initialize { resultAbi in let devicePairingSettingsWrapper = __ABI_Windows_Devices_Enumeration.IDevicePairingSettingsWrapper(devicePairingSettings) let _devicePairingSettings = try! devicePairingSettingsWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.PairWithProtectionLevelAndSettingsAsync(pThis, minProtectionLevel, _devicePairingSettings, &resultAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDevicePairingResultWrapper.unwrapFrom(abi: result) } internal func UnpairAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperation? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.UnpairAsync(pThis, &resultAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceUnpairingResultWrapper.unwrapFrom(abi: result) } } public class IDeviceInformationPairingStatics: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairingStatics } internal func TryRegisterForAllInboundPairingRequestsImpl(_ pairingKindsSupported: UWP.DevicePairingKinds) throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairingStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.TryRegisterForAllInboundPairingRequests(pThis, pairingKindsSupported, &result)) } return .init(from: result) } } public class IDeviceInformationPairingStatics2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairingStatics2 } internal func TryRegisterForAllInboundPairingRequestsWithProtectionLevelImpl(_ pairingKindsSupported: UWP.DevicePairingKinds, _ minProtectionLevel: UWP.DevicePairingProtectionLevel) throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairingStatics2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.TryRegisterForAllInboundPairingRequestsWithProtectionLevel(pThis, pairingKindsSupported, minProtectionLevel, &result)) } return .init(from: result) } } public class IDeviceInformationStatics: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics } internal func CreateFromIdAsyncImpl(_ deviceId: String) throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in let _deviceId = try! HString(deviceId) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFromIdAsync(pThis, _deviceId.get(), &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationWrapper.unwrapFrom(abi: asyncOp) } internal func CreateFromIdAsyncAdditionalPropertiesImpl(_ deviceId: String, _ additionalProperties: WindowsFoundation.AnyIIterable?) throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in let _deviceId = try! HString(deviceId) let additionalPropertiesWrapper = UWP.__x_ABI_C__FIIterable_1_HSTRINGWrapper(additionalProperties) let _additionalProperties = try! additionalPropertiesWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFromIdAsyncAdditionalProperties(pThis, _deviceId.get(), _additionalProperties, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationWrapper.unwrapFrom(abi: asyncOp) } internal func FindAllAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.FindAllAsync(pThis, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationCollectionWrapper.unwrapFrom(abi: asyncOp) } internal func FindAllAsyncDeviceClassImpl(_ deviceClass: UWP.DeviceClass) throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.FindAllAsyncDeviceClass(pThis, deviceClass, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationCollectionWrapper.unwrapFrom(abi: asyncOp) } internal func FindAllAsyncAqsFilterImpl(_ aqsFilter: String) throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in let _aqsFilter = try! HString(aqsFilter) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.FindAllAsyncAqsFilter(pThis, _aqsFilter.get(), &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationCollectionWrapper.unwrapFrom(abi: asyncOp) } internal func FindAllAsyncAqsFilterAndAdditionalPropertiesImpl(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable?) throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in let _aqsFilter = try! HString(aqsFilter) let additionalPropertiesWrapper = UWP.__x_ABI_C__FIIterable_1_HSTRINGWrapper(additionalProperties) let _additionalProperties = try! additionalPropertiesWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.FindAllAsyncAqsFilterAndAdditionalProperties(pThis, _aqsFilter.get(), _additionalProperties, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationCollectionWrapper.unwrapFrom(abi: asyncOp) } internal func CreateWatcherImpl() throws -> UWP.DeviceWatcher? { let (watcher) = try ComPtrs.initialize { watcherAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateWatcher(pThis, &watcherAbi)) } } return .from(abi: watcher) } internal func CreateWatcherDeviceClassImpl(_ deviceClass: UWP.DeviceClass) throws -> UWP.DeviceWatcher? { let (watcher) = try ComPtrs.initialize { watcherAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateWatcherDeviceClass(pThis, deviceClass, &watcherAbi)) } } return .from(abi: watcher) } internal func CreateWatcherAqsFilterImpl(_ aqsFilter: String) throws -> UWP.DeviceWatcher? { let (watcher) = try ComPtrs.initialize { watcherAbi in let _aqsFilter = try! HString(aqsFilter) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateWatcherAqsFilter(pThis, _aqsFilter.get(), &watcherAbi)) } } return .from(abi: watcher) } internal func CreateWatcherAqsFilterAndAdditionalPropertiesImpl(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable?) throws -> UWP.DeviceWatcher? { let (watcher) = try ComPtrs.initialize { watcherAbi in let _aqsFilter = try! HString(aqsFilter) let additionalPropertiesWrapper = UWP.__x_ABI_C__FIIterable_1_HSTRINGWrapper(additionalProperties) let _additionalProperties = try! additionalPropertiesWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateWatcherAqsFilterAndAdditionalProperties(pThis, _aqsFilter.get(), _additionalProperties, &watcherAbi)) } } return .from(abi: watcher) } } public class IDeviceInformationStatics2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics2 } internal func GetAqsFilterFromDeviceClassImpl(_ deviceClass: UWP.DeviceClass) throws -> String { var aqsFilter: HSTRING? _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetAqsFilterFromDeviceClass(pThis, deviceClass, &aqsFilter)) } return .init(from: aqsFilter) } internal func CreateFromIdAsyncWithKindAndAdditionalPropertiesImpl(_ deviceId: String, _ additionalProperties: WindowsFoundation.AnyIIterable?, _ kind: UWP.DeviceInformationKind) throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in let _deviceId = try! HString(deviceId) let additionalPropertiesWrapper = UWP.__x_ABI_C__FIIterable_1_HSTRINGWrapper(additionalProperties) let _additionalProperties = try! additionalPropertiesWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFromIdAsyncWithKindAndAdditionalProperties(pThis, _deviceId.get(), _additionalProperties, kind, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationWrapper.unwrapFrom(abi: asyncOp) } internal func FindAllAsyncWithKindAqsFilterAndAdditionalPropertiesImpl(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable?, _ kind: UWP.DeviceInformationKind) throws -> WindowsFoundation.AnyIAsyncOperation? { let (asyncOp) = try ComPtrs.initialize { asyncOpAbi in let _aqsFilter = try! HString(aqsFilter) let additionalPropertiesWrapper = UWP.__x_ABI_C__FIIterable_1_HSTRINGWrapper(additionalProperties) let _additionalProperties = try! additionalPropertiesWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.FindAllAsyncWithKindAqsFilterAndAdditionalProperties(pThis, _aqsFilter.get(), _additionalProperties, kind, &asyncOpAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationCollectionWrapper.unwrapFrom(abi: asyncOp) } internal func CreateWatcherWithKindAqsFilterAndAdditionalPropertiesImpl(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable?, _ kind: UWP.DeviceInformationKind) throws -> UWP.DeviceWatcher? { let (watcher) = try ComPtrs.initialize { watcherAbi in let _aqsFilter = try! HString(aqsFilter) let additionalPropertiesWrapper = UWP.__x_ABI_C__FIIterable_1_HSTRINGWrapper(additionalProperties) let _additionalProperties = try! additionalPropertiesWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationStatics2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateWatcherWithKindAqsFilterAndAdditionalProperties(pThis, _aqsFilter.get(), _additionalProperties, kind, &watcherAbi)) } } return .from(abi: watcher) } } public class IDeviceInformationUpdate: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate } internal func get_IdImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Id(pThis, &value)) } return .init(from: value) } internal func get_PropertiesImpl() throws -> WindowsFoundation.AnyIMapView? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Properties(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: value) } } public class IDeviceInformationUpdate2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate2 } internal func get_KindImpl() throws -> UWP.DeviceInformationKind { var value: __x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Kind(pThis, &value)) } return value } } public class IDevicePairingRequestedEventArgs: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs } internal func get_DeviceInformationImpl() throws -> UWP.DeviceInformation? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_DeviceInformation(pThis, &valueAbi)) } } return .from(abi: value) } internal func get_PairingKindImpl() throws -> UWP.DevicePairingKinds { var value: __x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_PairingKind(pThis, &value)) } return value } internal func get_PinImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Pin(pThis, &value)) } return .init(from: value) } internal func AcceptImpl() throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Accept(pThis)) } } internal func AcceptWithPinImpl(_ pin: String) throws { let _pin = try! HString(pin) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.AcceptWithPin(pThis, _pin.get())) } } internal func GetDeferralImpl() throws -> WindowsFoundation.Deferral? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetDeferral(pThis, &resultAbi)) } } return .from(abi: result) } } public class IDevicePairingRequestedEventArgs2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs2 } internal func AcceptWithPasswordCredentialImpl(_ passwordCredential: UWP.PasswordCredential?) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.AcceptWithPasswordCredential(pThis, RawPointer(passwordCredential))) } } } public class IDevicePairingResult: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingResult } internal func get_StatusImpl() throws -> UWP.DevicePairingResultStatus { var status: __x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingResult.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Status(pThis, &status)) } return status } internal func get_ProtectionLevelUsedImpl() throws -> UWP.DevicePairingProtectionLevel { var value: __x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingProtectionLevel = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingResult.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ProtectionLevelUsed(pThis, &value)) } return value } } public class IDevicePairingSettings: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingSettings } } internal static var IDevicePairingSettingsVTable: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingSettingsVtbl = .init( QueryInterface: { IDevicePairingSettingsWrapper.queryInterface($0, $1, $2) }, AddRef: { IDevicePairingSettingsWrapper.addRef($0) }, Release: { IDevicePairingSettingsWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = __ABI_Windows_Devices_Enumeration.IDevicePairingSettingsWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Devices.Enumeration.IDevicePairingSettings").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK } ) public typealias IDevicePairingSettingsWrapper = InterfaceWrapperBase<__IMPL_Windows_Devices_Enumeration.IDevicePairingSettingsBridge> public class IDevicePickerAppearance: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance } internal func get_TitleImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Title(pThis, &value)) } return .init(from: value) } internal func put_TitleImpl(_ value: String) throws { let _value = try! HString(value) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_Title(pThis, _value.get())) } } internal func get_ForegroundColorImpl() throws -> UWP.Color { var value: __x_ABI_CWindows_CUI_CColor = .init() _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ForegroundColor(pThis, &value)) } return .from(abi: value) } internal func put_ForegroundColorImpl(_ value: UWP.Color) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_ForegroundColor(pThis, .from(swift: value))) } } internal func get_BackgroundColorImpl() throws -> UWP.Color { var value: __x_ABI_CWindows_CUI_CColor = .init() _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_BackgroundColor(pThis, &value)) } return .from(abi: value) } internal func put_BackgroundColorImpl(_ value: UWP.Color) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_BackgroundColor(pThis, .from(swift: value))) } } internal func get_AccentColorImpl() throws -> UWP.Color { var value: __x_ABI_CWindows_CUI_CColor = .init() _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_AccentColor(pThis, &value)) } return .from(abi: value) } internal func put_AccentColorImpl(_ value: UWP.Color) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_AccentColor(pThis, .from(swift: value))) } } internal func get_SelectedForegroundColorImpl() throws -> UWP.Color { var value: __x_ABI_CWindows_CUI_CColor = .init() _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SelectedForegroundColor(pThis, &value)) } return .from(abi: value) } internal func put_SelectedForegroundColorImpl(_ value: UWP.Color) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_SelectedForegroundColor(pThis, .from(swift: value))) } } internal func get_SelectedBackgroundColorImpl() throws -> UWP.Color { var value: __x_ABI_CWindows_CUI_CColor = .init() _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SelectedBackgroundColor(pThis, &value)) } return .from(abi: value) } internal func put_SelectedBackgroundColorImpl(_ value: UWP.Color) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_SelectedBackgroundColor(pThis, .from(swift: value))) } } internal func get_SelectedAccentColorImpl() throws -> UWP.Color { var value: __x_ABI_CWindows_CUI_CColor = .init() _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SelectedAccentColor(pThis, &value)) } return .from(abi: value) } internal func put_SelectedAccentColorImpl(_ value: UWP.Color) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_SelectedAccentColor(pThis, .from(swift: value))) } } } public class IDeviceUnpairingResult: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceUnpairingResult } internal func get_StatusImpl() throws -> UWP.DeviceUnpairingResultStatus { var status: __x_ABI_CWindows_CDevices_CEnumeration_CDeviceUnpairingResultStatus = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceUnpairingResult.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Status(pThis, &status)) } return status } } public class IDeviceWatcher: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher } internal func add_AddedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CDevices__CEnumeration__CDeviceWatcher___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_Added(pThis, _handler, &token)) } return token } internal func remove_AddedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Added(pThis, token)) } } internal func add_UpdatedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CDevices__CEnumeration__CDeviceWatcher___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationUpdateWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_Updated(pThis, _handler, &token)) } return token } internal func remove_UpdatedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Updated(pThis, token)) } } internal func add_RemovedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CDevices__CEnumeration__CDeviceWatcher___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformationUpdateWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_Removed(pThis, _handler, &token)) } return token } internal func remove_RemovedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Removed(pThis, token)) } } internal func add_EnumerationCompletedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CDevices__CEnumeration__CDeviceWatcher_IInspectableWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_EnumerationCompleted(pThis, _handler, &token)) } return token } internal func remove_EnumerationCompletedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_EnumerationCompleted(pThis, token)) } } internal func add_StoppedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CDevices__CEnumeration__CDeviceWatcher_IInspectableWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_Stopped(pThis, _handler, &token)) } return token } internal func remove_StoppedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Stopped(pThis, token)) } } internal func get_StatusImpl() throws -> UWP.DeviceWatcherStatus { var status: __x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus = .init(0) _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Status(pThis, &status)) } return status } internal func StartImpl() throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Start(pThis)) } } internal func StopImpl() throws { _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Stop(pThis)) } } } public class IDeviceWatcher2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher2 } internal func GetBackgroundTriggerImpl(_ requestedEventKinds: WindowsFoundation.AnyIIterable?) throws -> UWP.DeviceWatcherTrigger? { let (trigger) = try ComPtrs.initialize { triggerAbi in let requestedEventKindsWrapper = UWP.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceWatcherEventKindWrapper(requestedEventKinds) let _requestedEventKinds = try! requestedEventKindsWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetBackgroundTrigger(pThis, _requestedEventKinds, &triggerAbi)) } } return .from(abi: trigger) } } public class IEnclosureLocation: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation } internal func get_InDockImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_InDock(pThis, &value)) } return .init(from: value) } internal func get_InLidImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_InLid(pThis, &value)) } return .init(from: value) } } public class IEnclosureLocation2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation2 } internal func get_RotationAngleInDegreesClockwiseImpl() throws -> UInt32 { var value: UINT32 = 0 _ = try perform(as: __x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_RotationAngleInDegreesClockwise(pThis, &value)) } return value } } }