1152 lines
57 KiB
Swift
1152 lines
57 KiB
Swift
// 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
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceclass)
|
|
public typealias DeviceClass = __x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationkind)
|
|
public typealias DeviceInformationKind = __x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingkinds)
|
|
public typealias DevicePairingKinds = __x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingprotectionlevel)
|
|
public typealias DevicePairingProtectionLevel = __x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingProtectionLevel
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingresultstatus)
|
|
public typealias DevicePairingResultStatus = __x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceunpairingresultstatus)
|
|
public typealias DeviceUnpairingResultStatus = __x_ABI_CWindows_CDevices_CEnumeration_CDeviceUnpairingResultStatus
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatchereventkind)
|
|
public typealias DeviceWatcherEventKind = __x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherEventKind
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcherstatus)
|
|
public typealias DeviceWatcherStatus = __x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation)
|
|
public final class DeviceInformation : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDeviceInformation
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformation>?) -> DeviceInformation? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
private static let _IDeviceInformationStatics: __ABI_Windows_Devices_Enumeration.IDeviceInformationStatics = try! RoGetActivationFactory(HString("Windows.Devices.Enumeration.DeviceInformation"))
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createfromidasync)
|
|
public static func createFromIdAsync(_ deviceId: String) -> WindowsFoundation.AnyIAsyncOperation<DeviceInformation?>! {
|
|
return try! _IDeviceInformationStatics.CreateFromIdAsyncImpl(deviceId)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createfromidasync)
|
|
public static func createFromIdAsync(_ deviceId: String, _ additionalProperties: WindowsFoundation.AnyIIterable<String>!) -> WindowsFoundation.AnyIAsyncOperation<DeviceInformation?>! {
|
|
return try! _IDeviceInformationStatics.CreateFromIdAsyncAdditionalPropertiesImpl(deviceId, additionalProperties)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.findallasync)
|
|
public static func findAllAsync() -> WindowsFoundation.AnyIAsyncOperation<DeviceInformationCollection?>! {
|
|
return try! _IDeviceInformationStatics.FindAllAsyncImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.findallasync)
|
|
public static func findAllAsync(_ deviceClass: DeviceClass) -> WindowsFoundation.AnyIAsyncOperation<DeviceInformationCollection?>! {
|
|
return try! _IDeviceInformationStatics.FindAllAsyncDeviceClassImpl(deviceClass)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.findallasync)
|
|
public static func findAllAsync(_ aqsFilter: String) -> WindowsFoundation.AnyIAsyncOperation<DeviceInformationCollection?>! {
|
|
return try! _IDeviceInformationStatics.FindAllAsyncAqsFilterImpl(aqsFilter)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.findallasync)
|
|
public static func findAllAsync(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable<String>!) -> WindowsFoundation.AnyIAsyncOperation<DeviceInformationCollection?>! {
|
|
return try! _IDeviceInformationStatics.FindAllAsyncAqsFilterAndAdditionalPropertiesImpl(aqsFilter, additionalProperties)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createwatcher)
|
|
public static func createWatcher() -> DeviceWatcher! {
|
|
return try! _IDeviceInformationStatics.CreateWatcherImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createwatcher)
|
|
public static func createWatcher(_ deviceClass: DeviceClass) -> DeviceWatcher! {
|
|
return try! _IDeviceInformationStatics.CreateWatcherDeviceClassImpl(deviceClass)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createwatcher)
|
|
public static func createWatcher(_ aqsFilter: String) -> DeviceWatcher! {
|
|
return try! _IDeviceInformationStatics.CreateWatcherAqsFilterImpl(aqsFilter)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createwatcher)
|
|
public static func createWatcher(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable<String>!) -> DeviceWatcher! {
|
|
return try! _IDeviceInformationStatics.CreateWatcherAqsFilterAndAdditionalPropertiesImpl(aqsFilter, additionalProperties)
|
|
}
|
|
|
|
private static let _IDeviceInformationStatics2: __ABI_Windows_Devices_Enumeration.IDeviceInformationStatics2 = try! RoGetActivationFactory(HString("Windows.Devices.Enumeration.DeviceInformation"))
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.getaqsfilterfromdeviceclass)
|
|
public static func getAqsFilterFromDeviceClass(_ deviceClass: DeviceClass) -> String {
|
|
return try! _IDeviceInformationStatics2.GetAqsFilterFromDeviceClassImpl(deviceClass)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createfromidasync)
|
|
public static func createFromIdAsync(_ deviceId: String, _ additionalProperties: WindowsFoundation.AnyIIterable<String>!, _ kind: DeviceInformationKind) -> WindowsFoundation.AnyIAsyncOperation<DeviceInformation?>! {
|
|
return try! _IDeviceInformationStatics2.CreateFromIdAsyncWithKindAndAdditionalPropertiesImpl(deviceId, additionalProperties, kind)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.findallasync)
|
|
public static func findAllAsync(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable<String>!, _ kind: DeviceInformationKind) -> WindowsFoundation.AnyIAsyncOperation<DeviceInformationCollection?>! {
|
|
return try! _IDeviceInformationStatics2.FindAllAsyncWithKindAqsFilterAndAdditionalPropertiesImpl(aqsFilter, additionalProperties, kind)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.createwatcher)
|
|
public static func createWatcher(_ aqsFilter: String, _ additionalProperties: WindowsFoundation.AnyIIterable<String>!, _ kind: DeviceInformationKind) -> DeviceWatcher! {
|
|
return try! _IDeviceInformationStatics2.CreateWatcherWithKindAqsFilterAndAdditionalPropertiesImpl(aqsFilter, additionalProperties, kind)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.update)
|
|
public func update(_ updateInfo: DeviceInformationUpdate!) throws {
|
|
try _default.UpdateImpl(updateInfo)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.getthumbnailasync)
|
|
public func getThumbnailAsync() throws -> WindowsFoundation.AnyIAsyncOperation<DeviceThumbnail?>! {
|
|
try _default.GetThumbnailAsyncImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.getglyphthumbnailasync)
|
|
public func getGlyphThumbnailAsync() throws -> WindowsFoundation.AnyIAsyncOperation<DeviceThumbnail?>! {
|
|
try _default.GetGlyphThumbnailAsyncImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.enclosurelocation)
|
|
public var enclosureLocation : EnclosureLocation! {
|
|
get { try! _default.get_EnclosureLocationImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.id)
|
|
public var id : String {
|
|
get { try! _default.get_IdImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.isdefault)
|
|
public var isDefault : Bool {
|
|
get { try! _default.get_IsDefaultImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.isenabled)
|
|
public var isEnabled : Bool {
|
|
get { try! _default.get_IsEnabledImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.name)
|
|
public var name : String {
|
|
get { try! _default.get_NameImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.properties)
|
|
public var properties : WindowsFoundation.AnyIMapView<String, Any?>! {
|
|
get { try! _default.get_PropertiesImpl() }
|
|
}
|
|
|
|
private lazy var _IDeviceInformation2: __ABI_Windows_Devices_Enumeration.IDeviceInformation2! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.kind)
|
|
public var kind : DeviceInformationKind {
|
|
get { try! _IDeviceInformation2.get_KindImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformation.pairing)
|
|
public var pairing : DeviceInformationPairing! {
|
|
get { try! _IDeviceInformation2.get_PairingImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IDeviceInformation2 = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcollection)
|
|
public final class DeviceInformationCollection : WinRTClass, IVectorView, IIterable {
|
|
public typealias T = DeviceInformation?
|
|
private typealias SwiftABI = UWP.IVectorViewDeviceInformation
|
|
private typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformation
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CDevices__CEnumeration__CDeviceInformation>?) -> DeviceInformationCollection? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
override public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
|
return super.queryInterface(iid)
|
|
}
|
|
// MARK: Collection
|
|
public typealias Element = T
|
|
public var startIndex: Int { 0 }
|
|
public var endIndex: Int { Int(size) }
|
|
public func index(after i: Int) -> Int {
|
|
i+1
|
|
}
|
|
|
|
public func index(of: Element) -> Int? {
|
|
var index: UInt32 = 0
|
|
let result = indexOf(of, &index)
|
|
guard result else { return nil }
|
|
return Int(index)
|
|
}
|
|
public var count: Int { Int(size) }
|
|
|
|
public subscript(position: Int) -> Element {
|
|
get {
|
|
getAt(UInt32(position))
|
|
}
|
|
}
|
|
// MARK: WinRT
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcollection.getat)
|
|
public func getAt(_ index: UInt32) -> DeviceInformation? {
|
|
try! _default.GetAtImpl(index)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcollection.indexof)
|
|
public func indexOf(_ value: DeviceInformation?, _ index: inout UInt32) -> Bool {
|
|
try! _default.IndexOfImpl(value, &index)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcollection.size)
|
|
public var size : UInt32 {
|
|
get { try! _default.get_SizeImpl() }
|
|
}
|
|
|
|
private lazy var _IIterable: IIterableDeviceInformation! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcollection.first)
|
|
public func first() -> WindowsFoundation.AnyIIterator<DeviceInformation?>? {
|
|
try! _IIterable.FirstImpl()
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IIterable = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcustompairing)
|
|
public final class DeviceInformationCustomPairing : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDeviceInformationCustomPairing
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationCustomPairing>?) -> DeviceInformationCustomPairing? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcustompairing.pairasync)
|
|
public func pairAsync(_ pairingKindsSupported: DevicePairingKinds) throws -> WindowsFoundation.AnyIAsyncOperation<DevicePairingResult?>! {
|
|
try _default.PairAsyncImpl(pairingKindsSupported)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcustompairing.pairasync)
|
|
public func pairAsync(_ pairingKindsSupported: DevicePairingKinds, _ minProtectionLevel: DevicePairingProtectionLevel) throws -> WindowsFoundation.AnyIAsyncOperation<DevicePairingResult?>! {
|
|
try _default.PairWithProtectionLevelAsyncImpl(pairingKindsSupported, minProtectionLevel)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcustompairing.pairasync)
|
|
public func pairAsync(_ pairingKindsSupported: DevicePairingKinds, _ minProtectionLevel: DevicePairingProtectionLevel, _ devicePairingSettings: AnyIDevicePairingSettings!) throws -> WindowsFoundation.AnyIAsyncOperation<DevicePairingResult?>! {
|
|
try _default.PairWithProtectionLevelAndSettingsAsyncImpl(pairingKindsSupported, minProtectionLevel, devicePairingSettings)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationcustompairing.pairingrequested)
|
|
public lazy var pairingRequested : Event<TypedEventHandler<DeviceInformationCustomPairing?, DevicePairingRequestedEventArgs?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_PairingRequestedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_PairingRequestedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing)
|
|
public final class DeviceInformationPairing : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDeviceInformationPairing
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationPairing>?) -> DeviceInformationPairing? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
private static let _IDeviceInformationPairingStatics: __ABI_Windows_Devices_Enumeration.IDeviceInformationPairingStatics = try! RoGetActivationFactory(HString("Windows.Devices.Enumeration.DeviceInformationPairing"))
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.tryregisterforallinboundpairingrequests)
|
|
public static func tryRegisterForAllInboundPairingRequests(_ pairingKindsSupported: DevicePairingKinds) -> Bool {
|
|
return try! _IDeviceInformationPairingStatics.TryRegisterForAllInboundPairingRequestsImpl(pairingKindsSupported)
|
|
}
|
|
|
|
private static let _IDeviceInformationPairingStatics2: __ABI_Windows_Devices_Enumeration.IDeviceInformationPairingStatics2 = try! RoGetActivationFactory(HString("Windows.Devices.Enumeration.DeviceInformationPairing"))
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.tryregisterforallinboundpairingrequestswithprotectionlevel)
|
|
public static func tryRegisterForAllInboundPairingRequestsWithProtectionLevel(_ pairingKindsSupported: DevicePairingKinds, _ minProtectionLevel: DevicePairingProtectionLevel) -> Bool {
|
|
return try! _IDeviceInformationPairingStatics2.TryRegisterForAllInboundPairingRequestsWithProtectionLevelImpl(pairingKindsSupported, minProtectionLevel)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.pairasync)
|
|
public func pairAsync() throws -> WindowsFoundation.AnyIAsyncOperation<DevicePairingResult?>! {
|
|
try _default.PairAsyncImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.pairasync)
|
|
public func pairAsync(_ minProtectionLevel: DevicePairingProtectionLevel) throws -> WindowsFoundation.AnyIAsyncOperation<DevicePairingResult?>! {
|
|
try _default.PairWithProtectionLevelAsyncImpl(minProtectionLevel)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.canpair)
|
|
public var canPair : Bool {
|
|
get { try! _default.get_CanPairImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.ispaired)
|
|
public var isPaired : Bool {
|
|
get { try! _default.get_IsPairedImpl() }
|
|
}
|
|
|
|
private lazy var _IDeviceInformationPairing2: __ABI_Windows_Devices_Enumeration.IDeviceInformationPairing2! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.pairasync)
|
|
public func pairAsync(_ minProtectionLevel: DevicePairingProtectionLevel, _ devicePairingSettings: AnyIDevicePairingSettings!) throws -> WindowsFoundation.AnyIAsyncOperation<DevicePairingResult?>! {
|
|
try _IDeviceInformationPairing2.PairWithProtectionLevelAndSettingsAsyncImpl(minProtectionLevel, devicePairingSettings)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.unpairasync)
|
|
public func unpairAsync() throws -> WindowsFoundation.AnyIAsyncOperation<DeviceUnpairingResult?>! {
|
|
try _IDeviceInformationPairing2.UnpairAsyncImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.custom)
|
|
public var custom : DeviceInformationCustomPairing! {
|
|
get { try! _IDeviceInformationPairing2.get_CustomImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationpairing.protectionlevel)
|
|
public var protectionLevel : DevicePairingProtectionLevel {
|
|
get { try! _IDeviceInformationPairing2.get_ProtectionLevelImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IDeviceInformationPairing2 = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationupdate)
|
|
public final class DeviceInformationUpdate : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDeviceInformationUpdate
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDeviceInformationUpdate>?) -> DeviceInformationUpdate? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationupdate.id)
|
|
public var id : String {
|
|
get { try! _default.get_IdImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationupdate.properties)
|
|
public var properties : WindowsFoundation.AnyIMapView<String, Any?>! {
|
|
get { try! _default.get_PropertiesImpl() }
|
|
}
|
|
|
|
private lazy var _IDeviceInformationUpdate2: __ABI_Windows_Devices_Enumeration.IDeviceInformationUpdate2! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceinformationupdate.kind)
|
|
public var kind : DeviceInformationKind {
|
|
get { try! _IDeviceInformationUpdate2.get_KindImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IDeviceInformationUpdate2 = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs)
|
|
public final class DevicePairingRequestedEventArgs : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDevicePairingRequestedEventArgs
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingRequestedEventArgs>?) -> DevicePairingRequestedEventArgs? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs.accept)
|
|
public func accept() throws {
|
|
try _default.AcceptImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs.accept)
|
|
public func accept(_ pin: String) throws {
|
|
try _default.AcceptWithPinImpl(pin)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs.getdeferral)
|
|
public func getDeferral() throws -> WindowsFoundation.Deferral! {
|
|
try _default.GetDeferralImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs.deviceinformation)
|
|
public var deviceInformation : DeviceInformation! {
|
|
get { try! _default.get_DeviceInformationImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs.pairingkind)
|
|
public var pairingKind : DevicePairingKinds {
|
|
get { try! _default.get_PairingKindImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs.pin)
|
|
public var pin : String {
|
|
get { try! _default.get_PinImpl() }
|
|
}
|
|
|
|
private lazy var _IDevicePairingRequestedEventArgs2: __ABI_Windows_Devices_Enumeration.IDevicePairingRequestedEventArgs2! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingrequestedeventargs.acceptwithpasswordcredential)
|
|
public func acceptWithPasswordCredential(_ passwordCredential: UWP.PasswordCredential!) throws {
|
|
try _IDevicePairingRequestedEventArgs2.AcceptWithPasswordCredentialImpl(passwordCredential)
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IDevicePairingRequestedEventArgs2 = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingresult)
|
|
public final class DevicePairingResult : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDevicePairingResult
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingResult
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDevicePairingResult>?) -> DevicePairingResult? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingresult.protectionlevelused)
|
|
public var protectionLevelUsed : DevicePairingProtectionLevel {
|
|
get { try! _default.get_ProtectionLevelUsedImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepairingresult.status)
|
|
public var status : DevicePairingResultStatus {
|
|
get { try! _default.get_StatusImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance)
|
|
public final class DevicePickerAppearance : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDevicePickerAppearance
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDevicePickerAppearance>?) -> DevicePickerAppearance? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance.accentcolor)
|
|
public var accentColor : UWP.Color {
|
|
get { try! _default.get_AccentColorImpl() }
|
|
set { try! _default.put_AccentColorImpl(newValue) }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance.backgroundcolor)
|
|
public var backgroundColor : UWP.Color {
|
|
get { try! _default.get_BackgroundColorImpl() }
|
|
set { try! _default.put_BackgroundColorImpl(newValue) }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance.foregroundcolor)
|
|
public var foregroundColor : UWP.Color {
|
|
get { try! _default.get_ForegroundColorImpl() }
|
|
set { try! _default.put_ForegroundColorImpl(newValue) }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance.selectedaccentcolor)
|
|
public var selectedAccentColor : UWP.Color {
|
|
get { try! _default.get_SelectedAccentColorImpl() }
|
|
set { try! _default.put_SelectedAccentColorImpl(newValue) }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance.selectedbackgroundcolor)
|
|
public var selectedBackgroundColor : UWP.Color {
|
|
get { try! _default.get_SelectedBackgroundColorImpl() }
|
|
set { try! _default.put_SelectedBackgroundColorImpl(newValue) }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance.selectedforegroundcolor)
|
|
public var selectedForegroundColor : UWP.Color {
|
|
get { try! _default.get_SelectedForegroundColorImpl() }
|
|
set { try! _default.put_SelectedForegroundColorImpl(newValue) }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicepickerappearance.title)
|
|
public var title : String {
|
|
get { try! _default.get_TitleImpl() }
|
|
set { try! _default.put_TitleImpl(newValue) }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail)
|
|
public final class DeviceThumbnail : WinRTClass, WindowsFoundation.IClosable, UWP.IInputStream, UWP.IOutputStream, UWP.IRandomAccessStream, UWP.IContentTypeProvider, UWP.IRandomAccessStreamWithContentType {
|
|
private typealias SwiftABI = __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentType
|
|
private typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamWithContentType
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamWithContentType>?) -> DeviceThumbnail? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
override public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
|
return super.queryInterface(iid)
|
|
}
|
|
private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.close)
|
|
public func close() throws {
|
|
try _IClosable.CloseImpl()
|
|
}
|
|
|
|
private lazy var _IInputStream: __ABI_Windows_Storage_Streams.IInputStream! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.readasync)
|
|
public func readAsync(_ buffer: UWP.AnyIBuffer!, _ count: UInt32, _ options: UWP.InputStreamOptions) throws -> WindowsFoundation.AnyIAsyncOperationWithProgress<UWP.AnyIBuffer?, UInt32>! {
|
|
try _IInputStream.ReadAsyncImpl(buffer, count, options)
|
|
}
|
|
|
|
private lazy var _IOutputStream: __ABI_Windows_Storage_Streams.IOutputStream! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.writeasync)
|
|
public func writeAsync(_ buffer: UWP.AnyIBuffer!) throws -> WindowsFoundation.AnyIAsyncOperationWithProgress<UInt32, UInt32>! {
|
|
try _IOutputStream.WriteAsyncImpl(buffer)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.flushasync)
|
|
public func flushAsync() throws -> WindowsFoundation.AnyIAsyncOperation<Bool>! {
|
|
try _IOutputStream.FlushAsyncImpl()
|
|
}
|
|
|
|
private lazy var _IRandomAccessStream: __ABI_Windows_Storage_Streams.IRandomAccessStream! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.getinputstreamat)
|
|
public func getInputStreamAt(_ position: UInt64) throws -> UWP.AnyIInputStream! {
|
|
try _IRandomAccessStream.GetInputStreamAtImpl(position)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.getoutputstreamat)
|
|
public func getOutputStreamAt(_ position: UInt64) throws -> UWP.AnyIOutputStream! {
|
|
try _IRandomAccessStream.GetOutputStreamAtImpl(position)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.seek)
|
|
public func seek(_ position: UInt64) throws {
|
|
try _IRandomAccessStream.SeekImpl(position)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.clonestream)
|
|
public func cloneStream() throws -> UWP.AnyIRandomAccessStream! {
|
|
try _IRandomAccessStream.CloneStreamImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.canread)
|
|
public var canRead : Bool {
|
|
get { try! _IRandomAccessStream.get_CanReadImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.canwrite)
|
|
public var canWrite : Bool {
|
|
get { try! _IRandomAccessStream.get_CanWriteImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.position)
|
|
public var position : UInt64 {
|
|
get { try! _IRandomAccessStream.get_PositionImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.size)
|
|
public var size : UInt64 {
|
|
get { try! _IRandomAccessStream.get_SizeImpl() }
|
|
set { try! _IRandomAccessStream.put_SizeImpl(newValue) }
|
|
}
|
|
|
|
private lazy var _IContentTypeProvider: __ABI_Windows_Storage_Streams.IContentTypeProvider! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicethumbnail.contenttype)
|
|
public var contentType : String {
|
|
get { try! _IContentTypeProvider.get_ContentTypeImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_IClosable = nil
|
|
_IInputStream = nil
|
|
_IOutputStream = nil
|
|
_IRandomAccessStream = nil
|
|
_IContentTypeProvider = nil
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceunpairingresult)
|
|
public final class DeviceUnpairingResult : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDeviceUnpairingResult
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceUnpairingResult
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDeviceUnpairingResult>?) -> DeviceUnpairingResult? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.deviceunpairingresult.status)
|
|
public var status : DeviceUnpairingResultStatus {
|
|
get { try! _default.get_StatusImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher)
|
|
public final class DeviceWatcher : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IDeviceWatcher
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIDeviceWatcher>?) -> DeviceWatcher? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.start)
|
|
public func start() throws {
|
|
try _default.StartImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.stop)
|
|
public func stop() throws {
|
|
try _default.StopImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.status)
|
|
public var status : DeviceWatcherStatus {
|
|
get { try! _default.get_StatusImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.added)
|
|
public lazy var added : Event<TypedEventHandler<DeviceWatcher?, DeviceInformation?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_AddedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_AddedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.enumerationcompleted)
|
|
public lazy var enumerationCompleted : Event<TypedEventHandler<DeviceWatcher?, Any?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_EnumerationCompletedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_EnumerationCompletedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.removed)
|
|
public lazy var removed : Event<TypedEventHandler<DeviceWatcher?, DeviceInformationUpdate?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_RemovedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_RemovedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.stopped)
|
|
public lazy var stopped : Event<TypedEventHandler<DeviceWatcher?, Any?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_StoppedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_StoppedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.updated)
|
|
public lazy var updated : Event<TypedEventHandler<DeviceWatcher?, DeviceInformationUpdate?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_UpdatedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_UpdatedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
private lazy var _IDeviceWatcher2: __ABI_Windows_Devices_Enumeration.IDeviceWatcher2! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.devicewatcher.getbackgroundtrigger)
|
|
public func getBackgroundTrigger(_ requestedEventKinds: WindowsFoundation.AnyIIterable<DeviceWatcherEventKind>!) throws -> UWP.DeviceWatcherTrigger! {
|
|
try _IDeviceWatcher2.GetBackgroundTriggerImpl(requestedEventKinds)
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IDeviceWatcher2 = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.enclosurelocation)
|
|
public final class EnclosureLocation : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Devices_Enumeration.IEnclosureLocation
|
|
private typealias CABI = __x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CDevices_CEnumeration_CIEnclosureLocation>?) -> EnclosureLocation? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.enclosurelocation.indock)
|
|
public var inDock : Bool {
|
|
get { try! _default.get_InDockImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.enclosurelocation.inlid)
|
|
public var inLid : Bool {
|
|
get { try! _default.get_InLidImpl() }
|
|
}
|
|
|
|
private lazy var _IEnclosureLocation2: __ABI_Windows_Devices_Enumeration.IEnclosureLocation2! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.enclosurelocation.rotationangleindegreesclockwise)
|
|
public var rotationAngleInDegreesClockwise : UInt32 {
|
|
get { try! _IEnclosureLocation2.get_RotationAngleInDegreesClockwiseImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IEnclosureLocation2 = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.devices.enumeration.idevicepairingsettings)
|
|
public protocol IDevicePairingSettings : WinRTInterface {
|
|
}
|
|
|
|
extension IDevicePairingSettings {
|
|
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
|
switch iid {
|
|
case __ABI_Windows_Devices_Enumeration.IDevicePairingSettingsWrapper.IID:
|
|
let wrapper = __ABI_Windows_Devices_Enumeration.IDevicePairingSettingsWrapper(self)
|
|
return wrapper!.queryInterface(iid)
|
|
default: return nil
|
|
}
|
|
}
|
|
}
|
|
public typealias AnyIDevicePairingSettings = any IDevicePairingSettings
|
|
|
|
extension UWP.DeviceClass {
|
|
public static var all : UWP.DeviceClass {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass_All
|
|
}
|
|
public static var audioCapture : UWP.DeviceClass {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass_AudioCapture
|
|
}
|
|
public static var audioRender : UWP.DeviceClass {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass_AudioRender
|
|
}
|
|
public static var portableStorageDevice : UWP.DeviceClass {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass_PortableStorageDevice
|
|
}
|
|
public static var videoCapture : UWP.DeviceClass {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass_VideoCapture
|
|
}
|
|
public static var imageScanner : UWP.DeviceClass {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass_ImageScanner
|
|
}
|
|
public static var location : UWP.DeviceClass {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceClass_Location
|
|
}
|
|
}
|
|
extension UWP.DeviceClass: @retroactive Hashable, @retroactive Codable {}
|
|
|
|
extension UWP.DeviceInformationKind {
|
|
public static var unknown : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_Unknown
|
|
}
|
|
public static var deviceInterface : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_DeviceInterface
|
|
}
|
|
public static var deviceContainer : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_DeviceContainer
|
|
}
|
|
public static var device : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_Device
|
|
}
|
|
public static var deviceInterfaceClass : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_DeviceInterfaceClass
|
|
}
|
|
public static var associationEndpoint : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_AssociationEndpoint
|
|
}
|
|
public static var associationEndpointContainer : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_AssociationEndpointContainer
|
|
}
|
|
public static var associationEndpointService : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_AssociationEndpointService
|
|
}
|
|
public static var devicePanel : UWP.DeviceInformationKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceInformationKind_DevicePanel
|
|
}
|
|
}
|
|
extension UWP.DeviceInformationKind: @retroactive Hashable, @retroactive Codable {}
|
|
|
|
extension UWP.DevicePairingKinds {
|
|
public static var none : UWP.DevicePairingKinds {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds_None
|
|
}
|
|
public static var confirmOnly : UWP.DevicePairingKinds {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds_ConfirmOnly
|
|
}
|
|
public static var displayPin : UWP.DevicePairingKinds {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds_DisplayPin
|
|
}
|
|
public static var providePin : UWP.DevicePairingKinds {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds_ProvidePin
|
|
}
|
|
public static var confirmPinMatch : UWP.DevicePairingKinds {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds_ConfirmPinMatch
|
|
}
|
|
public static var providePasswordCredential : UWP.DevicePairingKinds {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingKinds_ProvidePasswordCredential
|
|
}
|
|
}
|
|
extension UWP.DevicePairingKinds: @retroactive Hashable, @retroactive Codable {}
|
|
|
|
extension UWP.DevicePairingProtectionLevel {
|
|
public static var `default` : UWP.DevicePairingProtectionLevel {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingProtectionLevel_Default
|
|
}
|
|
public static var none : UWP.DevicePairingProtectionLevel {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingProtectionLevel_None
|
|
}
|
|
public static var encryption : UWP.DevicePairingProtectionLevel {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingProtectionLevel_Encryption
|
|
}
|
|
public static var encryptionAndAuthentication : UWP.DevicePairingProtectionLevel {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingProtectionLevel_EncryptionAndAuthentication
|
|
}
|
|
}
|
|
extension UWP.DevicePairingProtectionLevel: @retroactive Hashable, @retroactive Codable {}
|
|
|
|
extension UWP.DevicePairingResultStatus {
|
|
public static var paired : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_Paired
|
|
}
|
|
public static var notReadyToPair : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_NotReadyToPair
|
|
}
|
|
public static var notPaired : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_NotPaired
|
|
}
|
|
public static var alreadyPaired : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_AlreadyPaired
|
|
}
|
|
public static var connectionRejected : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_ConnectionRejected
|
|
}
|
|
public static var tooManyConnections : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_TooManyConnections
|
|
}
|
|
public static var hardwareFailure : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_HardwareFailure
|
|
}
|
|
public static var authenticationTimeout : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_AuthenticationTimeout
|
|
}
|
|
public static var authenticationNotAllowed : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_AuthenticationNotAllowed
|
|
}
|
|
public static var authenticationFailure : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_AuthenticationFailure
|
|
}
|
|
public static var noSupportedProfiles : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_NoSupportedProfiles
|
|
}
|
|
public static var protectionLevelCouldNotBeMet : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_ProtectionLevelCouldNotBeMet
|
|
}
|
|
public static var accessDenied : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_AccessDenied
|
|
}
|
|
public static var invalidCeremonyData : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_InvalidCeremonyData
|
|
}
|
|
public static var pairingCanceled : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_PairingCanceled
|
|
}
|
|
public static var operationAlreadyInProgress : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_OperationAlreadyInProgress
|
|
}
|
|
public static var requiredHandlerNotRegistered : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_RequiredHandlerNotRegistered
|
|
}
|
|
public static var rejectedByHandler : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_RejectedByHandler
|
|
}
|
|
public static var remoteDeviceHasAssociation : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_RemoteDeviceHasAssociation
|
|
}
|
|
public static var failed : UWP.DevicePairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDevicePairingResultStatus_Failed
|
|
}
|
|
}
|
|
extension UWP.DevicePairingResultStatus: @retroactive Hashable, @retroactive Codable {}
|
|
|
|
extension UWP.DeviceUnpairingResultStatus {
|
|
public static var unpaired : UWP.DeviceUnpairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceUnpairingResultStatus_Unpaired
|
|
}
|
|
public static var alreadyUnpaired : UWP.DeviceUnpairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceUnpairingResultStatus_AlreadyUnpaired
|
|
}
|
|
public static var operationAlreadyInProgress : UWP.DeviceUnpairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceUnpairingResultStatus_OperationAlreadyInProgress
|
|
}
|
|
public static var accessDenied : UWP.DeviceUnpairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceUnpairingResultStatus_AccessDenied
|
|
}
|
|
public static var failed : UWP.DeviceUnpairingResultStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceUnpairingResultStatus_Failed
|
|
}
|
|
}
|
|
extension UWP.DeviceUnpairingResultStatus: @retroactive Hashable, @retroactive Codable {}
|
|
|
|
extension UWP.DeviceWatcherEventKind {
|
|
public static var add : UWP.DeviceWatcherEventKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherEventKind_Add
|
|
}
|
|
public static var update : UWP.DeviceWatcherEventKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherEventKind_Update
|
|
}
|
|
public static var remove : UWP.DeviceWatcherEventKind {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherEventKind_Remove
|
|
}
|
|
}
|
|
extension UWP.DeviceWatcherEventKind: @retroactive Hashable, @retroactive Codable {}
|
|
|
|
extension UWP.DeviceWatcherStatus {
|
|
public static var created : UWP.DeviceWatcherStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus_Created
|
|
}
|
|
public static var started : UWP.DeviceWatcherStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus_Started
|
|
}
|
|
public static var enumerationCompleted : UWP.DeviceWatcherStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus_EnumerationCompleted
|
|
}
|
|
public static var stopping : UWP.DeviceWatcherStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus_Stopping
|
|
}
|
|
public static var stopped : UWP.DeviceWatcherStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus_Stopped
|
|
}
|
|
public static var aborted : UWP.DeviceWatcherStatus {
|
|
__x_ABI_CWindows_CDevices_CEnumeration_CDeviceWatcherStatus_Aborted
|
|
}
|
|
}
|
|
extension UWP.DeviceWatcherStatus: @retroactive Hashable, @retroactive Codable {}
|
|
|