2024-02-15 17:14:06 -08:00

1503 lines
66 KiB
Swift

// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
// swiftlint:disable all
import Foundation
import CWinRT
private var IID___x_ABI_CWindows_CFoundation_CIAsyncAction: WindowsFoundation.IID {
.init(Data1: 0x5A648006, Data2: 0x843A, Data3: 0x4DA9, Data4: ( 0x86,0x5B,0x9D,0x26,0xE5,0xDF,0xAD,0x7B ))// 5A648006-843A-4DA9-865B-9D26E5DFAD7B
}
private var IID___x_ABI_C__FIAsyncActionWithProgress_1_TProgress: WindowsFoundation.IID {
.init(Data1: 0x1F6DB258, Data2: 0xE803, Data3: 0x48A1, Data4: ( 0x95,0x46,0xEB,0x73,0x53,0x39,0x88,0x84 ))// 1F6DB258-E803-48A1-9546-EB7353398884
}
private var IID___x_ABI_CWindows_CFoundation_CIAsyncInfo: WindowsFoundation.IID {
.init(Data1: 0x00000036, Data2: 0x0000, Data3: 0x0000, Data4: ( 0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ))// 00000036-0000-0000-C000-000000000046
}
private var IID___x_ABI_C__FIAsyncOperationWithProgress_2_TResult_TProgress: WindowsFoundation.IID {
.init(Data1: 0xB5D036D7, Data2: 0xE297, Data3: 0x498F, Data4: ( 0xBA,0x60,0x02,0x89,0xE7,0x6E,0x23,0xDD ))// B5D036D7-E297-498F-BA60-0289E76E23DD
}
private var IID___x_ABI_C__FIAsyncOperation_1_TResult: WindowsFoundation.IID {
.init(Data1: 0x9FC2B0BB, Data2: 0xE446, Data3: 0x44E2, Data4: ( 0xAA,0x61,0x9C,0xAB,0x8F,0x63,0x6A,0xF2 ))// 9FC2B0BB-E446-44E2-AA61-9CAB8F636AF2
}
private var IID___x_ABI_CWindows_CFoundation_CIClosable: WindowsFoundation.IID {
.init(Data1: 0x30D5A829, Data2: 0x7FA4, Data3: 0x4026, Data4: ( 0x83,0xBB,0xD7,0x5B,0xAE,0x4E,0xA9,0x9E ))// 30D5A829-7FA4-4026-83BB-D75BAE4EA99E
}
private var IID___x_ABI_CWindows_CFoundation_CIDeferral: WindowsFoundation.IID {
.init(Data1: 0xD6269732, Data2: 0x3B7F, Data3: 0x46A7, Data4: ( 0xB4,0x0B,0x4F,0xDC,0xA2,0xA2,0xC6,0x93 ))// D6269732-3B7F-46A7-B40B-4FDCA2A2C693
}
private var IID___x_ABI_CWindows_CFoundation_CIDeferralFactory: WindowsFoundation.IID {
.init(Data1: 0x65A1ECC5, Data2: 0x3FB5, Data3: 0x4832, Data4: ( 0x8C,0xA9,0xF0,0x61,0xB2,0x81,0xD1,0x3A ))// 65A1ECC5-3FB5-4832-8CA9-F061B281D13A
}
private var IID___x_ABI_CWindows_CFoundation_CIGetActivationFactory: WindowsFoundation.IID {
.init(Data1: 0x4EDB8EE2, Data2: 0x96DD, Data3: 0x49A7, Data4: ( 0x94,0xF7,0x46,0x07,0xDD,0xAB,0x8E,0x3C ))// 4EDB8EE2-96DD-49A7-94F7-4607DDAB8E3C
}
private var IID___x_ABI_CWindows_CFoundation_CIGuidHelperStatics: WindowsFoundation.IID {
.init(Data1: 0x59C7966B, Data2: 0xAE52, Data3: 0x5283, Data4: ( 0xAD,0x7F,0xA1,0xB9,0xE9,0x67,0x8A,0xDD ))// 59C7966B-AE52-5283-AD7F-A1B9E9678ADD
}
private var IID___x_ABI_CWindows_CFoundation_CIMemoryBuffer: WindowsFoundation.IID {
.init(Data1: 0xFBC4DD2A, Data2: 0x245B, Data3: 0x11E4, Data4: ( 0xAF,0x98,0x68,0x94,0x23,0x26,0x0C,0xF8 ))// FBC4DD2A-245B-11E4-AF98-689423260CF8
}
private var IID___x_ABI_CWindows_CFoundation_CIMemoryBufferFactory: WindowsFoundation.IID {
.init(Data1: 0xFBC4DD2B, Data2: 0x245B, Data3: 0x11E4, Data4: ( 0xAF,0x98,0x68,0x94,0x23,0x26,0x0C,0xF8 ))// FBC4DD2B-245B-11E4-AF98-689423260CF8
}
private var IID___x_ABI_CWindows_CFoundation_CIMemoryBufferReference: WindowsFoundation.IID {
.init(Data1: 0xFBC4DD29, Data2: 0x245B, Data3: 0x11E4, Data4: ( 0xAF,0x98,0x68,0x94,0x23,0x26,0x0C,0xF8 ))// FBC4DD29-245B-11E4-AF98-689423260CF8
}
private var IID___x_ABI_CWindows_CFoundation_CIPropertyValue: WindowsFoundation.IID {
.init(Data1: 0x4BD682DD, Data2: 0x7554, Data3: 0x40E9, Data4: ( 0x9A,0x9B,0x82,0x65,0x4E,0xDE,0x7E,0x62 ))// 4BD682DD-7554-40E9-9A9B-82654EDE7E62
}
private var IID___x_ABI_CWindows_CFoundation_CIPropertyValueStatics: WindowsFoundation.IID {
.init(Data1: 0x629BDBC8, Data2: 0xD932, Data3: 0x4FF4, Data4: ( 0x96,0xB9,0x8D,0x96,0xC5,0xC1,0xE8,0x58 ))// 629BDBC8-D932-4FF4-96B9-8D96C5C1E858
}
private var IID___x_ABI_C__FIReferenceArray_1_T: WindowsFoundation.IID {
.init(Data1: 0x61C17707, Data2: 0x2D65, Data3: 0x11E0, Data4: ( 0x9A,0xE8,0xD4,0x85,0x64,0x01,0x54,0x72 ))// 61C17707-2D65-11E0-9AE8-D48564015472
}
private var IID___x_ABI_C__FIReference_1_T: WindowsFoundation.IID {
.init(Data1: 0x61C17706, Data2: 0x2D65, Data3: 0x11E0, Data4: ( 0x9A,0xE8,0xD4,0x85,0x64,0x01,0x54,0x72 ))// 61C17706-2D65-11E0-9AE8-D48564015472
}
private var IID___x_ABI_CWindows_CFoundation_CIStringable: WindowsFoundation.IID {
.init(Data1: 0x96369F54, Data2: 0x8EB6, Data3: 0x48F0, Data4: ( 0xAB,0xCE,0xC1,0xB2,0x11,0xE6,0x27,0xC3 ))// 96369F54-8EB6-48F0-ABCE-C1B211E627C3
}
private var IID___x_ABI_CWindows_CFoundation_CIUriEscapeStatics: WindowsFoundation.IID {
.init(Data1: 0xC1D432BA, Data2: 0xC824, Data3: 0x4452, Data4: ( 0xA7,0xFD,0x51,0x2B,0xC3,0xBB,0xE9,0xA1 ))// C1D432BA-C824-4452-A7FD-512BC3BBE9A1
}
private var IID___x_ABI_CWindows_CFoundation_CIUriRuntimeClass: WindowsFoundation.IID {
.init(Data1: 0x9E365E57, Data2: 0x48B2, Data3: 0x4160, Data4: ( 0x95,0x6F,0xC7,0x38,0x51,0x20,0xBB,0xFC ))// 9E365E57-48B2-4160-956F-C7385120BBFC
}
private var IID___x_ABI_CWindows_CFoundation_CIUriRuntimeClassFactory: WindowsFoundation.IID {
.init(Data1: 0x44A9796F, Data2: 0x723E, Data3: 0x4FDF, Data4: ( 0xA2,0x18,0x03,0x3E,0x75,0xB0,0xC0,0x84 ))// 44A9796F-723E-4FDF-A218-033E75B0C084
}
private var IID___x_ABI_CWindows_CFoundation_CIUriRuntimeClassWithAbsoluteCanonicalUri: WindowsFoundation.IID {
.init(Data1: 0x758D9661, Data2: 0x221C, Data3: 0x480F, Data4: ( 0xA3,0x39,0x50,0x65,0x66,0x73,0xF4,0x6F ))// 758D9661-221C-480F-A339-50656673F46F
}
private var IID___x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderEntry: WindowsFoundation.IID {
.init(Data1: 0x125E7431, Data2: 0xF678, Data3: 0x4E8E, Data4: ( 0xB6,0x70,0x20,0xA9,0xB0,0x6C,0x51,0x2D ))// 125E7431-F678-4E8E-B670-20A9B06C512D
}
private var IID___x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClass: WindowsFoundation.IID {
.init(Data1: 0xD45A0451, Data2: 0xF225, Data3: 0x4542, Data4: ( 0x92,0x96,0x0E,0x1D,0xF5,0xD2,0x54,0xDF ))// D45A0451-F225-4542-9296-0E1DF5D254DF
}
private var IID___x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClassFactory: WindowsFoundation.IID {
.init(Data1: 0x5B8C6B3D, Data2: 0x24AE, Data3: 0x41B5, Data4: ( 0xA1,0xBF,0xF0,0xC3,0xD5,0x44,0x84,0x5B ))// 5B8C6B3D-24AE-41B5-A1BF-F0C3D544845B
}
private var IID___x_ABI_CWindows_CFoundation_CIAsyncActionCompletedHandler: WindowsFoundation.IID {
.init(Data1: 0xA4ED5C81, Data2: 0x76C9, Data3: 0x40BD, Data4: ( 0x8B,0xE6,0xB1,0xD9,0x0F,0xB2,0x0A,0xE7 ))// A4ED5C81-76C9-40BD-8BE6-B1D90FB20AE7
}
private var IID___x_ABI_C__FIAsyncActionProgressHandler_1_TProgress: WindowsFoundation.IID {
.init(Data1: 0x6D844858, Data2: 0x0CFF, Data3: 0x4590, Data4: ( 0xAE,0x89,0x95,0xA5,0xA5,0xC8,0xB4,0xB8 ))// 6D844858-0CFF-4590-AE89-95A5A5C8B4B8
}
private var IID___x_ABI_C__FIAsyncActionWithProgressCompletedHandler_1_TProgress: WindowsFoundation.IID {
.init(Data1: 0x9C029F91, Data2: 0xCC84, Data3: 0x44FD, Data4: ( 0xAC,0x26,0x0A,0x6C,0x4E,0x55,0x52,0x81 ))// 9C029F91-CC84-44FD-AC26-0A6C4E555281
}
private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_TResult: WindowsFoundation.IID {
.init(Data1: 0xFCDCF02C, Data2: 0xE5D8, Data3: 0x4478, Data4: ( 0x91,0x5A,0x4D,0x90,0xB7,0x4B,0x83,0xA5 ))// FCDCF02C-E5D8-4478-915A-4D90B74B83A5
}
private var IID___x_ABI_C__FIAsyncOperationProgressHandler_2_TResult_TProgress: WindowsFoundation.IID {
.init(Data1: 0x55690902, Data2: 0x0AAB, Data3: 0x421A, Data4: ( 0x87,0x78,0xF8,0xCE,0x50,0x26,0xD7,0x58 ))// 55690902-0AAB-421A-8778-F8CE5026D758
}
private var IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_TResult_TProgress: WindowsFoundation.IID {
.init(Data1: 0xE85DF41D, Data2: 0x6AA7, Data3: 0x46E3, Data4: ( 0xA8,0xE2,0xF0,0x09,0xD8,0x40,0xC6,0x27 ))// E85DF41D-6AA7-46E3-A8E2-F009D840C627
}
private var IID___x_ABI_CWindows_CFoundation_CIDeferralCompletedHandler: WindowsFoundation.IID {
.init(Data1: 0xED32A372, Data2: 0xF3C8, Data3: 0x4FAA, Data4: ( 0x9C,0xFB,0x47,0x01,0x48,0xDA,0x38,0x88 ))// ED32A372-F3C8-4FAA-9CFB-470148DA3888
}
private var IID___x_ABI_C__FIEventHandler_1_T: WindowsFoundation.IID {
.init(Data1: 0x9DE1C535, Data2: 0x6AE1, Data3: 0x11E0, Data4: ( 0x84,0xE1,0x18,0xA9,0x05,0xBC,0xC5,0x3F ))// 9DE1C535-6AE1-11E0-84E1-18A905BCC53F
}
private var IID___x_ABI_C__FITypedEventHandler_2_TSender_TResult: WindowsFoundation.IID {
.init(Data1: 0x9DE1C534, Data2: 0x6AE1, Data3: 0x11E0, Data4: ( 0x84,0xE1,0x18,0xA9,0x05,0xBC,0xC5,0x3F ))// 9DE1C534-6AE1-11E0-84E1-18A905BCC53F
}
public enum __ABI_Windows_Foundation {
public class IAsyncAction: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIAsyncAction }
open func put_CompletedImpl(_ handler: WindowsFoundation.AsyncActionCompletedHandler?) throws {
let handlerWrapper = __ABI_Windows_Foundation.AsyncActionCompletedHandlerWrapper(handler)
let _handler = try! handlerWrapper?.toABI { $0 }
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncAction.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler))
}
}
open func get_CompletedImpl() throws -> WindowsFoundation.AsyncActionCompletedHandler? {
let (handler) = try ComPtrs.initialize { handlerAbi in
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncAction.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &handlerAbi))
}
}
return __ABI_Windows_Foundation.AsyncActionCompletedHandlerWrapper.unwrapFrom(abi: handler)
}
open func GetResultsImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncAction.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis))
}
}
}
internal static var IAsyncActionVTable: __x_ABI_CWindows_CFoundation_CIAsyncActionVtbl = .init(
QueryInterface: { IAsyncActionWrapper.queryInterface($0, $1, $2) },
AddRef: { IAsyncActionWrapper.addRef($0) },
Release: { IAsyncActionWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IAsyncActionWrapper.IID
iids[3] = __ABI_Windows_Foundation.IAsyncInfoWrapper.IID
$1!.pointee = 4
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IAsyncAction").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
put_Completed: {
guard let __unwrapped__instance = IAsyncActionWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
guard let handler = __ABI_Windows_Foundation.AsyncActionCompletedHandlerWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
__unwrapped__instance.completed = handler
return S_OK
},
get_Completed: {
guard let __unwrapped__instance = IAsyncActionWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let handler = __unwrapped__instance.completed
let handlerWrapper = __ABI_Windows_Foundation.AsyncActionCompletedHandlerWrapper(handler)
handlerWrapper?.copyTo($1)
return S_OK
},
GetResults: {
do {
guard let __unwrapped__instance = IAsyncActionWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
try __unwrapped__instance.getResults()
return S_OK
} catch { return failWith(err: E_FAIL) }
}
)
public typealias IAsyncActionWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IAsyncActionBridge>
public class IAsyncInfo: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIAsyncInfo }
open func get_IdImpl() throws -> UInt32 {
var result: UINT32 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncInfo.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Id(pThis, &result))
}
return result
}
open func get_StatusImpl() throws -> WindowsFoundation.AsyncStatus {
var result: __x_ABI_CWindows_CFoundation_CAsyncStatus = .init(0)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncInfo.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Status(pThis, &result))
}
return result
}
open func get_ErrorCodeImpl() throws -> HRESULT {
var result: HRESULT = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncInfo.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ErrorCode(pThis, &result))
}
return result
}
open func CancelImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncInfo.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Cancel(pThis))
}
}
open func CloseImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncInfo.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Close(pThis))
}
}
}
internal static var IAsyncInfoVTable: __x_ABI_CWindows_CFoundation_CIAsyncInfoVtbl = .init(
QueryInterface: { IAsyncInfoWrapper.queryInterface($0, $1, $2) },
AddRef: { IAsyncInfoWrapper.addRef($0) },
Release: { IAsyncInfoWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IAsyncInfoWrapper.IID
$1!.pointee = 3
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IAsyncInfo").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
get_Id: {
guard let __unwrapped__instance = IAsyncInfoWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let result = __unwrapped__instance.id
$1?.initialize(to: result)
return S_OK
},
get_Status: {
guard let __unwrapped__instance = IAsyncInfoWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let result = __unwrapped__instance.status
$1?.initialize(to: result)
return S_OK
},
get_ErrorCode: {
guard let __unwrapped__instance = IAsyncInfoWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let result = __unwrapped__instance.errorCode
$1?.initialize(to: result)
return S_OK
},
Cancel: {
do {
guard let __unwrapped__instance = IAsyncInfoWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
try __unwrapped__instance.cancel()
return S_OK
} catch { return failWith(err: E_FAIL) }
},
Close: {
do {
guard let __unwrapped__instance = IAsyncInfoWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
try __unwrapped__instance.close()
return S_OK
} catch { return failWith(err: E_FAIL) }
}
)
public typealias IAsyncInfoWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IAsyncInfoBridge>
public class IClosable: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIClosable }
open func CloseImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIClosable.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Close(pThis))
}
}
}
internal static var IClosableVTable: __x_ABI_CWindows_CFoundation_CIClosableVtbl = .init(
QueryInterface: { IClosableWrapper.queryInterface($0, $1, $2) },
AddRef: { IClosableWrapper.addRef($0) },
Release: { IClosableWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IClosableWrapper.IID
$1!.pointee = 3
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IClosable").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
Close: {
do {
guard let __unwrapped__instance = IClosableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
try __unwrapped__instance.close()
return S_OK
} catch { return failWith(err: E_FAIL) }
}
)
public typealias IClosableWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IClosableBridge>
public class IDeferral: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIDeferral }
internal func CompleteImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIDeferral.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Complete(pThis))
}
}
}
public class IDeferralFactory: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIDeferralFactory }
internal func CreateImpl(_ handler: WindowsFoundation.DeferralCompletedHandler?) throws -> IDeferral {
let (result) = try ComPtrs.initialize { resultAbi in
let handlerWrapper = __ABI_Windows_Foundation.DeferralCompletedHandlerWrapper(handler)
let _handler = try! handlerWrapper?.toABI { $0 }
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIDeferralFactory.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Create(pThis, _handler, &resultAbi))
}
}
return IDeferral(result!)
}
}
public class IGetActivationFactory: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIGetActivationFactory }
open func GetActivationFactoryImpl(_ activatableClassId: String) throws -> Any? {
let (factory) = try ComPtrs.initialize { factoryAbi in
let _activatableClassId = try! HString(activatableClassId)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIGetActivationFactory.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetActivationFactory(pThis, _activatableClassId.get(), &factoryAbi))
}
}
return __ABI_.AnyWrapper.unwrapFrom(abi: factory)
}
}
internal static var IGetActivationFactoryVTable: __x_ABI_CWindows_CFoundation_CIGetActivationFactoryVtbl = .init(
QueryInterface: { IGetActivationFactoryWrapper.queryInterface($0, $1, $2) },
AddRef: { IGetActivationFactoryWrapper.addRef($0) },
Release: { IGetActivationFactoryWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IGetActivationFactoryWrapper.IID
$1!.pointee = 3
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IGetActivationFactory").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
GetActivationFactory: {
do {
guard let __unwrapped__instance = IGetActivationFactoryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let activatableClassId: String = .init(from: $1)
let factory = try __unwrapped__instance.getActivationFactory(activatableClassId)
let factoryWrapper = __ABI_.AnyWrapper(factory)
factoryWrapper?.copyTo($2)
return S_OK
} catch { return failWith(err: E_FAIL) }
}
)
public typealias IGetActivationFactoryWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IGetActivationFactoryBridge>
public class IGuidHelperStatics: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIGuidHelperStatics }
internal func CreateNewGuidImpl() throws -> Foundation.UUID {
var result: WindowsFoundation.GUID = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIGuidHelperStatics.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateNewGuid(pThis, &result))
}
return .init(from: result)
}
internal func get_EmptyImpl() throws -> Foundation.UUID {
var value: WindowsFoundation.GUID = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIGuidHelperStatics.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Empty(pThis, &value))
}
return .init(from: value)
}
}
public class IMemoryBuffer: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIMemoryBuffer }
open func CreateReferenceImpl() throws -> WindowsFoundation.AnyIMemoryBufferReference? {
let (reference) = try ComPtrs.initialize { referenceAbi in
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIMemoryBuffer.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateReference(pThis, &referenceAbi))
}
}
return __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper.unwrapFrom(abi: reference)
}
}
internal static var IMemoryBufferVTable: __x_ABI_CWindows_CFoundation_CIMemoryBufferVtbl = .init(
QueryInterface: { IMemoryBufferWrapper.queryInterface($0, $1, $2) },
AddRef: { IMemoryBufferWrapper.addRef($0) },
Release: { IMemoryBufferWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IMemoryBufferWrapper.IID
iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID
$1!.pointee = 4
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IMemoryBuffer").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
CreateReference: {
do {
guard let __unwrapped__instance = IMemoryBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let reference = try __unwrapped__instance.createReference()
let referenceWrapper = __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper(reference)
referenceWrapper?.copyTo($1)
return S_OK
} catch { return failWith(err: E_FAIL) }
}
)
public typealias IMemoryBufferWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IMemoryBufferBridge>
public class IMemoryBufferFactory: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIMemoryBufferFactory }
internal func CreateImpl(_ capacity: UInt32) throws -> IMemoryBuffer {
let (value) = try ComPtrs.initialize { valueAbi in
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIMemoryBufferFactory.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Create(pThis, capacity, &valueAbi))
}
}
return IMemoryBuffer(value!)
}
}
public class IMemoryBufferReference: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIMemoryBufferReference }
open func get_CapacityImpl() throws -> UInt32 {
var value: UINT32 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIMemoryBufferReference.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Capacity(pThis, &value))
}
return value
}
open func add_ClosedImpl(_ handler: TypedEventHandler<WindowsFoundation.AnyIMemoryBufferReference?, Any?>?) throws -> EventRegistrationToken {
var cookie: EventRegistrationToken = .init()
let handlerWrapper = WindowsFoundation.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper(handler)
let _handler = try! handlerWrapper?.toABI { $0 }
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIMemoryBufferReference.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.add_Closed(pThis, _handler, &cookie))
}
return cookie
}
open func remove_ClosedImpl(_ cookie: EventRegistrationToken) throws {
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIMemoryBufferReference.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Closed(pThis, cookie))
}
}
}
internal static var IMemoryBufferReferenceVTable: __x_ABI_CWindows_CFoundation_CIMemoryBufferReferenceVtbl = .init(
QueryInterface: { IMemoryBufferReferenceWrapper.queryInterface($0, $1, $2) },
AddRef: { IMemoryBufferReferenceWrapper.addRef($0) },
Release: { IMemoryBufferReferenceWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper.IID
iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID
iids[4] = __ABI_.IMemoryBufferByteAccessWrapper.IID
$1!.pointee = 5
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IMemoryBufferReference").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
get_Capacity: {
guard let __unwrapped__instance = IMemoryBufferReferenceWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = __unwrapped__instance.capacity
$1?.initialize(to: value)
return S_OK
},
add_Closed: {
guard let __unwrapped__instance = IMemoryBufferReferenceWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
guard let handler = WindowsFoundation.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
let cookie = __unwrapped__instance.closed.addHandler(handler)
$2?.initialize(to: .from(swift: cookie))
return S_OK
},
remove_Closed: {
guard let __unwrapped__instance = IMemoryBufferReferenceWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let cookie: EventRegistrationToken = $1
__unwrapped__instance.closed.removeHandler(cookie)
return S_OK
}
)
public typealias IMemoryBufferReferenceWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IMemoryBufferReferenceBridge>
public class IPropertyValue: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIPropertyValue }
open func get_TypeImpl() throws -> WindowsFoundation.PropertyType {
var value: __x_ABI_CWindows_CFoundation_CPropertyType = .init(0)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Type(pThis, &value))
}
return value
}
open func get_IsNumericScalarImpl() throws -> Bool {
var value: boolean = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsNumericScalar(pThis, &value))
}
return .init(from: value)
}
open func GetUInt8Impl() throws -> UInt8 {
var value: UINT8 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetUInt8(pThis, &value))
}
return value
}
open func GetInt16Impl() throws -> Int16 {
var value: INT16 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetInt16(pThis, &value))
}
return value
}
open func GetUInt16Impl() throws -> UInt16 {
var value: UINT16 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetUInt16(pThis, &value))
}
return value
}
open func GetInt32Impl() throws -> Int32 {
var value: INT32 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetInt32(pThis, &value))
}
return value
}
open func GetUInt32Impl() throws -> UInt32 {
var value: UINT32 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetUInt32(pThis, &value))
}
return value
}
open func GetInt64Impl() throws -> Int64 {
var value: INT64 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetInt64(pThis, &value))
}
return value
}
open func GetUInt64Impl() throws -> UInt64 {
var value: UINT64 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetUInt64(pThis, &value))
}
return value
}
open func GetSingleImpl() throws -> Float {
var value: FLOAT = 0.0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetSingle(pThis, &value))
}
return value
}
open func GetDoubleImpl() throws -> Double {
var value: DOUBLE = 0.0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetDouble(pThis, &value))
}
return value
}
open func GetChar16Impl() throws -> Character {
var value: WCHAR = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetChar16(pThis, &value))
}
return .init(from: value)
}
open func GetBooleanImpl() throws -> Bool {
var value: boolean = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetBoolean(pThis, &value))
}
return .init(from: value)
}
open func GetStringImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetString(pThis, &value))
}
return .init(from: value)
}
open func GetGuidImpl() throws -> Foundation.UUID {
var value: WindowsFoundation.GUID = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetGuid(pThis, &value))
}
return .init(from: value)
}
open func GetDateTimeImpl() throws -> WindowsFoundation.DateTime {
var value: __x_ABI_CWindows_CFoundation_CDateTime = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetDateTime(pThis, &value))
}
return .from(abi: value)
}
open func GetTimeSpanImpl() throws -> WindowsFoundation.TimeSpan {
var value: __x_ABI_CWindows_CFoundation_CTimeSpan = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetTimeSpan(pThis, &value))
}
return .from(abi: value)
}
open func GetPointImpl() throws -> WindowsFoundation.Point {
var value: __x_ABI_CWindows_CFoundation_CPoint = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetPoint(pThis, &value))
}
return .from(abi: value)
}
open func GetSizeImpl() throws -> WindowsFoundation.Size {
var value: __x_ABI_CWindows_CFoundation_CSize = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetSize(pThis, &value))
}
return .from(abi: value)
}
open func GetRectImpl() throws -> WindowsFoundation.Rect {
var value: __x_ABI_CWindows_CFoundation_CRect = .init()
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIPropertyValue.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetRect(pThis, &value))
}
return .from(abi: value)
}
}
internal static var IPropertyValueVTable: __x_ABI_CWindows_CFoundation_CIPropertyValueVtbl = .init(
QueryInterface: { IPropertyValueWrapper.queryInterface($0, $1, $2) },
AddRef: { IPropertyValueWrapper.addRef($0) },
Release: { IPropertyValueWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IPropertyValueWrapper.IID
$1!.pointee = 3
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IPropertyValue").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
get_Type: {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = __unwrapped__instance.type
$1?.initialize(to: value)
return S_OK
},
get_IsNumericScalar: {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = __unwrapped__instance.isNumericScalar
$1?.initialize(to: .init(from: value))
return S_OK
},
GetUInt8: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getUInt8()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetInt16: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getInt16()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetUInt16: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getUInt16()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetInt32: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getInt32()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetUInt32: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getUInt32()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetInt64: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getInt64()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetUInt64: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getUInt64()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetSingle: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getSingle()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetDouble: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getDouble()
$1?.initialize(to: value)
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetChar16: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getChar16()
$1?.initialize(to: .init(from: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetBoolean: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getBoolean()
$1?.initialize(to: .init(from: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetString: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getString()
$1?.initialize(to: try! HString(value).detach())
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetGuid: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getGuid()
$1?.initialize(to: .init(from: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetDateTime: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getDateTime()
$1?.initialize(to: .from(swift: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetTimeSpan: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getTimeSpan()
$1?.initialize(to: .from(swift: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetPoint: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getPoint()
$1?.initialize(to: .from(swift: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetSize: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getSize()
$1?.initialize(to: .from(swift: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetRect: {
do {
guard let __unwrapped__instance = IPropertyValueWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.getRect()
$1?.initialize(to: .from(swift: value))
return S_OK
} catch { return failWith(err: E_FAIL) }
},
GetUInt8Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetInt16Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetUInt16Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetInt32Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetUInt32Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetInt64Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetUInt64Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetSingleArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetDoubleArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetChar16Array: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetBooleanArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetStringArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetInspectableArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetGuidArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetDateTimeArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetTimeSpanArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetPointArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetSizeArray: { _, _, _ in return failWith(err: E_NOTIMPL) },
GetRectArray: { _, _, _ in return failWith(err: E_NOTIMPL) }
)
public typealias IPropertyValueWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IPropertyValueBridge>
public class IStringable: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIStringable }
open func ToStringImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIStringable.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.ToString(pThis, &value))
}
return .init(from: value)
}
}
internal static var IStringableVTable: __x_ABI_CWindows_CFoundation_CIStringableVtbl = .init(
QueryInterface: { IStringableWrapper.queryInterface($0, $1, $2) },
AddRef: { IStringableWrapper.addRef($0) },
Release: { IStringableWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IStringableWrapper.IID
$1!.pointee = 3
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IStringable").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
ToString: {
do {
guard let __unwrapped__instance = IStringableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = try __unwrapped__instance.toString()
$1?.initialize(to: try! HString(value).detach())
return S_OK
} catch { return failWith(err: E_FAIL) }
}
)
public typealias IStringableWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IStringableBridge>
public class IUriEscapeStatics: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIUriEscapeStatics }
internal func UnescapeComponentImpl(_ toUnescape: String) throws -> String {
var value: HSTRING?
let _toUnescape = try! HString(toUnescape)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriEscapeStatics.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.UnescapeComponent(pThis, _toUnescape.get(), &value))
}
return .init(from: value)
}
internal func EscapeComponentImpl(_ toEscape: String) throws -> String {
var value: HSTRING?
let _toEscape = try! HString(toEscape)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriEscapeStatics.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.EscapeComponent(pThis, _toEscape.get(), &value))
}
return .init(from: value)
}
}
public class IUriRuntimeClass: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIUriRuntimeClass }
internal func get_AbsoluteUriImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_AbsoluteUri(pThis, &value))
}
return .init(from: value)
}
internal func get_DisplayUriImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DisplayUri(pThis, &value))
}
return .init(from: value)
}
internal func get_DomainImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Domain(pThis, &value))
}
return .init(from: value)
}
internal func get_ExtensionImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Extension(pThis, &value))
}
return .init(from: value)
}
internal func get_FragmentImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Fragment(pThis, &value))
}
return .init(from: value)
}
internal func get_HostImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Host(pThis, &value))
}
return .init(from: value)
}
internal func get_PasswordImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Password(pThis, &value))
}
return .init(from: value)
}
internal func get_PathImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Path(pThis, &value))
}
return .init(from: value)
}
internal func get_QueryImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Query(pThis, &value))
}
return .init(from: value)
}
internal func get_QueryParsedImpl() throws -> WindowsFoundation.WwwFormUrlDecoder? {
let (ppWwwFormUrlDecoder) = try ComPtrs.initialize { ppWwwFormUrlDecoderAbi in
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_QueryParsed(pThis, &ppWwwFormUrlDecoderAbi))
}
}
return .from(abi: ppWwwFormUrlDecoder)
}
internal func get_RawUriImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_RawUri(pThis, &value))
}
return .init(from: value)
}
internal func get_SchemeNameImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_SchemeName(pThis, &value))
}
return .init(from: value)
}
internal func get_UserNameImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_UserName(pThis, &value))
}
return .init(from: value)
}
internal func get_PortImpl() throws -> Int32 {
var value: INT32 = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Port(pThis, &value))
}
return value
}
internal func get_SuspiciousImpl() throws -> Bool {
var value: boolean = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Suspicious(pThis, &value))
}
return .init(from: value)
}
internal func EqualsImpl(_ pUri: WindowsFoundation.Uri?) throws -> Bool {
var value: boolean = 0
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Equals(pThis, RawPointer(pUri), &value))
}
return .init(from: value)
}
internal func CombineUriImpl(_ relativeUri: String) throws -> WindowsFoundation.Uri? {
let (instance) = try ComPtrs.initialize { instanceAbi in
let _relativeUri = try! HString(relativeUri)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.CombineUri(pThis, _relativeUri.get(), &instanceAbi))
}
}
return .from(abi: instance)
}
}
public class IUriRuntimeClassFactory: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIUriRuntimeClassFactory }
internal func CreateUriImpl(_ uri: String) throws -> IUriRuntimeClass {
let (instance) = try ComPtrs.initialize { instanceAbi in
let _uri = try! HString(uri)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClassFactory.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateUri(pThis, _uri.get(), &instanceAbi))
}
}
return IUriRuntimeClass(instance!)
}
internal func CreateWithRelativeUriImpl(_ baseUri: String, _ relativeUri: String) throws -> IUriRuntimeClass {
let (instance) = try ComPtrs.initialize { instanceAbi in
let _baseUri = try! HString(baseUri)
let _relativeUri = try! HString(relativeUri)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClassFactory.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateWithRelativeUri(pThis, _baseUri.get(), _relativeUri.get(), &instanceAbi))
}
}
return IUriRuntimeClass(instance!)
}
}
public class IUriRuntimeClassWithAbsoluteCanonicalUri: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIUriRuntimeClassWithAbsoluteCanonicalUri }
internal func get_AbsoluteCanonicalUriImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClassWithAbsoluteCanonicalUri.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_AbsoluteCanonicalUri(pThis, &value))
}
return .init(from: value)
}
internal func get_DisplayIriImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIUriRuntimeClassWithAbsoluteCanonicalUri.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DisplayIri(pThis, &value))
}
return .init(from: value)
}
}
public class IWwwFormUrlDecoderEntry: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderEntry }
open func get_NameImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderEntry.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Name(pThis, &value))
}
return .init(from: value)
}
open func get_ValueImpl() throws -> String {
var value: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderEntry.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &value))
}
return .init(from: value)
}
}
internal static var IWwwFormUrlDecoderEntryVTable: __x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderEntryVtbl = .init(
QueryInterface: { IWwwFormUrlDecoderEntryWrapper.queryInterface($0, $1, $2) },
AddRef: { IWwwFormUrlDecoderEntryWrapper.addRef($0) },
Release: { IWwwFormUrlDecoderEntryWrapper.release($0) },
GetIids: {
let size = MemoryLayout<WindowsFoundation.IID>.size
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
iids[0] = IUnknown.IID
iids[1] = IInspectable.IID
iids[2] = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.IID
$1!.pointee = 3
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Foundation.IWwwFormUrlDecoderEntry").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
get_Name: {
guard let __unwrapped__instance = IWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = __unwrapped__instance.name
$1?.initialize(to: try! HString(value).detach())
return S_OK
},
get_Value: {
guard let __unwrapped__instance = IWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = __unwrapped__instance.value
$1?.initialize(to: try! HString(value).detach())
return S_OK
}
)
public typealias IWwwFormUrlDecoderEntryWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IWwwFormUrlDecoderEntryBridge>
public class IWwwFormUrlDecoderRuntimeClass: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClass }
internal func GetFirstValueByNameImpl(_ name: String) throws -> String {
var phstrValue: HSTRING?
let _name = try! HString(name)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClass.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.GetFirstValueByName(pThis, _name.get(), &phstrValue))
}
return .init(from: phstrValue)
}
}
public class IWwwFormUrlDecoderRuntimeClassFactory: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClassFactory }
internal func CreateWwwFormUrlDecoderImpl(_ query: String) throws -> IWwwFormUrlDecoderRuntimeClass {
let (instance) = try ComPtrs.initialize { instanceAbi in
let _query = try! HString(query)
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClassFactory.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateWwwFormUrlDecoder(pThis, _query.get(), &instanceAbi))
}
}
return IWwwFormUrlDecoderRuntimeClass(instance!)
}
}
}
extension __x_ABI_CWindows_CFoundation_CDateTime {
public static func from(swift: WindowsFoundation.DateTime) -> __x_ABI_CWindows_CFoundation_CDateTime {
.init(UniversalTime: swift.universalTime)
}
}
extension __x_ABI_CWindows_CFoundation_CPoint {
public static func from(swift: WindowsFoundation.Point) -> __x_ABI_CWindows_CFoundation_CPoint {
.init(X: swift.x, Y: swift.y)
}
}
extension __x_ABI_CWindows_CFoundation_CRect {
public static func from(swift: WindowsFoundation.Rect) -> __x_ABI_CWindows_CFoundation_CRect {
.init(X: swift.x, Y: swift.y, Width: swift.width, Height: swift.height)
}
}
extension __x_ABI_CWindows_CFoundation_CSize {
public static func from(swift: WindowsFoundation.Size) -> __x_ABI_CWindows_CFoundation_CSize {
.init(Width: swift.width, Height: swift.height)
}
}
extension __x_ABI_CWindows_CFoundation_CTimeSpan {
public static func from(swift: WindowsFoundation.TimeSpan) -> __x_ABI_CWindows_CFoundation_CTimeSpan {
.init(Duration: swift.duration)
}
}
// MARK - AsyncActionCompletedHandler
extension __ABI_Windows_Foundation {
public class AsyncActionCompletedHandler: WindowsFoundation.IUnknown {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIAsyncActionCompletedHandler }
open func InvokeImpl(_ asyncInfo: WindowsFoundation.AnyIAsyncAction?, _ asyncStatus: WindowsFoundation.AsyncStatus) throws {
let asyncInfoWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(asyncInfo)
let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 }
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIAsyncActionCompletedHandler.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus))
}
}
}
typealias AsyncActionCompletedHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.AsyncActionCompletedHandlerBridge>
internal static var AsyncActionCompletedHandlerVTable: __x_ABI_CWindows_CFoundation_CIAsyncActionCompletedHandlerVtbl = .init(
QueryInterface: { AsyncActionCompletedHandlerWrapper.queryInterface($0, $1, $2) },
AddRef: { AsyncActionCompletedHandlerWrapper.addRef($0) },
Release: { AsyncActionCompletedHandlerWrapper.release($0) },
Invoke: {
guard let __unwrapped__instance = AsyncActionCompletedHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let asyncInfo: WindowsFoundation.AnyIAsyncAction? = __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: ComPtr($1))
let asyncStatus: WindowsFoundation.AsyncStatus = $2
__unwrapped__instance(asyncInfo, asyncStatus)
return S_OK
}
)
}
public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CFoundation_CIAsyncActionCompletedHandler {
static func makeAbi() -> CABI {
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Foundation.AsyncActionCompletedHandlerVTable) { $0 }
return .init(lpVtbl:vtblPtr)
}
}
// MARK - DeferralCompletedHandler
extension __ABI_Windows_Foundation {
public class DeferralCompletedHandler: WindowsFoundation.IUnknown {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CFoundation_CIDeferralCompletedHandler }
open func InvokeImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CFoundation_CIDeferralCompletedHandler.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis))
}
}
}
typealias DeferralCompletedHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.DeferralCompletedHandlerBridge>
internal static var DeferralCompletedHandlerVTable: __x_ABI_CWindows_CFoundation_CIDeferralCompletedHandlerVtbl = .init(
QueryInterface: { DeferralCompletedHandlerWrapper.queryInterface($0, $1, $2) },
AddRef: { DeferralCompletedHandlerWrapper.addRef($0) },
Release: { DeferralCompletedHandlerWrapper.release($0) },
Invoke: {
guard let __unwrapped__instance = DeferralCompletedHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
__unwrapped__instance()
return S_OK
}
)
}
public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CFoundation_CIDeferralCompletedHandler {
static func makeAbi() -> CABI {
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Foundation.DeferralCompletedHandlerVTable) { $0 }
return .init(lpVtbl:vtblPtr)
}
}