From f5c3a60436323da1b2afe78502bc448f92f0db07 Mon Sep 17 00:00:00 2001 From: Steve Kirbach Date: Wed, 24 Jan 2024 21:51:22 -0800 Subject: [PATCH] ibuffer byte access (#138) * initial implementation * move to c definitions and more swift stuff * building * build fixes * fix assigning proper variable * adding tests which verify buffer * fix indent * fix indent * fix comments * run all tests! * use let instead of var --- swiftwinrt/Resources/CWinRT/MemoryBuffer.h | 30 + swiftwinrt/Resources/CWinRT/robuffer.h | 32 + .../Resources/Support/IBufferByteAccess.swift | 64 + .../Support/IMemoryBufferByteAccess.swift | 74 + swiftwinrt/abi_writer.h | 3 +- swiftwinrt/code_writers.h | 40 + swiftwinrt/file_writers.h | 6 + swiftwinrt/metadata_cache.cpp | 15 + swiftwinrt/metadata_cache.h | 4 +- swiftwinrt/resources.h | 6 + swiftwinrt/resources.rc | 5 + swiftwinrt/types.cpp | 10 + tests/test_app/BufferTests.swift | 80 + tests/test_app/main.swift | 2 +- tests/test_app/test_app.exe.manifest | 4 + tests/test_component/CMakeLists.txt | 4 + .../Sources/CWinRT/include/Ctest_component.h | 3 +- .../Sources/CWinRT/include/test_component.h | 48 + .../Windows.Data.Text+ABI.swift | 13 + .../Windows.Data.Text+Impl.swift | 7 + .../test_component/Windows.Data.Text.swift | 21 + .../Windows.Foundation+ABI.swift | 500 + .../Windows.Foundation+Impl.swift | 127 + .../test_component/Windows.Foundation.swift | 367 + .../test_component/Windows.Storage+ABI.swift | 1915 ++ .../test_component/Windows.Storage+Impl.swift | 783 + .../Windows.Storage.FileProperties+ABI.swift | 805 + .../Windows.Storage.FileProperties+Impl.swift | 47 + .../Windows.Storage.FileProperties.swift | 876 + .../Windows.Storage.Search+ABI.swift | 873 + .../Windows.Storage.Search+Impl.swift | 193 + .../Windows.Storage.Search.swift | 644 + .../Windows.Storage.Streams+ABI.swift | 687 + .../Windows.Storage.Streams+Impl.swift | 402 + .../Windows.Storage.Streams.swift | 301 + .../test_component/Windows.Storage.swift | 1423 ++ .../test_component/test_component+ABI.swift | 19 + .../test_component+Generics.swift | 18374 ++++++++++++---- .../test_component+MakeFromAbi.swift | 265 + .../test_component/test_component.swift | 8 + tests/test_component/cpp/BufferTester.cpp | 16 + tests/test_component/cpp/BufferTester.h | 18 + tests/test_component/cpp/BufferTests.idl | 9 + tests/test_component/cpp/CMakeLists.txt | 3 +- tests/test_component/cpp/test_component.idl | 7 +- 45 files changed, 24599 insertions(+), 4534 deletions(-) create mode 100644 swiftwinrt/Resources/CWinRT/MemoryBuffer.h create mode 100644 swiftwinrt/Resources/CWinRT/robuffer.h create mode 100644 swiftwinrt/Resources/Support/IBufferByteAccess.swift create mode 100644 swiftwinrt/Resources/Support/IMemoryBufferByteAccess.swift create mode 100644 tests/test_app/BufferTests.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Data.Text+ABI.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Data.Text+Impl.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Data.Text.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage+ABI.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage+Impl.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.FileProperties+ABI.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.FileProperties.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.Search+ABI.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.Search.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.Streams+ABI.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.Streams.swift create mode 100644 tests/test_component/Sources/test_component/Windows.Storage.swift create mode 100644 tests/test_component/cpp/BufferTester.cpp create mode 100644 tests/test_component/cpp/BufferTester.h create mode 100644 tests/test_component/cpp/BufferTests.idl diff --git a/swiftwinrt/Resources/CWinRT/MemoryBuffer.h b/swiftwinrt/Resources/CWinRT/MemoryBuffer.h new file mode 100644 index 00000000..cdefd86b --- /dev/null +++ b/swiftwinrt/Resources/CWinRT/MemoryBuffer.h @@ -0,0 +1,30 @@ +// The real MemoryBuffer.h doesn't provide C definitions, so we need to provide those here +// No pragma once, we might include this twice (once for the regular definitions, once for the workaround) + +#include + +#ifndef _IMEMORYBUFFERBYTEACCESS_DEFINED +#define _IMEMORYBUFFERBYTEACCESS_DEFINED +typedef interface IMemoryBufferByteAccess IMemoryBufferByteAccess; +#endif + +typedef struct IMemoryBufferByteAccessVtbl +{ + BEGIN_INTERFACE + + HRESULT (STDMETHODCALLTYPE* QueryInterface)(__RPC__in IMemoryBufferByteAccess* This, + REFIID riid, + _COM_Outptr_ void** ppvObject); + ULONG (STDMETHODCALLTYPE* AddRef)(__RPC__in IMemoryBufferByteAccess* This); + ULONG (STDMETHODCALLTYPE* Release)(__RPC__in IMemoryBufferByteAccess* This); + HRESULT (STDMETHODCALLTYPE* GetBuffer)(__RPC__in IMemoryBufferByteAccess* This, + BYTE** value, + _Out_ UINT32* capacity); + + END_INTERFACE +} IMemoryBufferByteAccessVtbl; + +interface IMemoryBufferByteAccess +{ + CONST_VTBL struct IMemoryBufferByteAccessVtbl* lpVtbl; +}; \ No newline at end of file diff --git a/swiftwinrt/Resources/CWinRT/robuffer.h b/swiftwinrt/Resources/CWinRT/robuffer.h new file mode 100644 index 00000000..ca62b071 --- /dev/null +++ b/swiftwinrt/Resources/CWinRT/robuffer.h @@ -0,0 +1,32 @@ +// The real robuffer.h doesn't provide C definitions, so we need to provide those here + +// No pragma once, we might include this twice (once for the regular definitions, once for the workaround) + +#include +#include +#include + +#ifndef _IBufferByteAccess_DEFINED +#define _IBufferByteAccess_DEFINED +typedef interface C_IBufferByteAccess C_IBufferByteAccess; +#endif /* _IBufferByteAccess_DEFINED */ + +typedef struct C_IBufferByteAccessVtbl +{ + BEGIN_INTERFACE + + HRESULT (STDMETHODCALLTYPE* QueryInterface)(__RPC__in C_IBufferByteAccess* This, + REFIID riid, + _COM_Outptr_ void** ppvObject); + ULONG (STDMETHODCALLTYPE* AddRef)(__RPC__in C_IBufferByteAccess* This); + ULONG (STDMETHODCALLTYPE* Release)(__RPC__in C_IBufferByteAccess* This); + HRESULT (STDMETHODCALLTYPE* Buffer)(__RPC__in C_IBufferByteAccess* This, + BYTE** value); + + END_INTERFACE +} C_IBufferByteAccessVtbl; + +interface C_IBufferByteAccess +{ + CONST_VTBL struct C_IBufferByteAccessVtbl* lpVtbl; +}; diff --git a/swiftwinrt/Resources/Support/IBufferByteAccess.swift b/swiftwinrt/Resources/Support/IBufferByteAccess.swift new file mode 100644 index 00000000..14cfb19d --- /dev/null +++ b/swiftwinrt/Resources/Support/IBufferByteAccess.swift @@ -0,0 +1,64 @@ +import C_BINDINGS_MODULE +import Foundation + +/// IBufferByteAccess provides direct access to the underlying bytes of an IBuffer. +/// This buffer is only valid for the lifetime of the IBuffer. For a read-only representation +/// of the buffer, access the bytes through the Data property of the IBuffer. +/// [Open Microsoft Documentation](https://learn.microsoft.com/en-us/windows/win32/api/robuffer/ns-robuffer-ibufferbyteaccess) +public protocol IBufferByteAccess: WinRTInterface { + var buffer: UnsafeMutablePointer? { get throws } +} + +public typealias AnyIBufferByteAccess = any IBufferByteAccess + +fileprivate let IID_IBufferByteAccess = IID(Data1: 0x905A0FEF, Data2: 0xBC53, Data3: 0x11DF, Data4: ( 0x8C, 0x49, 0x00, 0x1E, 0x4F, 0xC6, 0x86, 0xDA )) // 905a0fef-bc53-11df-8c49-001e4fc686da + +extension __ABI_ { + public class IBufferByteAccess: IUnknown { + override public class var IID: IID { IID_IBufferByteAccess} + + public func Buffer() throws -> UnsafeMutablePointer? { + var buffer: UnsafeMutablePointer? + try perform(as: C_BINDINGS_MODULE.C_IBufferByteAccess.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Buffer(pThis, &buffer)) + } + return buffer + } + } + + public typealias IBufferByteAccessWrapper = InterfaceWrapperBase +} + +public enum IBufferByteAccessBridge: AbiInterfaceBridge { + public static func makeAbi() -> CABI { + return CABI(lpVtbl: &IBufferByteAccessVTable) + } + + public static func from(abi: ComPtr?) -> SwiftProjection? { + // This code path is not actually reachable since IBufferByteAccess is not a WinRT interface. + // It is a COM interface which is implemented by any object which implements the IBuffer interface. + // And the IBufferImpl object will correctly have the implementation of this interface, so this isn't needed + assertionFailure("IBufferByteAccessBridge.from not implemented") + return nil + } + + public typealias CABI = C_BINDINGS_MODULE.C_IBufferByteAccess + public typealias SwiftABI = __ABI_.IBufferByteAccess + public typealias SwiftProjection = AnyIBufferByteAccess +} + +private var IBufferByteAccessVTable: C_BINDINGS_MODULE.C_IBufferByteAccessVtbl = .init( + QueryInterface: { __ABI_.IBufferByteAccessWrapper.queryInterface($0, $1, $2) }, + AddRef: { __ABI_.IBufferByteAccessWrapper.addRef($0) }, + Release: { __ABI_.IBufferByteAccessWrapper.release($0) }, + Buffer: { __ABI_.IBufferByteAccessWrapper.buffer($0, $1) } +) + +extension __ABI_.IBufferByteAccessWrapper { + fileprivate static func buffer(_ this: UnsafeMutablePointer?, _ buffer: UnsafeMutablePointer?>?) -> HRESULT { + guard let swiftObj = __ABI_.IBufferByteAccessWrapper.tryUnwrapFrom(raw: this) else { return E_INVALIDARG } + guard let buffer else { return E_INVALIDARG } + buffer.pointee = try? swiftObj.buffer + return S_OK + } +} \ No newline at end of file diff --git a/swiftwinrt/Resources/Support/IMemoryBufferByteAccess.swift b/swiftwinrt/Resources/Support/IMemoryBufferByteAccess.swift new file mode 100644 index 00000000..ab210c10 --- /dev/null +++ b/swiftwinrt/Resources/Support/IMemoryBufferByteAccess.swift @@ -0,0 +1,74 @@ +import C_BINDINGS_MODULE +import Foundation + +/// IMemoryBufferByteAccess provides direct access to the underlying bytes of an IMemoryBuffer. +/// This buffer is only valid for the lifetime of the buffer. For a read-only representation +/// of the buffer, access the bytes through the Data property of the IBuffer. +/// [Open Microsoft Documentation](https://learn.microsoft.com/en-us/previous-versions/mt297505(v=vs.85)) +public protocol IMemoryBufferByteAccess: WinRTInterface { + var buffer: UnsafeMutableBufferPointer? { get throws } +} + +public typealias AnyIMemoryBufferByteAccess = any IMemoryBufferByteAccess +fileprivate let IID_IMemoryBufferByteAccess = IID(Data1: 0x5B0D3235, Data2: 0x4DBA, Data3: 0x4D44, Data4: ( 0x86, 0x5E, 0x8F, 0x1D, 0x0E, 0x4F, 0xD0, 0x4D )) // 5b0d3235-4dba-4d44-865e-8f1d0e4fd04d + +extension __ABI_ { + public class IMemoryBufferByteAccess: IUnknown { + override public class var IID: IID { IID_IMemoryBufferByteAccess} + + public func Buffer() throws -> UnsafeMutableBufferPointer? { + var capacity: UInt32 = 0 + let ptr = try GetBuffer(&capacity) + return UnsafeMutableBufferPointer(start: ptr, count: Int(capacity)) + } + + fileprivate func GetBuffer(_ capacity: inout UInt32) throws -> UnsafeMutablePointer? { + var buffer: UnsafeMutablePointer? + try perform(as: C_BINDINGS_MODULE.IMemoryBufferByteAccess.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetBuffer(pThis, &buffer, &capacity)) + } + return buffer + } + } + + public typealias IMemoryBufferByteAccessWrapper = InterfaceWrapperBase +} + +public enum IMemoryBufferByteAccessBridge: AbiInterfaceBridge { + public static func makeAbi() -> CABI { + return CABI(lpVtbl: &IMemoryBufferByteAccessVTable) + } + + public static func from(abi: ComPtr?) -> SwiftProjection? { + // This code path is not actually reachable since IMemoryBufferByteAccess is not a WinRT interface. + // It is a COM interface which is implemented by any object which implements the IMemoryBufferReference interface. + // And the IMemoryBufferReferenceImpl object will correctly have the implementation of this interface, so this isn't needed + assertionFailure("IMemoryBufferByteAccessBridge.from not implemented") + return nil + } + + public typealias CABI = C_BINDINGS_MODULE.IMemoryBufferByteAccess + public typealias SwiftABI = __ABI_.IMemoryBufferByteAccess + public typealias SwiftProjection = AnyIMemoryBufferByteAccess +} + +fileprivate var IMemoryBufferByteAccessVTable: C_BINDINGS_MODULE.IMemoryBufferByteAccessVtbl = .init( + QueryInterface: { __ABI_.IMemoryBufferByteAccessWrapper.queryInterface($0, $1, $2) }, + AddRef: { __ABI_.IMemoryBufferByteAccessWrapper.addRef($0) }, + Release: { __ABI_.IMemoryBufferByteAccessWrapper.release($0) }, + GetBuffer: { __ABI_.IMemoryBufferByteAccessWrapper.getBuffer($0, $1, $2) } +) + +extension __ABI_.IMemoryBufferByteAccessWrapper { + fileprivate static func getBuffer(_ this: UnsafeMutablePointer?, _ buffer: UnsafeMutablePointer?>?, _ count: UnsafeMutablePointer?) -> HRESULT { + guard let swiftObj = __ABI_.IMemoryBufferByteAccessWrapper.tryUnwrapFrom(raw: this) else { return E_INVALIDARG } + guard let buffer, let count else { return E_INVALIDARG } + count.pointee = 0 + buffer.pointee = nil + + guard let swiftBuffer = try? swiftObj.buffer else { return E_FAIL } + count.pointee = UInt32(swiftBuffer.count) + buffer.pointee = swiftBuffer.baseAddress + return S_OK + } +} \ No newline at end of file diff --git a/swiftwinrt/abi_writer.h b/swiftwinrt/abi_writer.h index 7a8df6f0..8e20bb4e 100644 --- a/swiftwinrt/abi_writer.h +++ b/swiftwinrt/abi_writer.h @@ -313,7 +313,8 @@ namespace swiftwinrt #pragma clang diagnostic ignored "-Wmicrosoft-enum-forward-reference" #include "CppInteropWorkaround.h" // TODO(WIN-860): Remove workaround once C++ interop issues with WinSDK.GUID are fixed. - +#include "MemoryBuffer.h" // IMemoryBufferByteAccess (C definition) +#include "robuffer.h" // IBufferByteAccess (C definition) )"); for (auto& [ns, members] : namespaces) { diff --git a/swiftwinrt/code_writers.h b/swiftwinrt/code_writers.h index 22bc2474..ea0f2746 100644 --- a/swiftwinrt/code_writers.h +++ b/swiftwinrt/code_writers.h @@ -998,6 +998,18 @@ bind_bridge_fullname(type)); }; static std::string modifier_for(typedef_base const& type_definition, interface_info const& iface, member_type member_type = member_type::property_or_method); + static void write_bufferbyteaccess(writer& w, interface_info const& info, system_type const& type, typedef_base const& type_definition) + { + auto bufferType = type.swift_type_name() == "IBufferByteAccess" ? "UnsafeMutablePointer" : "UnsafeMutableBufferPointer"; + w.write(R"(%var buffer: %? { + get throws { + let bufferByteAccess: %.__ABI_.% = try %.QueryInterface() + return try bufferByteAccess.Buffer() + } +} +)", modifier_for(type_definition, info), bufferType, w.support, type.swift_type_name(), get_swift_name(info)); + } + static void write_interface_impl_members(writer& w, interface_info const& info, typedef_base const& type_definition) { w.add_depends(*info.type); @@ -1050,6 +1062,13 @@ bind_bridge_fullname(type)); write_class_impl_event(w, event, info, type_definition); } } + else if (auto systemType = dynamic_cast(info.type)) + { + if (systemType->swift_type_name() == "IBufferByteAccess" || systemType->swift_type_name() == "IMemoryBufferByteAccess") + { + write_bufferbyteaccess(w, info, *systemType, type_definition); + } + } else { assert(!"Unexpected interface type."); @@ -1370,6 +1389,27 @@ vtable); w.write(" }\n"); w.write(" }\n"); w.write("}\n"); + + if (type.swift_full_name() == "Windows.Storage.Streams.IBuffer") + { + w.write(R"(extension IBuffer { + public var data: Data { + guard let buffer = try? buffer else { return Data() } + return Data(bytesNoCopy: buffer, count: Int(length), deallocator: .none) + } +} +)"); + } + else if (type.swift_full_name() == "Windows.Foundation.IMemoryBufferReference") + { + w.write(R"(extension IMemoryBufferReference { + public var data: Data { + guard let buffer = try? buffer, let ptr = buffer.baseAddress else { return Data() } + return Data(bytesNoCopy: ptr, count: buffer.count, deallocator: .none) + } +} +)"); + } } // Declare a short form for the existential version of the type, e.g. AnyClosable for "any IClosable" w.write("public typealias Any% = any %\n\n", type, type); diff --git a/swiftwinrt/file_writers.h b/swiftwinrt/file_writers.h index 35f4ee33..74580d8a 100644 --- a/swiftwinrt/file_writers.h +++ b/swiftwinrt/file_writers.h @@ -132,6 +132,12 @@ namespace swiftwinrt auto restrictederrorinfo_h_template = find_resource(RESOURCE_TYPE_OTHER_FILE_STR, RESOURCE_NAME_CWINRT_RESTRICTEDERRORINFO_H_STR); fill_template_placeholders_to_file(restrictederrorinfo_h_template, dir_path / "include" / "RestrictedErrorInfo.h"); + auto robuffer_h_template = find_resource(RESOURCE_TYPE_OTHER_FILE_STR, RESOURCE_NAME_CWINRT_ROBUFFER_H_STR); + fill_template_placeholders_to_file(robuffer_h_template, dir_path / "include" / "robuffer.h"); + + auto memorybuffer_h_template = find_resource(RESOURCE_TYPE_OTHER_FILE_STR, RESOURCE_NAME_CWINRT_MEMORYBUFFER_H_STR); + fill_template_placeholders_to_file(memorybuffer_h_template, dir_path / "include" / "MemoryBuffer.h"); + if (settings.has_project_type(project_type::spm)) { auto package_template = find_resource(RESOURCE_TYPE_OTHER_FILE_STR, RESOURCE_NAME_CWINRT_PACKAGE_SWIFT_STR); diff --git a/swiftwinrt/metadata_cache.cpp b/swiftwinrt/metadata_cache.cpp index 11cfe11f..7ac62f9b 100644 --- a/swiftwinrt/metadata_cache.cpp +++ b/swiftwinrt/metadata_cache.cpp @@ -266,12 +266,25 @@ void metadata_cache::get_interfaces_impl(init_state& state, writer& w, get_inter process_contract_dependencies(*state.target, impl); get_interfaces_impl(state, w, result, info.defaulted, info.overridable, base, typeBase->type().InterfaceImpl()); + try_insert_buffer_byte_access(typeBase->type(), result, info.defaulted); } insert_or_assign(result, name, std::move(info)); } }; +void metadata_cache::try_insert_buffer_byte_access(winmd::reader::TypeDef const& type, get_interfaces_t& result, bool defaulted = false) +{ + if (type.TypeNamespace() == "Windows.Foundation" && type.TypeName() == "IMemoryBufferReference") + { + insert_or_assign(result, "IMemoryBufferByteAccess", { &system_type::from_name("IMemoryBufferByteAccess"), false, defaulted }); + } + else if (type.TypeNamespace() == "Windows.Storage.Streams" && type.TypeName() == "IBuffer") + { + insert_or_assign(result, "IBufferByteAccess", { &system_type::from_name("IBufferByteAccess"), false, defaulted }); + } +} + metadata_cache::get_interfaces_t metadata_cache::get_interfaces(init_state& state, TypeDef const& type) { get_interfaces_t result; @@ -285,6 +298,8 @@ metadata_cache::get_interfaces_t metadata_cache::get_interfaces(init_state& stat get_interfaces_impl(state,w, result, false, false, true, base.InterfaceImpl()); } + try_insert_buffer_byte_access(type, result); + if (!has_fastabi(type)) { return result; diff --git a/swiftwinrt/metadata_cache.h b/swiftwinrt/metadata_cache.h index 15ccdd07..a132591f 100644 --- a/swiftwinrt/metadata_cache.h +++ b/swiftwinrt/metadata_cache.h @@ -93,7 +93,7 @@ namespace swiftwinrt type_cache compile_namespaces(std::vector const& targetNamespaces, metadata_filter const& f); std::set get_dependent_namespaces(std::vector const& targetNamespaces, metadata_filter const& f); - + bool has_namespace(std::string_view typeNamespace) const { return m_typeTable.find(typeNamespace) != m_typeTable.end(); @@ -171,5 +171,7 @@ namespace swiftwinrt std::map get_attributed_types(winmd::reader::TypeDef const& type) const; std::map> m_typeTable; + + void try_insert_buffer_byte_access(winmd::reader::TypeDef const& type, get_interfaces_t& result, bool defaulted); }; } diff --git a/swiftwinrt/resources.h b/swiftwinrt/resources.h index d993aef5..8ab33819 100644 --- a/swiftwinrt/resources.h +++ b/swiftwinrt/resources.h @@ -28,6 +28,12 @@ #define RESOURCE_NAME_CWINRT_RESTRICTEDERRORINFO_H CWINRT_RESTRICTEDERRORINFO #define RESOURCE_NAME_CWINRT_RESTRICTEDERRORINFO_H_STR "CWINRT_RESTRICTEDERRORINFO" +#define RESOURCE_NAME_CWINRT_ROBUFFER_H CWINRT_ROBUFFER +#define RESOURCE_NAME_CWINRT_ROBUFFER_H_STR "CWINRT_ROBUFFER" + +#define RESOURCE_NAME_CWINRT_MEMORYBUFFER_H CWINRT_MEMORYBUFFER +#define RESOURCE_NAME_CWINRT_MEMORYBUFFER_H_STR "CWINRT_MEMORYBUFFER" + #ifndef RC_INVOKED #include diff --git a/swiftwinrt/resources.rc b/swiftwinrt/resources.rc index abd40e56..b00b7c79 100644 --- a/swiftwinrt/resources.rc +++ b/swiftwinrt/resources.rc @@ -12,9 +12,11 @@ Error RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\Error.swift" ErrorHandling RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\ErrorHandling.swift" GUID RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\GUID.swift" HString RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\HString.swift" +IBufferByteAccess RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IBufferByteAccess.swift" IInspectable RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IInspectable.swift" IInspectable+Swift RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IInspectable+Swift.swift" IMap+Swift RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IMap+Swift.swift" +IMemoryBufferByteAccess RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IMemoryBufferByteAccess.swift" IUnknown RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IUnknown.swift" IUnknown+Swift RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IUnknown+Swift.swift" IUnknownRef RESOURCE_TYPE_SWIFT_SUPPORT_FILE "Resources\\Support\\IUnknownRef.swift" @@ -41,3 +43,6 @@ RESOURCE_NAME_CWINRT_IVECTORCHANGEDEVENTARGS_H RESOURCE_TYPE_OTHER_FILE "Resourc RESOURCE_NAME_CWINRT_RESTRICTEDERRORINFO_H RESOURCE_TYPE_OTHER_FILE "Resources\\CWinRT\\RestrictedErrorInfo.h" RESOURCE_NAME_CWINRT_SHIM_C RESOURCE_TYPE_OTHER_FILE "Resources\\CWinRT\\shim.c" RESOURCE_NAME_CWINRT_PACKAGE_SWIFT RESOURCE_TYPE_OTHER_FILE "Resources\\CWinRT\\Package.swift" + +RESOURCE_NAME_CWINRT_ROBUFFER_H RESOURCE_TYPE_OTHER_FILE "Resources\\CWinRT\\robuffer.h" +RESOURCE_NAME_CWINRT_MEMORYBUFFER_H RESOURCE_TYPE_OTHER_FILE "Resources\\CWinRT\\MemoryBuffer.h" diff --git a/swiftwinrt/types.cpp b/swiftwinrt/types.cpp index 92f41b39..05b09ab2 100644 --- a/swiftwinrt/types.cpp +++ b/swiftwinrt/types.cpp @@ -693,6 +693,16 @@ namespace swiftwinrt static system_type const guid_type{ "Foundation"sv, "UUID"sv, "Foundation.UUID"sv, "GUID"sv, "g16"sv, param_category::guid_type }; return guid_type; } + else if (typeName == "IBufferByteAccess") + { + static system_type const ibufferbyteaccess_type{ ""sv, typeName, typeName, "C_IBufferByteAccess"sv, "{905a0fef-bc53-11df-8c49-001e4fc686da}"sv, param_category::object_type }; + return ibufferbyteaccess_type; + } + else if (typeName == "IMemoryBufferByteAccess") + { + static system_type const imemorybufferbyte_type{ ""sv, typeName, typeName, "IMemoryBufferByteAccess"sv, "{5b0d3235-4dba-4d44-865e-8f1d0e4fd04d}"sv, param_category::object_type }; + return imemorybufferbyte_type; + } XLANG_ASSERT(false); swiftwinrt::throw_invalid("Unknown type '", typeName, "' in System namespace"); diff --git a/tests/test_app/BufferTests.swift b/tests/test_app/BufferTests.swift new file mode 100644 index 00000000..e6ab9b30 --- /dev/null +++ b/tests/test_app/BufferTests.swift @@ -0,0 +1,80 @@ + +import Foundation +import XCTest +import test_component + +extension URL { + func asFSR() -> String { + assert(isFileURL, "URL must be a file URL") + return withUnsafeFileSystemRepresentation { String(cString: $0!) } + } +} + +class CustomBuffer: IBuffer { + public var length: UInt32 = 0 { + willSet { + if newValue > capacity { + fatalError("Buffer length cannot be greater than capacity") + } + } + } + + public var capacity: UInt32 { + return UInt32(_buffer.count) + } + public let _buffer: UnsafeMutableBufferPointer + + public init(_ capacity: Int) { + self._buffer = UnsafeMutableBufferPointer.allocate(capacity: capacity) + } + + public var buffer: UnsafeMutablePointer? { + return _buffer.baseAddress + } + + deinit { + _buffer.deallocate() + } +} + +class BufferTests : XCTestCase { + public func testWinRTBuffer() throws { + let buffer = Buffer(10) + XCTAssertEqual(buffer.data.count, 0) + XCTAssertEqual(buffer.capacity, 10) + buffer.length = 10 + XCTAssertEqual(buffer.capacity, 10) + XCTAssertEqual(buffer.data.count, 10) + for (i, byte) in buffer.data.enumerated() { + XCTAssertEqual(byte, BufferTester.getDataFrom(buffer, UInt32(i))) + } + } + + public func testSwiftBuffer() async throws { + // Picking an arbitrary file and comparing a custom swift implementation of IBuffer + // to the built-in WinRT one + let path = Bundle.main.bundleURL.appendingPathComponent("test_app.exe.manifest").asFSR() + let file = try await StorageFile.getFileFromPathAsync(path).get() + let stream = try await file!.openAsync(.read).get() + + let swiftBuffer = CustomBuffer(500) + let winrtBuffer = Buffer(500) + _ = try await stream!.readAsync(swiftBuffer, 500, .none).get() + try stream!.seek(0) // seek back to beginning so we read the same data again + _ = try await stream!.readAsync(winrtBuffer, 500, .none).get() + + XCTAssertEqual(swiftBuffer.length, winrtBuffer.length) + XCTAssertEqual(swiftBuffer.data, winrtBuffer.data) + + for (i, byte) in swiftBuffer.data.enumerated() { + XCTAssertEqual(byte, BufferTester.getDataFrom(swiftBuffer, UInt32(i))) + } + } +} + +var bufferTests: [XCTestCaseEntry] = [ + testCase([ + ("testWinRTBuffer", BufferTests.testWinRTBuffer), + ("testSwiftBuffer", asyncTest(BufferTests.testSwiftBuffer)), + ]) +] diff --git a/tests/test_app/main.swift b/tests/test_app/main.swift index 217c3a67..d68c5128 100644 --- a/tests/test_app/main.swift +++ b/tests/test_app/main.swift @@ -460,7 +460,7 @@ var tests: [XCTestCaseEntry] = [ ("testUnicode", SwiftWinRTTests.testUnicode), ("testErrorInfo", SwiftWinRTTests.testErrorInfo), ]) -] + valueBoxingTests + eventTests + collectionTests + aggregationTests + asyncTests + memoryManagementTests +] + valueBoxingTests + eventTests + collectionTests + aggregationTests + asyncTests + memoryManagementTests + bufferTests RoInitialize(RO_INIT_MULTITHREADED) XCTMain(tests) diff --git a/tests/test_app/test_app.exe.manifest b/tests/test_app/test_app.exe.manifest index e55cb709..a48b90b6 100644 --- a/tests/test_app/test_app.exe.manifest +++ b/tests/test_app/test_app.exe.manifest @@ -62,5 +62,9 @@ name="test_component.AsyncMethods" threadingModel="both" xmlns="urn:schemas-microsoft-com:winrt.v1" /> + \ No newline at end of file diff --git a/tests/test_component/CMakeLists.txt b/tests/test_component/CMakeLists.txt index 88c33f91..bf0af923 100644 --- a/tests/test_component/CMakeLists.txt +++ b/tests/test_component/CMakeLists.txt @@ -8,6 +8,10 @@ set(SWIFT_WINRT_PARAMETERS "-ns-prefix" "-include test_component" "-include Windows.Foundation.Collections" +"-include Windows.Foundation.IMemoryBufferReference" +"-include Windows.Storage.Streams.Buffer" +"-include Windows.Storage.StorageFile" +"-include Windows.Storage.PathIO" "-input ${WINMD_FILE}" "-support test_component" "-test" diff --git a/tests/test_component/Sources/CWinRT/include/Ctest_component.h b/tests/test_component/Sources/CWinRT/include/Ctest_component.h index 6a44ca63..1faa06e1 100644 --- a/tests/test_component/Sources/CWinRT/include/Ctest_component.h +++ b/tests/test_component/Sources/CWinRT/include/Ctest_component.h @@ -23,7 +23,8 @@ #pragma clang diagnostic ignored "-Wmicrosoft-enum-forward-reference" #include "CppInteropWorkaround.h" // TODO(WIN-860): Remove workaround once C++ interop issues with WinSDK.GUID are fixed. - +#include "MemoryBuffer.h" // IMemoryBufferByteAccess (C definition) +#include "robuffer.h" // IBufferByteAccess (C definition) #include "Windows.AI.MachineLearning.h" #include "Windows.AI.MachineLearning.Preview.h" #include "Windows.ApplicationModel.h" diff --git a/tests/test_component/Sources/CWinRT/include/test_component.h b/tests/test_component/Sources/CWinRT/include/test_component.h index e7179a89..c146159f 100644 --- a/tests/test_component/Sources/CWinRT/include/test_component.h +++ b/tests/test_component/Sources/CWinRT/include/test_component.h @@ -6,6 +6,7 @@ #include #include #include "Windows.Foundation.h" +#include "Windows.Storage.Streams.h" #include "test_component.Delegates.h" // Importing Collections header #include "Windows.Foundation.Collections.h" @@ -95,6 +96,12 @@ typedef interface __x_ABI_Ctest__component_CIVoidToVoidDelegate __x_ABI_Ctest__c #endif // ____x_ABI_Ctest__component_CIBasic_FWD_DEFINED__ +#ifndef ____x_ABI_Ctest__component_CIBufferTesterStatics_FWD_DEFINED__ +#define ____x_ABI_Ctest__component_CIBufferTesterStatics_FWD_DEFINED__ + typedef interface __x_ABI_Ctest__component_CIBufferTesterStatics __x_ABI_Ctest__component_CIBufferTesterStatics; + +#endif // ____x_ABI_Ctest__component_CIBufferTesterStatics_FWD_DEFINED__ + #ifndef ____x_ABI_Ctest__component_CIClass_FWD_DEFINED__ #define ____x_ABI_Ctest__component_CIClass_FWD_DEFINED__ typedef interface __x_ABI_Ctest__component_CIClass __x_ABI_Ctest__component_CIClass; @@ -2372,6 +2379,12 @@ typedef struct __x_ABI_CWindows_CFoundation_CDateTime __x_ABI_CWindows_CFoundati #endif // ____x_ABI_CWindows_CFoundation_CIStringable_FWD_DEFINED__ +#ifndef ____x_ABI_CWindows_CStorage_CStreams_CIBuffer_FWD_DEFINED__ +#define ____x_ABI_CWindows_CStorage_CStreams_CIBuffer_FWD_DEFINED__ + typedef interface __x_ABI_CWindows_CStorage_CStreams_CIBuffer __x_ABI_CWindows_CStorage_CStreams_CIBuffer; + +#endif // ____x_ABI_CWindows_CStorage_CStreams_CIBuffer_FWD_DEFINED__ + #ifndef ____x_ABI_Ctest__component_CDelegates_CIInDelegate_FWD_DEFINED__ #define ____x_ABI_Ctest__component_CDelegates_CIInDelegate_FWD_DEFINED__ typedef interface __x_ABI_Ctest__component_CDelegates_CIInDelegate __x_ABI_Ctest__component_CDelegates_CIInDelegate; @@ -2981,6 +2994,41 @@ struct __x_ABI_Ctest__component_CStructWithIReference EXTERN_C const IID IID___x_ABI_Ctest__component_CIBasic; #endif /* !defined(____x_ABI_Ctest__component_CIBasic_INTERFACE_DEFINED__) */ +#if !defined(____x_ABI_Ctest__component_CIBufferTesterStatics_INTERFACE_DEFINED__) + #define ____x_ABI_Ctest__component_CIBufferTesterStatics_INTERFACE_DEFINED__ + typedef struct __x_ABI_Ctest__component_CIBufferTesterStaticsVtbl + { + BEGIN_INTERFACE + + HRESULT (STDMETHODCALLTYPE* QueryInterface)(__x_ABI_Ctest__component_CIBufferTesterStatics* This, + REFIID riid, + void** ppvObject); + ULONG (STDMETHODCALLTYPE* AddRef)(__x_ABI_Ctest__component_CIBufferTesterStatics* This); + ULONG (STDMETHODCALLTYPE* Release)(__x_ABI_Ctest__component_CIBufferTesterStatics* This); + HRESULT (STDMETHODCALLTYPE* GetIids)(__x_ABI_Ctest__component_CIBufferTesterStatics* This, + ULONG* iidCount, + IID** iids); + HRESULT (STDMETHODCALLTYPE* GetRuntimeClassName)(__x_ABI_Ctest__component_CIBufferTesterStatics* This, + HSTRING* className); + HRESULT (STDMETHODCALLTYPE* GetTrustLevel)(__x_ABI_Ctest__component_CIBufferTesterStatics* This, + TrustLevel* trustLevel); + HRESULT (STDMETHODCALLTYPE* GetDataFrom)(__x_ABI_Ctest__component_CIBufferTesterStatics* This, + __x_ABI_CWindows_CStorage_CStreams_CIBuffer* buffer, + UINT32 index, + BYTE* result); + + END_INTERFACE + } __x_ABI_Ctest__component_CIBufferTesterStaticsVtbl; + + interface __x_ABI_Ctest__component_CIBufferTesterStatics + { + CONST_VTBL struct __x_ABI_Ctest__component_CIBufferTesterStaticsVtbl* lpVtbl; + }; + + + EXTERN_C const IID IID___x_ABI_Ctest__component_CIBufferTesterStatics; +#endif /* !defined(____x_ABI_Ctest__component_CIBufferTesterStatics_INTERFACE_DEFINED__) */ + #if !defined(____x_ABI_Ctest__component_CIClass_INTERFACE_DEFINED__) #define ____x_ABI_Ctest__component_CIClass_INTERFACE_DEFINED__ typedef struct __x_ABI_Ctest__component_CIClassVtbl diff --git a/tests/test_component/Sources/test_component/Windows.Data.Text+ABI.swift b/tests/test_component/Sources/test_component/Windows.Data.Text+ABI.swift new file mode 100644 index 00000000..fbdd16d7 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Data.Text+ABI.swift @@ -0,0 +1,13 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +public enum __ABI_Windows_Data_Text { +} +extension __x_ABI_CWindows_CData_CText_CTextSegment { + public static func from(swift: test_component.TextSegment) -> __x_ABI_CWindows_CData_CText_CTextSegment { + .init(StartPosition: swift.startPosition, Length: swift.length) + } + } + \ No newline at end of file diff --git a/tests/test_component/Sources/test_component/Windows.Data.Text+Impl.swift b/tests/test_component/Sources/test_component/Windows.Data.Text+Impl.swift new file mode 100644 index 00000000..6accd7f5 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Data.Text+Impl.swift @@ -0,0 +1,7 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +public enum __IMPL_Windows_Data_Text { +} diff --git a/tests/test_component/Sources/test_component/Windows.Data.Text.swift b/tests/test_component/Sources/test_component/Windows.Data.Text.swift new file mode 100644 index 00000000..a46cde34 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Data.Text.swift @@ -0,0 +1,21 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.data.text.textsegment) +public struct TextSegment: Hashable, Codable { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.data.text.textsegment.startposition) + public var startPosition: UInt32 = 0 + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.data.text.textsegment.length) + public var length: UInt32 = 0 + public init() {} + public init(startPosition: UInt32, length: UInt32) { + self.startPosition = startPosition + self.length = length + } + public static func from(abi: __x_ABI_CWindows_CData_CText_CTextSegment) -> TextSegment { + .init(startPosition: abi.StartPosition, length: abi.Length) + } +} + diff --git a/tests/test_component/Sources/test_component/Windows.Foundation+ABI.swift b/tests/test_component/Sources/test_component/Windows.Foundation+ABI.swift index 374c0735..ae6f90d9 100644 --- a/tests/test_component/Sources/test_component/Windows.Foundation+ABI.swift +++ b/tests/test_component/Sources/test_component/Windows.Foundation+ABI.swift @@ -31,6 +31,18 @@ private var IID___x_ABI_CWindows_CFoundation_CIDeferralFactory: test_component.I .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_CIMemoryBuffer: test_component.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: test_component.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: test_component.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: test_component.IID { .init(Data1: 0x4BD682DD, Data2: 0x7554, Data3: 0x40E9, Data4: ( 0x9A,0x9B,0x82,0x65,0x4E,0xDE,0x7E,0x62 ))// 4BD682DD-7554-40E9-9A9B-82654EDE7E62 } @@ -43,6 +55,34 @@ private var IID___x_ABI_CWindows_CFoundation_CIStringable: test_component.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: test_component.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: test_component.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: test_component.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: test_component.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: test_component.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: test_component.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: test_component.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: test_component.IID { .init(Data1: 0xA4ED5C81, Data2: 0x76C9, Data3: 0x40BD, Data4: ( 0x8B,0xE6,0xB1,0xD9,0x0F,0xB2,0x0A,0xE7 ))// A4ED5C81-76C9-40BD-8BE6-B1D90FB20AE7 } @@ -338,6 +378,158 @@ public enum __ABI_Windows_Foundation { } + public class IMemoryBuffer: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CFoundation_CIMemoryBuffer } + + open func CreateReferenceImpl() throws -> test_component.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.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.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: test_component.IInspectable { + override public class var IID: test_component.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: test_component.IInspectable { + override public class var IID: test_component.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?) throws -> EventRegistrationToken { + var cookie: EventRegistrationToken = .init() + let handlerWrapper = test_component.__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.size + let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.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 = test_component.__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: test_component.IInspectable { override public class var IID: test_component.IID { IID___x_ABI_CWindows_CFoundation_CIPropertyValue } @@ -799,6 +991,314 @@ public enum __ABI_Windows_Foundation { ) public typealias IStringableWrapper = InterfaceWrapperBase<__IMPL_Windows_Foundation.IStringableBridge> + public class IUriEscapeStatics: test_component.IInspectable { + override public class var IID: test_component.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: test_component.IInspectable { + override public class var IID: test_component.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 -> test_component.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: test_component.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 -> test_component.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: test_component.IInspectable { + override public class var IID: test_component.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: test_component.IInspectable { + override public class var IID: test_component.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: test_component.IInspectable { + override public class var IID: test_component.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.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.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: test_component.IInspectable { + override public class var IID: test_component.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: test_component.IInspectable { + override public class var IID: test_component.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: test_component.DateTime) -> __x_ABI_CWindows_CFoundation_CDateTime { diff --git a/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift b/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift index 4ea92168..0f23d375 100644 --- a/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift +++ b/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift @@ -146,6 +146,98 @@ public enum __IMPL_Windows_Foundation { } + public enum IMemoryBufferBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CFoundation_CIMemoryBuffer + public typealias SwiftABI = __ABI_Windows_Foundation.IMemoryBuffer + public typealias SwiftProjection = AnyIMemoryBuffer + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IMemoryBufferImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Foundation.IMemoryBufferVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IMemoryBufferImpl: IMemoryBuffer, WinRTAbiImpl { + fileprivate typealias Bridge = IMemoryBufferBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybuffer.createreference) + fileprivate func createReference() throws -> AnyIMemoryBufferReference! { + try _default.CreateReferenceImpl() + } + + private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybuffer.close) + fileprivate func close() throws { + try _IClosable.CloseImpl() + } + + } + + public enum IMemoryBufferReferenceBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CFoundation_CIMemoryBufferReference + public typealias SwiftABI = __ABI_Windows_Foundation.IMemoryBufferReference + public typealias SwiftProjection = AnyIMemoryBufferReference + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IMemoryBufferReferenceImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Foundation.IMemoryBufferReferenceVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IMemoryBufferReferenceImpl: IMemoryBufferReference, WinRTAbiImpl { + fileprivate typealias Bridge = IMemoryBufferReferenceBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybufferreference.capacity) + fileprivate var capacity : UInt32 { + get { try! _default.get_CapacityImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybufferreference.closed) + fileprivate lazy var closed : Event> = { + .init( + add: { [weak self] in + guard let this = self?._default else { return .init() } + return try! this.add_ClosedImpl($0) + }, + remove: { [weak self] in + try? self?._default.remove_ClosedImpl($0) + } + ) + }() + + private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybufferreference.close) + fileprivate func close() throws { + try _IClosable.CloseImpl() + } + + private lazy var _IMemoryBufferByteAccess: __ABI_.IMemoryBufferByteAccess! = getInterfaceForCaching() + fileprivate var buffer: UnsafeMutableBufferPointer? { + get throws { + let bufferByteAccess: test_component.__ABI_.IMemoryBufferByteAccess = try _IMemoryBufferByteAccess.QueryInterface() + return try bufferByteAccess.Buffer() + } + } + } + public enum IPropertyValueBridge : AbiInterfaceBridge { public typealias CABI = __x_ABI_CWindows_CFoundation_CIPropertyValue public typealias SwiftABI = __ABI_Windows_Foundation.IPropertyValue @@ -269,6 +361,41 @@ public enum __IMPL_Windows_Foundation { } + public enum IWwwFormUrlDecoderEntryBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderEntry + public typealias SwiftABI = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntry + public typealias SwiftProjection = AnyIWwwFormUrlDecoderEntry + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IWwwFormUrlDecoderEntryImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Foundation.IWwwFormUrlDecoderEntryVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IWwwFormUrlDecoderEntryImpl: IWwwFormUrlDecoderEntry, WinRTAbiImpl { + fileprivate typealias Bridge = IWwwFormUrlDecoderEntryBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iwwwformurldecoderentry.name) + fileprivate var name : String { + get { try! _default.get_NameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iwwwformurldecoderentry.value) + fileprivate var value : String { + get { try! _default.get_ValueImpl() } + } + + } + public class AsyncActionCompletedHandlerBridge : WinRTDelegateBridge { public typealias Handler = AsyncActionCompletedHandler public typealias CABI = __x_ABI_CWindows_CFoundation_CIAsyncActionCompletedHandler diff --git a/tests/test_component/Sources/test_component/Windows.Foundation.swift b/tests/test_component/Sources/test_component/Windows.Foundation.swift index d25ada98..bdc7329f 100644 --- a/tests/test_component/Sources/test_component/Windows.Foundation.swift +++ b/tests/test_component/Sources/test_component/Windows.Foundation.swift @@ -56,6 +56,300 @@ public final class Deferral : WinRTClass, IClosable { } } +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.memorybuffer) +public final class MemoryBuffer : WinRTClass, IClosable, IMemoryBuffer { + private typealias SwiftABI = __ABI_Windows_Foundation.IMemoryBuffer + private typealias CABI = __x_ABI_CWindows_CFoundation_CIMemoryBuffer + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CFoundation_CIMemoryBuffer>?) -> MemoryBuffer? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private static let _IMemoryBufferFactory: __ABI_Windows_Foundation.IMemoryBufferFactory = try! RoGetActivationFactory(HString("Windows.Foundation.MemoryBuffer")) + public init(_ capacity: UInt32) { + super.init(try! Self._IMemoryBufferFactory.CreateImpl(capacity)) + } + + private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.memorybuffer.close) + public func close() throws { + try _IClosable.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.memorybuffer.createreference) + public func createReference() throws -> AnyIMemoryBufferReference! { + try _default.CreateReferenceImpl() + } + + deinit { + _IClosable = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri) +public final class Uri : WinRTClass, IStringable { + private typealias SwiftABI = __ABI_Windows_Foundation.IUriRuntimeClass + private typealias CABI = __x_ABI_CWindows_CFoundation_CIUriRuntimeClass + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CFoundation_CIUriRuntimeClass>?) -> Uri? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private static let _IUriEscapeStatics: __ABI_Windows_Foundation.IUriEscapeStatics = try! RoGetActivationFactory(HString("Windows.Foundation.Uri")) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.unescapecomponent) + public static func unescapeComponent(_ toUnescape: String) -> String { + return try! _IUriEscapeStatics.UnescapeComponentImpl(toUnescape) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.escapecomponent) + public static func escapeComponent(_ toEscape: String) -> String { + return try! _IUriEscapeStatics.EscapeComponentImpl(toEscape) + } + + private static let _IUriRuntimeClassFactory: __ABI_Windows_Foundation.IUriRuntimeClassFactory = try! RoGetActivationFactory(HString("Windows.Foundation.Uri")) + public init(_ uri: String) { + super.init(try! Self._IUriRuntimeClassFactory.CreateUriImpl(uri)) + } + + public init(_ baseUri: String, _ relativeUri: String) { + super.init(try! Self._IUriRuntimeClassFactory.CreateWithRelativeUriImpl(baseUri, relativeUri)) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.equals) + public func equals(_ pUri: Uri!) throws -> Bool { + try _default.EqualsImpl(pUri) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.combineuri) + public func combineUri(_ relativeUri: String) throws -> Uri! { + try _default.CombineUriImpl(relativeUri) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.absoluteuri) + public var absoluteUri : String { + get { try! _default.get_AbsoluteUriImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.displayuri) + public var displayUri : String { + get { try! _default.get_DisplayUriImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.domain) + public var domain : String { + get { try! _default.get_DomainImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.extension) + public var `extension` : String { + get { try! _default.get_ExtensionImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.fragment) + public var fragment : String { + get { try! _default.get_FragmentImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.host) + public var host : String { + get { try! _default.get_HostImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.password) + public var password : String { + get { try! _default.get_PasswordImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.path) + public var path : String { + get { try! _default.get_PathImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.port) + public var port : Int32 { + get { try! _default.get_PortImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.query) + public var query : String { + get { try! _default.get_QueryImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.queryparsed) + public var queryParsed : WwwFormUrlDecoder! { + get { try! _default.get_QueryParsedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.rawuri) + public var rawUri : String { + get { try! _default.get_RawUriImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.schemename) + public var schemeName : String { + get { try! _default.get_SchemeNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.suspicious) + public var suspicious : Bool { + get { try! _default.get_SuspiciousImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.username) + public var userName : String { + get { try! _default.get_UserNameImpl() } + } + + private lazy var _IUriRuntimeClassWithAbsoluteCanonicalUri: __ABI_Windows_Foundation.IUriRuntimeClassWithAbsoluteCanonicalUri! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.absolutecanonicaluri) + public var absoluteCanonicalUri : String { + get { try! _IUriRuntimeClassWithAbsoluteCanonicalUri.get_AbsoluteCanonicalUriImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.displayiri) + public var displayIri : String { + get { try! _IUriRuntimeClassWithAbsoluteCanonicalUri.get_DisplayIriImpl() } + } + + private lazy var _IStringable: __ABI_Windows_Foundation.IStringable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.uri.tostring) + public func toString() throws -> String { + try _IStringable.ToStringImpl() + } + + deinit { + _default = nil + _IUriRuntimeClassWithAbsoluteCanonicalUri = nil + _IStringable = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.wwwformurldecoder) +public final class WwwFormUrlDecoder : WinRTClass, IIterable, IVectorView { + public typealias T = AnyIWwwFormUrlDecoderEntry? + private typealias SwiftABI = __ABI_Windows_Foundation.IWwwFormUrlDecoderRuntimeClass + private typealias CABI = __x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClass + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CFoundation_CIWwwFormUrlDecoderRuntimeClass>?) -> WwwFormUrlDecoder? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private static let _IWwwFormUrlDecoderRuntimeClassFactory: __ABI_Windows_Foundation.IWwwFormUrlDecoderRuntimeClassFactory = try! RoGetActivationFactory(HString("Windows.Foundation.WwwFormUrlDecoder")) + public init(_ query: String) { + super.init(try! Self._IWwwFormUrlDecoderRuntimeClassFactory.CreateWwwFormUrlDecoderImpl(query)) + } + + private lazy var _IIterable: IIterableIWwwFormUrlDecoderEntry! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.wwwformurldecoder.first) + public func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + // 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 + private lazy var _IVectorView: IVectorViewIWwwFormUrlDecoderEntry! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.wwwformurldecoder.getat) + public func getAt(_ index: UInt32) -> AnyIWwwFormUrlDecoderEntry? { + try! _IVectorView.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.wwwformurldecoder.indexof) + public func indexOf(_ value: AnyIWwwFormUrlDecoderEntry?, _ index: inout UInt32) -> Bool { + try! _IVectorView.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.wwwformurldecoder.size) + public var size : UInt32 { + get { try! _IVectorView.get_SizeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.wwwformurldecoder.getfirstvaluebyname) + public func getFirstValueByName(_ name: String) throws -> String { + try _default.GetFirstValueByNameImpl(name) + } + + deinit { + _IIterable = nil + _IVectorView = nil + _default = nil + } +} + public typealias AsyncActionCompletedHandler = (AnyIAsyncAction?, AsyncStatus) -> () public typealias AsyncOperationCompletedHandler = (AnyIAsyncOperation?, AsyncStatus) -> () public typealias AsyncOperationProgressHandler = (AnyIAsyncOperationWithProgress?, TProgress) -> () @@ -274,6 +568,59 @@ extension IClosable { } public typealias AnyIClosable = any IClosable +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybuffer) +public protocol IMemoryBuffer : IClosable { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybuffer.createreference) + func createReference() throws -> test_component.AnyIMemoryBufferReference! +} + +extension IMemoryBuffer { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Foundation.IMemoryBufferWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IMemoryBufferWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Foundation.IClosableWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIMemoryBuffer = any IMemoryBuffer + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybufferreference) +public protocol IMemoryBufferReference : IClosable, IMemoryBufferByteAccess { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybufferreference.capacity) + var capacity: UInt32 { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.imemorybufferreference.closed) + var closed: Event> { get } +} + +extension IMemoryBufferReference { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Foundation.IClosableWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_.IMemoryBufferByteAccessWrapper.IID: + let wrapper = __ABI_.IMemoryBufferByteAccessWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +extension IMemoryBufferReference { + public var data: Data { + guard let buffer = try? buffer, let ptr = buffer.baseAddress else { return Data() } + return Data(bytesNoCopy: ptr, count: buffer.count, deallocator: .none) + } +} +public typealias AnyIMemoryBufferReference = any IMemoryBufferReference + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.ipropertyvalue) public protocol IPropertyValue : WinRTInterface { /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.ipropertyvalue.getuint8) @@ -347,6 +694,26 @@ extension IStringable { } public typealias AnyIStringable = any IStringable +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iwwwformurldecoderentry) +public protocol IWwwFormUrlDecoderEntry : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iwwwformurldecoderentry.name) + var name: String { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iwwwformurldecoderentry.value) + var value: String { get } +} + +extension IWwwFormUrlDecoderEntry { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIWwwFormUrlDecoderEntry = any IWwwFormUrlDecoderEntry + extension test_component.AsyncStatus { public static var canceled : test_component.AsyncStatus { __x_ABI_CWindows_CFoundation_CAsyncStatus_Canceled diff --git a/tests/test_component/Sources/test_component/Windows.Storage+ABI.swift b/tests/test_component/Sources/test_component/Windows.Storage+ABI.swift new file mode 100644 index 00000000..dc536235 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage+ABI.swift @@ -0,0 +1,1915 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +private var IID___x_ABI_CWindows_CStorage_CIPathIOStatics: test_component.IID { + .init(Data1: 0x0F2F3758, Data2: 0x8EC7, Data3: 0x4381, Data4: ( 0x92,0x2B,0x8F,0x6C,0x07,0xD2,0x88,0xF3 ))// 0F2F3758-8EC7-4381-922B-8F6C07D288F3 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFile: test_component.IID { + .init(Data1: 0xFA3F6186, Data2: 0x4214, Data3: 0x428C, Data4: ( 0xA6,0x4C,0x14,0xC9,0xAC,0x73,0x15,0xEA ))// FA3F6186-4214-428C-A64C-14C9AC7315EA +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFile2: test_component.IID { + .init(Data1: 0x954E4BCF, Data2: 0x0A77, Data3: 0x42FB, Data4: ( 0xB7,0x77,0xC2,0xED,0x58,0xA5,0x2E,0x44 ))// 954E4BCF-0A77-42FB-B777-C2ED58A52E44 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFilePropertiesWithAvailability: test_component.IID { + .init(Data1: 0xAFCBBE9B, Data2: 0x582B, Data3: 0x4133, Data4: ( 0x96,0x48,0xE4,0x4C,0xA4,0x6E,0xE4,0x91 ))// AFCBBE9B-582B-4133-9648-E44CA46EE491 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFileStatics: test_component.IID { + .init(Data1: 0x5984C710, Data2: 0xDAF2, Data3: 0x43C8, Data4: ( 0x8B,0xB4,0xA4,0xD3,0xEA,0xCF,0xD0,0x3F ))// 5984C710-DAF2-43C8-8BB4-A4D3EACFD03F +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFolder: test_component.IID { + .init(Data1: 0x72D1CB78, Data2: 0xB3EF, Data3: 0x4F75, Data4: ( 0xA8,0x0B,0x6F,0xD9,0xDA,0xE2,0x94,0x4B ))// 72D1CB78-B3EF-4F75-A80B-6FD9DAE2944B +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFolder2: test_component.IID { + .init(Data1: 0xE827E8B9, Data2: 0x08D9, Data3: 0x4A8E, Data4: ( 0xA0,0xAC,0xFE,0x5E,0xD3,0xCB,0xBB,0xD3 ))// E827E8B9-08D9-4A8E-A0AC-FE5ED3CBBBD3 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFolder3: test_component.IID { + .init(Data1: 0x9F617899, Data2: 0xBDE1, Data3: 0x4124, Data4: ( 0xAE,0xB3,0xB0,0x6A,0xD9,0x6F,0x98,0xD4 ))// 9F617899-BDE1-4124-AEB3-B06AD96F98D4 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageFolderStatics: test_component.IID { + .init(Data1: 0x08F327FF, Data2: 0x85D5, Data3: 0x48B9, Data4: ( 0xAE,0xE9,0x28,0x51,0x1E,0x33,0x9F,0x9F ))// 08F327FF-85D5-48B9-AEE9-28511E339F9F +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageItem: test_component.IID { + .init(Data1: 0x4207A996, Data2: 0xCA2F, Data3: 0x42F7, Data4: ( 0xBD,0xE8,0x8B,0x10,0x45,0x7A,0x7F,0x30 ))// 4207A996-CA2F-42F7-BDE8-8B10457A7F30 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageItem2: test_component.IID { + .init(Data1: 0x53F926D2, Data2: 0x083C, Data3: 0x4283, Data4: ( 0xB4,0x5B,0x81,0xC0,0x07,0x23,0x7E,0x44 ))// 53F926D2-083C-4283-B45B-81C007237E44 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageItemProperties: test_component.IID { + .init(Data1: 0x86664478, Data2: 0x8029, Data3: 0x46FE, Data4: ( 0xA7,0x89,0x1C,0x2F,0x3E,0x2F,0xFB,0x5C ))// 86664478-8029-46FE-A789-1C2F3E2FFB5C +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageItemProperties2: test_component.IID { + .init(Data1: 0x8E86A951, Data2: 0x04B9, Data3: 0x4BD2, Data4: ( 0x92,0x9D,0xFE,0xF3,0xF7,0x16,0x21,0xD0 ))// 8E86A951-04B9-4BD2-929D-FEF3F71621D0 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageItemPropertiesWithProvider: test_component.IID { + .init(Data1: 0x861BF39B, Data2: 0x6368, Data3: 0x4DEE, Data4: ( 0xB4,0x0E,0x74,0x68,0x4A,0x5C,0xE7,0x14 ))// 861BF39B-6368-4DEE-B40E-74684A5CE714 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageLibraryChange: test_component.IID { + .init(Data1: 0x00980B23, Data2: 0x2BE2, Data3: 0x4909, Data4: ( 0xAA,0x48,0x15,0x9F,0x52,0x03,0xA5,0x1E ))// 00980B23-2BE2-4909-AA48-159F5203A51E +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageLibraryChangeReader: test_component.IID { + .init(Data1: 0xF205BC83, Data2: 0xFCA2, Data3: 0x41F9, Data4: ( 0x89,0x54,0xEE,0x2E,0x99,0x1E,0xB9,0x6F ))// F205BC83-FCA2-41F9-8954-EE2E991EB96F +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageLibraryChangeTracker: test_component.IID { + .init(Data1: 0x9E157316, Data2: 0x6073, Data3: 0x44F6, Data4: ( 0x96,0x81,0x74,0x92,0xD1,0x28,0x6C,0x90 ))// 9E157316-6073-44F6-9681-7492D1286C90 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageProvider: test_component.IID { + .init(Data1: 0xE705EED4, Data2: 0xD478, Data3: 0x47D6, Data4: ( 0xBA,0x46,0x1A,0x8E,0xBE,0x11,0x4A,0x20 ))// E705EED4-D478-47D6-BA46-1A8EBE114A20 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageProvider2: test_component.IID { + .init(Data1: 0x010D1917, Data2: 0x3404, Data3: 0x414B, Data4: ( 0x9F,0xD7,0xCD,0x44,0x47,0x2E,0xAA,0x39 ))// 010D1917-3404-414B-9FD7-CD44472EAA39 +} + +private var IID___x_ABI_CWindows_CStorage_CIStorageStreamTransaction: test_component.IID { + .init(Data1: 0xF67CF363, Data2: 0xA53D, Data3: 0x4D94, Data4: ( 0xAE,0x2C,0x67,0x23,0x2D,0x93,0xAC,0xDD ))// F67CF363-A53D-4D94-AE2C-67232D93ACDD +} + +private var IID___x_ABI_CWindows_CStorage_CIStreamedFileDataRequest: test_component.IID { + .init(Data1: 0x1673FCCE, Data2: 0xDABD, Data3: 0x4D50, Data4: ( 0xBE,0xEE,0x18,0x0B,0x8A,0x81,0x91,0xB6 ))// 1673FCCE-DABD-4D50-BEEE-180B8A8191B6 +} + +private var IID___x_ABI_CWindows_CStorage_CIStreamedFileDataRequestedHandler: test_component.IID { + .init(Data1: 0xFEF6A824, Data2: 0x2FE1, Data3: 0x4D07, Data4: ( 0xA3,0x5B,0xB7,0x7C,0x50,0xB5,0xF4,0xCC ))// FEF6A824-2FE1-4D07-A35B-B77C50B5F4CC +} + +public enum __ABI_Windows_Storage { + public class IPathIOStatics: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIPathIOStatics } + + internal func ReadTextAsyncImpl(_ absolutePath: String) throws -> test_component.AnyIAsyncOperation? { + let (textOperation) = try ComPtrs.initialize { textOperationAbi in + let _absolutePath = try! HString(absolutePath) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReadTextAsync(pThis, _absolutePath.get(), &textOperationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.unwrapFrom(abi: textOperation) + } + + internal func ReadTextWithEncodingAsyncImpl(_ absolutePath: String, _ encoding: test_component.UnicodeEncoding) throws -> test_component.AnyIAsyncOperation? { + let (textOperation) = try ComPtrs.initialize { textOperationAbi in + let _absolutePath = try! HString(absolutePath) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReadTextWithEncodingAsync(pThis, _absolutePath.get(), encoding, &textOperationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.unwrapFrom(abi: textOperation) + } + + internal func WriteTextAsyncImpl(_ absolutePath: String, _ contents: String) throws -> test_component.AnyIAsyncAction? { + let (textOperation) = try ComPtrs.initialize { textOperationAbi in + let _absolutePath = try! HString(absolutePath) + let _contents = try! HString(contents) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.WriteTextAsync(pThis, _absolutePath.get(), _contents.get(), &textOperationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: textOperation) + } + + internal func WriteTextWithEncodingAsyncImpl(_ absolutePath: String, _ contents: String, _ encoding: test_component.UnicodeEncoding) throws -> test_component.AnyIAsyncAction? { + let (textOperation) = try ComPtrs.initialize { textOperationAbi in + let _absolutePath = try! HString(absolutePath) + let _contents = try! HString(contents) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.WriteTextWithEncodingAsync(pThis, _absolutePath.get(), _contents.get(), encoding, &textOperationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: textOperation) + } + + internal func AppendTextAsyncImpl(_ absolutePath: String, _ contents: String) throws -> test_component.AnyIAsyncAction? { + let (textOperation) = try ComPtrs.initialize { textOperationAbi in + let _absolutePath = try! HString(absolutePath) + let _contents = try! HString(contents) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.AppendTextAsync(pThis, _absolutePath.get(), _contents.get(), &textOperationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: textOperation) + } + + internal func AppendTextWithEncodingAsyncImpl(_ absolutePath: String, _ contents: String, _ encoding: test_component.UnicodeEncoding) throws -> test_component.AnyIAsyncAction? { + let (textOperation) = try ComPtrs.initialize { textOperationAbi in + let _absolutePath = try! HString(absolutePath) + let _contents = try! HString(contents) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.AppendTextWithEncodingAsync(pThis, _absolutePath.get(), _contents.get(), encoding, &textOperationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: textOperation) + } + + internal func ReadLinesAsyncImpl(_ absolutePath: String) throws -> test_component.AnyIAsyncOperation?>? { + let (linesOperation) = try ComPtrs.initialize { linesOperationAbi in + let _absolutePath = try! HString(absolutePath) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReadLinesAsync(pThis, _absolutePath.get(), &linesOperationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: linesOperation) + } + + internal func ReadLinesWithEncodingAsyncImpl(_ absolutePath: String, _ encoding: test_component.UnicodeEncoding) throws -> test_component.AnyIAsyncOperation?>? { + let (linesOperation) = try ComPtrs.initialize { linesOperationAbi in + let _absolutePath = try! HString(absolutePath) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReadLinesWithEncodingAsync(pThis, _absolutePath.get(), encoding, &linesOperationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: linesOperation) + } + + internal func WriteLinesAsyncImpl(_ absolutePath: String, _ lines: test_component.AnyIIterable?) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _absolutePath = try! HString(absolutePath) + let linesWrapper = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper(lines) + let _lines = try! linesWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.WriteLinesAsync(pThis, _absolutePath.get(), _lines, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + internal func WriteLinesWithEncodingAsyncImpl(_ absolutePath: String, _ lines: test_component.AnyIIterable?, _ encoding: test_component.UnicodeEncoding) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _absolutePath = try! HString(absolutePath) + let linesWrapper = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper(lines) + let _lines = try! linesWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.WriteLinesWithEncodingAsync(pThis, _absolutePath.get(), _lines, encoding, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + internal func AppendLinesAsyncImpl(_ absolutePath: String, _ lines: test_component.AnyIIterable?) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _absolutePath = try! HString(absolutePath) + let linesWrapper = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper(lines) + let _lines = try! linesWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.AppendLinesAsync(pThis, _absolutePath.get(), _lines, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + internal func AppendLinesWithEncodingAsyncImpl(_ absolutePath: String, _ lines: test_component.AnyIIterable?, _ encoding: test_component.UnicodeEncoding) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _absolutePath = try! HString(absolutePath) + let linesWrapper = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper(lines) + let _lines = try! linesWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.AppendLinesWithEncodingAsync(pThis, _absolutePath.get(), _lines, encoding, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + internal func ReadBufferAsyncImpl(_ absolutePath: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _absolutePath = try! HString(absolutePath) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReadBufferAsync(pThis, _absolutePath.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.unwrapFrom(abi: operation) + } + + internal func WriteBufferAsyncImpl(_ absolutePath: String, _ buffer: test_component.AnyIBuffer?) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _absolutePath = try! HString(absolutePath) + let bufferWrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(buffer) + let _buffer = try! bufferWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIPathIOStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.WriteBufferAsync(pThis, _absolutePath.get(), _buffer, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageFile: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFile } + + open func get_FileTypeImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_FileType(pThis, &value)) + } + return .init(from: value) + } + + open func get_ContentTypeImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_ContentType(pThis, &value)) + } + return .init(from: value) + } + + open func OpenAsyncImpl(_ accessMode: test_component.FileAccessMode) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.OpenAsync(pThis, accessMode, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.unwrapFrom(abi: operation) + } + + open func OpenTransactedWriteAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.OpenTransactedWriteAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.unwrapFrom(abi: operation) + } + + open func CopyOverloadDefaultNameAndOptionsImpl(_ destinationFolder: test_component.AnyIStorageFolder?) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let destinationFolderWrapper = __ABI_Windows_Storage.IStorageFolderWrapper(destinationFolder) + let _destinationFolder = try! destinationFolderWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CopyOverloadDefaultNameAndOptions(pThis, _destinationFolder, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func CopyOverloadDefaultOptionsImpl(_ destinationFolder: test_component.AnyIStorageFolder?, _ desiredNewName: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let destinationFolderWrapper = __ABI_Windows_Storage.IStorageFolderWrapper(destinationFolder) + let _destinationFolder = try! destinationFolderWrapper?.toABI { $0 } + let _desiredNewName = try! HString(desiredNewName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CopyOverloadDefaultOptions(pThis, _destinationFolder, _desiredNewName.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func CopyOverloadImpl(_ destinationFolder: test_component.AnyIStorageFolder?, _ desiredNewName: String, _ option: test_component.NameCollisionOption) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let destinationFolderWrapper = __ABI_Windows_Storage.IStorageFolderWrapper(destinationFolder) + let _destinationFolder = try! destinationFolderWrapper?.toABI { $0 } + let _desiredNewName = try! HString(desiredNewName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CopyOverload(pThis, _destinationFolder, _desiredNewName.get(), option, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func CopyAndReplaceAsyncImpl(_ fileToReplace: test_component.AnyIStorageFile?) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let fileToReplaceWrapper = __ABI_Windows_Storage.IStorageFileWrapper(fileToReplace) + let _fileToReplace = try! fileToReplaceWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CopyAndReplaceAsync(pThis, _fileToReplace, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func MoveOverloadDefaultNameAndOptionsImpl(_ destinationFolder: test_component.AnyIStorageFolder?) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let destinationFolderWrapper = __ABI_Windows_Storage.IStorageFolderWrapper(destinationFolder) + let _destinationFolder = try! destinationFolderWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveOverloadDefaultNameAndOptions(pThis, _destinationFolder, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func MoveOverloadDefaultOptionsImpl(_ destinationFolder: test_component.AnyIStorageFolder?, _ desiredNewName: String) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let destinationFolderWrapper = __ABI_Windows_Storage.IStorageFolderWrapper(destinationFolder) + let _destinationFolder = try! destinationFolderWrapper?.toABI { $0 } + let _desiredNewName = try! HString(desiredNewName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveOverloadDefaultOptions(pThis, _destinationFolder, _desiredNewName.get(), &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func MoveOverloadImpl(_ destinationFolder: test_component.AnyIStorageFolder?, _ desiredNewName: String, _ option: test_component.NameCollisionOption) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let destinationFolderWrapper = __ABI_Windows_Storage.IStorageFolderWrapper(destinationFolder) + let _destinationFolder = try! destinationFolderWrapper?.toABI { $0 } + let _desiredNewName = try! HString(desiredNewName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveOverload(pThis, _destinationFolder, _desiredNewName.get(), option, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func MoveAndReplaceAsyncImpl(_ fileToReplace: test_component.AnyIStorageFile?) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let fileToReplaceWrapper = __ABI_Windows_Storage.IStorageFileWrapper(fileToReplace) + let _fileToReplace = try! fileToReplaceWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveAndReplaceAsync(pThis, _fileToReplace, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IStorageFileVTable: __x_ABI_CWindows_CStorage_CIStorageFileVtbl = .init( + QueryInterface: { IStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageFileWrapper.addRef($0) }, + Release: { IStorageFileWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 6).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageFileWrapper.IID + iids[3] = __ABI_Windows_Storage.IStorageItemWrapper.IID + iids[4] = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper.IID + iids[5] = __ABI_Windows_Storage_Streams.IInputStreamReferenceWrapper.IID + $1!.pointee = 6 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageFile").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_FileType: { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.fileType + $1?.initialize(to: try! HString(value).detach()) + return S_OK + }, + + get_ContentType: { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.contentType + $1?.initialize(to: try! HString(value).detach()) + return S_OK + }, + + OpenAsync: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let accessMode: test_component.FileAccessMode = $1 + let operation = try __unwrapped__instance.openAsync(accessMode) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + OpenTransactedWriteAsync: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.openTransactedWriteAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CopyOverloadDefaultNameAndOptions: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let destinationFolder: test_component.AnyIStorageFolder? = __ABI_Windows_Storage.IStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.copyAsync(destinationFolder) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CopyOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let destinationFolder: test_component.AnyIStorageFolder? = __ABI_Windows_Storage.IStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let desiredNewName: String = .init(from: $2) + let operation = try __unwrapped__instance.copyAsync(destinationFolder, desiredNewName) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CopyOverload: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let destinationFolder: test_component.AnyIStorageFolder? = __ABI_Windows_Storage.IStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let desiredNewName: String = .init(from: $2) + let option: test_component.NameCollisionOption = $3 + let operation = try __unwrapped__instance.copyAsync(destinationFolder, desiredNewName, option) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($4) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CopyAndReplaceAsync: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let fileToReplace: test_component.AnyIStorageFile? = __ABI_Windows_Storage.IStorageFileWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.copyAndReplaceAsync(fileToReplace) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + MoveOverloadDefaultNameAndOptions: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let destinationFolder: test_component.AnyIStorageFolder? = __ABI_Windows_Storage.IStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.moveAsync(destinationFolder) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + MoveOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let destinationFolder: test_component.AnyIStorageFolder? = __ABI_Windows_Storage.IStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let desiredNewName: String = .init(from: $2) + let operation = try __unwrapped__instance.moveAsync(destinationFolder, desiredNewName) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + MoveOverload: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let destinationFolder: test_component.AnyIStorageFolder? = __ABI_Windows_Storage.IStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let desiredNewName: String = .init(from: $2) + let option: test_component.NameCollisionOption = $3 + let operation = try __unwrapped__instance.moveAsync(destinationFolder, desiredNewName, option) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($4) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + MoveAndReplaceAsync: { + do { + guard let __unwrapped__instance = IStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let fileToReplace: test_component.AnyIStorageFile? = __ABI_Windows_Storage.IStorageFileWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.moveAndReplaceAsync(fileToReplace) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageFileWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageFileBridge> + public class IStorageFile2: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFile2 } + + open func OpenWithOptionsAsyncImpl(_ accessMode: test_component.FileAccessMode, _ options: test_component.StorageOpenOptions) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.OpenWithOptionsAsync(pThis, accessMode, options, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.unwrapFrom(abi: operation) + } + + open func OpenTransactedWriteWithOptionsAsyncImpl(_ options: test_component.StorageOpenOptions) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFile2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.OpenTransactedWriteWithOptionsAsync(pThis, options, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IStorageFile2VTable: __x_ABI_CWindows_CStorage_CIStorageFile2Vtbl = .init( + QueryInterface: { IStorageFile2Wrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageFile2Wrapper.addRef($0) }, + Release: { IStorageFile2Wrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageFile2Wrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageFile2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + OpenWithOptionsAsync: { + do { + guard let __unwrapped__instance = IStorageFile2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let accessMode: test_component.FileAccessMode = $1 + let options: test_component.StorageOpenOptions = $2 + let operation = try __unwrapped__instance.openAsync(accessMode, options) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + OpenTransactedWriteWithOptionsAsync: { + do { + guard let __unwrapped__instance = IStorageFile2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let options: test_component.StorageOpenOptions = $1 + let operation = try __unwrapped__instance.openTransactedWriteAsync(options) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageFile2Wrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageFile2Bridge> + public class IStorageFilePropertiesWithAvailability: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFilePropertiesWithAvailability } + + open func get_IsAvailableImpl() throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFilePropertiesWithAvailability.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsAvailable(pThis, &value)) + } + return .init(from: value) + } + + } + + internal static var IStorageFilePropertiesWithAvailabilityVTable: __x_ABI_CWindows_CStorage_CIStorageFilePropertiesWithAvailabilityVtbl = .init( + QueryInterface: { IStorageFilePropertiesWithAvailabilityWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageFilePropertiesWithAvailabilityWrapper.addRef($0) }, + Release: { IStorageFilePropertiesWithAvailabilityWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageFilePropertiesWithAvailabilityWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageFilePropertiesWithAvailability").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_IsAvailable: { + guard let __unwrapped__instance = IStorageFilePropertiesWithAvailabilityWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.isAvailable + $1?.initialize(to: .init(from: value)) + return S_OK + } + ) + + public typealias IStorageFilePropertiesWithAvailabilityWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageFilePropertiesWithAvailabilityBridge> + public class IStorageFileStatics: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFileStatics } + + internal func GetFileFromPathAsyncImpl(_ path: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _path = try! HString(path) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFileStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFileFromPathAsync(pThis, _path.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + internal func GetFileFromApplicationUriAsyncImpl(_ uri: test_component.Uri?) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFileStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFileFromApplicationUriAsync(pThis, RawPointer(uri), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + internal func CreateStreamedFileAsyncImpl(_ displayNameWithExtension: String, _ dataRequested: test_component.StreamedFileDataRequestedHandler?, _ thumbnail: test_component.AnyIRandomAccessStreamReference?) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _displayNameWithExtension = try! HString(displayNameWithExtension) + let dataRequestedWrapper = __ABI_Windows_Storage.StreamedFileDataRequestedHandlerWrapper(dataRequested) + let _dataRequested = try! dataRequestedWrapper?.toABI { $0 } + let thumbnailWrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper(thumbnail) + let _thumbnail = try! thumbnailWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFileStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateStreamedFileAsync(pThis, _displayNameWithExtension.get(), _dataRequested, _thumbnail, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + internal func ReplaceWithStreamedFileAsyncImpl(_ fileToReplace: test_component.AnyIStorageFile?, _ dataRequested: test_component.StreamedFileDataRequestedHandler?, _ thumbnail: test_component.AnyIRandomAccessStreamReference?) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let fileToReplaceWrapper = __ABI_Windows_Storage.IStorageFileWrapper(fileToReplace) + let _fileToReplace = try! fileToReplaceWrapper?.toABI { $0 } + let dataRequestedWrapper = __ABI_Windows_Storage.StreamedFileDataRequestedHandlerWrapper(dataRequested) + let _dataRequested = try! dataRequestedWrapper?.toABI { $0 } + let thumbnailWrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper(thumbnail) + let _thumbnail = try! thumbnailWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFileStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReplaceWithStreamedFileAsync(pThis, _fileToReplace, _dataRequested, _thumbnail, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + internal func CreateStreamedFileFromUriAsyncImpl(_ displayNameWithExtension: String, _ uri: test_component.Uri?, _ thumbnail: test_component.AnyIRandomAccessStreamReference?) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _displayNameWithExtension = try! HString(displayNameWithExtension) + let thumbnailWrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper(thumbnail) + let _thumbnail = try! thumbnailWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFileStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateStreamedFileFromUriAsync(pThis, _displayNameWithExtension.get(), RawPointer(uri), _thumbnail, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + internal func ReplaceWithStreamedFileFromUriAsyncImpl(_ fileToReplace: test_component.AnyIStorageFile?, _ uri: test_component.Uri?, _ thumbnail: test_component.AnyIRandomAccessStreamReference?) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let fileToReplaceWrapper = __ABI_Windows_Storage.IStorageFileWrapper(fileToReplace) + let _fileToReplace = try! fileToReplaceWrapper?.toABI { $0 } + let thumbnailWrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper(thumbnail) + let _thumbnail = try! thumbnailWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFileStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReplaceWithStreamedFileFromUriAsync(pThis, _fileToReplace, RawPointer(uri), _thumbnail, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageFolder: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFolder } + + open func CreateFileAsyncOverloadDefaultOptionsImpl(_ desiredName: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _desiredName = try! HString(desiredName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFileAsyncOverloadDefaultOptions(pThis, _desiredName.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func CreateFileAsyncImpl(_ desiredName: String, _ options: test_component.CreationCollisionOption) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _desiredName = try! HString(desiredName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFileAsync(pThis, _desiredName.get(), options, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func CreateFolderAsyncOverloadDefaultOptionsImpl(_ desiredName: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _desiredName = try! HString(desiredName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFolderAsyncOverloadDefaultOptions(pThis, _desiredName.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + open func CreateFolderAsyncImpl(_ desiredName: String, _ options: test_component.CreationCollisionOption) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _desiredName = try! HString(desiredName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFolderAsync(pThis, _desiredName.get(), options, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + open func GetFileAsyncImpl(_ name: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _name = try! HString(name) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFileAsync(pThis, _name.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func GetFolderAsyncImpl(_ name: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _name = try! HString(name) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFolderAsync(pThis, _name.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + open func GetItemAsyncImpl(_ name: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _name = try! HString(name) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetItemAsync(pThis, _name.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) + } + + open func GetFilesAsyncOverloadDefaultOptionsStartAndCountImpl() throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFilesAsyncOverloadDefaultOptionsStartAndCount(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func GetFoldersAsyncOverloadDefaultOptionsStartAndCountImpl() throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFoldersAsyncOverloadDefaultOptionsStartAndCount(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + open func GetItemsAsyncOverloadDefaultStartAndCountImpl() throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetItemsAsyncOverloadDefaultStartAndCount(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IStorageFolderVTable: __x_ABI_CWindows_CStorage_CIStorageFolderVtbl = .init( + QueryInterface: { IStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageFolderWrapper.addRef($0) }, + Release: { IStorageFolderWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageFolderWrapper.IID + iids[3] = __ABI_Windows_Storage.IStorageItemWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageFolder").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + CreateFileAsyncOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let desiredName: String = .init(from: $1) + let operation = try __unwrapped__instance.createFileAsync(desiredName) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFileAsync: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let desiredName: String = .init(from: $1) + let options: test_component.CreationCollisionOption = $2 + let operation = try __unwrapped__instance.createFileAsync(desiredName, options) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFolderAsyncOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let desiredName: String = .init(from: $1) + let operation = try __unwrapped__instance.createFolderAsync(desiredName) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFolderAsync: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let desiredName: String = .init(from: $1) + let options: test_component.CreationCollisionOption = $2 + let operation = try __unwrapped__instance.createFolderAsync(desiredName, options) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFileAsync: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let name: String = .init(from: $1) + let operation = try __unwrapped__instance.getFileAsync(name) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFolderAsync: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let name: String = .init(from: $1) + let operation = try __unwrapped__instance.getFolderAsync(name) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetItemAsync: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let name: String = .init(from: $1) + let operation = try __unwrapped__instance.getItemAsync(name) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFilesAsyncOverloadDefaultOptionsStartAndCount: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.getFilesAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFoldersAsyncOverloadDefaultOptionsStartAndCount: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.getFoldersAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetItemsAsyncOverloadDefaultStartAndCount: { + do { + guard let __unwrapped__instance = IStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.getItemsAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageFolderWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageFolderBridge> + public class IStorageFolder2: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFolder2 } + + open func TryGetItemAsyncImpl(_ name: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _name = try! HString(name) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetItemAsync(pThis, _name.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IStorageFolder2VTable: __x_ABI_CWindows_CStorage_CIStorageFolder2Vtbl = .init( + QueryInterface: { IStorageFolder2Wrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageFolder2Wrapper.addRef($0) }, + Release: { IStorageFolder2Wrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageFolder2Wrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageFolder2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + TryGetItemAsync: { + do { + guard let __unwrapped__instance = IStorageFolder2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let name: String = .init(from: $1) + let operation = try __unwrapped__instance.tryGetItemAsync(name) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageFolder2Wrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageFolder2Bridge> + public class IStorageFolder3: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFolder3 } + + internal func TryGetChangeTrackerImpl() throws -> test_component.StorageLibraryChangeTracker? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolder3.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetChangeTracker(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + + } + + public class IStorageFolderStatics: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageFolderStatics } + + internal func GetFolderFromPathAsyncImpl(_ path: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _path = try! HString(path) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageFolderStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFolderFromPathAsync(pThis, _path.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageItem: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageItem } + + open func RenameAsyncOverloadDefaultOptionsImpl(_ desiredName: String) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _desiredName = try! HString(desiredName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RenameAsyncOverloadDefaultOptions(pThis, _desiredName.get(), &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func RenameAsyncImpl(_ desiredName: String, _ option: test_component.NameCollisionOption) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _desiredName = try! HString(desiredName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RenameAsync(pThis, _desiredName.get(), option, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func DeleteAsyncOverloadDefaultOptionsImpl() throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.DeleteAsyncOverloadDefaultOptions(pThis, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func DeleteAsyncImpl(_ option: test_component.StorageDeleteOption) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.DeleteAsync(pThis, option, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func GetBasicPropertiesAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetBasicPropertiesAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.unwrapFrom(abi: operation) + } + + open func get_NameImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Name(pThis, &value)) + } + return .init(from: value) + } + + open func get_PathImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Path(pThis, &value)) + } + return .init(from: value) + } + + open func get_AttributesImpl() throws -> test_component.FileAttributes { + var value: __x_ABI_CWindows_CStorage_CFileAttributes = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Attributes(pThis, &value)) + } + return value + } + + open func get_DateCreatedImpl() throws -> test_component.DateTime { + var value: __x_ABI_CWindows_CFoundation_CDateTime = .init() + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_DateCreated(pThis, &value)) + } + return .from(abi: value) + } + + open func IsOfTypeImpl(_ type: test_component.StorageItemTypes) throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IsOfType(pThis, type, &value)) + } + return .init(from: value) + } + + } + + internal static var IStorageItemVTable: __x_ABI_CWindows_CStorage_CIStorageItemVtbl = .init( + QueryInterface: { IStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageItemWrapper.addRef($0) }, + Release: { IStorageItemWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageItemWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageItem").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + RenameAsyncOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let desiredName: String = .init(from: $1) + let operation = try __unwrapped__instance.renameAsync(desiredName) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + RenameAsync: { + do { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let desiredName: String = .init(from: $1) + let option: test_component.NameCollisionOption = $2 + let operation = try __unwrapped__instance.renameAsync(desiredName, option) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + DeleteAsyncOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.deleteAsync() + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + DeleteAsync: { + do { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let option: test_component.StorageDeleteOption = $1 + let operation = try __unwrapped__instance.deleteAsync(option) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetBasicPropertiesAsync: { + do { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.getBasicPropertiesAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + get_Name: { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.name + $1?.initialize(to: try! HString(value).detach()) + return S_OK + }, + + get_Path: { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.path + $1?.initialize(to: try! HString(value).detach()) + return S_OK + }, + + get_Attributes: { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.attributes + $1?.initialize(to: value) + return S_OK + }, + + get_DateCreated: { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.dateCreated + $1?.initialize(to: .from(swift: value)) + return S_OK + }, + + IsOfType: { + do { + guard let __unwrapped__instance = IStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let type: test_component.StorageItemTypes = $1 + let value = try __unwrapped__instance.isOfType(type) + $2?.initialize(to: .init(from: value)) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageItemWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageItemBridge> + public class IStorageItem2: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageItem2 } + + open func GetParentAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetParentAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + open func IsEqualImpl(_ item: test_component.AnyIStorageItem?) throws -> Bool { + var value: boolean = 0 + let itemWrapper = __ABI_Windows_Storage.IStorageItemWrapper(item) + let _item = try! itemWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItem2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IsEqual(pThis, _item, &value)) + } + return .init(from: value) + } + + } + + internal static var IStorageItem2VTable: __x_ABI_CWindows_CStorage_CIStorageItem2Vtbl = .init( + QueryInterface: { IStorageItem2Wrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageItem2Wrapper.addRef($0) }, + Release: { IStorageItem2Wrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageItem2Wrapper.IID + iids[3] = __ABI_Windows_Storage.IStorageItemWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageItem2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetParentAsync: { + do { + guard let __unwrapped__instance = IStorageItem2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.getParentAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + IsEqual: { + do { + guard let __unwrapped__instance = IStorageItem2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let item: test_component.AnyIStorageItem? = __ABI_Windows_Storage.IStorageItemWrapper.unwrapFrom(abi: ComPtr($1)) + let value = try __unwrapped__instance.isEqual(item) + $2?.initialize(to: .init(from: value)) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageItem2Wrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageItem2Bridge> + public class IStorageItemProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageItemProperties } + + open func GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(_ mode: test_component.ThumbnailMode) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetThumbnailAsyncOverloadDefaultSizeDefaultOptions(pThis, mode, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: operation) + } + + open func GetThumbnailAsyncOverloadDefaultOptionsImpl(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetThumbnailAsyncOverloadDefaultOptions(pThis, mode, requestedSize, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: operation) + } + + open func GetThumbnailAsyncImpl(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetThumbnailAsync(pThis, mode, requestedSize, options, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: operation) + } + + open func get_DisplayNameImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_DisplayName(pThis, &value)) + } + return .init(from: value) + } + + open func get_DisplayTypeImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_DisplayType(pThis, &value)) + } + return .init(from: value) + } + + open func get_FolderRelativeIdImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_FolderRelativeId(pThis, &value)) + } + return .init(from: value) + } + + open func get_PropertiesImpl() throws -> test_component.StorageItemContentProperties? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Properties(pThis, &valueAbi)) + } + } + return .from(abi: value) + } + + } + + internal static var IStorageItemPropertiesVTable: __x_ABI_CWindows_CStorage_CIStorageItemPropertiesVtbl = .init( + QueryInterface: { IStorageItemPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageItemPropertiesWrapper.addRef($0) }, + Release: { IStorageItemPropertiesWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageItemPropertiesWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageItemProperties").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetThumbnailAsyncOverloadDefaultSizeDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageItemPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let mode: test_component.ThumbnailMode = $1 + let operation = try __unwrapped__instance.getThumbnailAsync(mode) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetThumbnailAsyncOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageItemPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let mode: test_component.ThumbnailMode = $1 + let requestedSize: UInt32 = $2 + let operation = try __unwrapped__instance.getThumbnailAsync(mode, requestedSize) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetThumbnailAsync: { + do { + guard let __unwrapped__instance = IStorageItemPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let mode: test_component.ThumbnailMode = $1 + let requestedSize: UInt32 = $2 + let options: test_component.ThumbnailOptions = $3 + let operation = try __unwrapped__instance.getThumbnailAsync(mode, requestedSize, options) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(operation) + operationWrapper?.copyTo($4) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + get_DisplayName: { + guard let __unwrapped__instance = IStorageItemPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.displayName + $1?.initialize(to: try! HString(value).detach()) + return S_OK + }, + + get_DisplayType: { + guard let __unwrapped__instance = IStorageItemPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.displayType + $1?.initialize(to: try! HString(value).detach()) + return S_OK + }, + + get_FolderRelativeId: { + guard let __unwrapped__instance = IStorageItemPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.folderRelativeId + $1?.initialize(to: try! HString(value).detach()) + return S_OK + }, + + get_Properties: { + guard let __unwrapped__instance = IStorageItemPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.properties + value?.copyTo($1) + return S_OK + } + ) + + public typealias IStorageItemPropertiesWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageItemPropertiesBridge> + public class IStorageItemProperties2: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageItemProperties2 } + + open func GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(_ mode: test_component.ThumbnailMode) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions(pThis, mode, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: operation) + } + + open func GetScaledImageAsThumbnailAsyncOverloadDefaultOptionsImpl(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetScaledImageAsThumbnailAsyncOverloadDefaultOptions(pThis, mode, requestedSize, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: operation) + } + + open func GetScaledImageAsThumbnailAsyncImpl(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemProperties2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetScaledImageAsThumbnailAsync(pThis, mode, requestedSize, options, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IStorageItemProperties2VTable: __x_ABI_CWindows_CStorage_CIStorageItemProperties2Vtbl = .init( + QueryInterface: { IStorageItemProperties2Wrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageItemProperties2Wrapper.addRef($0) }, + Release: { IStorageItemProperties2Wrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageItemProperties2Wrapper.IID + iids[3] = __ABI_Windows_Storage.IStorageItemPropertiesWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageItemProperties2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageItemProperties2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let mode: test_component.ThumbnailMode = $1 + let operation = try __unwrapped__instance.getScaledImageAsThumbnailAsync(mode) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetScaledImageAsThumbnailAsyncOverloadDefaultOptions: { + do { + guard let __unwrapped__instance = IStorageItemProperties2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let mode: test_component.ThumbnailMode = $1 + let requestedSize: UInt32 = $2 + let operation = try __unwrapped__instance.getScaledImageAsThumbnailAsync(mode, requestedSize) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetScaledImageAsThumbnailAsync: { + do { + guard let __unwrapped__instance = IStorageItemProperties2Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let mode: test_component.ThumbnailMode = $1 + let requestedSize: UInt32 = $2 + let options: test_component.ThumbnailOptions = $3 + let operation = try __unwrapped__instance.getScaledImageAsThumbnailAsync(mode, requestedSize, options) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(operation) + operationWrapper?.copyTo($4) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageItemProperties2Wrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageItemProperties2Bridge> + public class IStorageItemPropertiesWithProvider: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageItemPropertiesWithProvider } + + open func get_ProviderImpl() throws -> test_component.StorageProvider? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageItemPropertiesWithProvider.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Provider(pThis, &valueAbi)) + } + } + return .from(abi: value) + } + + } + + internal static var IStorageItemPropertiesWithProviderVTable: __x_ABI_CWindows_CStorage_CIStorageItemPropertiesWithProviderVtbl = .init( + QueryInterface: { IStorageItemPropertiesWithProviderWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageItemPropertiesWithProviderWrapper.addRef($0) }, + Release: { IStorageItemPropertiesWithProviderWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStorageItemPropertiesWithProviderWrapper.IID + iids[3] = __ABI_Windows_Storage.IStorageItemPropertiesWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStorageItemPropertiesWithProvider").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_Provider: { + guard let __unwrapped__instance = IStorageItemPropertiesWithProviderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.provider + value?.copyTo($1) + return S_OK + } + ) + + public typealias IStorageItemPropertiesWithProviderWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStorageItemPropertiesWithProviderBridge> + public class IStorageLibraryChange: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageLibraryChange } + + internal func get_ChangeTypeImpl() throws -> test_component.StorageLibraryChangeType { + var value: __x_ABI_CWindows_CStorage_CStorageLibraryChangeType = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_ChangeType(pThis, &value)) + } + return value + } + + internal func get_PathImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Path(pThis, &value)) + } + return .init(from: value) + } + + internal func get_PreviousPathImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_PreviousPath(pThis, &value)) + } + return .init(from: value) + } + + internal func IsOfTypeImpl(_ type: test_component.StorageItemTypes) throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IsOfType(pThis, type, &value)) + } + return .init(from: value) + } + + internal func GetStorageItemAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetStorageItemAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageLibraryChangeReader: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageLibraryChangeReader } + + internal func ReadBatchAsyncImpl() throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChangeReader.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReadBatchAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.unwrapFrom(abi: operation) + } + + internal func AcceptChangesAsyncImpl() throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChangeReader.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.AcceptChangesAsync(pThis, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageLibraryChangeTracker: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageLibraryChangeTracker } + + internal func GetChangeReaderImpl() throws -> test_component.StorageLibraryChangeReader? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChangeTracker.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetChangeReader(pThis, &valueAbi)) + } + } + return .from(abi: value) + } + + internal func EnableImpl() throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChangeTracker.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Enable(pThis)) + } + } + + internal func ResetImpl() throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageLibraryChangeTracker.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Reset(pThis)) + } + } + + } + + public class IStorageProvider: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageProvider } + + internal func get_IdImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageProvider.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Id(pThis, &value)) + } + return .init(from: value) + } + + internal func get_DisplayNameImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageProvider.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_DisplayName(pThis, &value)) + } + return .init(from: value) + } + + } + + public class IStorageProvider2: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageProvider2 } + + internal func IsPropertySupportedForPartialFileAsyncImpl(_ propertyCanonicalName: String) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let _propertyCanonicalName = try! HString(propertyCanonicalName) + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageProvider2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IsPropertySupportedForPartialFileAsync(pThis, _propertyCanonicalName.get(), &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1_booleanWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageStreamTransaction: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStorageStreamTransaction } + + internal func get_StreamImpl() throws -> test_component.AnyIRandomAccessStream? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageStreamTransaction.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Stream(pThis, &valueAbi)) + } + } + return __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper.unwrapFrom(abi: value) + } + + internal func CommitAsyncImpl() throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStorageStreamTransaction.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CommitAsync(pThis, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStreamedFileDataRequest: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStreamedFileDataRequest } + + open func FailAndCloseImpl(_ failureMode: test_component.StreamedFileFailureMode) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStreamedFileDataRequest.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.FailAndClose(pThis, failureMode)) + } + } + + } + + internal static var IStreamedFileDataRequestVTable: __x_ABI_CWindows_CStorage_CIStreamedFileDataRequestVtbl = .init( + QueryInterface: { IStreamedFileDataRequestWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStreamedFileDataRequestWrapper.addRef($0) }, + Release: { IStreamedFileDataRequestWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage.IStreamedFileDataRequestWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.IStreamedFileDataRequest").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + FailAndClose: { + do { + guard let __unwrapped__instance = IStreamedFileDataRequestWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let failureMode: test_component.StreamedFileFailureMode = $1 + try __unwrapped__instance.failAndClose(failureMode) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStreamedFileDataRequestWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.IStreamedFileDataRequestBridge> +} +// MARK - StreamedFileDataRequestedHandler +extension __ABI_Windows_Storage { + public class StreamedFileDataRequestedHandler: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CIStreamedFileDataRequestedHandler } + + open func InvokeImpl(_ stream: test_component.StreamedFileDataRequest?) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CIStreamedFileDataRequestedHandler.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, RawPointer(stream))) + } + } + + } + + + typealias StreamedFileDataRequestedHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage.StreamedFileDataRequestedHandlerBridge> + internal static var StreamedFileDataRequestedHandlerVTable: __x_ABI_CWindows_CStorage_CIStreamedFileDataRequestedHandlerVtbl = .init( + QueryInterface: { StreamedFileDataRequestedHandlerWrapper.queryInterface($0, $1, $2) }, + AddRef: { StreamedFileDataRequestedHandlerWrapper.addRef($0) }, + Release: { StreamedFileDataRequestedHandlerWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = StreamedFileDataRequestedHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let stream: test_component.StreamedFileDataRequest? = .from(abi: ComPtr($1)) + __unwrapped__instance(stream) + return S_OK + } + ) +} +public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CStorage_CIStreamedFileDataRequestedHandler { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.StreamedFileDataRequestedHandlerVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + diff --git a/tests/test_component/Sources/test_component/Windows.Storage+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage+Impl.swift new file mode 100644 index 00000000..6707f1a2 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage+Impl.swift @@ -0,0 +1,783 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +public enum __IMPL_Windows_Storage { + public enum IStorageFileBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageFile + public typealias SwiftABI = __ABI_Windows_Storage.IStorageFile + public typealias SwiftProjection = AnyIStorageFile + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageFileImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageFileVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageFileImpl: IStorageFile, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageFileBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.openasync) + fileprivate func openAsync(_ accessMode: FileAccessMode) throws -> AnyIAsyncOperation! { + try _default.OpenAsyncImpl(accessMode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.opentransactedwriteasync) + fileprivate func openTransactedWriteAsync() throws -> AnyIAsyncOperation! { + try _default.OpenTransactedWriteAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyasync) + fileprivate func copyAsync(_ destinationFolder: AnyIStorageFolder!) throws -> AnyIAsyncOperation! { + try _default.CopyOverloadDefaultNameAndOptionsImpl(destinationFolder) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyasync) + fileprivate func copyAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String) throws -> AnyIAsyncOperation! { + try _default.CopyOverloadDefaultOptionsImpl(destinationFolder, desiredNewName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyasync) + fileprivate func copyAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String, _ option: NameCollisionOption) throws -> AnyIAsyncOperation! { + try _default.CopyOverloadImpl(destinationFolder, desiredNewName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyandreplaceasync) + fileprivate func copyAndReplaceAsync(_ fileToReplace: AnyIStorageFile!) throws -> test_component.AnyIAsyncAction! { + try _default.CopyAndReplaceAsyncImpl(fileToReplace) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveasync) + fileprivate func moveAsync(_ destinationFolder: AnyIStorageFolder!) throws -> test_component.AnyIAsyncAction! { + try _default.MoveOverloadDefaultNameAndOptionsImpl(destinationFolder) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveasync) + fileprivate func moveAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String) throws -> test_component.AnyIAsyncAction! { + try _default.MoveOverloadDefaultOptionsImpl(destinationFolder, desiredNewName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveasync) + fileprivate func moveAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _default.MoveOverloadImpl(destinationFolder, desiredNewName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveandreplaceasync) + fileprivate func moveAndReplaceAsync(_ fileToReplace: AnyIStorageFile!) throws -> test_component.AnyIAsyncAction! { + try _default.MoveAndReplaceAsyncImpl(fileToReplace) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.contenttype) + fileprivate var contentType : String { + get { try! _default.get_ContentTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.filetype) + fileprivate var fileType : String { + get { try! _default.get_FileTypeImpl() } + } + + private lazy var _IStorageItem: __ABI_Windows_Storage.IStorageItem! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.renameasync) + fileprivate func renameAsync(_ desiredName: String) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.renameasync) + fileprivate func renameAsync(_ desiredName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncImpl(desiredName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.deleteasync) + fileprivate func deleteAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.deleteasync) + fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncImpl(option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.getbasicpropertiesasync) + fileprivate func getBasicPropertiesAsync() throws -> AnyIAsyncOperation! { + try _IStorageItem.GetBasicPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.isoftype) + fileprivate func isOfType(_ type: StorageItemTypes) throws -> Bool { + try _IStorageItem.IsOfTypeImpl(type) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.attributes) + fileprivate var attributes : FileAttributes { + get { try! _IStorageItem.get_AttributesImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.datecreated) + fileprivate var dateCreated : test_component.DateTime { + get { try! _IStorageItem.get_DateCreatedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.name) + fileprivate var name : String { + get { try! _IStorageItem.get_NameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.path) + fileprivate var path : String { + get { try! _IStorageItem.get_PathImpl() } + } + + private lazy var _IRandomAccessStreamReference: __ABI_Windows_Storage_Streams.IRandomAccessStreamReference! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.openreadasync) + fileprivate func openReadAsync() throws -> AnyIAsyncOperation! { + try _IRandomAccessStreamReference.OpenReadAsyncImpl() + } + + private lazy var _IInputStreamReference: __ABI_Windows_Storage_Streams.IInputStreamReference! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.opensequentialreadasync) + fileprivate func openSequentialReadAsync() throws -> AnyIAsyncOperation! { + try _IInputStreamReference.OpenSequentialReadAsyncImpl() + } + + } + + public enum IStorageFile2Bridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageFile2 + public typealias SwiftABI = __ABI_Windows_Storage.IStorageFile2 + public typealias SwiftProjection = AnyIStorageFile2 + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageFile2Impl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageFile2VTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageFile2Impl: IStorageFile2, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageFile2Bridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile2.openasync) + fileprivate func openAsync(_ accessMode: FileAccessMode, _ options: StorageOpenOptions) throws -> AnyIAsyncOperation! { + try _default.OpenWithOptionsAsyncImpl(accessMode, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile2.opentransactedwriteasync) + fileprivate func openTransactedWriteAsync(_ options: StorageOpenOptions) throws -> AnyIAsyncOperation! { + try _default.OpenTransactedWriteWithOptionsAsyncImpl(options) + } + + } + + public enum IStorageFilePropertiesWithAvailabilityBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageFilePropertiesWithAvailability + public typealias SwiftABI = __ABI_Windows_Storage.IStorageFilePropertiesWithAvailability + public typealias SwiftProjection = AnyIStorageFilePropertiesWithAvailability + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageFilePropertiesWithAvailabilityImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageFilePropertiesWithAvailabilityVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageFilePropertiesWithAvailabilityImpl: IStorageFilePropertiesWithAvailability, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageFilePropertiesWithAvailabilityBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefilepropertieswithavailability.isavailable) + fileprivate var isAvailable : Bool { + get { try! _default.get_IsAvailableImpl() } + } + + } + + public enum IStorageFolderBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageFolder + public typealias SwiftABI = __ABI_Windows_Storage.IStorageFolder + public typealias SwiftProjection = AnyIStorageFolder + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageFolderImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageFolderVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageFolderImpl: IStorageFolder, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageFolderBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfileasync) + fileprivate func createFileAsync(_ desiredName: String) throws -> AnyIAsyncOperation! { + try _default.CreateFileAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfileasync) + fileprivate func createFileAsync(_ desiredName: String, _ options: CreationCollisionOption) throws -> AnyIAsyncOperation! { + try _default.CreateFileAsyncImpl(desiredName, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfolderasync) + fileprivate func createFolderAsync(_ desiredName: String) throws -> AnyIAsyncOperation! { + try _default.CreateFolderAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfolderasync) + fileprivate func createFolderAsync(_ desiredName: String, _ options: CreationCollisionOption) throws -> AnyIAsyncOperation! { + try _default.CreateFolderAsyncImpl(desiredName, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfileasync) + fileprivate func getFileAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _default.GetFileAsyncImpl(name) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfolderasync) + fileprivate func getFolderAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _default.GetFolderAsyncImpl(name) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getitemasync) + fileprivate func getItemAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _default.GetItemAsyncImpl(name) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfilesasync) + fileprivate func getFilesAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetFilesAsyncOverloadDefaultOptionsStartAndCountImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfoldersasync) + fileprivate func getFoldersAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetFoldersAsyncOverloadDefaultOptionsStartAndCountImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getitemsasync) + fileprivate func getItemsAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetItemsAsyncOverloadDefaultStartAndCountImpl() + } + + private lazy var _IStorageItem: __ABI_Windows_Storage.IStorageItem! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.renameasync) + fileprivate func renameAsync(_ desiredName: String) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.renameasync) + fileprivate func renameAsync(_ desiredName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncImpl(desiredName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.deleteasync) + fileprivate func deleteAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.deleteasync) + fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncImpl(option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getbasicpropertiesasync) + fileprivate func getBasicPropertiesAsync() throws -> AnyIAsyncOperation! { + try _IStorageItem.GetBasicPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.isoftype) + fileprivate func isOfType(_ type: StorageItemTypes) throws -> Bool { + try _IStorageItem.IsOfTypeImpl(type) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.attributes) + fileprivate var attributes : FileAttributes { + get { try! _IStorageItem.get_AttributesImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.datecreated) + fileprivate var dateCreated : test_component.DateTime { + get { try! _IStorageItem.get_DateCreatedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.name) + fileprivate var name : String { + get { try! _IStorageItem.get_NameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.path) + fileprivate var path : String { + get { try! _IStorageItem.get_PathImpl() } + } + + } + + public enum IStorageFolder2Bridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageFolder2 + public typealias SwiftABI = __ABI_Windows_Storage.IStorageFolder2 + public typealias SwiftProjection = AnyIStorageFolder2 + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageFolder2Impl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageFolder2VTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageFolder2Impl: IStorageFolder2, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageFolder2Bridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder2.trygetitemasync) + fileprivate func tryGetItemAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _default.TryGetItemAsyncImpl(name) + } + + } + + public enum IStorageItemBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageItem + public typealias SwiftABI = __ABI_Windows_Storage.IStorageItem + public typealias SwiftProjection = AnyIStorageItem + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageItemImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageItemVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageItemImpl: IStorageItem, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageItemBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.renameasync) + fileprivate func renameAsync(_ desiredName: String) throws -> test_component.AnyIAsyncAction! { + try _default.RenameAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.renameasync) + fileprivate func renameAsync(_ desiredName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _default.RenameAsyncImpl(desiredName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.deleteasync) + fileprivate func deleteAsync() throws -> test_component.AnyIAsyncAction! { + try _default.DeleteAsyncOverloadDefaultOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.deleteasync) + fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> test_component.AnyIAsyncAction! { + try _default.DeleteAsyncImpl(option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.getbasicpropertiesasync) + fileprivate func getBasicPropertiesAsync() throws -> AnyIAsyncOperation! { + try _default.GetBasicPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.isoftype) + fileprivate func isOfType(_ type: StorageItemTypes) throws -> Bool { + try _default.IsOfTypeImpl(type) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.attributes) + fileprivate var attributes : FileAttributes { + get { try! _default.get_AttributesImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.datecreated) + fileprivate var dateCreated : test_component.DateTime { + get { try! _default.get_DateCreatedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.name) + fileprivate var name : String { + get { try! _default.get_NameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.path) + fileprivate var path : String { + get { try! _default.get_PathImpl() } + } + + } + + public enum IStorageItem2Bridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageItem2 + public typealias SwiftABI = __ABI_Windows_Storage.IStorageItem2 + public typealias SwiftProjection = AnyIStorageItem2 + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageItem2Impl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageItem2VTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageItem2Impl: IStorageItem2, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageItem2Bridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.getparentasync) + fileprivate func getParentAsync() throws -> AnyIAsyncOperation! { + try _default.GetParentAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.isequal) + fileprivate func isEqual(_ item: AnyIStorageItem!) throws -> Bool { + try _default.IsEqualImpl(item) + } + + private lazy var _IStorageItem: __ABI_Windows_Storage.IStorageItem! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.renameasync) + fileprivate func renameAsync(_ desiredName: String) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.renameasync) + fileprivate func renameAsync(_ desiredName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncImpl(desiredName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.deleteasync) + fileprivate func deleteAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.deleteasync) + fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncImpl(option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.getbasicpropertiesasync) + fileprivate func getBasicPropertiesAsync() throws -> AnyIAsyncOperation! { + try _IStorageItem.GetBasicPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.isoftype) + fileprivate func isOfType(_ type: StorageItemTypes) throws -> Bool { + try _IStorageItem.IsOfTypeImpl(type) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.attributes) + fileprivate var attributes : FileAttributes { + get { try! _IStorageItem.get_AttributesImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.datecreated) + fileprivate var dateCreated : test_component.DateTime { + get { try! _IStorageItem.get_DateCreatedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.name) + fileprivate var name : String { + get { try! _IStorageItem.get_NameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.path) + fileprivate var path : String { + get { try! _IStorageItem.get_PathImpl() } + } + + } + + public enum IStorageItemPropertiesBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageItemProperties + public typealias SwiftABI = __ABI_Windows_Storage.IStorageItemProperties + public typealias SwiftProjection = AnyIStorageItemProperties + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageItemPropertiesImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageItemPropertiesVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageItemPropertiesImpl: IStorageItemProperties, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageItemPropertiesBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _default.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _default.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _default.GetThumbnailAsyncImpl(mode, requestedSize, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.displayname) + fileprivate var displayName : String { + get { try! _default.get_DisplayNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.displaytype) + fileprivate var displayType : String { + get { try! _default.get_DisplayTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.folderrelativeid) + fileprivate var folderRelativeId : String { + get { try! _default.get_FolderRelativeIdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.properties) + fileprivate var properties : test_component.StorageItemContentProperties! { + get { try! _default.get_PropertiesImpl() } + } + + } + + public enum IStorageItemProperties2Bridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageItemProperties2 + public typealias SwiftABI = __ABI_Windows_Storage.IStorageItemProperties2 + public typealias SwiftProjection = AnyIStorageItemProperties2 + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageItemProperties2Impl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageItemProperties2VTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageItemProperties2Impl: IStorageItemProperties2, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageItemProperties2Bridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync) + fileprivate func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _default.GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync) + fileprivate func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _default.GetScaledImageAsThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync) + fileprivate func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _default.GetScaledImageAsThumbnailAsyncImpl(mode, requestedSize, options) + } + + private lazy var _IStorageItemProperties: __ABI_Windows_Storage.IStorageItemProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncImpl(mode, requestedSize, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.displayname) + fileprivate var displayName : String { + get { try! _IStorageItemProperties.get_DisplayNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.displaytype) + fileprivate var displayType : String { + get { try! _IStorageItemProperties.get_DisplayTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.folderrelativeid) + fileprivate var folderRelativeId : String { + get { try! _IStorageItemProperties.get_FolderRelativeIdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.properties) + fileprivate var properties : test_component.StorageItemContentProperties! { + get { try! _IStorageItemProperties.get_PropertiesImpl() } + } + + } + + public enum IStorageItemPropertiesWithProviderBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStorageItemPropertiesWithProvider + public typealias SwiftABI = __ABI_Windows_Storage.IStorageItemPropertiesWithProvider + public typealias SwiftProjection = AnyIStorageItemPropertiesWithProvider + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageItemPropertiesWithProviderImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStorageItemPropertiesWithProviderVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageItemPropertiesWithProviderImpl: IStorageItemPropertiesWithProvider, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageItemPropertiesWithProviderBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.provider) + fileprivate var provider : StorageProvider! { + get { try! _default.get_ProviderImpl() } + } + + private lazy var _IStorageItemProperties: __ABI_Windows_Storage.IStorageItemProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.getthumbnailasync) + fileprivate func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncImpl(mode, requestedSize, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.displayname) + fileprivate var displayName : String { + get { try! _IStorageItemProperties.get_DisplayNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.displaytype) + fileprivate var displayType : String { + get { try! _IStorageItemProperties.get_DisplayTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.folderrelativeid) + fileprivate var folderRelativeId : String { + get { try! _IStorageItemProperties.get_FolderRelativeIdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.properties) + fileprivate var properties : test_component.StorageItemContentProperties! { + get { try! _IStorageItemProperties.get_PropertiesImpl() } + } + + } + + public enum IStreamedFileDataRequestBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CIStreamedFileDataRequest + public typealias SwiftABI = __ABI_Windows_Storage.IStreamedFileDataRequest + public typealias SwiftProjection = AnyIStreamedFileDataRequest + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStreamedFileDataRequestImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage.IStreamedFileDataRequestVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStreamedFileDataRequestImpl: IStreamedFileDataRequest, WinRTAbiImpl { + fileprivate typealias Bridge = IStreamedFileDataRequestBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istreamedfiledatarequest.failandclose) + fileprivate func failAndClose(_ failureMode: StreamedFileFailureMode) throws { + try _default.FailAndCloseImpl(failureMode) + } + + } + + public class StreamedFileDataRequestedHandlerBridge : WinRTDelegateBridge { + public typealias Handler = StreamedFileDataRequestedHandler + public typealias CABI = __x_ABI_CWindows_CStorage_CIStreamedFileDataRequestedHandler + public typealias SwiftABI = __ABI_Windows_Storage.StreamedFileDataRequestedHandler + + public static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (stream) in + try! _default.InvokeImpl(stream) + } + return handler + } + } +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+ABI.swift b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+ABI.swift new file mode 100644 index 00000000..de809753 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+ABI.swift @@ -0,0 +1,805 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIBasicProperties: test_component.IID { + .init(Data1: 0xD05D55DB, Data2: 0x785E, Data3: 0x4A66, Data4: ( 0xBE,0x02,0x9B,0xEE,0xC5,0x8A,0xEA,0x81 ))// D05D55DB-785E-4A66-BE02-9BEEC58AEA81 +} + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties: test_component.IID { + .init(Data1: 0x7EAB19BC, Data2: 0x1821, Data3: 0x4923, Data4: ( 0xB4,0xA9,0x0A,0xEA,0x40,0x4D,0x00,0x70 ))// 7EAB19BC-1821-4923-B4A9-0AEA404D0070 +} + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties: test_component.IID { + .init(Data1: 0x523C9424, Data2: 0xFCFF, Data3: 0x4275, Data4: ( 0xAF,0xEE,0xEC,0xDB,0x9A,0xB4,0x79,0x73 ))// 523C9424-FCFF-4275-AFEE-ECDB9AB47973 +} + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties: test_component.IID { + .init(Data1: 0xBC8AAB62, Data2: 0x66EC, Data3: 0x419A, Data4: ( 0xBC,0x5D,0xCA,0x65,0xA4,0xCB,0x46,0xDA ))// BC8AAB62-66EC-419A-BC5D-CA65A4CB46DA +} + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties: test_component.IID { + .init(Data1: 0x05294BAD, Data2: 0xBC38, Data3: 0x48BF, Data4: ( 0x85,0xD7,0x77,0x0E,0x0E,0x2A,0xE0,0xBA ))// 05294BAD-BC38-48BF-85D7-770E0E2AE0BA +} + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemExtraProperties: test_component.IID { + .init(Data1: 0xC54361B2, Data2: 0x54CD, Data3: 0x432B, Data4: ( 0xBD,0xBC,0x4B,0x19,0xC4,0xB4,0x70,0xD7 ))// C54361B2-54CD-432B-BDBC-4B19C4B470D7 +} + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIThumbnailProperties: test_component.IID { + .init(Data1: 0x693DD42F, Data2: 0xDBE7, Data3: 0x49B5, Data4: ( 0xB3,0xB3,0x28,0x93,0xAC,0x5D,0x34,0x23 ))// 693DD42F-DBE7-49B5-B3B3-2893AC5D3423 +} + +private var IID___x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties: test_component.IID { + .init(Data1: 0x719AE507, Data2: 0x68DE, Data3: 0x4DB8, Data4: ( 0x97,0xDE,0x49,0x99,0x8C,0x05,0x9F,0x2F ))// 719AE507-68DE-4DB8-97DE-49998C059F2F +} + +public enum __ABI_Windows_Storage_FileProperties { + public class IBasicProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIBasicProperties } + + internal func get_SizeImpl() throws -> UInt64 { + var value: UINT64 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIBasicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &value)) + } + return value + } + + internal func get_DateModifiedImpl() throws -> test_component.DateTime { + var value: __x_ABI_CWindows_CFoundation_CDateTime = .init() + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIBasicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_DateModified(pThis, &value)) + } + return .from(abi: value) + } + + internal func get_ItemDateImpl() throws -> test_component.DateTime { + var value: __x_ABI_CWindows_CFoundation_CDateTime = .init() + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIBasicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_ItemDate(pThis, &value)) + } + return .from(abi: value) + } + + } + + public class IDocumentProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties } + + internal func get_AuthorImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Author(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_TitleImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Title(pThis, &value)) + } + return .init(from: value) + } + + internal func put_TitleImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Title(pThis, _value.get())) + } + } + + internal func get_KeywordsImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Keywords(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_CommentImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Comment(pThis, &value)) + } + return .init(from: value) + } + + internal func put_CommentImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Comment(pThis, _value.get())) + } + } + + } + + public class IImageProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties } + + internal func get_RatingImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Rating(pThis, &value)) + } + return value + } + + internal func put_RatingImpl(_ value: UInt32) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Rating(pThis, value)) + } + } + + internal func get_KeywordsImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Keywords(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_DateTakenImpl() throws -> test_component.DateTime { + var value: __x_ABI_CWindows_CFoundation_CDateTime = .init() + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_DateTaken(pThis, &value)) + } + return .from(abi: value) + } + + internal func put_DateTakenImpl(_ value: test_component.DateTime) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_DateTaken(pThis, .from(swift: value))) + } + } + + internal func get_WidthImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Width(pThis, &value)) + } + return value + } + + internal func get_HeightImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Height(pThis, &value)) + } + return value + } + + internal func get_TitleImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Title(pThis, &value)) + } + return .init(from: value) + } + + internal func put_TitleImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Title(pThis, _value.get())) + } + } + + internal func get_LatitudeImpl() throws -> Double? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Latitude(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIReference_1_doubleWrapper.unwrapFrom(abi: value) + } + + internal func get_LongitudeImpl() throws -> Double? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Longitude(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIReference_1_doubleWrapper.unwrapFrom(abi: value) + } + + internal func get_CameraManufacturerImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_CameraManufacturer(pThis, &value)) + } + return .init(from: value) + } + + internal func put_CameraManufacturerImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_CameraManufacturer(pThis, _value.get())) + } + } + + internal func get_CameraModelImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_CameraModel(pThis, &value)) + } + return .init(from: value) + } + + internal func put_CameraModelImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_CameraModel(pThis, _value.get())) + } + } + + internal func get_OrientationImpl() throws -> test_component.PhotoOrientation { + var value: __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Orientation(pThis, &value)) + } + return value + } + + internal func get_PeopleNamesImpl() throws -> test_component.AnyIVectorView? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_PeopleNames(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + } + + public class IMusicProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties } + + internal func get_AlbumImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Album(pThis, &value)) + } + return .init(from: value) + } + + internal func put_AlbumImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Album(pThis, _value.get())) + } + } + + internal func get_ArtistImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Artist(pThis, &value)) + } + return .init(from: value) + } + + internal func put_ArtistImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Artist(pThis, _value.get())) + } + } + + internal func get_GenreImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Genre(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_TrackNumberImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_TrackNumber(pThis, &value)) + } + return value + } + + internal func put_TrackNumberImpl(_ value: UInt32) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_TrackNumber(pThis, value)) + } + } + + internal func get_TitleImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Title(pThis, &value)) + } + return .init(from: value) + } + + internal func put_TitleImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Title(pThis, _value.get())) + } + } + + internal func get_RatingImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Rating(pThis, &value)) + } + return value + } + + internal func put_RatingImpl(_ value: UInt32) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Rating(pThis, value)) + } + } + + internal func get_DurationImpl() throws -> test_component.TimeSpan { + var value: __x_ABI_CWindows_CFoundation_CTimeSpan = .init() + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Duration(pThis, &value)) + } + return .from(abi: value) + } + + internal func get_BitrateImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Bitrate(pThis, &value)) + } + return value + } + + internal func get_AlbumArtistImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_AlbumArtist(pThis, &value)) + } + return .init(from: value) + } + + internal func put_AlbumArtistImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_AlbumArtist(pThis, _value.get())) + } + } + + internal func get_ComposersImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Composers(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_ConductorsImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Conductors(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_SubtitleImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Subtitle(pThis, &value)) + } + return .init(from: value) + } + + internal func put_SubtitleImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Subtitle(pThis, _value.get())) + } + } + + internal func get_ProducersImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Producers(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_PublisherImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Publisher(pThis, &value)) + } + return .init(from: value) + } + + internal func put_PublisherImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Publisher(pThis, _value.get())) + } + } + + internal func get_WritersImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Writers(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_YearImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Year(pThis, &value)) + } + return value + } + + internal func put_YearImpl(_ value: UInt32) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Year(pThis, value)) + } + } + + } + + public class IStorageItemContentProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties } + + internal func GetMusicPropertiesAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetMusicPropertiesAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.unwrapFrom(abi: operation) + } + + internal func GetVideoPropertiesAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetVideoPropertiesAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.unwrapFrom(abi: operation) + } + + internal func GetImagePropertiesAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetImagePropertiesAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.unwrapFrom(abi: operation) + } + + internal func GetDocumentPropertiesAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetDocumentPropertiesAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageItemExtraProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemExtraProperties } + + open func RetrievePropertiesAsyncImpl(_ propertiesToRetrieve: test_component.AnyIIterable?) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + let propertiesToRetrieveWrapper = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper(propertiesToRetrieve) + let _propertiesToRetrieve = try! propertiesToRetrieveWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemExtraProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RetrievePropertiesAsync(pThis, _propertiesToRetrieve, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: operation) + } + + open func SavePropertiesAsyncImpl(_ propertiesToSave: test_component.AnyIIterable?>?) throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + let propertiesToSaveWrapper = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper(propertiesToSave) + let _propertiesToSave = try! propertiesToSaveWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemExtraProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SavePropertiesAsync(pThis, _propertiesToSave, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + open func SavePropertiesAsyncOverloadDefaultImpl() throws -> test_component.AnyIAsyncAction? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemExtraProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SavePropertiesAsyncOverloadDefault(pThis, &operationAbi)) + } + } + return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IStorageItemExtraPropertiesVTable: __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemExtraPropertiesVtbl = .init( + QueryInterface: { IStorageItemExtraPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageItemExtraPropertiesWrapper.addRef($0) }, + Release: { IStorageItemExtraPropertiesWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_FileProperties.IStorageItemExtraPropertiesWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.FileProperties.IStorageItemExtraProperties").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + RetrievePropertiesAsync: { + do { + guard let __unwrapped__instance = IStorageItemExtraPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let propertiesToRetrieve: test_component.AnyIIterable? = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.retrievePropertiesAsync(propertiesToRetrieve) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + SavePropertiesAsync: { + do { + guard let __unwrapped__instance = IStorageItemExtraPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let propertiesToSave: test_component.AnyIIterable?>? = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.savePropertiesAsync(propertiesToSave) + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + SavePropertiesAsyncOverloadDefault: { + do { + guard let __unwrapped__instance = IStorageItemExtraPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.savePropertiesAsync() + let operationWrapper = __ABI_Windows_Foundation.IAsyncActionWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageItemExtraPropertiesWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_FileProperties.IStorageItemExtraPropertiesBridge> + public class IThumbnailProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIThumbnailProperties } + + internal func get_OriginalWidthImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIThumbnailProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_OriginalWidth(pThis, &value)) + } + return value + } + + internal func get_OriginalHeightImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIThumbnailProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_OriginalHeight(pThis, &value)) + } + return value + } + + internal func get_ReturnedSmallerCachedSizeImpl() throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIThumbnailProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_ReturnedSmallerCachedSize(pThis, &value)) + } + return .init(from: value) + } + + internal func get_TypeImpl() throws -> test_component.ThumbnailType { + var value: __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailType = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIThumbnailProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Type(pThis, &value)) + } + return value + } + + } + + public class IVideoProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties } + + internal func get_RatingImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Rating(pThis, &value)) + } + return value + } + + internal func put_RatingImpl(_ value: UInt32) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Rating(pThis, value)) + } + } + + internal func get_KeywordsImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Keywords(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_WidthImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Width(pThis, &value)) + } + return value + } + + internal func get_HeightImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Height(pThis, &value)) + } + return value + } + + internal func get_DurationImpl() throws -> test_component.TimeSpan { + var value: __x_ABI_CWindows_CFoundation_CTimeSpan = .init() + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Duration(pThis, &value)) + } + return .from(abi: value) + } + + internal func get_LatitudeImpl() throws -> Double? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Latitude(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIReference_1_doubleWrapper.unwrapFrom(abi: value) + } + + internal func get_LongitudeImpl() throws -> Double? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Longitude(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIReference_1_doubleWrapper.unwrapFrom(abi: value) + } + + internal func get_TitleImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Title(pThis, &value)) + } + return .init(from: value) + } + + internal func put_TitleImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Title(pThis, _value.get())) + } + } + + internal func get_SubtitleImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Subtitle(pThis, &value)) + } + return .init(from: value) + } + + internal func put_SubtitleImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Subtitle(pThis, _value.get())) + } + } + + internal func get_ProducersImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Producers(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_PublisherImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Publisher(pThis, &value)) + } + return .init(from: value) + } + + internal func put_PublisherImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Publisher(pThis, _value.get())) + } + } + + internal func get_WritersImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Writers(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_YearImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Year(pThis, &value)) + } + return value + } + + internal func put_YearImpl(_ value: UInt32) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Year(pThis, value)) + } + } + + internal func get_BitrateImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Bitrate(pThis, &value)) + } + return value + } + + internal func get_DirectorsImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Directors(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_OrientationImpl() throws -> test_component.VideoOrientation { + var value: __x_ABI_CWindows_CStorage_CFileProperties_CVideoOrientation = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Orientation(pThis, &value)) + } + return value + } + + } + +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift new file mode 100644 index 00000000..106af0b0 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift @@ -0,0 +1,47 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +public enum __IMPL_Windows_Storage_FileProperties { + public enum IStorageItemExtraPropertiesBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemExtraProperties + public typealias SwiftABI = __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties + public typealias SwiftProjection = AnyIStorageItemExtraProperties + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageItemExtraPropertiesImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_FileProperties.IStorageItemExtraPropertiesVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageItemExtraPropertiesImpl: IStorageItemExtraProperties, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageItemExtraPropertiesBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.istorageitemextraproperties.retrievepropertiesasync) + fileprivate func retrievePropertiesAsync(_ propertiesToRetrieve: AnyIIterable!) throws -> AnyIAsyncOperation?>! { + try _default.RetrievePropertiesAsyncImpl(propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.istorageitemextraproperties.savepropertiesasync) + fileprivate func savePropertiesAsync(_ propertiesToSave: AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! { + try _default.SavePropertiesAsyncImpl(propertiesToSave) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.istorageitemextraproperties.savepropertiesasync) + fileprivate func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! { + try _default.SavePropertiesAsyncOverloadDefaultImpl() + } + + } + +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.FileProperties.swift b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties.swift new file mode 100644 index 00000000..ec54f33e --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties.swift @@ -0,0 +1,876 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.photoorientation) +public typealias PhotoOrientation = __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.propertyprefetchoptions) +public typealias PropertyPrefetchOptions = __x_ABI_CWindows_CStorage_CFileProperties_CPropertyPrefetchOptions +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.thumbnailmode) +public typealias ThumbnailMode = __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailMode +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.thumbnailoptions) +public typealias ThumbnailOptions = __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailOptions +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.thumbnailtype) +public typealias ThumbnailType = __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailType +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoorientation) +public typealias VideoOrientation = __x_ABI_CWindows_CStorage_CFileProperties_CVideoOrientation +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.basicproperties) +public final class BasicProperties : WinRTClass, IStorageItemExtraProperties { + private typealias SwiftABI = __ABI_Windows_Storage_FileProperties.IBasicProperties + private typealias CABI = __x_ABI_CWindows_CStorage_CFileProperties_CIBasicProperties + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CFileProperties_CIBasicProperties>?) -> BasicProperties? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.basicproperties.datemodified) + public var dateModified : test_component.DateTime { + get { try! _default.get_DateModifiedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.basicproperties.itemdate) + public var itemDate : test_component.DateTime { + get { try! _default.get_ItemDateImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.basicproperties.size) + public var size : UInt64 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IStorageItemExtraProperties: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.basicproperties.retrievepropertiesasync) + public func retrievePropertiesAsync(_ propertiesToRetrieve: AnyIIterable!) throws -> AnyIAsyncOperation?>! { + try _IStorageItemExtraProperties.RetrievePropertiesAsyncImpl(propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.basicproperties.savepropertiesasync) + public func savePropertiesAsync(_ propertiesToSave: AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncImpl(propertiesToSave) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.basicproperties.savepropertiesasync) + public func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncOverloadDefaultImpl() + } + + deinit { + _default = nil + _IStorageItemExtraProperties = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties) +public final class DocumentProperties : WinRTClass, IStorageItemExtraProperties { + private typealias SwiftABI = __ABI_Windows_Storage_FileProperties.IDocumentProperties + private typealias CABI = __x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CFileProperties_CIDocumentProperties>?) -> DocumentProperties? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageItemExtraProperties: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties.retrievepropertiesasync) + public func retrievePropertiesAsync(_ propertiesToRetrieve: AnyIIterable!) throws -> AnyIAsyncOperation?>! { + try _IStorageItemExtraProperties.RetrievePropertiesAsyncImpl(propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties.savepropertiesasync) + public func savePropertiesAsync(_ propertiesToSave: AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncImpl(propertiesToSave) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties.savepropertiesasync) + public func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties.author) + public var author : AnyIVector! { + get { try! _default.get_AuthorImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties.comment) + public var comment : String { + get { try! _default.get_CommentImpl() } + set { try! _default.put_CommentImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties.keywords) + public var keywords : AnyIVector! { + get { try! _default.get_KeywordsImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.documentproperties.title) + public var title : String { + get { try! _default.get_TitleImpl() } + set { try! _default.put_TitleImpl(newValue) } + } + + deinit { + _IStorageItemExtraProperties = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties) +public final class ImageProperties : WinRTClass, IStorageItemExtraProperties { + private typealias SwiftABI = __ABI_Windows_Storage_FileProperties.IImageProperties + private typealias CABI = __x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CFileProperties_CIImageProperties>?) -> ImageProperties? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageItemExtraProperties: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.retrievepropertiesasync) + public func retrievePropertiesAsync(_ propertiesToRetrieve: AnyIIterable!) throws -> AnyIAsyncOperation?>! { + try _IStorageItemExtraProperties.RetrievePropertiesAsyncImpl(propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.savepropertiesasync) + public func savePropertiesAsync(_ propertiesToSave: AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncImpl(propertiesToSave) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.savepropertiesasync) + public func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.cameramanufacturer) + public var cameraManufacturer : String { + get { try! _default.get_CameraManufacturerImpl() } + set { try! _default.put_CameraManufacturerImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.cameramodel) + public var cameraModel : String { + get { try! _default.get_CameraModelImpl() } + set { try! _default.put_CameraModelImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.datetaken) + public var dateTaken : test_component.DateTime { + get { try! _default.get_DateTakenImpl() } + set { try! _default.put_DateTakenImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.height) + public var height : UInt32 { + get { try! _default.get_HeightImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.keywords) + public var keywords : AnyIVector! { + get { try! _default.get_KeywordsImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.latitude) + public var latitude : Double? { + get { try! _default.get_LatitudeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.longitude) + public var longitude : Double? { + get { try! _default.get_LongitudeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.orientation) + public var orientation : PhotoOrientation { + get { try! _default.get_OrientationImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.peoplenames) + public var peopleNames : AnyIVectorView! { + get { try! _default.get_PeopleNamesImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.rating) + public var rating : UInt32 { + get { try! _default.get_RatingImpl() } + set { try! _default.put_RatingImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.title) + public var title : String { + get { try! _default.get_TitleImpl() } + set { try! _default.put_TitleImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.imageproperties.width) + public var width : UInt32 { + get { try! _default.get_WidthImpl() } + } + + deinit { + _IStorageItemExtraProperties = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties) +public final class MusicProperties : WinRTClass, IStorageItemExtraProperties { + private typealias SwiftABI = __ABI_Windows_Storage_FileProperties.IMusicProperties + private typealias CABI = __x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CFileProperties_CIMusicProperties>?) -> MusicProperties? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageItemExtraProperties: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.retrievepropertiesasync) + public func retrievePropertiesAsync(_ propertiesToRetrieve: AnyIIterable!) throws -> AnyIAsyncOperation?>! { + try _IStorageItemExtraProperties.RetrievePropertiesAsyncImpl(propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.savepropertiesasync) + public func savePropertiesAsync(_ propertiesToSave: AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncImpl(propertiesToSave) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.savepropertiesasync) + public func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.album) + public var album : String { + get { try! _default.get_AlbumImpl() } + set { try! _default.put_AlbumImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.albumartist) + public var albumArtist : String { + get { try! _default.get_AlbumArtistImpl() } + set { try! _default.put_AlbumArtistImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.artist) + public var artist : String { + get { try! _default.get_ArtistImpl() } + set { try! _default.put_ArtistImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.bitrate) + public var bitrate : UInt32 { + get { try! _default.get_BitrateImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.composers) + public var composers : AnyIVector! { + get { try! _default.get_ComposersImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.conductors) + public var conductors : AnyIVector! { + get { try! _default.get_ConductorsImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.duration) + public var duration : test_component.TimeSpan { + get { try! _default.get_DurationImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.genre) + public var genre : AnyIVector! { + get { try! _default.get_GenreImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.producers) + public var producers : AnyIVector! { + get { try! _default.get_ProducersImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.publisher) + public var publisher : String { + get { try! _default.get_PublisherImpl() } + set { try! _default.put_PublisherImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.rating) + public var rating : UInt32 { + get { try! _default.get_RatingImpl() } + set { try! _default.put_RatingImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.subtitle) + public var subtitle : String { + get { try! _default.get_SubtitleImpl() } + set { try! _default.put_SubtitleImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.title) + public var title : String { + get { try! _default.get_TitleImpl() } + set { try! _default.put_TitleImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.tracknumber) + public var trackNumber : UInt32 { + get { try! _default.get_TrackNumberImpl() } + set { try! _default.put_TrackNumberImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.writers) + public var writers : AnyIVector! { + get { try! _default.get_WritersImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.musicproperties.year) + public var year : UInt32 { + get { try! _default.get_YearImpl() } + set { try! _default.put_YearImpl(newValue) } + } + + deinit { + _IStorageItemExtraProperties = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties) +public final class StorageItemContentProperties : WinRTClass, IStorageItemExtraProperties { + private typealias SwiftABI = __ABI_Windows_Storage_FileProperties.IStorageItemContentProperties + private typealias CABI = __x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CFileProperties_CIStorageItemContentProperties>?) -> StorageItemContentProperties? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageItemExtraProperties: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties.retrievepropertiesasync) + public func retrievePropertiesAsync(_ propertiesToRetrieve: AnyIIterable!) throws -> AnyIAsyncOperation?>! { + try _IStorageItemExtraProperties.RetrievePropertiesAsyncImpl(propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties.savepropertiesasync) + public func savePropertiesAsync(_ propertiesToSave: AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncImpl(propertiesToSave) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties.savepropertiesasync) + public func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties.getmusicpropertiesasync) + public func getMusicPropertiesAsync() throws -> AnyIAsyncOperation! { + try _default.GetMusicPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties.getvideopropertiesasync) + public func getVideoPropertiesAsync() throws -> AnyIAsyncOperation! { + try _default.GetVideoPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties.getimagepropertiesasync) + public func getImagePropertiesAsync() throws -> AnyIAsyncOperation! { + try _default.GetImagePropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemcontentproperties.getdocumentpropertiesasync) + public func getDocumentPropertiesAsync() throws -> AnyIAsyncOperation! { + try _default.GetDocumentPropertiesAsyncImpl() + } + + deinit { + _IStorageItemExtraProperties = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail) +public final class StorageItemThumbnail : WinRTClass, test_component.IClosable, test_component.IInputStream, test_component.IOutputStream, test_component.IRandomAccessStream, test_component.IContentTypeProvider, test_component.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() -> UnsafeMutablePointer? { + 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>?) -> StorageItemThumbnail? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.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.storage.fileproperties.storageitemthumbnail.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.storage.fileproperties.storageitemthumbnail.readasync) + public func readAsync(_ buffer: test_component.AnyIBuffer!, _ count: UInt32, _ options: test_component.InputStreamOptions) throws -> AnyIAsyncOperationWithProgress! { + 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.storage.fileproperties.storageitemthumbnail.writeasync) + public func writeAsync(_ buffer: test_component.AnyIBuffer!) throws -> AnyIAsyncOperationWithProgress! { + try _IOutputStream.WriteAsyncImpl(buffer) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.flushasync) + public func flushAsync() throws -> AnyIAsyncOperation! { + try _IOutputStream.FlushAsyncImpl() + } + + private lazy var _IRandomAccessStream: __ABI_Windows_Storage_Streams.IRandomAccessStream! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.getinputstreamat) + public func getInputStreamAt(_ position: UInt64) throws -> test_component.AnyIInputStream! { + try _IRandomAccessStream.GetInputStreamAtImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.getoutputstreamat) + public func getOutputStreamAt(_ position: UInt64) throws -> test_component.AnyIOutputStream! { + try _IRandomAccessStream.GetOutputStreamAtImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.seek) + public func seek(_ position: UInt64) throws { + try _IRandomAccessStream.SeekImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.clonestream) + public func cloneStream() throws -> test_component.AnyIRandomAccessStream! { + try _IRandomAccessStream.CloneStreamImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.canread) + public var canRead : Bool { + get { try! _IRandomAccessStream.get_CanReadImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.canwrite) + public var canWrite : Bool { + get { try! _IRandomAccessStream.get_CanWriteImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.position) + public var position : UInt64 { + get { try! _IRandomAccessStream.get_PositionImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.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.storage.fileproperties.storageitemthumbnail.contenttype) + public var contentType : String { + get { try! _IContentTypeProvider.get_ContentTypeImpl() } + } + + private lazy var _IThumbnailProperties: __ABI_Windows_Storage_FileProperties.IThumbnailProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.originalheight) + public var originalHeight : UInt32 { + get { try! _IThumbnailProperties.get_OriginalHeightImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.originalwidth) + public var originalWidth : UInt32 { + get { try! _IThumbnailProperties.get_OriginalWidthImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.returnedsmallercachedsize) + public var returnedSmallerCachedSize : Bool { + get { try! _IThumbnailProperties.get_ReturnedSmallerCachedSizeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.storageitemthumbnail.type) + public var type : ThumbnailType { + get { try! _IThumbnailProperties.get_TypeImpl() } + } + + deinit { + _IClosable = nil + _IInputStream = nil + _IOutputStream = nil + _IRandomAccessStream = nil + _IContentTypeProvider = nil + _default = nil + _IThumbnailProperties = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties) +public final class VideoProperties : WinRTClass, IStorageItemExtraProperties { + private typealias SwiftABI = __ABI_Windows_Storage_FileProperties.IVideoProperties + private typealias CABI = __x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CFileProperties_CIVideoProperties>?) -> VideoProperties? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageItemExtraProperties: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.retrievepropertiesasync) + public func retrievePropertiesAsync(_ propertiesToRetrieve: AnyIIterable!) throws -> AnyIAsyncOperation?>! { + try _IStorageItemExtraProperties.RetrievePropertiesAsyncImpl(propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.savepropertiesasync) + public func savePropertiesAsync(_ propertiesToSave: AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncImpl(propertiesToSave) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.savepropertiesasync) + public func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItemExtraProperties.SavePropertiesAsyncOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.bitrate) + public var bitrate : UInt32 { + get { try! _default.get_BitrateImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.directors) + public var directors : AnyIVector! { + get { try! _default.get_DirectorsImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.duration) + public var duration : test_component.TimeSpan { + get { try! _default.get_DurationImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.height) + public var height : UInt32 { + get { try! _default.get_HeightImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.keywords) + public var keywords : AnyIVector! { + get { try! _default.get_KeywordsImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.latitude) + public var latitude : Double? { + get { try! _default.get_LatitudeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.longitude) + public var longitude : Double? { + get { try! _default.get_LongitudeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.orientation) + public var orientation : VideoOrientation { + get { try! _default.get_OrientationImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.producers) + public var producers : AnyIVector! { + get { try! _default.get_ProducersImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.publisher) + public var publisher : String { + get { try! _default.get_PublisherImpl() } + set { try! _default.put_PublisherImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.rating) + public var rating : UInt32 { + get { try! _default.get_RatingImpl() } + set { try! _default.put_RatingImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.subtitle) + public var subtitle : String { + get { try! _default.get_SubtitleImpl() } + set { try! _default.put_SubtitleImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.title) + public var title : String { + get { try! _default.get_TitleImpl() } + set { try! _default.put_TitleImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.width) + public var width : UInt32 { + get { try! _default.get_WidthImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.writers) + public var writers : AnyIVector! { + get { try! _default.get_WritersImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.videoproperties.year) + public var year : UInt32 { + get { try! _default.get_YearImpl() } + set { try! _default.put_YearImpl(newValue) } + } + + deinit { + _IStorageItemExtraProperties = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.istorageitemextraproperties) +public protocol IStorageItemExtraProperties : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.istorageitemextraproperties.retrievepropertiesasync) + func retrievePropertiesAsync(_ propertiesToRetrieve: test_component.AnyIIterable!) throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.istorageitemextraproperties.savepropertiesasync) + func savePropertiesAsync(_ propertiesToSave: test_component.AnyIIterable?>!) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileproperties.istorageitemextraproperties.savepropertiesasync) + func savePropertiesAsync() throws -> test_component.AnyIAsyncAction! +} + +extension IStorageItemExtraProperties { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_FileProperties.IStorageItemExtraPropertiesWrapper.IID: + let wrapper = __ABI_Windows_Storage_FileProperties.IStorageItemExtraPropertiesWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageItemExtraProperties = any IStorageItemExtraProperties + +extension test_component.PhotoOrientation { + public static var unspecified : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_Unspecified + } + public static var normal : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_Normal + } + public static var flipHorizontal : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_FlipHorizontal + } + public static var rotate180 : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_Rotate180 + } + public static var flipVertical : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_FlipVertical + } + public static var transpose : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_Transpose + } + public static var rotate270 : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_Rotate270 + } + public static var transverse : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_Transverse + } + public static var rotate90 : test_component.PhotoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CPhotoOrientation_Rotate90 + } +} +extension test_component.PhotoOrientation: @retroactive Hashable, @retroactive Codable {} + +extension test_component.PropertyPrefetchOptions { + public static var none : test_component.PropertyPrefetchOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CPropertyPrefetchOptions_None + } + public static var musicProperties : test_component.PropertyPrefetchOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CPropertyPrefetchOptions_MusicProperties + } + public static var videoProperties : test_component.PropertyPrefetchOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CPropertyPrefetchOptions_VideoProperties + } + public static var imageProperties : test_component.PropertyPrefetchOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CPropertyPrefetchOptions_ImageProperties + } + public static var documentProperties : test_component.PropertyPrefetchOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CPropertyPrefetchOptions_DocumentProperties + } + public static var basicProperties : test_component.PropertyPrefetchOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CPropertyPrefetchOptions_BasicProperties + } +} +extension test_component.PropertyPrefetchOptions: @retroactive Hashable, @retroactive Codable {} + +extension test_component.ThumbnailMode { + public static var picturesView : test_component.ThumbnailMode { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailMode_PicturesView + } + public static var videosView : test_component.ThumbnailMode { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailMode_VideosView + } + public static var musicView : test_component.ThumbnailMode { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailMode_MusicView + } + public static var documentsView : test_component.ThumbnailMode { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailMode_DocumentsView + } + public static var listView : test_component.ThumbnailMode { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailMode_ListView + } + public static var singleItem : test_component.ThumbnailMode { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailMode_SingleItem + } +} +extension test_component.ThumbnailMode: @retroactive Hashable, @retroactive Codable {} + +extension test_component.ThumbnailOptions { + public static var none : test_component.ThumbnailOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailOptions_None + } + public static var returnOnlyIfCached : test_component.ThumbnailOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailOptions_ReturnOnlyIfCached + } + public static var resizeThumbnail : test_component.ThumbnailOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailOptions_ResizeThumbnail + } + public static var useCurrentScale : test_component.ThumbnailOptions { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailOptions_UseCurrentScale + } +} +extension test_component.ThumbnailOptions: @retroactive Hashable, @retroactive Codable {} + +extension test_component.ThumbnailType { + public static var image : test_component.ThumbnailType { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailType_Image + } + public static var icon : test_component.ThumbnailType { + __x_ABI_CWindows_CStorage_CFileProperties_CThumbnailType_Icon + } +} +extension test_component.ThumbnailType: @retroactive Hashable, @retroactive Codable {} + +extension test_component.VideoOrientation { + public static var normal : test_component.VideoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CVideoOrientation_Normal + } + public static var rotate90 : test_component.VideoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CVideoOrientation_Rotate90 + } + public static var rotate180 : test_component.VideoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CVideoOrientation_Rotate180 + } + public static var rotate270 : test_component.VideoOrientation { + __x_ABI_CWindows_CStorage_CFileProperties_CVideoOrientation_Rotate270 + } +} +extension test_component.VideoOrientation: @retroactive Hashable, @retroactive Codable {} + diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Search+ABI.swift b/tests/test_component/Sources/test_component/Windows.Storage.Search+ABI.swift new file mode 100644 index 00000000..6d5872ae --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.Search+ABI.swift @@ -0,0 +1,873 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptions: test_component.IID { + .init(Data1: 0x1E5E46EE, Data2: 0x0F45, Data3: 0x4838, Data4: ( 0xA8,0xE9,0xD0,0x47,0x9D,0x44,0x6C,0x30 ))// 1E5E46EE-0F45-4838-A8E9-D0479D446C30 +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsFactory: test_component.IID { + .init(Data1: 0x032E1F8C, Data2: 0xA9C1, Data3: 0x4E71, Data4: ( 0x80,0x11,0x0D,0xEE,0x9D,0x48,0x11,0xA3 ))// 032E1F8C-A9C1-4E71-8011-0DEE9D4811A3 +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsWithProviderFilter: test_component.IID { + .init(Data1: 0x5B9D1026, Data2: 0x15C4, Data3: 0x44DD, Data4: ( 0xB8,0x9A,0x47,0xA5,0x9B,0x7D,0x7C,0x4F ))// 5B9D1026-15C4-44DD-B89A-47A59B7D7C4F +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult: test_component.IID { + .init(Data1: 0x52FDA447, Data2: 0x2BAA, Data3: 0x412C, Data4: ( 0xB2,0x9F,0xD4,0xB1,0x77,0x8E,0xFA,0x1E ))// 52FDA447-2BAA-412C-B29F-D4B1778EFA1E +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult2: test_component.IID { + .init(Data1: 0x4E5DB9DD, Data2: 0x7141, Data3: 0x46C4, Data4: ( 0x8B,0xE3,0xE9,0xDC,0x9E,0x27,0x27,0x5C ))// 4E5DB9DD-7141-46C4-8BE3-E9DC9E27275C +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations: test_component.IID { + .init(Data1: 0xCB43CCC9, Data2: 0x446B, Data3: 0x4A4F, Data4: ( 0xBE,0x97,0x75,0x77,0x71,0xBE,0x52,0x03 ))// CB43CCC9-446B-4A4F-BE97-757771BE5203 +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryResult: test_component.IID { + .init(Data1: 0x6654C911, Data2: 0x7D66, Data3: 0x46FA, Data4: ( 0xAE,0xCF,0xE4,0xA4,0xBA,0xA9,0x3A,0xB8 ))// 6654C911-7D66-46FA-AECF-E4A4BAA93AB8 +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIStorageItemQueryResult: test_component.IID { + .init(Data1: 0xE8948079, Data2: 0x9D58, Data3: 0x47B8, Data4: ( 0xB2,0xB2,0x41,0xB0,0x7F,0x47,0x95,0xF9 ))// E8948079-9D58-47B8-B2B2-41B07F4795F9 +} + +private var IID___x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase: test_component.IID { + .init(Data1: 0xC297D70D, Data2: 0x7353, Data3: 0x47AB, Data4: ( 0xBA,0x58,0x8C,0x61,0x42,0x5D,0xC5,0x4B ))// C297D70D-7353-47AB-BA58-8C61425DC54B +} + +public enum __ABI_Windows_Storage_Search { + public class IQueryOptions: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptions } + + internal func get_FileTypeFilterImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_FileTypeFilter(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + internal func get_FolderDepthImpl() throws -> test_component.FolderDepth { + var value: __x_ABI_CWindows_CStorage_CSearch_CFolderDepth = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_FolderDepth(pThis, &value)) + } + return value + } + + internal func put_FolderDepthImpl(_ value: test_component.FolderDepth) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_FolderDepth(pThis, value)) + } + } + + internal func get_ApplicationSearchFilterImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_ApplicationSearchFilter(pThis, &value)) + } + return .init(from: value) + } + + internal func put_ApplicationSearchFilterImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_ApplicationSearchFilter(pThis, _value.get())) + } + } + + internal func get_UserSearchFilterImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_UserSearchFilter(pThis, &value)) + } + return .init(from: value) + } + + internal func put_UserSearchFilterImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_UserSearchFilter(pThis, _value.get())) + } + } + + internal func get_LanguageImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Language(pThis, &value)) + } + return .init(from: value) + } + + internal func put_LanguageImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Language(pThis, _value.get())) + } + } + + internal func get_IndexerOptionImpl() throws -> test_component.IndexerOption { + var value: __x_ABI_CWindows_CStorage_CSearch_CIndexerOption = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_IndexerOption(pThis, &value)) + } + return value + } + + internal func put_IndexerOptionImpl(_ value: test_component.IndexerOption) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_IndexerOption(pThis, value)) + } + } + + internal func get_SortOrderImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_SortOrder(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.unwrapFrom(abi: value) + } + + internal func get_GroupPropertyNameImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_GroupPropertyName(pThis, &value)) + } + return .init(from: value) + } + + internal func get_DateStackOptionImpl() throws -> test_component.DateStackOption { + var value: __x_ABI_CWindows_CStorage_CSearch_CDateStackOption = .init(0) + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_DateStackOption(pThis, &value)) + } + return value + } + + internal func SaveToStringImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SaveToString(pThis, &value)) + } + return .init(from: value) + } + + internal func LoadFromStringImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.LoadFromString(pThis, _value.get())) + } + } + + internal func SetThumbnailPrefetchImpl(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetThumbnailPrefetch(pThis, mode, requestedSize, options)) + } + } + + internal func SetPropertyPrefetchImpl(_ options: test_component.PropertyPrefetchOptions, _ propertiesToRetrieve: test_component.AnyIIterable?) throws { + let propertiesToRetrieveWrapper = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper(propertiesToRetrieve) + let _propertiesToRetrieve = try! propertiesToRetrieveWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetPropertyPrefetch(pThis, options, _propertiesToRetrieve)) + } + } + + } + + public class IQueryOptionsFactory: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsFactory } + + internal func CreateCommonFileQueryImpl(_ query: test_component.CommonFileQuery, _ fileTypeFilter: test_component.AnyIIterable?) throws -> IQueryOptions { + let (queryOptions) = try ComPtrs.initialize { queryOptionsAbi in + let fileTypeFilterWrapper = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper(fileTypeFilter) + let _fileTypeFilter = try! fileTypeFilterWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsFactory.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateCommonFileQuery(pThis, query, _fileTypeFilter, &queryOptionsAbi)) + } + } + return IQueryOptions(queryOptions!) + } + + internal func CreateCommonFolderQueryImpl(_ query: test_component.CommonFolderQuery) throws -> IQueryOptions { + let (queryOptions) = try ComPtrs.initialize { queryOptionsAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsFactory.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateCommonFolderQuery(pThis, query, &queryOptionsAbi)) + } + } + return IQueryOptions(queryOptions!) + } + + } + + public class IQueryOptionsWithProviderFilter: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsWithProviderFilter } + + internal func get_StorageProviderIdFilterImpl() throws -> test_component.AnyIVector? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsWithProviderFilter.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_StorageProviderIdFilter(pThis, &valueAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) + } + + } + + public class IStorageFileQueryResult: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult } + + internal func GetFilesAsyncImpl(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFilesAsync(pThis, startIndex, maxNumberOfItems, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + internal func GetFilesAsyncDefaultStartAndCountImpl() throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFilesAsyncDefaultStartAndCount(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageFileQueryResult2: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult2 } + + internal func GetMatchingPropertiesWithRangesImpl(_ file: test_component.StorageFile?) throws -> test_component.AnyIMap?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult2.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetMatchingPropertiesWithRanges(pThis, RawPointer(file), &resultAbi)) + } + } + return test_component.__x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) + } + + } + + public class IStorageFolderQueryOperations: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations } + + open func GetIndexedStateAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetIndexedStateAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.unwrapFrom(abi: operation) + } + + open func CreateFileQueryOverloadDefaultImpl() throws -> test_component.StorageFileQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFileQueryOverloadDefault(pThis, &valueAbi)) + } + } + return .from(abi: value) + } + + open func CreateFileQueryImpl(_ query: test_component.CommonFileQuery) throws -> test_component.StorageFileQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFileQuery(pThis, query, &valueAbi)) + } + } + return .from(abi: value) + } + + open func CreateFileQueryWithOptionsImpl(_ queryOptions: test_component.QueryOptions?) throws -> test_component.StorageFileQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFileQueryWithOptions(pThis, RawPointer(queryOptions), &valueAbi)) + } + } + return .from(abi: value) + } + + open func CreateFolderQueryOverloadDefaultImpl() throws -> test_component.StorageFolderQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFolderQueryOverloadDefault(pThis, &valueAbi)) + } + } + return .from(abi: value) + } + + open func CreateFolderQueryImpl(_ query: test_component.CommonFolderQuery) throws -> test_component.StorageFolderQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFolderQuery(pThis, query, &valueAbi)) + } + } + return .from(abi: value) + } + + open func CreateFolderQueryWithOptionsImpl(_ queryOptions: test_component.QueryOptions?) throws -> test_component.StorageFolderQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateFolderQueryWithOptions(pThis, RawPointer(queryOptions), &valueAbi)) + } + } + return .from(abi: value) + } + + open func CreateItemQueryImpl() throws -> test_component.StorageItemQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateItemQuery(pThis, &valueAbi)) + } + } + return .from(abi: value) + } + + open func CreateItemQueryWithOptionsImpl(_ queryOptions: test_component.QueryOptions?) throws -> test_component.StorageItemQueryResult? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateItemQueryWithOptions(pThis, RawPointer(queryOptions), &valueAbi)) + } + } + return .from(abi: value) + } + + open func GetFilesAsyncImpl(_ query: test_component.CommonFileQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFilesAsync(pThis, query, startIndex, maxItemsToRetrieve, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func GetFilesAsyncOverloadDefaultStartAndCountImpl(_ query: test_component.CommonFileQuery) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFilesAsyncOverloadDefaultStartAndCount(pThis, query, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) + } + + open func GetFoldersAsyncImpl(_ query: test_component.CommonFolderQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFoldersAsync(pThis, query, startIndex, maxItemsToRetrieve, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + open func GetFoldersAsyncOverloadDefaultStartAndCountImpl(_ query: test_component.CommonFolderQuery) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFoldersAsyncOverloadDefaultStartAndCount(pThis, query, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + open func GetItemsAsyncImpl(_ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetItemsAsync(pThis, startIndex, maxItemsToRetrieve, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) + } + + open func AreQueryOptionsSupportedImpl(_ queryOptions: test_component.QueryOptions?) throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.AreQueryOptionsSupported(pThis, RawPointer(queryOptions), &value)) + } + return .init(from: value) + } + + open func IsCommonFolderQuerySupportedImpl(_ query: test_component.CommonFolderQuery) throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IsCommonFolderQuerySupported(pThis, query, &value)) + } + return .init(from: value) + } + + open func IsCommonFileQuerySupportedImpl(_ query: test_component.CommonFileQuery) throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IsCommonFileQuerySupported(pThis, query, &value)) + } + return .init(from: value) + } + + } + + internal static var IStorageFolderQueryOperationsVTable: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperationsVtbl = .init( + QueryInterface: { IStorageFolderQueryOperationsWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageFolderQueryOperationsWrapper.addRef($0) }, + Release: { IStorageFolderQueryOperationsWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Search.IStorageFolderQueryOperationsWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Search.IStorageFolderQueryOperations").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetIndexedStateAsync: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.getIndexedStateAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFileQueryOverloadDefault: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = try __unwrapped__instance.createFileQuery() + value?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFileQuery: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFileQuery = $1 + let value = try __unwrapped__instance.createFileQuery(query) + value?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFileQueryWithOptions: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let queryOptions: test_component.QueryOptions? = .from(abi: ComPtr($1)) + let value = try __unwrapped__instance.createFileQueryWithOptions(queryOptions) + value?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFolderQueryOverloadDefault: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = try __unwrapped__instance.createFolderQuery() + value?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFolderQuery: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFolderQuery = $1 + let value = try __unwrapped__instance.createFolderQuery(query) + value?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateFolderQueryWithOptions: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let queryOptions: test_component.QueryOptions? = .from(abi: ComPtr($1)) + let value = try __unwrapped__instance.createFolderQueryWithOptions(queryOptions) + value?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateItemQuery: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = try __unwrapped__instance.createItemQuery() + value?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CreateItemQueryWithOptions: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let queryOptions: test_component.QueryOptions? = .from(abi: ComPtr($1)) + let value = try __unwrapped__instance.createItemQueryWithOptions(queryOptions) + value?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFilesAsync: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFileQuery = $1 + let startIndex: UInt32 = $2 + let maxItemsToRetrieve: UInt32 = $3 + let operation = try __unwrapped__instance.getFilesAsync(query, startIndex, maxItemsToRetrieve) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($4) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFilesAsyncOverloadDefaultStartAndCount: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFileQuery = $1 + let operation = try __unwrapped__instance.getFilesAsync(query) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFoldersAsync: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFolderQuery = $1 + let startIndex: UInt32 = $2 + let maxItemsToRetrieve: UInt32 = $3 + let operation = try __unwrapped__instance.getFoldersAsync(query, startIndex, maxItemsToRetrieve) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(operation) + operationWrapper?.copyTo($4) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetFoldersAsyncOverloadDefaultStartAndCount: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFolderQuery = $1 + let operation = try __unwrapped__instance.getFoldersAsync(query) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetItemsAsync: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let startIndex: UInt32 = $1 + let maxItemsToRetrieve: UInt32 = $2 + let operation = try __unwrapped__instance.getItemsAsync(startIndex, maxItemsToRetrieve) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(operation) + operationWrapper?.copyTo($3) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + AreQueryOptionsSupported: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let queryOptions: test_component.QueryOptions? = .from(abi: ComPtr($1)) + let value = try __unwrapped__instance.areQueryOptionsSupported(queryOptions) + $2?.initialize(to: .init(from: value)) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + IsCommonFolderQuerySupported: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFolderQuery = $1 + let value = try __unwrapped__instance.isCommonFolderQuerySupported(query) + $2?.initialize(to: .init(from: value)) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + IsCommonFileQuerySupported: { + do { + guard let __unwrapped__instance = IStorageFolderQueryOperationsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let query: test_component.CommonFileQuery = $1 + let value = try __unwrapped__instance.isCommonFileQuerySupported(query) + $2?.initialize(to: .init(from: value)) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageFolderQueryOperationsWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Search.IStorageFolderQueryOperationsBridge> + public class IStorageFolderQueryResult: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryResult } + + internal func GetFoldersAsyncImpl(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryResult.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFoldersAsync(pThis, startIndex, maxNumberOfItems, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + internal func GetFoldersAsyncDefaultStartAndCountImpl() throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryResult.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetFoldersAsyncDefaultStartAndCount(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageItemQueryResult: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageItemQueryResult } + + internal func GetItemsAsyncImpl(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageItemQueryResult.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetItemsAsync(pThis, startIndex, maxNumberOfItems, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) + } + + internal func GetItemsAsyncDefaultStartAndCountImpl() throws -> test_component.AnyIAsyncOperation?>? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageItemQueryResult.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetItemsAsyncDefaultStartAndCount(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) + } + + } + + public class IStorageQueryResultBase: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase } + + open func GetItemCountAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetItemCountAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.unwrapFrom(abi: operation) + } + + open func get_FolderImpl() throws -> test_component.StorageFolder? { + let (container) = try ComPtrs.initialize { containerAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Folder(pThis, &containerAbi)) + } + } + return .from(abi: container) + } + + open func add_ContentsChangedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { + var eventCookie: EventRegistrationToken = .init() + let handlerWrapper = test_component.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.add_ContentsChanged(pThis, _handler, &eventCookie)) + } + return eventCookie + } + + open func remove_ContentsChangedImpl(_ eventCookie: EventRegistrationToken) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ContentsChanged(pThis, eventCookie)) + } + } + + open func add_OptionsChangedImpl(_ changedHandler: TypedEventHandler?) throws -> EventRegistrationToken { + var eventCookie: EventRegistrationToken = .init() + let changedHandlerWrapper = test_component.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper(changedHandler) + let _changedHandler = try! changedHandlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.add_OptionsChanged(pThis, _changedHandler, &eventCookie)) + } + return eventCookie + } + + open func remove_OptionsChangedImpl(_ eventCookie: EventRegistrationToken) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.remove_OptionsChanged(pThis, eventCookie)) + } + } + + open func FindStartIndexAsyncImpl(_ value: Any?) throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + let valueWrapper = __ABI_.AnyWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.FindStartIndexAsync(pThis, _value, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.unwrapFrom(abi: operation) + } + + open func GetCurrentQueryOptionsImpl() throws -> test_component.QueryOptions? { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetCurrentQueryOptions(pThis, &valueAbi)) + } + } + return .from(abi: value) + } + + open func ApplyNewQueryOptionsImpl(_ newQueryOptions: test_component.QueryOptions?) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ApplyNewQueryOptions(pThis, RawPointer(newQueryOptions))) + } + } + + } + + internal static var IStorageQueryResultBaseVTable: __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBaseVtbl = .init( + QueryInterface: { IStorageQueryResultBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { IStorageQueryResultBaseWrapper.addRef($0) }, + Release: { IStorageQueryResultBaseWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Search.IStorageQueryResultBaseWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Search.IStorageQueryResultBase").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetItemCountAsync: { + do { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.getItemCountAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + get_Folder: { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let container = __unwrapped__instance.folder + container?.copyTo($1) + return S_OK + }, + + add_ContentsChanged: { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + let eventCookie = __unwrapped__instance.contentsChanged.addHandler(handler) + $2?.initialize(to: .from(swift: eventCookie)) + return S_OK + }, + + remove_ContentsChanged: { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let eventCookie: EventRegistrationToken = $1 + __unwrapped__instance.contentsChanged.removeHandler(eventCookie) + return S_OK + }, + + add_OptionsChanged: { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let changedHandler = test_component.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + let eventCookie = __unwrapped__instance.optionsChanged.addHandler(changedHandler) + $2?.initialize(to: .from(swift: eventCookie)) + return S_OK + }, + + remove_OptionsChanged: { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let eventCookie: EventRegistrationToken = $1 + __unwrapped__instance.optionsChanged.removeHandler(eventCookie) + return S_OK + }, + + FindStartIndexAsync: { + do { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.findStartIndexAsync(value) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetCurrentQueryOptions: { + do { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = try __unwrapped__instance.getCurrentQueryOptions() + value?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + ApplyNewQueryOptions: { + do { + guard let __unwrapped__instance = IStorageQueryResultBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let newQueryOptions: test_component.QueryOptions? = .from(abi: ComPtr($1)) + try __unwrapped__instance.applyNewQueryOptions(newQueryOptions) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IStorageQueryResultBaseWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Search.IStorageQueryResultBaseBridge> + public class _ABI_SortEntry { + public var val: __x_ABI_CWindows_CStorage_CSearch_CSortEntry = .init() + public init() { } + public init(from swift: test_component.SortEntry) { + val.PropertyName = try! HString(swift.propertyName).detach() + val.AscendingOrder = .init(from: swift.ascendingOrder) + } + + public func detach() -> __x_ABI_CWindows_CStorage_CSearch_CSortEntry { + let result = val + val.PropertyName = nil + return result + } + + deinit { + WindowsDeleteString(val.PropertyName) + } + } +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift new file mode 100644 index 00000000..15c17d31 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift @@ -0,0 +1,193 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +public enum __IMPL_Windows_Storage_Search { + public enum IStorageFolderQueryOperationsBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations + public typealias SwiftABI = __ABI_Windows_Storage_Search.IStorageFolderQueryOperations + public typealias SwiftProjection = AnyIStorageFolderQueryOperations + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageFolderQueryOperationsImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Search.IStorageFolderQueryOperationsVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageFolderQueryOperationsImpl: IStorageFolderQueryOperations, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageFolderQueryOperationsBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getindexedstateasync) + fileprivate func getIndexedStateAsync() throws -> AnyIAsyncOperation! { + try _default.GetIndexedStateAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfilequery) + fileprivate func createFileQuery() throws -> StorageFileQueryResult! { + try _default.CreateFileQueryOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfilequery) + fileprivate func createFileQuery(_ query: CommonFileQuery) throws -> StorageFileQueryResult! { + try _default.CreateFileQueryImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfilequerywithoptions) + fileprivate func createFileQueryWithOptions(_ queryOptions: QueryOptions!) throws -> StorageFileQueryResult! { + try _default.CreateFileQueryWithOptionsImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfolderquery) + fileprivate func createFolderQuery() throws -> StorageFolderQueryResult! { + try _default.CreateFolderQueryOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfolderquery) + fileprivate func createFolderQuery(_ query: CommonFolderQuery) throws -> StorageFolderQueryResult! { + try _default.CreateFolderQueryImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfolderquerywithoptions) + fileprivate func createFolderQueryWithOptions(_ queryOptions: QueryOptions!) throws -> StorageFolderQueryResult! { + try _default.CreateFolderQueryWithOptionsImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createitemquery) + fileprivate func createItemQuery() throws -> StorageItemQueryResult! { + try _default.CreateItemQueryImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createitemquerywithoptions) + fileprivate func createItemQueryWithOptions(_ queryOptions: QueryOptions!) throws -> StorageItemQueryResult! { + try _default.CreateItemQueryWithOptionsImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfilesasync) + fileprivate func getFilesAsync(_ query: CommonFileQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> AnyIAsyncOperation?>! { + try _default.GetFilesAsyncImpl(query, startIndex, maxItemsToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfilesasync) + fileprivate func getFilesAsync(_ query: CommonFileQuery) throws -> AnyIAsyncOperation?>! { + try _default.GetFilesAsyncOverloadDefaultStartAndCountImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfoldersasync) + fileprivate func getFoldersAsync(_ query: CommonFolderQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> AnyIAsyncOperation?>! { + try _default.GetFoldersAsyncImpl(query, startIndex, maxItemsToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfoldersasync) + fileprivate func getFoldersAsync(_ query: CommonFolderQuery) throws -> AnyIAsyncOperation?>! { + try _default.GetFoldersAsyncOverloadDefaultStartAndCountImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getitemsasync) + fileprivate func getItemsAsync(_ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> AnyIAsyncOperation?>! { + try _default.GetItemsAsyncImpl(startIndex, maxItemsToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.arequeryoptionssupported) + fileprivate func areQueryOptionsSupported(_ queryOptions: QueryOptions!) throws -> Bool { + try _default.AreQueryOptionsSupportedImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.iscommonfolderquerysupported) + fileprivate func isCommonFolderQuerySupported(_ query: CommonFolderQuery) throws -> Bool { + try _default.IsCommonFolderQuerySupportedImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.iscommonfilequerysupported) + fileprivate func isCommonFileQuerySupported(_ query: CommonFileQuery) throws -> Bool { + try _default.IsCommonFileQuerySupportedImpl(query) + } + + } + + public enum IStorageQueryResultBaseBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase + public typealias SwiftABI = __ABI_Windows_Storage_Search.IStorageQueryResultBase + public typealias SwiftProjection = AnyIStorageQueryResultBase + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IStorageQueryResultBaseImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Search.IStorageQueryResultBaseVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IStorageQueryResultBaseImpl: IStorageQueryResultBase, WinRTAbiImpl { + fileprivate typealias Bridge = IStorageQueryResultBaseBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.getitemcountasync) + fileprivate func getItemCountAsync() throws -> AnyIAsyncOperation! { + try _default.GetItemCountAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.findstartindexasync) + fileprivate func findStartIndexAsync(_ value: Any!) throws -> AnyIAsyncOperation! { + try _default.FindStartIndexAsyncImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.getcurrentqueryoptions) + fileprivate func getCurrentQueryOptions() throws -> QueryOptions! { + try _default.GetCurrentQueryOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.applynewqueryoptions) + fileprivate func applyNewQueryOptions(_ newQueryOptions: QueryOptions!) throws { + try _default.ApplyNewQueryOptionsImpl(newQueryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.folder) + fileprivate var folder : test_component.StorageFolder! { + get { try! _default.get_FolderImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.contentschanged) + fileprivate lazy var contentsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._default else { return .init() } + return try! this.add_ContentsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._default.remove_ContentsChangedImpl($0) + } + ) + }() + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.optionschanged) + fileprivate lazy var optionsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._default else { return .init() } + return try! this.add_OptionsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._default.remove_OptionsChangedImpl($0) + } + ) + }() + + } + +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Search.swift b/tests/test_component/Sources/test_component/Windows.Storage.Search.swift new file mode 100644 index 00000000..74668691 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.Search.swift @@ -0,0 +1,644 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.commonfilequery) +public typealias CommonFileQuery = __x_ABI_CWindows_CStorage_CSearch_CCommonFileQuery +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.commonfolderquery) +public typealias CommonFolderQuery = __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.datestackoption) +public typealias DateStackOption = __x_ABI_CWindows_CStorage_CSearch_CDateStackOption +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.folderdepth) +public typealias FolderDepth = __x_ABI_CWindows_CStorage_CSearch_CFolderDepth +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.indexedstate) +public typealias IndexedState = __x_ABI_CWindows_CStorage_CSearch_CIndexedState +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.indexeroption) +public typealias IndexerOption = __x_ABI_CWindows_CStorage_CSearch_CIndexerOption +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions) +public final class QueryOptions : WinRTClass { + private typealias SwiftABI = __ABI_Windows_Storage_Search.IQueryOptions + private typealias CABI = __x_ABI_CWindows_CStorage_CSearch_CIQueryOptions + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CSearch_CIQueryOptions>?) -> QueryOptions? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public init() { + super.init(try! RoActivateInstance(HString("Windows.Storage.Search.QueryOptions"))) + } + + private static let _IQueryOptionsFactory: __ABI_Windows_Storage_Search.IQueryOptionsFactory = try! RoGetActivationFactory(HString("Windows.Storage.Search.QueryOptions")) + public init(_ query: CommonFileQuery, _ fileTypeFilter: AnyIIterable!) { + super.init(try! Self._IQueryOptionsFactory.CreateCommonFileQueryImpl(query, fileTypeFilter)) + } + + public init(_ query: CommonFolderQuery) { + super.init(try! Self._IQueryOptionsFactory.CreateCommonFolderQueryImpl(query)) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.savetostring) + public func saveToString() throws -> String { + try _default.SaveToStringImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.loadfromstring) + public func loadFromString(_ value: String) throws { + try _default.LoadFromStringImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.setthumbnailprefetch) + public func setThumbnailPrefetch(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws { + try _default.SetThumbnailPrefetchImpl(mode, requestedSize, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.setpropertyprefetch) + public func setPropertyPrefetch(_ options: test_component.PropertyPrefetchOptions, _ propertiesToRetrieve: AnyIIterable!) throws { + try _default.SetPropertyPrefetchImpl(options, propertiesToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.applicationsearchfilter) + public var applicationSearchFilter : String { + get { try! _default.get_ApplicationSearchFilterImpl() } + set { try! _default.put_ApplicationSearchFilterImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.datestackoption) + public var dateStackOption : DateStackOption { + get { try! _default.get_DateStackOptionImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.filetypefilter) + public var fileTypeFilter : AnyIVector! { + get { try! _default.get_FileTypeFilterImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.folderdepth) + public var folderDepth : FolderDepth { + get { try! _default.get_FolderDepthImpl() } + set { try! _default.put_FolderDepthImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.grouppropertyname) + public var groupPropertyName : String { + get { try! _default.get_GroupPropertyNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.indexeroption) + public var indexerOption : IndexerOption { + get { try! _default.get_IndexerOptionImpl() } + set { try! _default.put_IndexerOptionImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.language) + public var language : String { + get { try! _default.get_LanguageImpl() } + set { try! _default.put_LanguageImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.sortorder) + public var sortOrder : AnyIVector! { + get { try! _default.get_SortOrderImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.usersearchfilter) + public var userSearchFilter : String { + get { try! _default.get_UserSearchFilterImpl() } + set { try! _default.put_UserSearchFilterImpl(newValue) } + } + + private lazy var _IQueryOptionsWithProviderFilter: __ABI_Windows_Storage_Search.IQueryOptionsWithProviderFilter! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.storageprovideridfilter) + public var storageProviderIdFilter : AnyIVector! { + get { try! _IQueryOptionsWithProviderFilter.get_StorageProviderIdFilterImpl() } + } + + deinit { + _default = nil + _IQueryOptionsWithProviderFilter = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult) +public final class StorageFileQueryResult : WinRTClass, IStorageQueryResultBase { + private typealias SwiftABI = __ABI_Windows_Storage_Search.IStorageFileQueryResult + private typealias CABI = __x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult>?) -> StorageFileQueryResult? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageQueryResultBase: __ABI_Windows_Storage_Search.IStorageQueryResultBase! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.getitemcountasync) + public func getItemCountAsync() throws -> AnyIAsyncOperation! { + try _IStorageQueryResultBase.GetItemCountAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.findstartindexasync) + public func findStartIndexAsync(_ value: Any!) throws -> AnyIAsyncOperation! { + try _IStorageQueryResultBase.FindStartIndexAsyncImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.getcurrentqueryoptions) + public func getCurrentQueryOptions() throws -> QueryOptions! { + try _IStorageQueryResultBase.GetCurrentQueryOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.applynewqueryoptions) + public func applyNewQueryOptions(_ newQueryOptions: QueryOptions!) throws { + try _IStorageQueryResultBase.ApplyNewQueryOptionsImpl(newQueryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.folder) + public var folder : test_component.StorageFolder! { + get { try! _IStorageQueryResultBase.get_FolderImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.contentschanged) + public lazy var contentsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._IStorageQueryResultBase else { return .init() } + return try! this.add_ContentsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._IStorageQueryResultBase.remove_ContentsChangedImpl($0) + } + ) + }() + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.optionschanged) + public lazy var optionsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._IStorageQueryResultBase else { return .init() } + return try! this.add_OptionsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._IStorageQueryResultBase.remove_OptionsChangedImpl($0) + } + ) + }() + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.getfilesasync) + public func getFilesAsync(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> AnyIAsyncOperation?>! { + try _default.GetFilesAsyncImpl(startIndex, maxNumberOfItems) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.getfilesasync) + public func getFilesAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetFilesAsyncDefaultStartAndCountImpl() + } + + private lazy var _IStorageFileQueryResult2: __ABI_Windows_Storage_Search.IStorageFileQueryResult2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefilequeryresult.getmatchingpropertieswithranges) + public func getMatchingPropertiesWithRanges(_ file: test_component.StorageFile!) throws -> AnyIMap?>! { + try _IStorageFileQueryResult2.GetMatchingPropertiesWithRangesImpl(file) + } + + deinit { + _IStorageQueryResultBase = nil + _default = nil + _IStorageFileQueryResult2 = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult) +public final class StorageFolderQueryResult : WinRTClass, IStorageQueryResultBase { + private typealias SwiftABI = __ABI_Windows_Storage_Search.IStorageFolderQueryResult + private typealias CABI = __x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryResult + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryResult>?) -> StorageFolderQueryResult? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageQueryResultBase: __ABI_Windows_Storage_Search.IStorageQueryResultBase! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.getitemcountasync) + public func getItemCountAsync() throws -> AnyIAsyncOperation! { + try _IStorageQueryResultBase.GetItemCountAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.findstartindexasync) + public func findStartIndexAsync(_ value: Any!) throws -> AnyIAsyncOperation! { + try _IStorageQueryResultBase.FindStartIndexAsyncImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.getcurrentqueryoptions) + public func getCurrentQueryOptions() throws -> QueryOptions! { + try _IStorageQueryResultBase.GetCurrentQueryOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.applynewqueryoptions) + public func applyNewQueryOptions(_ newQueryOptions: QueryOptions!) throws { + try _IStorageQueryResultBase.ApplyNewQueryOptionsImpl(newQueryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.folder) + public var folder : test_component.StorageFolder! { + get { try! _IStorageQueryResultBase.get_FolderImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.contentschanged) + public lazy var contentsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._IStorageQueryResultBase else { return .init() } + return try! this.add_ContentsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._IStorageQueryResultBase.remove_ContentsChangedImpl($0) + } + ) + }() + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.optionschanged) + public lazy var optionsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._IStorageQueryResultBase else { return .init() } + return try! this.add_OptionsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._IStorageQueryResultBase.remove_OptionsChangedImpl($0) + } + ) + }() + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.getfoldersasync) + public func getFoldersAsync(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> AnyIAsyncOperation?>! { + try _default.GetFoldersAsyncImpl(startIndex, maxNumberOfItems) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storagefolderqueryresult.getfoldersasync) + public func getFoldersAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetFoldersAsyncDefaultStartAndCountImpl() + } + + deinit { + _IStorageQueryResultBase = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult) +public final class StorageItemQueryResult : WinRTClass, IStorageQueryResultBase { + private typealias SwiftABI = __ABI_Windows_Storage_Search.IStorageItemQueryResult + private typealias CABI = __x_ABI_CWindows_CStorage_CSearch_CIStorageItemQueryResult + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CSearch_CIStorageItemQueryResult>?) -> StorageItemQueryResult? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private lazy var _IStorageQueryResultBase: __ABI_Windows_Storage_Search.IStorageQueryResultBase! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.getitemcountasync) + public func getItemCountAsync() throws -> AnyIAsyncOperation! { + try _IStorageQueryResultBase.GetItemCountAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.findstartindexasync) + public func findStartIndexAsync(_ value: Any!) throws -> AnyIAsyncOperation! { + try _IStorageQueryResultBase.FindStartIndexAsyncImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.getcurrentqueryoptions) + public func getCurrentQueryOptions() throws -> QueryOptions! { + try _IStorageQueryResultBase.GetCurrentQueryOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.applynewqueryoptions) + public func applyNewQueryOptions(_ newQueryOptions: QueryOptions!) throws { + try _IStorageQueryResultBase.ApplyNewQueryOptionsImpl(newQueryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.folder) + public var folder : test_component.StorageFolder! { + get { try! _IStorageQueryResultBase.get_FolderImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.contentschanged) + public lazy var contentsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._IStorageQueryResultBase else { return .init() } + return try! this.add_ContentsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._IStorageQueryResultBase.remove_ContentsChangedImpl($0) + } + ) + }() + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.optionschanged) + public lazy var optionsChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._IStorageQueryResultBase else { return .init() } + return try! this.add_OptionsChangedImpl($0) + }, + remove: { [weak self] in + try? self?._IStorageQueryResultBase.remove_OptionsChangedImpl($0) + } + ) + }() + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.getitemsasync) + public func getItemsAsync(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> AnyIAsyncOperation?>! { + try _default.GetItemsAsyncImpl(startIndex, maxNumberOfItems) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.storageitemqueryresult.getitemsasync) + public func getItemsAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetItemsAsyncDefaultStartAndCountImpl() + } + + deinit { + _IStorageQueryResultBase = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.sortentry) +public struct SortEntry: Hashable, Codable { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.sortentry.propertyname) + public var propertyName: String = "" + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.sortentry.ascendingorder) + public var ascendingOrder: Bool = false + public init() {} + public init(propertyName: String, ascendingOrder: Bool) { + self.propertyName = propertyName + self.ascendingOrder = ascendingOrder + } + public static func from(abi: __x_ABI_CWindows_CStorage_CSearch_CSortEntry) -> SortEntry { + .init(propertyName: .init(from: abi.PropertyName), ascendingOrder: .init(from: abi.AscendingOrder)) + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations) +public protocol IStorageFolderQueryOperations : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getindexedstateasync) + func getIndexedStateAsync() throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfilequery) + func createFileQuery() throws -> test_component.StorageFileQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfilequery) + func createFileQuery(_ query: test_component.CommonFileQuery) throws -> test_component.StorageFileQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfilequerywithoptions) + func createFileQueryWithOptions(_ queryOptions: test_component.QueryOptions!) throws -> test_component.StorageFileQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfolderquery) + func createFolderQuery() throws -> test_component.StorageFolderQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfolderquery) + func createFolderQuery(_ query: test_component.CommonFolderQuery) throws -> test_component.StorageFolderQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createfolderquerywithoptions) + func createFolderQueryWithOptions(_ queryOptions: test_component.QueryOptions!) throws -> test_component.StorageFolderQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createitemquery) + func createItemQuery() throws -> test_component.StorageItemQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.createitemquerywithoptions) + func createItemQueryWithOptions(_ queryOptions: test_component.QueryOptions!) throws -> test_component.StorageItemQueryResult! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfilesasync) + func getFilesAsync(_ query: test_component.CommonFileQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfilesasync) + func getFilesAsync(_ query: test_component.CommonFileQuery) throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfoldersasync) + func getFoldersAsync(_ query: test_component.CommonFolderQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getfoldersasync) + func getFoldersAsync(_ query: test_component.CommonFolderQuery) throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.getitemsasync) + func getItemsAsync(_ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.arequeryoptionssupported) + func areQueryOptionsSupported(_ queryOptions: test_component.QueryOptions!) throws -> Bool + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.iscommonfolderquerysupported) + func isCommonFolderQuerySupported(_ query: test_component.CommonFolderQuery) throws -> Bool + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragefolderqueryoperations.iscommonfilequerysupported) + func isCommonFileQuerySupported(_ query: test_component.CommonFileQuery) throws -> Bool +} + +extension IStorageFolderQueryOperations { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Search.IStorageFolderQueryOperationsWrapper.IID: + let wrapper = __ABI_Windows_Storage_Search.IStorageFolderQueryOperationsWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageFolderQueryOperations = any IStorageFolderQueryOperations + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase) +public protocol IStorageQueryResultBase : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.getitemcountasync) + func getItemCountAsync() throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.findstartindexasync) + func findStartIndexAsync(_ value: Any!) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.getcurrentqueryoptions) + func getCurrentQueryOptions() throws -> test_component.QueryOptions! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.applynewqueryoptions) + func applyNewQueryOptions(_ newQueryOptions: test_component.QueryOptions!) throws + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.folder) + var folder: test_component.StorageFolder! { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.contentschanged) + var contentsChanged: Event> { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.optionschanged) + var optionsChanged: Event> { get } +} + +extension IStorageQueryResultBase { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Search.IStorageQueryResultBaseWrapper.IID: + let wrapper = __ABI_Windows_Storage_Search.IStorageQueryResultBaseWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageQueryResultBase = any IStorageQueryResultBase + +extension test_component.CommonFileQuery { + public static var defaultQuery : test_component.CommonFileQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFileQuery_DefaultQuery + } + public static var orderByName : test_component.CommonFileQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFileQuery_OrderByName + } + public static var orderByTitle : test_component.CommonFileQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFileQuery_OrderByTitle + } + public static var orderByMusicProperties : test_component.CommonFileQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFileQuery_OrderByMusicProperties + } + public static var orderBySearchRank : test_component.CommonFileQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFileQuery_OrderBySearchRank + } + public static var orderByDate : test_component.CommonFileQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFileQuery_OrderByDate + } +} +extension test_component.CommonFileQuery: @retroactive Hashable, @retroactive Codable {} + +extension test_component.CommonFolderQuery { + public static var defaultQuery : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_DefaultQuery + } + public static var groupByYear : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByYear + } + public static var groupByMonth : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByMonth + } + public static var groupByArtist : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByArtist + } + public static var groupByAlbum : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByAlbum + } + public static var groupByAlbumArtist : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByAlbumArtist + } + public static var groupByComposer : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByComposer + } + public static var groupByGenre : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByGenre + } + public static var groupByPublishedYear : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByPublishedYear + } + public static var groupByRating : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByRating + } + public static var groupByTag : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByTag + } + public static var groupByAuthor : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByAuthor + } + public static var groupByType : test_component.CommonFolderQuery { + __x_ABI_CWindows_CStorage_CSearch_CCommonFolderQuery_GroupByType + } +} +extension test_component.CommonFolderQuery: @retroactive Hashable, @retroactive Codable {} + +extension test_component.DateStackOption { + public static var none : test_component.DateStackOption { + __x_ABI_CWindows_CStorage_CSearch_CDateStackOption_None + } + public static var year : test_component.DateStackOption { + __x_ABI_CWindows_CStorage_CSearch_CDateStackOption_Year + } + public static var month : test_component.DateStackOption { + __x_ABI_CWindows_CStorage_CSearch_CDateStackOption_Month + } +} +extension test_component.DateStackOption: @retroactive Hashable, @retroactive Codable {} + +extension test_component.FolderDepth { + public static var shallow : test_component.FolderDepth { + __x_ABI_CWindows_CStorage_CSearch_CFolderDepth_Shallow + } + public static var deep : test_component.FolderDepth { + __x_ABI_CWindows_CStorage_CSearch_CFolderDepth_Deep + } +} +extension test_component.FolderDepth: @retroactive Hashable, @retroactive Codable {} + +extension test_component.IndexedState { + public static var unknown : test_component.IndexedState { + __x_ABI_CWindows_CStorage_CSearch_CIndexedState_Unknown + } + public static var notIndexed : test_component.IndexedState { + __x_ABI_CWindows_CStorage_CSearch_CIndexedState_NotIndexed + } + public static var partiallyIndexed : test_component.IndexedState { + __x_ABI_CWindows_CStorage_CSearch_CIndexedState_PartiallyIndexed + } + public static var fullyIndexed : test_component.IndexedState { + __x_ABI_CWindows_CStorage_CSearch_CIndexedState_FullyIndexed + } +} +extension test_component.IndexedState: @retroactive Hashable, @retroactive Codable {} + +extension test_component.IndexerOption { + public static var useIndexerWhenAvailable : test_component.IndexerOption { + __x_ABI_CWindows_CStorage_CSearch_CIndexerOption_UseIndexerWhenAvailable + } + public static var onlyUseIndexer : test_component.IndexerOption { + __x_ABI_CWindows_CStorage_CSearch_CIndexerOption_OnlyUseIndexer + } + public static var doNotUseIndexer : test_component.IndexerOption { + __x_ABI_CWindows_CStorage_CSearch_CIndexerOption_DoNotUseIndexer + } + public static var onlyUseIndexerAndOptimizeForIndexedProperties : test_component.IndexerOption { + __x_ABI_CWindows_CStorage_CSearch_CIndexerOption_OnlyUseIndexerAndOptimizeForIndexedProperties + } +} +extension test_component.IndexerOption: @retroactive Hashable, @retroactive Codable {} + diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Streams+ABI.swift b/tests/test_component/Sources/test_component/Windows.Storage.Streams+ABI.swift new file mode 100644 index 00000000..c9bfe36d --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.Streams+ABI.swift @@ -0,0 +1,687 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIBuffer: test_component.IID { + .init(Data1: 0x905A0FE0, Data2: 0xBC53, Data3: 0x11DF, Data4: ( 0x8C,0x49,0x00,0x1E,0x4F,0xC6,0x86,0xDA ))// 905A0FE0-BC53-11DF-8C49-001E4FC686DA +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIBufferFactory: test_component.IID { + .init(Data1: 0x71AF914D, Data2: 0xC10F, Data3: 0x484B, Data4: ( 0xBC,0x50,0x14,0xBC,0x62,0x3B,0x3A,0x27 ))// 71AF914D-C10F-484B-BC50-14BC623B3A27 +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIBufferStatics: test_component.IID { + .init(Data1: 0xE901E65B, Data2: 0xD716, Data3: 0x475A, Data4: ( 0xA9,0x0A,0xAF,0x72,0x29,0xB1,0xE7,0x41 ))// E901E65B-D716-475A-A90A-AF7229B1E741 +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIContentTypeProvider: test_component.IID { + .init(Data1: 0x97D098A5, Data2: 0x3B99, Data3: 0x4DE9, Data4: ( 0x88,0xA5,0xE1,0x1D,0x2F,0x50,0xC7,0x95 ))// 97D098A5-3B99-4DE9-88A5-E11D2F50C795 +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIInputStream: test_component.IID { + .init(Data1: 0x905A0FE2, Data2: 0xBC53, Data3: 0x11DF, Data4: ( 0x8C,0x49,0x00,0x1E,0x4F,0xC6,0x86,0xDA ))// 905A0FE2-BC53-11DF-8C49-001E4FC686DA +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIInputStreamReference: test_component.IID { + .init(Data1: 0x43929D18, Data2: 0x5EC9, Data3: 0x4B5A, Data4: ( 0x91,0x9C,0x42,0x05,0xB0,0xC8,0x04,0xB6 ))// 43929D18-5EC9-4B5A-919C-4205B0C804B6 +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIOutputStream: test_component.IID { + .init(Data1: 0x905A0FE6, Data2: 0xBC53, Data3: 0x11DF, Data4: ( 0x8C,0x49,0x00,0x1E,0x4F,0xC6,0x86,0xDA ))// 905A0FE6-BC53-11DF-8C49-001E4FC686DA +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream: test_component.IID { + .init(Data1: 0x905A0FE1, Data2: 0xBC53, Data3: 0x11DF, Data4: ( 0x8C,0x49,0x00,0x1E,0x4F,0xC6,0x86,0xDA ))// 905A0FE1-BC53-11DF-8C49-001E4FC686DA +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamReference: test_component.IID { + .init(Data1: 0x33EE3134, Data2: 0x1DD6, Data3: 0x4E3A, Data4: ( 0x80,0x67,0xD1,0xC1,0x62,0xE8,0x64,0x2B ))// 33EE3134-1DD6-4E3A-8067-D1C162E8642B +} + +private var IID___x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamWithContentType: test_component.IID { + .init(Data1: 0xCC254827, Data2: 0x4B3D, Data3: 0x438F, Data4: ( 0x92,0x32,0x10,0xC7,0x6B,0xC7,0xE0,0x38 ))// CC254827-4B3D-438F-9232-10C76BC7E038 +} + +public enum __ABI_Windows_Storage_Streams { + public class IBuffer: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIBuffer } + + open func get_CapacityImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIBuffer.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Capacity(pThis, &value)) + } + return value + } + + open func get_LengthImpl() throws -> UInt32 { + var value: UINT32 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIBuffer.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Length(pThis, &value)) + } + return value + } + + open func put_LengthImpl(_ value: UInt32) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIBuffer.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Length(pThis, value)) + } + } + + } + + internal static var IBufferVTable: __x_ABI_CWindows_CStorage_CStreams_CIBufferVtbl = .init( + QueryInterface: { IBufferWrapper.queryInterface($0, $1, $2) }, + AddRef: { IBufferWrapper.addRef($0) }, + Release: { IBufferWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IBufferWrapper.IID + iids[3] = __ABI_.IBufferByteAccessWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IBuffer").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_Capacity: { + guard let __unwrapped__instance = IBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.capacity + $1?.initialize(to: value) + return S_OK + }, + + get_Length: { + guard let __unwrapped__instance = IBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.length + $1?.initialize(to: value) + return S_OK + }, + + put_Length: { + guard let __unwrapped__instance = IBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: UInt32 = $1 + __unwrapped__instance.length = value + return S_OK + } + ) + + public typealias IBufferWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IBufferBridge> + public class IBufferFactory: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIBufferFactory } + + internal func CreateImpl(_ capacity: UInt32) throws -> IBuffer { + let (value) = try ComPtrs.initialize { valueAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIBufferFactory.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Create(pThis, capacity, &valueAbi)) + } + } + return IBuffer(value!) + } + + } + + public class IBufferStatics: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIBufferStatics } + + internal func CreateCopyFromMemoryBufferImpl(_ input: test_component.AnyIMemoryBuffer?) throws -> test_component.Buffer? { + let (value) = try ComPtrs.initialize { valueAbi in + let inputWrapper = __ABI_Windows_Foundation.IMemoryBufferWrapper(input) + let _input = try! inputWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIBufferStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateCopyFromMemoryBuffer(pThis, _input, &valueAbi)) + } + } + return .from(abi: value) + } + + internal func CreateMemoryBufferOverIBufferImpl(_ input: test_component.AnyIBuffer?) throws -> test_component.MemoryBuffer? { + let (value) = try ComPtrs.initialize { valueAbi in + let inputWrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(input) + let _input = try! inputWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIBufferStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CreateMemoryBufferOverIBuffer(pThis, _input, &valueAbi)) + } + } + return .from(abi: value) + } + + } + + public class IContentTypeProvider: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIContentTypeProvider } + + open func get_ContentTypeImpl() throws -> String { + var value: HSTRING? + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIContentTypeProvider.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_ContentType(pThis, &value)) + } + return .init(from: value) + } + + } + + internal static var IContentTypeProviderVTable: __x_ABI_CWindows_CStorage_CStreams_CIContentTypeProviderVtbl = .init( + QueryInterface: { IContentTypeProviderWrapper.queryInterface($0, $1, $2) }, + AddRef: { IContentTypeProviderWrapper.addRef($0) }, + Release: { IContentTypeProviderWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IContentTypeProviderWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IContentTypeProvider").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_ContentType: { + guard let __unwrapped__instance = IContentTypeProviderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.contentType + $1?.initialize(to: try! HString(value).detach()) + return S_OK + } + ) + + public typealias IContentTypeProviderWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IContentTypeProviderBridge> + public class IInputStream: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIInputStream } + + open func ReadAsyncImpl(_ buffer: test_component.AnyIBuffer?, _ count: UInt32, _ options: test_component.InputStreamOptions) throws -> test_component.AnyIAsyncOperationWithProgress? { + let (operation) = try ComPtrs.initialize { operationAbi in + let bufferWrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(buffer) + let _buffer = try! bufferWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIInputStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.ReadAsync(pThis, _buffer, count, options, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IInputStreamVTable: __x_ABI_CWindows_CStorage_CStreams_CIInputStreamVtbl = .init( + QueryInterface: { IInputStreamWrapper.queryInterface($0, $1, $2) }, + AddRef: { IInputStreamWrapper.addRef($0) }, + Release: { IInputStreamWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IInputStreamWrapper.IID + iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IInputStream").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + ReadAsync: { + do { + guard let __unwrapped__instance = IInputStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let buffer: test_component.AnyIBuffer? = __ABI_Windows_Storage_Streams.IBufferWrapper.unwrapFrom(abi: ComPtr($1)) + let count: UInt32 = $2 + let options: test_component.InputStreamOptions = $3 + let operation = try __unwrapped__instance.readAsync(buffer, count, options) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper(operation) + operationWrapper?.copyTo($4) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IInputStreamWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IInputStreamBridge> + public class IInputStreamReference: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIInputStreamReference } + + open func OpenSequentialReadAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIInputStreamReference.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.OpenSequentialReadAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IInputStreamReferenceVTable: __x_ABI_CWindows_CStorage_CStreams_CIInputStreamReferenceVtbl = .init( + QueryInterface: { IInputStreamReferenceWrapper.queryInterface($0, $1, $2) }, + AddRef: { IInputStreamReferenceWrapper.addRef($0) }, + Release: { IInputStreamReferenceWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IInputStreamReferenceWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IInputStreamReference").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + OpenSequentialReadAsync: { + do { + guard let __unwrapped__instance = IInputStreamReferenceWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.openSequentialReadAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IInputStreamReferenceWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IInputStreamReferenceBridge> + public class IOutputStream: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIOutputStream } + + open func WriteAsyncImpl(_ buffer: test_component.AnyIBuffer?) throws -> test_component.AnyIAsyncOperationWithProgress? { + let (operation) = try ComPtrs.initialize { operationAbi in + let bufferWrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(buffer) + let _buffer = try! bufferWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIOutputStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.WriteAsync(pThis, _buffer, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.unwrapFrom(abi: operation) + } + + open func FlushAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIOutputStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.FlushAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1_booleanWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IOutputStreamVTable: __x_ABI_CWindows_CStorage_CStreams_CIOutputStreamVtbl = .init( + QueryInterface: { IOutputStreamWrapper.queryInterface($0, $1, $2) }, + AddRef: { IOutputStreamWrapper.addRef($0) }, + Release: { IOutputStreamWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IOutputStreamWrapper.IID + iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IOutputStream").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + WriteAsync: { + do { + guard let __unwrapped__instance = IOutputStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let buffer: test_component.AnyIBuffer? = __ABI_Windows_Storage_Streams.IBufferWrapper.unwrapFrom(abi: ComPtr($1)) + let operation = try __unwrapped__instance.writeAsync(buffer) + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper(operation) + operationWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + FlushAsync: { + do { + guard let __unwrapped__instance = IOutputStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.flushAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1_booleanWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IOutputStreamWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IOutputStreamBridge> + public class IRandomAccessStream: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream } + + open func get_SizeImpl() throws -> UInt64 { + var value: UINT64 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &value)) + } + return value + } + + open func put_SizeImpl(_ value: UInt64) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Size(pThis, value)) + } + } + + open func GetInputStreamAtImpl(_ position: UInt64) throws -> test_component.AnyIInputStream? { + let (stream) = try ComPtrs.initialize { streamAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetInputStreamAt(pThis, position, &streamAbi)) + } + } + return __ABI_Windows_Storage_Streams.IInputStreamWrapper.unwrapFrom(abi: stream) + } + + open func GetOutputStreamAtImpl(_ position: UInt64) throws -> test_component.AnyIOutputStream? { + let (stream) = try ComPtrs.initialize { streamAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetOutputStreamAt(pThis, position, &streamAbi)) + } + } + return __ABI_Windows_Storage_Streams.IOutputStreamWrapper.unwrapFrom(abi: stream) + } + + open func get_PositionImpl() throws -> UInt64 { + var value: UINT64 = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Position(pThis, &value)) + } + return value + } + + open func SeekImpl(_ position: UInt64) throws { + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Seek(pThis, position)) + } + } + + open func CloneStreamImpl() throws -> test_component.AnyIRandomAccessStream? { + let (stream) = try ComPtrs.initialize { streamAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.CloneStream(pThis, &streamAbi)) + } + } + return __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper.unwrapFrom(abi: stream) + } + + open func get_CanReadImpl() throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_CanRead(pThis, &value)) + } + return .init(from: value) + } + + open func get_CanWriteImpl() throws -> Bool { + var value: boolean = 0 + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_CanWrite(pThis, &value)) + } + return .init(from: value) + } + + } + + internal static var IRandomAccessStreamVTable: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamVtbl = .init( + QueryInterface: { IRandomAccessStreamWrapper.queryInterface($0, $1, $2) }, + AddRef: { IRandomAccessStreamWrapper.addRef($0) }, + Release: { IRandomAccessStreamWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 6).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper.IID + iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID + iids[4] = __ABI_Windows_Storage_Streams.IInputStreamWrapper.IID + iids[5] = __ABI_Windows_Storage_Streams.IOutputStreamWrapper.IID + $1!.pointee = 6 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IRandomAccessStream").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.size + $1?.initialize(to: value) + return S_OK + }, + + put_Size: { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: UInt64 = $1 + __unwrapped__instance.size = value + return S_OK + }, + + GetInputStreamAt: { + do { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let position: UInt64 = $1 + let stream = try __unwrapped__instance.getInputStreamAt(position) + let streamWrapper = __ABI_Windows_Storage_Streams.IInputStreamWrapper(stream) + streamWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + GetOutputStreamAt: { + do { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let position: UInt64 = $1 + let stream = try __unwrapped__instance.getOutputStreamAt(position) + let streamWrapper = __ABI_Windows_Storage_Streams.IOutputStreamWrapper(stream) + streamWrapper?.copyTo($2) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + get_Position: { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.position + $1?.initialize(to: value) + return S_OK + }, + + Seek: { + do { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let position: UInt64 = $1 + try __unwrapped__instance.seek(position) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + CloneStream: { + do { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let stream = try __unwrapped__instance.cloneStream() + let streamWrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper(stream) + streamWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + }, + + get_CanRead: { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.canRead + $1?.initialize(to: .init(from: value)) + return S_OK + }, + + get_CanWrite: { + guard let __unwrapped__instance = IRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value = __unwrapped__instance.canWrite + $1?.initialize(to: .init(from: value)) + return S_OK + } + ) + + public typealias IRandomAccessStreamWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IRandomAccessStreamBridge> + public class IRandomAccessStreamReference: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamReference } + + open func OpenReadAsyncImpl() throws -> test_component.AnyIAsyncOperation? { + let (operation) = try ComPtrs.initialize { operationAbi in + _ = try perform(as: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamReference.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.OpenReadAsync(pThis, &operationAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.unwrapFrom(abi: operation) + } + + } + + internal static var IRandomAccessStreamReferenceVTable: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamReferenceVtbl = .init( + QueryInterface: { IRandomAccessStreamReferenceWrapper.queryInterface($0, $1, $2) }, + AddRef: { IRandomAccessStreamReferenceWrapper.addRef($0) }, + Release: { IRandomAccessStreamReferenceWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IRandomAccessStreamReference").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + OpenReadAsync: { + do { + guard let __unwrapped__instance = IRandomAccessStreamReferenceWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let operation = try __unwrapped__instance.openReadAsync() + let operationWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper(operation) + operationWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } + ) + + public typealias IRandomAccessStreamReferenceWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IRandomAccessStreamReferenceBridge> + public class IRandomAccessStreamWithContentType: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamWithContentType } + + } + + internal static var IRandomAccessStreamWithContentTypeVTable: __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamWithContentTypeVtbl = .init( + QueryInterface: { IRandomAccessStreamWithContentTypeWrapper.queryInterface($0, $1, $2) }, + AddRef: { IRandomAccessStreamWithContentTypeWrapper.addRef($0) }, + Release: { IRandomAccessStreamWithContentTypeWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 8).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeWrapper.IID + iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID + iids[4] = __ABI_Windows_Storage_Streams.IInputStreamWrapper.IID + iids[5] = __ABI_Windows_Storage_Streams.IOutputStreamWrapper.IID + iids[6] = __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper.IID + iids[7] = __ABI_Windows_Storage_Streams.IContentTypeProviderWrapper.IID + $1!.pointee = 8 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Storage.Streams.IRandomAccessStreamWithContentType").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + } + ) + + public typealias IRandomAccessStreamWithContentTypeWrapper = InterfaceWrapperBase<__IMPL_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeBridge> +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift new file mode 100644 index 00000000..c444682a --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift @@ -0,0 +1,402 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +public enum __IMPL_Windows_Storage_Streams { + public enum IBufferBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIBuffer + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IBuffer + public typealias SwiftProjection = AnyIBuffer + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IBufferImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IBufferVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IBufferImpl: IBuffer, WinRTAbiImpl { + fileprivate typealias Bridge = IBufferBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ibuffer.capacity) + fileprivate var capacity : UInt32 { + get { try! _default.get_CapacityImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ibuffer.length) + fileprivate var length : UInt32 { + get { try! _default.get_LengthImpl() } + set { try! _default.put_LengthImpl(newValue) } + } + + private lazy var _IBufferByteAccess: __ABI_.IBufferByteAccess! = getInterfaceForCaching() + fileprivate var buffer: UnsafeMutablePointer? { + get throws { + let bufferByteAccess: test_component.__ABI_.IBufferByteAccess = try _IBufferByteAccess.QueryInterface() + return try bufferByteAccess.Buffer() + } + } + } + + public enum IContentTypeProviderBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIContentTypeProvider + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IContentTypeProvider + public typealias SwiftProjection = AnyIContentTypeProvider + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IContentTypeProviderImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IContentTypeProviderVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IContentTypeProviderImpl: IContentTypeProvider, WinRTAbiImpl { + fileprivate typealias Bridge = IContentTypeProviderBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.icontenttypeprovider.contenttype) + fileprivate var contentType : String { + get { try! _default.get_ContentTypeImpl() } + } + + } + + public enum IInputStreamBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIInputStream + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IInputStream + public typealias SwiftProjection = AnyIInputStream + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IInputStreamImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IInputStreamVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IInputStreamImpl: IInputStream, WinRTAbiImpl { + fileprivate typealias Bridge = IInputStreamBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.iinputstream.readasync) + fileprivate func readAsync(_ buffer: AnyIBuffer!, _ count: UInt32, _ options: InputStreamOptions) throws -> AnyIAsyncOperationWithProgress! { + try _default.ReadAsyncImpl(buffer, count, options) + } + + private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.iinputstream.close) + fileprivate func close() throws { + try _IClosable.CloseImpl() + } + + } + + public enum IInputStreamReferenceBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIInputStreamReference + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IInputStreamReference + public typealias SwiftProjection = AnyIInputStreamReference + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IInputStreamReferenceImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IInputStreamReferenceVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IInputStreamReferenceImpl: IInputStreamReference, WinRTAbiImpl { + fileprivate typealias Bridge = IInputStreamReferenceBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.iinputstreamreference.opensequentialreadasync) + fileprivate func openSequentialReadAsync() throws -> AnyIAsyncOperation! { + try _default.OpenSequentialReadAsyncImpl() + } + + } + + public enum IOutputStreamBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIOutputStream + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IOutputStream + public typealias SwiftProjection = AnyIOutputStream + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IOutputStreamImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IOutputStreamVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IOutputStreamImpl: IOutputStream, WinRTAbiImpl { + fileprivate typealias Bridge = IOutputStreamBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ioutputstream.writeasync) + fileprivate func writeAsync(_ buffer: AnyIBuffer!) throws -> AnyIAsyncOperationWithProgress! { + try _default.WriteAsyncImpl(buffer) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ioutputstream.flushasync) + fileprivate func flushAsync() throws -> AnyIAsyncOperation! { + try _default.FlushAsyncImpl() + } + + private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ioutputstream.close) + fileprivate func close() throws { + try _IClosable.CloseImpl() + } + + } + + public enum IRandomAccessStreamBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStream + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IRandomAccessStream + public typealias SwiftProjection = AnyIRandomAccessStream + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IRandomAccessStreamImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IRandomAccessStreamVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IRandomAccessStreamImpl: IRandomAccessStream, WinRTAbiImpl { + fileprivate typealias Bridge = IRandomAccessStreamBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.getinputstreamat) + fileprivate func getInputStreamAt(_ position: UInt64) throws -> AnyIInputStream! { + try _default.GetInputStreamAtImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.getoutputstreamat) + fileprivate func getOutputStreamAt(_ position: UInt64) throws -> AnyIOutputStream! { + try _default.GetOutputStreamAtImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.seek) + fileprivate func seek(_ position: UInt64) throws { + try _default.SeekImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.clonestream) + fileprivate func cloneStream() throws -> AnyIRandomAccessStream! { + try _default.CloneStreamImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.canread) + fileprivate var canRead : Bool { + get { try! _default.get_CanReadImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.canwrite) + fileprivate var canWrite : Bool { + get { try! _default.get_CanWriteImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.position) + fileprivate var position : UInt64 { + get { try! _default.get_PositionImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.size) + fileprivate var size : UInt64 { + get { try! _default.get_SizeImpl() } + set { try! _default.put_SizeImpl(newValue) } + } + + private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.close) + fileprivate 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.storage.streams.irandomaccessstream.readasync) + fileprivate func readAsync(_ buffer: AnyIBuffer!, _ count: UInt32, _ options: InputStreamOptions) throws -> AnyIAsyncOperationWithProgress! { + 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.storage.streams.irandomaccessstream.writeasync) + fileprivate func writeAsync(_ buffer: AnyIBuffer!) throws -> AnyIAsyncOperationWithProgress! { + try _IOutputStream.WriteAsyncImpl(buffer) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.flushasync) + fileprivate func flushAsync() throws -> AnyIAsyncOperation! { + try _IOutputStream.FlushAsyncImpl() + } + + } + + public enum IRandomAccessStreamReferenceBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamReference + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IRandomAccessStreamReference + public typealias SwiftProjection = AnyIRandomAccessStreamReference + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IRandomAccessStreamReferenceImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IRandomAccessStreamReferenceImpl: IRandomAccessStreamReference, WinRTAbiImpl { + fileprivate typealias Bridge = IRandomAccessStreamReferenceBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamreference.openreadasync) + fileprivate func openReadAsync() throws -> AnyIAsyncOperation! { + try _default.OpenReadAsyncImpl() + } + + } + + public enum IRandomAccessStreamWithContentTypeBridge : AbiInterfaceBridge { + public typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIRandomAccessStreamWithContentType + public typealias SwiftABI = __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentType + public typealias SwiftProjection = AnyIRandomAccessStreamWithContentType + public static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return IRandomAccessStreamWithContentTypeImpl(abi) + } + + public static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } + } + + fileprivate class IRandomAccessStreamWithContentTypeImpl: IRandomAccessStreamWithContentType, WinRTAbiImpl { + fileprivate typealias Bridge = IRandomAccessStreamWithContentTypeBridge + fileprivate let _default: Bridge.SwiftABI + fileprivate var thisPtr: test_component.IInspectable { _default } + fileprivate init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.close) + fileprivate 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.storage.streams.irandomaccessstreamwithcontenttype.readasync) + fileprivate func readAsync(_ buffer: AnyIBuffer!, _ count: UInt32, _ options: InputStreamOptions) throws -> AnyIAsyncOperationWithProgress! { + 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.storage.streams.irandomaccessstreamwithcontenttype.writeasync) + fileprivate func writeAsync(_ buffer: AnyIBuffer!) throws -> AnyIAsyncOperationWithProgress! { + try _IOutputStream.WriteAsyncImpl(buffer) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.flushasync) + fileprivate func flushAsync() throws -> AnyIAsyncOperation! { + try _IOutputStream.FlushAsyncImpl() + } + + private lazy var _IRandomAccessStream: __ABI_Windows_Storage_Streams.IRandomAccessStream! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.getinputstreamat) + fileprivate func getInputStreamAt(_ position: UInt64) throws -> AnyIInputStream! { + try _IRandomAccessStream.GetInputStreamAtImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.getoutputstreamat) + fileprivate func getOutputStreamAt(_ position: UInt64) throws -> AnyIOutputStream! { + try _IRandomAccessStream.GetOutputStreamAtImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.seek) + fileprivate func seek(_ position: UInt64) throws { + try _IRandomAccessStream.SeekImpl(position) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.clonestream) + fileprivate func cloneStream() throws -> AnyIRandomAccessStream! { + try _IRandomAccessStream.CloneStreamImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.canread) + fileprivate var canRead : Bool { + get { try! _IRandomAccessStream.get_CanReadImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.canwrite) + fileprivate var canWrite : Bool { + get { try! _IRandomAccessStream.get_CanWriteImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.position) + fileprivate var position : UInt64 { + get { try! _IRandomAccessStream.get_PositionImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype.size) + fileprivate 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.storage.streams.irandomaccessstreamwithcontenttype.contenttype) + fileprivate var contentType : String { + get { try! _IContentTypeProvider.get_ContentTypeImpl() } + } + + } + +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Streams.swift b/tests/test_component/Sources/test_component/Windows.Storage.Streams.swift new file mode 100644 index 00000000..c8104341 --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.Streams.swift @@ -0,0 +1,301 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.inputstreamoptions) +public typealias InputStreamOptions = __x_ABI_CWindows_CStorage_CStreams_CInputStreamOptions +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.unicodeencoding) +public typealias UnicodeEncoding = __x_ABI_CWindows_CStorage_CStreams_CUnicodeEncoding +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.buffer) +public final class Buffer : WinRTClass, IBufferByteAccess, IBuffer { + private typealias SwiftABI = __ABI_Windows_Storage_Streams.IBuffer + private typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIBuffer + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CStreams_CIBuffer>?) -> Buffer? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private static let _IBufferFactory: __ABI_Windows_Storage_Streams.IBufferFactory = try! RoGetActivationFactory(HString("Windows.Storage.Streams.Buffer")) + public init(_ capacity: UInt32) { + super.init(try! Self._IBufferFactory.CreateImpl(capacity)) + } + + private static let _IBufferStatics: __ABI_Windows_Storage_Streams.IBufferStatics = try! RoGetActivationFactory(HString("Windows.Storage.Streams.Buffer")) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.buffer.createcopyfrommemorybuffer) + public static func createCopyFromMemoryBuffer(_ input: test_component.AnyIMemoryBuffer!) -> Buffer! { + return try! _IBufferStatics.CreateCopyFromMemoryBufferImpl(input) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.buffer.creatememorybufferoveribuffer) + public static func createMemoryBufferOverIBuffer(_ input: AnyIBuffer!) -> test_component.MemoryBuffer! { + return try! _IBufferStatics.CreateMemoryBufferOverIBufferImpl(input) + } + + private lazy var _IBufferByteAccess: __ABI_.IBufferByteAccess! = getInterfaceForCaching() + public var buffer: UnsafeMutablePointer? { + get throws { + let bufferByteAccess: test_component.__ABI_.IBufferByteAccess = try _IBufferByteAccess.QueryInterface() + return try bufferByteAccess.Buffer() + } + } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.buffer.capacity) + public var capacity : UInt32 { + get { try! _default.get_CapacityImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.buffer.length) + public var length : UInt32 { + get { try! _default.get_LengthImpl() } + set { try! _default.put_LengthImpl(newValue) } + } + + deinit { + _IBufferByteAccess = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ibuffer) +public protocol IBuffer : IBufferByteAccess { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ibuffer.capacity) + var capacity: UInt32 { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ibuffer.length) + var length: UInt32 { get set } +} + +extension IBuffer { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IBufferWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_.IBufferByteAccessWrapper.IID: + let wrapper = __ABI_.IBufferByteAccessWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +extension IBuffer { + public var data: Data { + guard let buffer = try? buffer else { return Data() } + return Data(bytesNoCopy: buffer, count: Int(length), deallocator: .none) + } +} +public typealias AnyIBuffer = any IBuffer + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.icontenttypeprovider) +public protocol IContentTypeProvider : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.icontenttypeprovider.contenttype) + var contentType: String { get } +} + +extension IContentTypeProvider { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IContentTypeProviderWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IContentTypeProviderWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIContentTypeProvider = any IContentTypeProvider + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.iinputstream) +public protocol IInputStream : test_component.IClosable { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.iinputstream.readasync) + func readAsync(_ buffer: test_component.AnyIBuffer!, _ count: UInt32, _ options: test_component.InputStreamOptions) throws -> test_component.AnyIAsyncOperationWithProgress! +} + +extension IInputStream { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IInputStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IInputStreamWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Foundation.IClosableWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIInputStream = any IInputStream + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.iinputstreamreference) +public protocol IInputStreamReference : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.iinputstreamreference.opensequentialreadasync) + func openSequentialReadAsync() throws -> test_component.AnyIAsyncOperation! +} + +extension IInputStreamReference { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IInputStreamReferenceWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IInputStreamReferenceWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIInputStreamReference = any IInputStreamReference + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ioutputstream) +public protocol IOutputStream : test_component.IClosable { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ioutputstream.writeasync) + func writeAsync(_ buffer: test_component.AnyIBuffer!) throws -> test_component.AnyIAsyncOperationWithProgress! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.ioutputstream.flushasync) + func flushAsync() throws -> test_component.AnyIAsyncOperation! +} + +extension IOutputStream { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IOutputStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IOutputStreamWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Foundation.IClosableWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIOutputStream = any IOutputStream + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream) +public protocol IRandomAccessStream : test_component.IClosable, IInputStream, IOutputStream { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.getinputstreamat) + func getInputStreamAt(_ position: UInt64) throws -> test_component.AnyIInputStream! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.getoutputstreamat) + func getOutputStreamAt(_ position: UInt64) throws -> test_component.AnyIOutputStream! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.seek) + func seek(_ position: UInt64) throws + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.clonestream) + func cloneStream() throws -> test_component.AnyIRandomAccessStream! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.canread) + var canRead: Bool { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.canwrite) + var canWrite: Bool { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.position) + var position: UInt64 { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstream.size) + var size: UInt64 { get set } +} + +extension IRandomAccessStream { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Foundation.IClosableWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IInputStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IInputStreamWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IOutputStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IOutputStreamWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIRandomAccessStream = any IRandomAccessStream + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamreference) +public protocol IRandomAccessStreamReference : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamreference.openreadasync) + func openReadAsync() throws -> test_component.AnyIAsyncOperation! +} + +extension IRandomAccessStreamReference { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIRandomAccessStreamReference = any IRandomAccessStreamReference + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streams.irandomaccessstreamwithcontenttype) +public protocol IRandomAccessStreamWithContentType : test_component.IClosable, IInputStream, IOutputStream, IRandomAccessStream, IContentTypeProvider { +} + +extension IRandomAccessStreamWithContentType { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Foundation.IClosableWrapper.IID: + let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IInputStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IInputStreamWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IOutputStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IOutputStreamWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IContentTypeProviderWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IContentTypeProviderWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIRandomAccessStreamWithContentType = any IRandomAccessStreamWithContentType + +extension test_component.InputStreamOptions { + public static var none : test_component.InputStreamOptions { + __x_ABI_CWindows_CStorage_CStreams_CInputStreamOptions_None + } + public static var partial : test_component.InputStreamOptions { + __x_ABI_CWindows_CStorage_CStreams_CInputStreamOptions_Partial + } + public static var readAhead : test_component.InputStreamOptions { + __x_ABI_CWindows_CStorage_CStreams_CInputStreamOptions_ReadAhead + } +} +extension test_component.InputStreamOptions: @retroactive Hashable, @retroactive Codable {} + +extension test_component.UnicodeEncoding { + public static var utf8 : test_component.UnicodeEncoding { + __x_ABI_CWindows_CStorage_CStreams_CUnicodeEncoding_Utf8 + } + public static var utf16LE : test_component.UnicodeEncoding { + __x_ABI_CWindows_CStorage_CStreams_CUnicodeEncoding_Utf16LE + } + public static var utf16BE : test_component.UnicodeEncoding { + __x_ABI_CWindows_CStorage_CStreams_CUnicodeEncoding_Utf16BE + } +} +extension test_component.UnicodeEncoding: @retroactive Hashable, @retroactive Codable {} + diff --git a/tests/test_component/Sources/test_component/Windows.Storage.swift b/tests/test_component/Sources/test_component/Windows.Storage.swift new file mode 100644 index 00000000..1331c83d --- /dev/null +++ b/tests/test_component/Sources/test_component/Windows.Storage.swift @@ -0,0 +1,1423 @@ +// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 +// swiftlint:disable all +import Foundation +import Ctest_component + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.creationcollisionoption) +public typealias CreationCollisionOption = __x_ABI_CWindows_CStorage_CCreationCollisionOption +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileaccessmode) +public typealias FileAccessMode = __x_ABI_CWindows_CStorage_CFileAccessMode +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.fileattributes) +public typealias FileAttributes = __x_ABI_CWindows_CStorage_CFileAttributes +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.namecollisionoption) +public typealias NameCollisionOption = __x_ABI_CWindows_CStorage_CNameCollisionOption +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagedeleteoption) +public typealias StorageDeleteOption = __x_ABI_CWindows_CStorage_CStorageDeleteOption +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storageitemtypes) +public typealias StorageItemTypes = __x_ABI_CWindows_CStorage_CStorageItemTypes +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangetype) +public typealias StorageLibraryChangeType = __x_ABI_CWindows_CStorage_CStorageLibraryChangeType +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storageopenoptions) +public typealias StorageOpenOptions = __x_ABI_CWindows_CStorage_CStorageOpenOptions +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streamedfilefailuremode) +public typealias StreamedFileFailureMode = __x_ABI_CWindows_CStorage_CStreamedFileFailureMode +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio) +public final class PathIO { + private static let _IPathIOStatics: __ABI_Windows_Storage.IPathIOStatics = try! RoGetActivationFactory(HString("Windows.Storage.PathIO")) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.readtextasync) + public static func readTextAsync(_ absolutePath: String) -> AnyIAsyncOperation! { + return try! _IPathIOStatics.ReadTextAsyncImpl(absolutePath) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.readtextasync) + public static func readTextAsync(_ absolutePath: String, _ encoding: test_component.UnicodeEncoding) -> AnyIAsyncOperation! { + return try! _IPathIOStatics.ReadTextWithEncodingAsyncImpl(absolutePath, encoding) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.writetextasync) + public static func writeTextAsync(_ absolutePath: String, _ contents: String) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.WriteTextAsyncImpl(absolutePath, contents) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.writetextasync) + public static func writeTextAsync(_ absolutePath: String, _ contents: String, _ encoding: test_component.UnicodeEncoding) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.WriteTextWithEncodingAsyncImpl(absolutePath, contents, encoding) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.appendtextasync) + public static func appendTextAsync(_ absolutePath: String, _ contents: String) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.AppendTextAsyncImpl(absolutePath, contents) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.appendtextasync) + public static func appendTextAsync(_ absolutePath: String, _ contents: String, _ encoding: test_component.UnicodeEncoding) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.AppendTextWithEncodingAsyncImpl(absolutePath, contents, encoding) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.readlinesasync) + public static func readLinesAsync(_ absolutePath: String) -> AnyIAsyncOperation?>! { + return try! _IPathIOStatics.ReadLinesAsyncImpl(absolutePath) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.readlinesasync) + public static func readLinesAsync(_ absolutePath: String, _ encoding: test_component.UnicodeEncoding) -> AnyIAsyncOperation?>! { + return try! _IPathIOStatics.ReadLinesWithEncodingAsyncImpl(absolutePath, encoding) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.writelinesasync) + public static func writeLinesAsync(_ absolutePath: String, _ lines: AnyIIterable!) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.WriteLinesAsyncImpl(absolutePath, lines) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.writelinesasync) + public static func writeLinesAsync(_ absolutePath: String, _ lines: AnyIIterable!, _ encoding: test_component.UnicodeEncoding) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.WriteLinesWithEncodingAsyncImpl(absolutePath, lines, encoding) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.appendlinesasync) + public static func appendLinesAsync(_ absolutePath: String, _ lines: AnyIIterable!) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.AppendLinesAsyncImpl(absolutePath, lines) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.appendlinesasync) + public static func appendLinesAsync(_ absolutePath: String, _ lines: AnyIIterable!, _ encoding: test_component.UnicodeEncoding) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.AppendLinesWithEncodingAsyncImpl(absolutePath, lines, encoding) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.readbufferasync) + public static func readBufferAsync(_ absolutePath: String) -> AnyIAsyncOperation! { + return try! _IPathIOStatics.ReadBufferAsyncImpl(absolutePath) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.pathio.writebufferasync) + public static func writeBufferAsync(_ absolutePath: String, _ buffer: test_component.AnyIBuffer!) -> test_component.AnyIAsyncAction! { + return try! _IPathIOStatics.WriteBufferAsyncImpl(absolutePath, buffer) + } + +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile) +public final class StorageFile : WinRTClass, IStorageItem, test_component.IRandomAccessStreamReference, test_component.IInputStreamReference, IStorageFile, IStorageItemProperties, IStorageItemProperties2, IStorageItem2, IStorageItemPropertiesWithProvider, IStorageFilePropertiesWithAvailability, IStorageFile2 { + private typealias SwiftABI = __ABI_Windows_Storage.IStorageFile + private typealias CABI = __x_ABI_CWindows_CStorage_CIStorageFile + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CIStorageFile>?) -> StorageFile? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private static let _IStorageFileStatics: __ABI_Windows_Storage.IStorageFileStatics = try! RoGetActivationFactory(HString("Windows.Storage.StorageFile")) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getfilefrompathasync) + public static func getFileFromPathAsync(_ path: String) -> AnyIAsyncOperation! { + return try! _IStorageFileStatics.GetFileFromPathAsyncImpl(path) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getfilefromapplicationuriasync) + public static func getFileFromApplicationUriAsync(_ uri: test_component.Uri!) -> AnyIAsyncOperation! { + return try! _IStorageFileStatics.GetFileFromApplicationUriAsyncImpl(uri) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.createstreamedfileasync) + public static func createStreamedFileAsync(_ displayNameWithExtension: String, _ dataRequested: StreamedFileDataRequestedHandler!, _ thumbnail: test_component.AnyIRandomAccessStreamReference!) -> AnyIAsyncOperation! { + return try! _IStorageFileStatics.CreateStreamedFileAsyncImpl(displayNameWithExtension, dataRequested, thumbnail) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.replacewithstreamedfileasync) + public static func replaceWithStreamedFileAsync(_ fileToReplace: AnyIStorageFile!, _ dataRequested: StreamedFileDataRequestedHandler!, _ thumbnail: test_component.AnyIRandomAccessStreamReference!) -> AnyIAsyncOperation! { + return try! _IStorageFileStatics.ReplaceWithStreamedFileAsyncImpl(fileToReplace, dataRequested, thumbnail) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.createstreamedfilefromuriasync) + public static func createStreamedFileFromUriAsync(_ displayNameWithExtension: String, _ uri: test_component.Uri!, _ thumbnail: test_component.AnyIRandomAccessStreamReference!) -> AnyIAsyncOperation! { + return try! _IStorageFileStatics.CreateStreamedFileFromUriAsyncImpl(displayNameWithExtension, uri, thumbnail) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.replacewithstreamedfilefromuriasync) + public static func replaceWithStreamedFileFromUriAsync(_ fileToReplace: AnyIStorageFile!, _ uri: test_component.Uri!, _ thumbnail: test_component.AnyIRandomAccessStreamReference!) -> AnyIAsyncOperation! { + return try! _IStorageFileStatics.ReplaceWithStreamedFileFromUriAsyncImpl(fileToReplace, uri, thumbnail) + } + + private lazy var _IStorageItem: __ABI_Windows_Storage.IStorageItem! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.renameasync) + public func renameAsync(_ desiredName: String) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.renameasync) + public func renameAsync(_ desiredName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncImpl(desiredName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.deleteasync) + public func deleteAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.deleteasync) + public func deleteAsync(_ option: StorageDeleteOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncImpl(option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getbasicpropertiesasync) + public func getBasicPropertiesAsync() throws -> AnyIAsyncOperation! { + try _IStorageItem.GetBasicPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.isoftype) + public func isOfType(_ type: StorageItemTypes) throws -> Bool { + try _IStorageItem.IsOfTypeImpl(type) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.attributes) + public var attributes : FileAttributes { + get { try! _IStorageItem.get_AttributesImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.datecreated) + public var dateCreated : test_component.DateTime { + get { try! _IStorageItem.get_DateCreatedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.name) + public var name : String { + get { try! _IStorageItem.get_NameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.path) + public var path : String { + get { try! _IStorageItem.get_PathImpl() } + } + + private lazy var _IRandomAccessStreamReference: __ABI_Windows_Storage_Streams.IRandomAccessStreamReference! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.openreadasync) + public func openReadAsync() throws -> AnyIAsyncOperation! { + try _IRandomAccessStreamReference.OpenReadAsyncImpl() + } + + private lazy var _IInputStreamReference: __ABI_Windows_Storage_Streams.IInputStreamReference! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.opensequentialreadasync) + public func openSequentialReadAsync() throws -> AnyIAsyncOperation! { + try _IInputStreamReference.OpenSequentialReadAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.openasync) + public func openAsync(_ accessMode: FileAccessMode) throws -> AnyIAsyncOperation! { + try _default.OpenAsyncImpl(accessMode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.opentransactedwriteasync) + public func openTransactedWriteAsync() throws -> AnyIAsyncOperation! { + try _default.OpenTransactedWriteAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.copyasync) + public func copyAsync(_ destinationFolder: AnyIStorageFolder!) throws -> AnyIAsyncOperation! { + try _default.CopyOverloadDefaultNameAndOptionsImpl(destinationFolder) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.copyasync) + public func copyAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String) throws -> AnyIAsyncOperation! { + try _default.CopyOverloadDefaultOptionsImpl(destinationFolder, desiredNewName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.copyasync) + public func copyAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String, _ option: NameCollisionOption) throws -> AnyIAsyncOperation! { + try _default.CopyOverloadImpl(destinationFolder, desiredNewName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.copyandreplaceasync) + public func copyAndReplaceAsync(_ fileToReplace: AnyIStorageFile!) throws -> test_component.AnyIAsyncAction! { + try _default.CopyAndReplaceAsyncImpl(fileToReplace) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.moveasync) + public func moveAsync(_ destinationFolder: AnyIStorageFolder!) throws -> test_component.AnyIAsyncAction! { + try _default.MoveOverloadDefaultNameAndOptionsImpl(destinationFolder) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.moveasync) + public func moveAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String) throws -> test_component.AnyIAsyncAction! { + try _default.MoveOverloadDefaultOptionsImpl(destinationFolder, desiredNewName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.moveasync) + public func moveAsync(_ destinationFolder: AnyIStorageFolder!, _ desiredNewName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _default.MoveOverloadImpl(destinationFolder, desiredNewName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.moveandreplaceasync) + public func moveAndReplaceAsync(_ fileToReplace: AnyIStorageFile!) throws -> test_component.AnyIAsyncAction! { + try _default.MoveAndReplaceAsyncImpl(fileToReplace) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.contenttype) + public var contentType : String { + get { try! _default.get_ContentTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.filetype) + public var fileType : String { + get { try! _default.get_FileTypeImpl() } + } + + private lazy var _IStorageItemProperties: __ABI_Windows_Storage.IStorageItemProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getthumbnailasync) + public func getThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getthumbnailasync) + public func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getthumbnailasync) + public func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncImpl(mode, requestedSize, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.displayname) + public var displayName : String { + get { try! _IStorageItemProperties.get_DisplayNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.displaytype) + public var displayType : String { + get { try! _IStorageItemProperties.get_DisplayTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.folderrelativeid) + public var folderRelativeId : String { + get { try! _IStorageItemProperties.get_FolderRelativeIdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.properties) + public var properties : test_component.StorageItemContentProperties! { + get { try! _IStorageItemProperties.get_PropertiesImpl() } + } + + private lazy var _IStorageItemProperties2: __ABI_Windows_Storage.IStorageItemProperties2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getscaledimageasthumbnailasync) + public func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties2.GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getscaledimageasthumbnailasync) + public func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties2.GetScaledImageAsThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getscaledimageasthumbnailasync) + public func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties2.GetScaledImageAsThumbnailAsyncImpl(mode, requestedSize, options) + } + + private lazy var _IStorageItem2: __ABI_Windows_Storage.IStorageItem2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.getparentasync) + public func getParentAsync() throws -> AnyIAsyncOperation! { + try _IStorageItem2.GetParentAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.isequal) + public func isEqual(_ item: AnyIStorageItem!) throws -> Bool { + try _IStorageItem2.IsEqualImpl(item) + } + + private lazy var _IStorageItemPropertiesWithProvider: __ABI_Windows_Storage.IStorageItemPropertiesWithProvider! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.provider) + public var provider : StorageProvider! { + get { try! _IStorageItemPropertiesWithProvider.get_ProviderImpl() } + } + + private lazy var _IStorageFilePropertiesWithAvailability: __ABI_Windows_Storage.IStorageFilePropertiesWithAvailability! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.isavailable) + public var isAvailable : Bool { + get { try! _IStorageFilePropertiesWithAvailability.get_IsAvailableImpl() } + } + + private lazy var _IStorageFile2: __ABI_Windows_Storage.IStorageFile2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.openasync) + public func openAsync(_ accessMode: FileAccessMode, _ options: StorageOpenOptions) throws -> AnyIAsyncOperation! { + try _IStorageFile2.OpenWithOptionsAsyncImpl(accessMode, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefile.opentransactedwriteasync) + public func openTransactedWriteAsync(_ options: StorageOpenOptions) throws -> AnyIAsyncOperation! { + try _IStorageFile2.OpenTransactedWriteWithOptionsAsyncImpl(options) + } + + deinit { + _IStorageItem = nil + _IRandomAccessStreamReference = nil + _IInputStreamReference = nil + _default = nil + _IStorageItemProperties = nil + _IStorageItemProperties2 = nil + _IStorageItem2 = nil + _IStorageItemPropertiesWithProvider = nil + _IStorageFilePropertiesWithAvailability = nil + _IStorageFile2 = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder) +public final class StorageFolder : WinRTClass, IStorageItem, IStorageFolder, test_component.IStorageFolderQueryOperations, IStorageItemProperties, IStorageItemProperties2, IStorageItem2, IStorageFolder2, IStorageItemPropertiesWithProvider { + private typealias SwiftABI = __ABI_Windows_Storage.IStorageFolder + private typealias CABI = __x_ABI_CWindows_CStorage_CIStorageFolder + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CIStorageFolder>?) -> StorageFolder? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + return super.queryInterface(iid) + } + private static let _IStorageFolderStatics: __ABI_Windows_Storage.IStorageFolderStatics = try! RoGetActivationFactory(HString("Windows.Storage.StorageFolder")) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfolderfrompathasync) + public static func getFolderFromPathAsync(_ path: String) -> AnyIAsyncOperation! { + return try! _IStorageFolderStatics.GetFolderFromPathAsyncImpl(path) + } + + private lazy var _IStorageItem: __ABI_Windows_Storage.IStorageItem! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.renameasync) + public func renameAsync(_ desiredName: String) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.renameasync) + public func renameAsync(_ desiredName: String, _ option: NameCollisionOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.RenameAsyncImpl(desiredName, option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.deleteasync) + public func deleteAsync() throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.deleteasync) + public func deleteAsync(_ option: StorageDeleteOption) throws -> test_component.AnyIAsyncAction! { + try _IStorageItem.DeleteAsyncImpl(option) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getbasicpropertiesasync) + public func getBasicPropertiesAsync() throws -> AnyIAsyncOperation! { + try _IStorageItem.GetBasicPropertiesAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.isoftype) + public func isOfType(_ type: StorageItemTypes) throws -> Bool { + try _IStorageItem.IsOfTypeImpl(type) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.attributes) + public var attributes : FileAttributes { + get { try! _IStorageItem.get_AttributesImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.datecreated) + public var dateCreated : test_component.DateTime { + get { try! _IStorageItem.get_DateCreatedImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.name) + public var name : String { + get { try! _IStorageItem.get_NameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.path) + public var path : String { + get { try! _IStorageItem.get_PathImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfileasync) + public func createFileAsync(_ desiredName: String) throws -> AnyIAsyncOperation! { + try _default.CreateFileAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfileasync) + public func createFileAsync(_ desiredName: String, _ options: CreationCollisionOption) throws -> AnyIAsyncOperation! { + try _default.CreateFileAsyncImpl(desiredName, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfolderasync) + public func createFolderAsync(_ desiredName: String) throws -> AnyIAsyncOperation! { + try _default.CreateFolderAsyncOverloadDefaultOptionsImpl(desiredName) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfolderasync) + public func createFolderAsync(_ desiredName: String, _ options: CreationCollisionOption) throws -> AnyIAsyncOperation! { + try _default.CreateFolderAsyncImpl(desiredName, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfileasync) + public func getFileAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _default.GetFileAsyncImpl(name) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfolderasync) + public func getFolderAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _default.GetFolderAsyncImpl(name) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getitemasync) + public func getItemAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _default.GetItemAsyncImpl(name) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfilesasync) + public func getFilesAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetFilesAsyncOverloadDefaultOptionsStartAndCountImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfoldersasync) + public func getFoldersAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetFoldersAsyncOverloadDefaultOptionsStartAndCountImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getitemsasync) + public func getItemsAsync() throws -> AnyIAsyncOperation?>! { + try _default.GetItemsAsyncOverloadDefaultStartAndCountImpl() + } + + private lazy var _IStorageFolderQueryOperations: __ABI_Windows_Storage_Search.IStorageFolderQueryOperations! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getindexedstateasync) + public func getIndexedStateAsync() throws -> AnyIAsyncOperation! { + try _IStorageFolderQueryOperations.GetIndexedStateAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfilequery) + public func createFileQuery() throws -> test_component.StorageFileQueryResult! { + try _IStorageFolderQueryOperations.CreateFileQueryOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfilequery) + public func createFileQuery(_ query: test_component.CommonFileQuery) throws -> test_component.StorageFileQueryResult! { + try _IStorageFolderQueryOperations.CreateFileQueryImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfilequerywithoptions) + public func createFileQueryWithOptions(_ queryOptions: test_component.QueryOptions!) throws -> test_component.StorageFileQueryResult! { + try _IStorageFolderQueryOperations.CreateFileQueryWithOptionsImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfolderquery) + public func createFolderQuery() throws -> test_component.StorageFolderQueryResult! { + try _IStorageFolderQueryOperations.CreateFolderQueryOverloadDefaultImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfolderquery) + public func createFolderQuery(_ query: test_component.CommonFolderQuery) throws -> test_component.StorageFolderQueryResult! { + try _IStorageFolderQueryOperations.CreateFolderQueryImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createfolderquerywithoptions) + public func createFolderQueryWithOptions(_ queryOptions: test_component.QueryOptions!) throws -> test_component.StorageFolderQueryResult! { + try _IStorageFolderQueryOperations.CreateFolderQueryWithOptionsImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createitemquery) + public func createItemQuery() throws -> test_component.StorageItemQueryResult! { + try _IStorageFolderQueryOperations.CreateItemQueryImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.createitemquerywithoptions) + public func createItemQueryWithOptions(_ queryOptions: test_component.QueryOptions!) throws -> test_component.StorageItemQueryResult! { + try _IStorageFolderQueryOperations.CreateItemQueryWithOptionsImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfilesasync) + public func getFilesAsync(_ query: test_component.CommonFileQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> AnyIAsyncOperation?>! { + try _IStorageFolderQueryOperations.GetFilesAsyncImpl(query, startIndex, maxItemsToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfilesasync) + public func getFilesAsync(_ query: test_component.CommonFileQuery) throws -> AnyIAsyncOperation?>! { + try _IStorageFolderQueryOperations.GetFilesAsyncOverloadDefaultStartAndCountImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfoldersasync) + public func getFoldersAsync(_ query: test_component.CommonFolderQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> AnyIAsyncOperation?>! { + try _IStorageFolderQueryOperations.GetFoldersAsyncImpl(query, startIndex, maxItemsToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getfoldersasync) + public func getFoldersAsync(_ query: test_component.CommonFolderQuery) throws -> AnyIAsyncOperation?>! { + try _IStorageFolderQueryOperations.GetFoldersAsyncOverloadDefaultStartAndCountImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getitemsasync) + public func getItemsAsync(_ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> AnyIAsyncOperation?>! { + try _IStorageFolderQueryOperations.GetItemsAsyncImpl(startIndex, maxItemsToRetrieve) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.arequeryoptionssupported) + public func areQueryOptionsSupported(_ queryOptions: test_component.QueryOptions!) throws -> Bool { + try _IStorageFolderQueryOperations.AreQueryOptionsSupportedImpl(queryOptions) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.iscommonfolderquerysupported) + public func isCommonFolderQuerySupported(_ query: test_component.CommonFolderQuery) throws -> Bool { + try _IStorageFolderQueryOperations.IsCommonFolderQuerySupportedImpl(query) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.iscommonfilequerysupported) + public func isCommonFileQuerySupported(_ query: test_component.CommonFileQuery) throws -> Bool { + try _IStorageFolderQueryOperations.IsCommonFileQuerySupportedImpl(query) + } + + private lazy var _IStorageItemProperties: __ABI_Windows_Storage.IStorageItemProperties! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getthumbnailasync) + public func getThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getthumbnailasync) + public func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getthumbnailasync) + public func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties.GetThumbnailAsyncImpl(mode, requestedSize, options) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.displayname) + public var displayName : String { + get { try! _IStorageItemProperties.get_DisplayNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.displaytype) + public var displayType : String { + get { try! _IStorageItemProperties.get_DisplayTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.folderrelativeid) + public var folderRelativeId : String { + get { try! _IStorageItemProperties.get_FolderRelativeIdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.properties) + public var properties : test_component.StorageItemContentProperties! { + get { try! _IStorageItemProperties.get_PropertiesImpl() } + } + + private lazy var _IStorageItemProperties2: __ABI_Windows_Storage.IStorageItemProperties2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getscaledimageasthumbnailasync) + public func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties2.GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getscaledimageasthumbnailasync) + public func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties2.GetScaledImageAsThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getscaledimageasthumbnailasync) + public func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> AnyIAsyncOperation! { + try _IStorageItemProperties2.GetScaledImageAsThumbnailAsyncImpl(mode, requestedSize, options) + } + + private lazy var _IStorageItem2: __ABI_Windows_Storage.IStorageItem2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.getparentasync) + public func getParentAsync() throws -> AnyIAsyncOperation! { + try _IStorageItem2.GetParentAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.isequal) + public func isEqual(_ item: AnyIStorageItem!) throws -> Bool { + try _IStorageItem2.IsEqualImpl(item) + } + + private lazy var _IStorageFolder2: __ABI_Windows_Storage.IStorageFolder2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.trygetitemasync) + public func tryGetItemAsync(_ name: String) throws -> AnyIAsyncOperation! { + try _IStorageFolder2.TryGetItemAsyncImpl(name) + } + + private lazy var _IStorageItemPropertiesWithProvider: __ABI_Windows_Storage.IStorageItemPropertiesWithProvider! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.provider) + public var provider : StorageProvider! { + get { try! _IStorageItemPropertiesWithProvider.get_ProviderImpl() } + } + + private lazy var _IStorageFolder3: __ABI_Windows_Storage.IStorageFolder3! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagefolder.trygetchangetracker) + public func tryGetChangeTracker() throws -> StorageLibraryChangeTracker! { + try _IStorageFolder3.TryGetChangeTrackerImpl() + } + + deinit { + _IStorageItem = nil + _default = nil + _IStorageFolderQueryOperations = nil + _IStorageItemProperties = nil + _IStorageItemProperties2 = nil + _IStorageItem2 = nil + _IStorageFolder2 = nil + _IStorageItemPropertiesWithProvider = nil + _IStorageFolder3 = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychange) +public final class StorageLibraryChange : WinRTClass { + private typealias SwiftABI = __ABI_Windows_Storage.IStorageLibraryChange + private typealias CABI = __x_ABI_CWindows_CStorage_CIStorageLibraryChange + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CIStorageLibraryChange>?) -> StorageLibraryChange? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychange.isoftype) + public func isOfType(_ type: StorageItemTypes) throws -> Bool { + try _default.IsOfTypeImpl(type) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychange.getstorageitemasync) + public func getStorageItemAsync() throws -> AnyIAsyncOperation! { + try _default.GetStorageItemAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychange.changetype) + public var changeType : StorageLibraryChangeType { + get { try! _default.get_ChangeTypeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychange.path) + public var path : String { + get { try! _default.get_PathImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychange.previouspath) + public var previousPath : String { + get { try! _default.get_PreviousPathImpl() } + } + + deinit { + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangereader) +public final class StorageLibraryChangeReader : WinRTClass { + private typealias SwiftABI = __ABI_Windows_Storage.IStorageLibraryChangeReader + private typealias CABI = __x_ABI_CWindows_CStorage_CIStorageLibraryChangeReader + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CIStorageLibraryChangeReader>?) -> StorageLibraryChangeReader? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangereader.readbatchasync) + public func readBatchAsync() throws -> AnyIAsyncOperation?>! { + try _default.ReadBatchAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangereader.acceptchangesasync) + public func acceptChangesAsync() throws -> test_component.AnyIAsyncAction! { + try _default.AcceptChangesAsyncImpl() + } + + deinit { + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangetracker) +public final class StorageLibraryChangeTracker : WinRTClass { + private typealias SwiftABI = __ABI_Windows_Storage.IStorageLibraryChangeTracker + private typealias CABI = __x_ABI_CWindows_CStorage_CIStorageLibraryChangeTracker + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CIStorageLibraryChangeTracker>?) -> StorageLibraryChangeTracker? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangetracker.getchangereader) + public func getChangeReader() throws -> StorageLibraryChangeReader! { + try _default.GetChangeReaderImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangetracker.enable) + public func enable() throws { + try _default.EnableImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagelibrarychangetracker.reset) + public func reset() throws { + try _default.ResetImpl() + } + + deinit { + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storageprovider) +public final class StorageProvider : WinRTClass { + private typealias SwiftABI = __ABI_Windows_Storage.IStorageProvider + private typealias CABI = __x_ABI_CWindows_CStorage_CIStorageProvider + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CIStorageProvider>?) -> StorageProvider? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storageprovider.displayname) + public var displayName : String { + get { try! _default.get_DisplayNameImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storageprovider.id) + public var id : String { + get { try! _default.get_IdImpl() } + } + + private lazy var _IStorageProvider2: __ABI_Windows_Storage.IStorageProvider2! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storageprovider.ispropertysupportedforpartialfileasync) + public func isPropertySupportedForPartialFileAsync(_ propertyCanonicalName: String) throws -> AnyIAsyncOperation! { + try _IStorageProvider2.IsPropertySupportedForPartialFileAsyncImpl(propertyCanonicalName) + } + + deinit { + _default = nil + _IStorageProvider2 = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagestreamtransaction) +public final class StorageStreamTransaction : WinRTClass, test_component.IClosable { + private typealias SwiftABI = __ABI_Windows_Storage.IStorageStreamTransaction + private typealias CABI = __x_ABI_CWindows_CStorage_CIStorageStreamTransaction + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CIStorageStreamTransaction>?) -> StorageStreamTransaction? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.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.storage.storagestreamtransaction.close) + public func close() throws { + try _IClosable.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagestreamtransaction.commitasync) + public func commitAsync() throws -> test_component.AnyIAsyncAction! { + try _default.CommitAsyncImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.storagestreamtransaction.stream) + public var stream : test_component.AnyIRandomAccessStream! { + get { try! _default.get_StreamImpl() } + } + + deinit { + _IClosable = nil + _default = nil + } +} + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streamedfiledatarequest) +public final class StreamedFileDataRequest : WinRTClass, test_component.IClosable, test_component.IOutputStream, IStreamedFileDataRequest { + private typealias SwiftABI = __ABI_Windows_Storage_Streams.IOutputStream + private typealias CABI = __x_ABI_CWindows_CStorage_CStreams_CIOutputStream + private lazy var _default: SwiftABI! = getInterfaceForCaching() + @_spi(WinRTInternal) + override public func _getABI() -> UnsafeMutablePointer? { + if T.self == CABI.self { + return RawPointer(_default) + } + return super._getABI() + } + + @_spi(WinRTInternal) + public static func from(abi: ComPtr<__x_ABI_CWindows_CStorage_CStreams_CIOutputStream>?) -> StreamedFileDataRequest? { + guard let abi = abi else { return nil } + return .init(fromAbi: test_component.IInspectable(abi)) + } + + @_spi(WinRTInternal) + public init(fromAbi: test_component.IInspectable) { + super.init(fromAbi) + } + + override public func queryInterface(_ iid: test_component.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.storage.streamedfiledatarequest.close) + public func close() throws { + try _IClosable.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streamedfiledatarequest.writeasync) + public func writeAsync(_ buffer: test_component.AnyIBuffer!) throws -> AnyIAsyncOperationWithProgress! { + try _default.WriteAsyncImpl(buffer) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streamedfiledatarequest.flushasync) + public func flushAsync() throws -> AnyIAsyncOperation! { + try _default.FlushAsyncImpl() + } + + private lazy var _IStreamedFileDataRequest: __ABI_Windows_Storage.IStreamedFileDataRequest! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.streamedfiledatarequest.failandclose) + public func failAndClose(_ failureMode: StreamedFileFailureMode) throws { + try _IStreamedFileDataRequest.FailAndCloseImpl(failureMode) + } + + deinit { + _IClosable = nil + _default = nil + _IStreamedFileDataRequest = nil + } +} + +public typealias StreamedFileDataRequestedHandler = (StreamedFileDataRequest?) -> () +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile) +public protocol IStorageFile : IStorageItem, test_component.IRandomAccessStreamReference, test_component.IInputStreamReference { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.openasync) + func openAsync(_ accessMode: test_component.FileAccessMode) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.opentransactedwriteasync) + func openTransactedWriteAsync() throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyasync) + func copyAsync(_ destinationFolder: test_component.AnyIStorageFolder!) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyasync) + func copyAsync(_ destinationFolder: test_component.AnyIStorageFolder!, _ desiredNewName: String) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyasync) + func copyAsync(_ destinationFolder: test_component.AnyIStorageFolder!, _ desiredNewName: String, _ option: test_component.NameCollisionOption) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyandreplaceasync) + func copyAndReplaceAsync(_ fileToReplace: test_component.AnyIStorageFile!) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveasync) + func moveAsync(_ destinationFolder: test_component.AnyIStorageFolder!) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveasync) + func moveAsync(_ destinationFolder: test_component.AnyIStorageFolder!, _ desiredNewName: String) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveasync) + func moveAsync(_ destinationFolder: test_component.AnyIStorageFolder!, _ desiredNewName: String, _ option: test_component.NameCollisionOption) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveandreplaceasync) + func moveAndReplaceAsync(_ fileToReplace: test_component.AnyIStorageFile!) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.contenttype) + var contentType: String { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.filetype) + var fileType: String { get } +} + +extension IStorageFile { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageFileWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageFileWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage.IStorageItemWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage_Streams.IInputStreamReferenceWrapper.IID: + let wrapper = __ABI_Windows_Storage_Streams.IInputStreamReferenceWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageFile = any IStorageFile + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile2) +public protocol IStorageFile2 : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile2.openasync) + func openAsync(_ accessMode: test_component.FileAccessMode, _ options: test_component.StorageOpenOptions) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile2.opentransactedwriteasync) + func openTransactedWriteAsync(_ options: test_component.StorageOpenOptions) throws -> test_component.AnyIAsyncOperation! +} + +extension IStorageFile2 { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageFile2Wrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageFile2Wrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageFile2 = any IStorageFile2 + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefilepropertieswithavailability) +public protocol IStorageFilePropertiesWithAvailability : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefilepropertieswithavailability.isavailable) + var isAvailable: Bool { get } +} + +extension IStorageFilePropertiesWithAvailability { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageFilePropertiesWithAvailabilityWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageFilePropertiesWithAvailabilityWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageFilePropertiesWithAvailability = any IStorageFilePropertiesWithAvailability + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder) +public protocol IStorageFolder : IStorageItem { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfileasync) + func createFileAsync(_ desiredName: String) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfileasync) + func createFileAsync(_ desiredName: String, _ options: test_component.CreationCollisionOption) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfolderasync) + func createFolderAsync(_ desiredName: String) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfolderasync) + func createFolderAsync(_ desiredName: String, _ options: test_component.CreationCollisionOption) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfileasync) + func getFileAsync(_ name: String) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfolderasync) + func getFolderAsync(_ name: String) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getitemasync) + func getItemAsync(_ name: String) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfilesasync) + func getFilesAsync() throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfoldersasync) + func getFoldersAsync() throws -> test_component.AnyIAsyncOperation?>! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getitemsasync) + func getItemsAsync() throws -> test_component.AnyIAsyncOperation?>! +} + +extension IStorageFolder { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageFolderWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageFolderWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage.IStorageItemWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageFolder = any IStorageFolder + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder2) +public protocol IStorageFolder2 : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder2.trygetitemasync) + func tryGetItemAsync(_ name: String) throws -> test_component.AnyIAsyncOperation! +} + +extension IStorageFolder2 { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageFolder2Wrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageFolder2Wrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageFolder2 = any IStorageFolder2 + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem) +public protocol IStorageItem : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.renameasync) + func renameAsync(_ desiredName: String) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.renameasync) + func renameAsync(_ desiredName: String, _ option: test_component.NameCollisionOption) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.deleteasync) + func deleteAsync() throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.deleteasync) + func deleteAsync(_ option: test_component.StorageDeleteOption) throws -> test_component.AnyIAsyncAction! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.getbasicpropertiesasync) + func getBasicPropertiesAsync() throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.isoftype) + func isOfType(_ type: test_component.StorageItemTypes) throws -> Bool + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.attributes) + var attributes: test_component.FileAttributes { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.datecreated) + var dateCreated: test_component.DateTime { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.name) + var name: String { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.path) + var path: String { get } +} + +extension IStorageItem { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageItemWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageItem = any IStorageItem + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2) +public protocol IStorageItem2 : IStorageItem { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.getparentasync) + func getParentAsync() throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.isequal) + func isEqual(_ item: test_component.AnyIStorageItem!) throws -> Bool +} + +extension IStorageItem2 { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageItem2Wrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItem2Wrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage.IStorageItemWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageItem2 = any IStorageItem2 + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties) +public protocol IStorageItemProperties : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync) + func getThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync) + func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync) + func getThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.displayname) + var displayName: String { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.displaytype) + var displayType: String { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.folderrelativeid) + var folderRelativeId: String { get } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.properties) + var properties: test_component.StorageItemContentProperties! { get } +} + +extension IStorageItemProperties { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageItemPropertiesWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemPropertiesWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageItemProperties = any IStorageItemProperties + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2) +public protocol IStorageItemProperties2 : IStorageItemProperties { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync) + func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync) + func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32) throws -> test_component.AnyIAsyncOperation! + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync) + func getScaledImageAsThumbnailAsync(_ mode: test_component.ThumbnailMode, _ requestedSize: UInt32, _ options: test_component.ThumbnailOptions) throws -> test_component.AnyIAsyncOperation! +} + +extension IStorageItemProperties2 { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageItemProperties2Wrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemProperties2Wrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage.IStorageItemPropertiesWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemPropertiesWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageItemProperties2 = any IStorageItemProperties2 + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider) +public protocol IStorageItemPropertiesWithProvider : IStorageItemProperties { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.provider) + var provider: test_component.StorageProvider! { get } +} + +extension IStorageItemPropertiesWithProvider { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStorageItemPropertiesWithProviderWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemPropertiesWithProviderWrapper(self) + return wrapper!.queryInterface(iid) + case __ABI_Windows_Storage.IStorageItemPropertiesWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStorageItemPropertiesWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStorageItemPropertiesWithProvider = any IStorageItemPropertiesWithProvider + +/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istreamedfiledatarequest) +public protocol IStreamedFileDataRequest : WinRTInterface { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istreamedfiledatarequest.failandclose) + func failAndClose(_ failureMode: test_component.StreamedFileFailureMode) throws +} + +extension IStreamedFileDataRequest { + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { + switch iid { + case __ABI_Windows_Storage.IStreamedFileDataRequestWrapper.IID: + let wrapper = __ABI_Windows_Storage.IStreamedFileDataRequestWrapper(self) + return wrapper!.queryInterface(iid) + default: return nil + } + } +} +public typealias AnyIStreamedFileDataRequest = any IStreamedFileDataRequest + +extension test_component.CreationCollisionOption { + public static var generateUniqueName : test_component.CreationCollisionOption { + __x_ABI_CWindows_CStorage_CCreationCollisionOption_GenerateUniqueName + } + public static var replaceExisting : test_component.CreationCollisionOption { + __x_ABI_CWindows_CStorage_CCreationCollisionOption_ReplaceExisting + } + public static var failIfExists : test_component.CreationCollisionOption { + __x_ABI_CWindows_CStorage_CCreationCollisionOption_FailIfExists + } + public static var openIfExists : test_component.CreationCollisionOption { + __x_ABI_CWindows_CStorage_CCreationCollisionOption_OpenIfExists + } +} +extension test_component.CreationCollisionOption: @retroactive Hashable, @retroactive Codable {} + +extension test_component.FileAccessMode { + public static var read : test_component.FileAccessMode { + __x_ABI_CWindows_CStorage_CFileAccessMode_Read + } + public static var readWrite : test_component.FileAccessMode { + __x_ABI_CWindows_CStorage_CFileAccessMode_ReadWrite + } +} +extension test_component.FileAccessMode: @retroactive Hashable, @retroactive Codable {} + +extension test_component.FileAttributes { + public static var normal : test_component.FileAttributes { + __x_ABI_CWindows_CStorage_CFileAttributes_Normal + } + public static var readOnly : test_component.FileAttributes { + __x_ABI_CWindows_CStorage_CFileAttributes_ReadOnly + } + public static var directory : test_component.FileAttributes { + __x_ABI_CWindows_CStorage_CFileAttributes_Directory + } + public static var archive : test_component.FileAttributes { + __x_ABI_CWindows_CStorage_CFileAttributes_Archive + } + public static var temporary : test_component.FileAttributes { + __x_ABI_CWindows_CStorage_CFileAttributes_Temporary + } + public static var locallyIncomplete : test_component.FileAttributes { + __x_ABI_CWindows_CStorage_CFileAttributes_LocallyIncomplete + } +} +extension test_component.FileAttributes: @retroactive Hashable, @retroactive Codable {} + +extension test_component.NameCollisionOption { + public static var generateUniqueName : test_component.NameCollisionOption { + __x_ABI_CWindows_CStorage_CNameCollisionOption_GenerateUniqueName + } + public static var replaceExisting : test_component.NameCollisionOption { + __x_ABI_CWindows_CStorage_CNameCollisionOption_ReplaceExisting + } + public static var failIfExists : test_component.NameCollisionOption { + __x_ABI_CWindows_CStorage_CNameCollisionOption_FailIfExists + } +} +extension test_component.NameCollisionOption: @retroactive Hashable, @retroactive Codable {} + +extension test_component.StorageDeleteOption { + public static var `default` : test_component.StorageDeleteOption { + __x_ABI_CWindows_CStorage_CStorageDeleteOption_Default + } + public static var permanentDelete : test_component.StorageDeleteOption { + __x_ABI_CWindows_CStorage_CStorageDeleteOption_PermanentDelete + } +} +extension test_component.StorageDeleteOption: @retroactive Hashable, @retroactive Codable {} + +extension test_component.StorageItemTypes { + public static var none : test_component.StorageItemTypes { + __x_ABI_CWindows_CStorage_CStorageItemTypes_None + } + public static var file : test_component.StorageItemTypes { + __x_ABI_CWindows_CStorage_CStorageItemTypes_File + } + public static var folder : test_component.StorageItemTypes { + __x_ABI_CWindows_CStorage_CStorageItemTypes_Folder + } +} +extension test_component.StorageItemTypes: @retroactive Hashable, @retroactive Codable {} + +extension test_component.StorageLibraryChangeType { + public static var created : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_Created + } + public static var deleted : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_Deleted + } + public static var movedOrRenamed : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_MovedOrRenamed + } + public static var contentsChanged : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_ContentsChanged + } + public static var movedOutOfLibrary : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_MovedOutOfLibrary + } + public static var movedIntoLibrary : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_MovedIntoLibrary + } + public static var contentsReplaced : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_ContentsReplaced + } + public static var indexingStatusChanged : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_IndexingStatusChanged + } + public static var encryptionChanged : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_EncryptionChanged + } + public static var changeTrackingLost : test_component.StorageLibraryChangeType { + __x_ABI_CWindows_CStorage_CStorageLibraryChangeType_ChangeTrackingLost + } +} +extension test_component.StorageLibraryChangeType: @retroactive Hashable, @retroactive Codable {} + +extension test_component.StorageOpenOptions { + public static var none : test_component.StorageOpenOptions { + __x_ABI_CWindows_CStorage_CStorageOpenOptions_None + } + public static var allowOnlyReaders : test_component.StorageOpenOptions { + __x_ABI_CWindows_CStorage_CStorageOpenOptions_AllowOnlyReaders + } + public static var allowReadersAndWriters : test_component.StorageOpenOptions { + __x_ABI_CWindows_CStorage_CStorageOpenOptions_AllowReadersAndWriters + } +} +extension test_component.StorageOpenOptions: @retroactive Hashable, @retroactive Codable {} + +extension test_component.StreamedFileFailureMode { + public static var failed : test_component.StreamedFileFailureMode { + __x_ABI_CWindows_CStorage_CStreamedFileFailureMode_Failed + } + public static var currentlyUnavailable : test_component.StreamedFileFailureMode { + __x_ABI_CWindows_CStorage_CStreamedFileFailureMode_CurrentlyUnavailable + } + public static var incomplete : test_component.StreamedFileFailureMode { + __x_ABI_CWindows_CStorage_CStreamedFileFailureMode_Incomplete + } +} +extension test_component.StreamedFileFailureMode: @retroactive Hashable, @retroactive Codable {} + diff --git a/tests/test_component/Sources/test_component/test_component+ABI.swift b/tests/test_component/Sources/test_component/test_component+ABI.swift index 5dfe81c1..e5b4ab16 100644 --- a/tests/test_component/Sources/test_component/test_component+ABI.swift +++ b/tests/test_component/Sources/test_component/test_component+ABI.swift @@ -51,6 +51,10 @@ private var IID___x_ABI_Ctest__component_CIBasic: test_component.IID { .init(Data1: 0x636060A1, Data2: 0xE41D, Data3: 0x59DF, Data4: ( 0xA5,0xD3,0xFB,0x7C,0xE7,0xE1,0x79,0x2F ))// 636060A1-E41D-59DF-A5D3-FB7CE7E1792F } +private var IID___x_ABI_Ctest__component_CIBufferTesterStatics: test_component.IID { + .init(Data1: 0x82190F30, Data2: 0x48DC, Data3: 0x5350, Data4: ( 0xAD,0x5B,0x00,0x36,0x63,0x5C,0xF5,0xB4 ))// 82190F30-48DC-5350-AD5B-0036635CF5B4 +} + private var IID___x_ABI_Ctest__component_CIClass: test_component.IID { .init(Data1: 0xEBCBC0CD, Data2: 0x48DD, Data3: 0x56BA, Data4: ( 0xBB,0xE2,0xCD,0x0B,0xE5,0xA3,0x06,0x76 ))// EBCBC0CD-48DD-56BA-BBE2-CD0BE5A30676 } @@ -520,6 +524,21 @@ public enum __ABI_test_component { ) public typealias IBasicWrapper = InterfaceWrapperBase<__IMPL_test_component.IBasicBridge> + public class IBufferTesterStatics: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_Ctest__component_CIBufferTesterStatics } + + internal func GetDataFromImpl(_ buffer: test_component.AnyIBuffer?, _ index: UInt32) throws -> UInt8 { + var result: UINT8 = 0 + let bufferWrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(buffer) + let _buffer = try! bufferWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_Ctest__component_CIBufferTesterStatics.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetDataFrom(pThis, _buffer, index, &result)) + } + return result + } + + } + public class IClass: test_component.IInspectable { override public class var IID: test_component.IID { IID___x_ABI_Ctest__component_CIClass } diff --git a/tests/test_component/Sources/test_component/test_component+Generics.swift b/tests/test_component/Sources/test_component/test_component+Generics.swift index 82033dac..1b4d6d80 100644 --- a/tests/test_component/Sources/test_component/test_component+Generics.swift +++ b/tests/test_component/Sources/test_component/test_component+Generics.swift @@ -3,6 +3,57 @@ import Foundation import Ctest_component +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_boolean: test_component.IID { + .init(Data1: 0xc1d3d1a2, Data2: 0xae17, Data3: 0x5a5f, Data4: ( 0xb5,0xa2,0xbd,0xcc,0x88,0x44,0x88,0x9a ))// c1d3d1a2-ae17-5a5f-b5a2-bdcc8844889a +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1_boolean { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1_booleanWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK + } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerBool: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_boolean } + + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1_booleanWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1_boolean.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } + } + +} + +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1_boolean + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerBool + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_int: test_component.IID { .init(Data1: 0xd60cae9d, Data2: 0x88cb, Data3: 0x59f1, Data4: ( 0x85,0x76,0x3f,0xba,0x44,0x79,0x6b,0xe8 ))// d60cae9d-88cb-59f1-8576-3fba44796be8 } @@ -54,98 +105,98 @@ internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1_intBridge : WinRTDe return handler } } -private var IID___x_ABI_C__FIAsyncOperationProgressHandler_2_int_double: test_component.IID { - .init(Data1: 0xc13682fc, Data2: 0x6466, Data3: 0x5af2, Data4: ( 0x8a,0x68,0x0d,0xa9,0x4b,0x50,0x64,0xf3 ))// c13682fc-6466-5af2-8a68-0da94b5064f3 +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRING: test_component.IID { + .init(Data1: 0xb79a741f, Data2: 0x7fb5, Data3: 0x50ae, Data4: ( 0x9e,0x99,0x91,0x12,0x01,0xec,0x3d,0x41 ))// b79a741f-7fb5-50ae-9e99-911201ec3d41 } -internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationProgressHandler_2_int_double { +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRING { static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGVTable) { $0 } return .init(lpVtbl:vtblPtr) } } -internal var __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleVTable: __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleVtbl = .init( - QueryInterface: { __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.addRef($0) }, - Release: { __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.release($0) }, +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper.release($0) }, Invoke: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) - let progressInfo: Double = $2 - __unwrapped__instance(asyncInfo, progressInfo) + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper = InterfaceWrapperBase -internal class AsyncOperationProgressHandlerInt32_Double: test_component.IUnknown { - override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationProgressHandler_2_int_double } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerString: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRING } - internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ progressInfo: Double) throws { - let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper(asyncInfo) + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper(asyncInfo) let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIAsyncOperationProgressHandler_2_int_double.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, progressInfo)) + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } } } -internal class __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleBridge : WinRTDelegateBridge { - internal typealias Handler = AsyncOperationProgressHandler - internal typealias CABI = __x_ABI_C__FIAsyncOperationProgressHandler_2_int_double - internal typealias SwiftABI = test_component.AsyncOperationProgressHandlerInt32_Double +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRING + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerString internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } let _default = SwiftABI(abi) - let handler: Handler = { (asyncInfo, progressInfo) in - try! _default.InvokeImpl(asyncInfo, progressInfo) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) } return handler } } -private var IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double: test_component.IID { - .init(Data1: 0x42d14b3d, Data2: 0xcf9b, Data3: 0x5c48, Data4: ( 0x85,0x42,0x74,0xd9,0xf4,0x8f,0x4d,0x27 ))// 42d14b3d-cf9b-5c48-8542-74d9f48f4d27 +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32: test_component.IID { + .init(Data1: 0x9343b6e7, Data2: 0xe3d2, Data3: 0x5e4a, Data4: ( 0xab,0x2d,0x2b,0xce,0x49,0x19,0xa6,0xa4 ))// 9343b6e7-e3d2-5e4a-ab2d-2bce4919a6a4 } -internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double { +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32 { static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32VTable) { $0 } return .init(lpVtbl:vtblPtr) } } -internal var __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleVTable: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleVtbl = .init( - QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.addRef($0) }, - Release: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.release($0) }, +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32VTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper.release($0) }, Invoke: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) let asyncStatus: test_component.AsyncStatus = $2 __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper = InterfaceWrapperBase -internal class AsyncOperationWithProgressCompletedHandlerInt32_Double: test_component.IUnknown { - override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerUInt32: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32 } - internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ asyncStatus: test_component.AsyncStatus) throws { - let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper(asyncInfo) + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper(asyncInfo) let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double.self) { pThis in + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } } } -internal class __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleBridge : WinRTDelegateBridge { - internal typealias Handler = AsyncOperationWithProgressCompletedHandler - internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double - internal typealias SwiftABI = test_component.AsyncOperationWithProgressCompletedHandlerInt32_Double +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Bridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32 + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerUInt32 internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } @@ -156,972 +207,1397 @@ internal class __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_dou return handler } } -private var IID___x_ABI_C__FIIterable_1_IInspectable: test_component.IID { - .init(Data1: 0x092b849b, Data2: 0x60b1, Data3: 0x52be, Data4: ( 0xa4,0x4a,0x6f,0xe8,0xe9,0x33,0xcb,0xe4 ))// 092b849b-60b1-52be-a44a-6fe8e933cbe4 +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0x7344f356, Data2: 0x8399, Data3: 0x5756, Data4: ( 0xa2,0xf8,0xab,0xd5,0x0c,0x41,0x46,0xff ))// 7344f356-8399-5756-a2f8-abd50c4146ff } -internal var __x_ABI_C__FIIterable_1_IInspectableVTable: __x_ABI_C__FIIterable_1_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1_IInspectableWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1_IInspectableWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, - - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() - $1!.pointee = hstring - return S_OK - }, - - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectable { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1_IInspectableWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation?>? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1_IInspectableWrapper = InterfaceWrapperBase -internal class IIterableAny: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1_IInspectable } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIMapString_Any: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectable } - internal func FirstImpl() throws -> test_component.AnyIIterator? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?>?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1_IInspectableWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1_IInspectable - internal typealias SwiftABI = IIterableAny - internal typealias SwiftProjection = AnyIIterable - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler?> + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectable + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIMapString_Any + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1_IInspectableImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem: test_component.IID { + .init(Data1: 0x51436e75, Data2: 0xace1, Data3: 0x5a68, Data4: ( 0xb2,0x60,0xf8,0x43,0xb8,0x46,0xf0,0xdb ))// 51436e75-ace1-5a68-b260-f843b846f0db +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1_IInspectableVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1_IInspectableImpl : IIterable, AbiInterfaceImpl { - typealias T = Any? - typealias Bridge = __x_ABI_C__FIIterable_1_IInspectableBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation?>? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIVectorViewIStorageItem: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?>?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIIterable_1_GUID: test_component.IID { - .init(Data1: 0xf4ca3045, Data2: 0x5dd7, Data3: 0x54be, Data4: ( 0x98,0x2e,0xd8,0x8d,0x8c,0xa0,0x87,0x6e ))// f4ca3045-5dd7-54be-982e-d88d8ca0876e } -internal var __x_ABI_C__FIIterable_1_GUIDVTable: __x_ABI_C__FIIterable_1_GUIDVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1_GUIDWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1_GUIDWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1_GUIDWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1_GUIDWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler?> + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIVectorViewIStorageItem - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() - $1!.pointee = hstring - return S_OK - }, + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile: test_component.IID { + .init(Data1: 0xcb4206c5, Data2: 0x0988, Data3: 0x5104, Data4: ( 0xaf,0xa9,0x25,0x3c,0x29,0x8f,0x86,0xfd ))// cb4206c5-0988-5104-afa9-253c298f86fd +} - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1_GUIDWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation?>? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1_GUIDWrapper = InterfaceWrapperBase -internal class IIterableUUID: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1_GUID } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIVectorViewStorageFile: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile } - internal func FirstImpl() throws -> test_component.AnyIIterator? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?>?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1_GUIDWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1_GUIDBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1_GUID - internal typealias SwiftABI = IIterableUUID - internal typealias SwiftProjection = AnyIIterable - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler?> + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIVectorViewStorageFile + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1_GUIDImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder: test_component.IID { + .init(Data1: 0xed2d1d9b, Data2: 0x26ec, Data3: 0x5be7, Data4: ( 0xa8,0xa3,0x56,0x45,0x89,0x33,0xd2,0x5f ))// ed2d1d9b-26ec-5be7-a8a3-56458933d25f +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1_GUIDVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1_GUIDImpl : IIterable, AbiInterfaceImpl { - typealias T = Foundation.UUID - typealias Bridge = __x_ABI_C__FIIterable_1_GUIDBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation?>? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIVectorViewStorageFolder: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?>?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIIterable_1_HSTRING: test_component.IID { - .init(Data1: 0xe2fcc7c1, Data2: 0x3bfc, Data3: 0x5a0b, Data4: ( 0xb2,0xb0,0x72,0xe7,0x69,0xd1,0xcb,0x7e ))// e2fcc7c1-3bfc-5a0b-b2b0-72e769d1cb7e } -internal var __x_ABI_C__FIIterable_1_HSTRINGVTable: __x_ABI_C__FIIterable_1_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1_HSTRINGWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler?> + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIVectorViewStorageFolder - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() - $1!.pointee = hstring - return S_OK - }, + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange: test_component.IID { + .init(Data1: 0xab9cea41, Data2: 0x6df8, Data3: 0x535d, Data4: ( 0x81,0x71,0x46,0xaf,0xf1,0x87,0x15,0x8f ))// ab9cea41-6df8-535d-8171-46aff187158f +} - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1_HSTRINGWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation?>? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1_HSTRINGWrapper = InterfaceWrapperBase -internal class IIterableString: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1_HSTRING } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIVectorViewStorageLibraryChange: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange } - internal func FirstImpl() throws -> test_component.AnyIIterator? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?>?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1_HSTRINGWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1_HSTRING - internal typealias SwiftABI = IIterableString - internal typealias SwiftProjection = AnyIIterable - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler?> + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIVectorViewStorageLibraryChange + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1_HSTRINGImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRING: test_component.IID { + .init(Data1: 0xfae4b396, Data2: 0x97c8, Data3: 0x5cc3, Data4: ( 0xbf,0x88,0xea,0x30,0x98,0xed,0xf6,0xb2 ))// fae4b396-97c8-5cc3-bf88-ea3098edf6b2 +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1_HSTRINGVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRING { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1_HSTRINGImpl : IIterable, AbiInterfaceImpl { - typealias T = String - typealias Bridge = __x_ABI_C__FIIterable_1_HSTRINGBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation?>? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIVectorString: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRING } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?>?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: test_component.IID { - .init(Data1: 0xfe2f3d47, Data2: 0x5d47, Data3: 0x5499, Data4: ( 0x83,0x74,0x43,0x0c,0x7c,0xda,0x02,0x04 ))// fe2f3d47-5d47-5499-8374-430c7cda0204 +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler?> + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRING + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIVectorString + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties: test_component.IID { + .init(Data1: 0xc8659aae, Data2: 0x4926, Data3: 0x52ad, Data4: ( 0x8f,0x60,0xd8,0x9f,0xe5,0xa8,0xdf,0x5f ))// c8659aae-4926-52ad-8f60-d89fe5a8df5f } -internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() - $1!.pointee = hstring +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK - }, + } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerBasicProperties: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties } - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } + } - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper(result) - resultWrapper?.copyTo($1) +} + +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerBasicProperties + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties: test_component.IID { + .init(Data1: 0x4452ed4c, Data2: 0x642b, Data3: 0x501b, Data4: ( 0x96,0x17,0x7d,0x68,0xb4,0xac,0x3c,0x66 ))// 4452ed4c-642b-501b-9617-7d68b4ac3c66 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase -internal class IIterableIKeyValuePairString_Any: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerDocumentProperties: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties } - internal func FirstImpl() throws -> test_component.AnyIIterator?>? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable - internal typealias SwiftABI = IIterableIKeyValuePairString_Any - internal typealias SwiftProjection = AnyIIterable?> - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerDocumentProperties + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties: test_component.IID { + .init(Data1: 0xc63729bc, Data2: 0xe4c3, Data3: 0x564c, Data4: ( 0xb1,0x37,0x2c,0xb4,0xf5,0x96,0x6a,0x83 ))// c63729bc-e4c3-564c-b137-2cb4f5966a83 +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IIterable, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerImageProperties: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator?>? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: test_component.IID { - .init(Data1: 0xe9bdaaf0, Data2: 0xcbf6, Data3: 0x5c72, Data4: ( 0xbe,0x90,0x29,0xcb,0xf3,0xa1,0x31,0x9b ))// e9bdaaf0-cbf6-5c72-be90-29cbf3a1319b +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerImageProperties + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties: test_component.IID { + .init(Data1: 0xd84e1312, Data2: 0xd661, Data3: 0x5b7f, Data4: ( 0x95,0x66,0x74,0x21,0xbd,0xed,0xc1,0xea ))// d84e1312-d661-5b7f-9566-7421bdedc1ea } -internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, - - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() - $1!.pointee = hstring - return S_OK - }, - - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase -internal class IIterableIKeyValuePairString_String: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerMusicProperties: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties } - internal func FirstImpl() throws -> test_component.AnyIIterator?>? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING - internal typealias SwiftABI = IIterableIKeyValuePairString_String - internal typealias SwiftProjection = AnyIIterable?> - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerMusicProperties + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail: test_component.IID { + .init(Data1: 0x6d0036f2, Data2: 0xa8a8, Data3: 0x505d, Data4: ( 0xb0,0x42,0xd0,0x87,0xdc,0x1f,0xc1,0xb7 ))// 6d0036f2-a8a8-505d-b042-d087dc1fc1b7 +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IIterable, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerStorageItemThumbnail: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator?>? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0x9ee59ac2, Data2: 0xef36, Data3: 0x560b, Data4: ( 0x8a,0xdc,0xd3,0xea,0x78,0xbd,0x58,0x2b ))// 9ee59ac2-ef36-560b-8adc-d3ea78bd582b } -internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerStorageItemThumbnail - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() - $1!.pointee = hstring - return S_OK - }, + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties: test_component.IID { + .init(Data1: 0x43401d34, Data2: 0x61ab, Data3: 0x5cf2, Data4: ( 0x92,0x1f,0x55,0xb6,0x16,0x63,0x1d,0x1d ))// 43401d34-61ab-5cf2-921f-55b616631d1d +} - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IIterableIKeyValuePairString_Base: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerVideoProperties: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties } - internal func FirstImpl() throws -> test_component.AnyIIterator?>? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IIterableIKeyValuePairString_Base - internal typealias SwiftProjection = AnyIIterable?> - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerVideoProperties + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItem: test_component.IID { + .init(Data1: 0x92c3102f, Data2: 0xa327, Data3: 0x5318, Data4: ( 0xa6,0xc1,0x76,0xf6,0xb2,0xa0,0xab,0xfb ))// 92c3102f-a327-5318-a6c1-76f6b2a0abfb +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItem { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IIterable, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIStorageItem: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItem } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator?>? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0xb826dcab, Data2: 0xca2a, Data3: 0x5fbc, Data4: ( 0x8c,0xbd,0xed,0x75,0x9a,0x9a,0x1c,0x00 ))// b826dcab-ca2a-5fbc-8cbd-ed759a9a1c00 } -internal var __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItem + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIStorageItem - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() - $1!.pointee = hstring - return S_OK - }, + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState: test_component.IID { + .init(Data1: 0xb67a3cba, Data2: 0xf5f7, Data3: 0x5e51, Data4: ( 0x96,0x8a,0x38,0x51,0x26,0xd1,0xf9,0x18 ))// b67a3cba-f5f7-5e51-968a-385126d1f918 +} - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IIterableBase: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIndexedState: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState } - internal func FirstImpl() throws -> test_component.AnyIIterator? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IIterableBase - internal typealias SwiftProjection = AnyIIterable - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIndexedState + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFile: test_component.IID { + .init(Data1: 0xe521c894, Data2: 0x2c26, Data3: 0x5946, Data4: ( 0x9e,0x61,0x2b,0x5e,0x18,0x8d,0x01,0xed ))// e521c894-2c26-5946-9e61-2b5e188d01ed +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFile { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseImpl : IIterable, AbiInterfaceImpl { - typealias T = Base? - typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerStorageFile: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFile } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { - .init(Data1: 0x2ec46808, Data2: 0xad2e, Data3: 0x5438, Data4: ( 0xa5,0x84,0xfa,0xb6,0x0a,0x1b,0x07,0xe3 ))// 2ec46808-ad2e-5438-a584-fab60a1b07e3 } -internal var __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFile + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerStorageFile - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() - $1!.pointee = hstring - return S_OK - }, + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolder: test_component.IID { + .init(Data1: 0xc211026e, Data2: 0x9e63, Data3: 0x5452, Data4: ( 0xba,0x54,0x3a,0x07,0xd6,0xa9,0x68,0x74 ))// c211026e-9e63-5452-ba54-3a07d6a96874 +} - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolder { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - First: { - guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.first() - let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK } ) -typealias __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase -internal class IIterableIBasic: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic } +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerStorageFolder: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolder } - internal func FirstImpl() throws -> test_component.AnyIIterator? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) - } + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic - internal typealias SwiftABI = IIterableIBasic - internal typealias SwiftProjection = AnyIIterable - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolder + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerStorageFolder + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction: test_component.IID { + .init(Data1: 0xd11739e6, Data2: 0x2995, Data3: 0x5d33, Data4: ( 0xbf,0xff,0x51,0xb6,0x04,0x1f,0x68,0xc1 ))// d11739e6-2995-5d33-bfff-51b6041f68c1 +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IIterable, AbiInterfaceImpl { - typealias T = AnyIBasic? - typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerStorageStreamTransaction: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) - fileprivate func first() -> AnyIIterator? { - try! _default.FirstImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIIterator_1_IInspectable: test_component.IID { - .init(Data1: 0x44a94f2d, Data2: 0x04f8, Data3: 0x5091, Data4: ( 0xb3,0x36,0xbe,0x78,0x92,0xdd,0x10,0xbe ))// 44a94f2d-04f8-5091-b336-be7892dd10be } -internal var __x_ABI_C__FIIterator_1_IInspectableVTable: __x_ABI_C__FIIterator_1_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1_IInspectableWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1_IInspectableWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids - return S_OK - }, +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerStorageStreamTransaction - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() - $1!.pointee = hstring - return S_OK - }, + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer: test_component.IID { + .init(Data1: 0x51c3d2fd, Data2: 0xb8a1, Data3: 0x5620, Data4: ( 0xb7,0x46,0x7e,0xe6,0xd5,0x33,0xac,0xa3 ))// 51c3d2fd-b8a1-5620-b746-7ee6d533aca3 +} - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - let resultWrapper = __ABI_.AnyWrapper(result) - resultWrapper?.copyTo($1) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK - }, + } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIBuffer: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer } - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } + } - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) - return S_OK - }, +} - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } -) -typealias __x_ABI_C__FIIterator_1_IInspectableWrapper = InterfaceWrapperBase -internal class IIteratorAny: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1_IInspectable } +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIBuffer - internal func get_CurrentImpl() throws -> Any? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterator_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) - } + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) } - return __ABI_.AnyWrapper.unwrapFrom(abi: result) + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream: test_component.IID { + .init(Data1: 0xd0bd0125, Data2: 0x9049, Data3: 0x57a3, Data4: ( 0xbd,0x66,0xe2,0x52,0x5d,0x98,0xc8,0x14 ))// d0bd0125-9049-57a3-bd66-e2525d98c814 +} - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) - } - return .init(from: result) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamVTable) { $0 } + return .init(lpVtbl:vtblPtr) } +} - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK + } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIInputStream: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream } + + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) } - return .init(from: result) } } -internal enum __x_ABI_C__FIIterator_1_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1_IInspectable - internal typealias SwiftABI = IIteratorAny - internal typealias SwiftProjection = AnyIIterator - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIInputStream + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1_IInspectableImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream: test_component.IID { + .init(Data1: 0x398c4183, Data2: 0x793d, Data3: 0x5b00, Data4: ( 0x81,0x9b,0x4a,0xef,0x92,0x48,0x5e,0x94 ))// 398c4183-793d-5b00-819b-4aef92485e94 +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1_IInspectableVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamVTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1_IInspectableImpl : IIterator, AbiInterfaceImpl { - typealias T = Any? - typealias Bridge = __x_ABI_C__FIIterator_1_IInspectableBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIRandomAccessStream: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : Any? { - get { try! _default.get_CurrentImpl() } - } +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } - } +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIRandomAccessStream - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType: test_component.IID { + .init(Data1: 0x3dddecf4, Data2: 0x1d39, Data3: 0x58e8, Data4: ( 0x83,0xb1,0xdb,0xed,0x54,0x1c,0x7f,0x35 ))// 3dddecf4-1d39-58e8-83b1-dbed541c7f35 } -private var IID___x_ABI_C__FIIterator_1_GUID: test_component.IID { - .init(Data1: 0xd3d64048, Data2: 0x82b3, Data3: 0x53c7, Data4: ( 0x92,0x85,0xb0,0xbe,0x18,0x36,0x84,0x82 ))// d3d64048-82b3-53c7-9285-b0be18368482 +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } } -internal var __x_ABI_C__FIIterator_1_GUIDVTable: __x_ABI_C__FIIterator_1_GUIDVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1_GUIDWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1_GUIDWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1_GUIDWrapper.release($0) }, - GetIids: { - let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) - iids[0] = IUnknown.IID - iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1_GUIDWrapper.IID - $1!.pointee = 3 - $2!.pointee = iids +internal var __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeVTable: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperation? = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) return S_OK - }, + } +) +typealias __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper = InterfaceWrapperBase +internal class AsyncOperationCompletedHandlerIRandomAccessStreamWithContentType: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType } - GetRuntimeClassName: { - _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() - $1!.pointee = hstring - return S_OK - }, + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperation?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } + } - GetTrustLevel: { - _ = $0 - $1!.pointee = TrustLevel(rawValue: 0) - return S_OK - }, +} - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - $1?.initialize(to: .init(from: result)) - return S_OK - }, +internal class __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType + internal typealias SwiftABI = test_component.AsyncOperationCompletedHandlerIRandomAccessStreamWithContentType - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationProgressHandler_2_int_double: test_component.IID { + .init(Data1: 0xc13682fc, Data2: 0x6466, Data3: 0x5af2, Data4: ( 0x8a,0x68,0x0d,0xa9,0x4b,0x50,0x64,0xf3 ))// c13682fc-6466-5af2-8a68-0da94b5064f3 +} - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) - return S_OK - }, +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationProgressHandler_2_int_double { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } +internal var __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleVTable: __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) + let progressInfo: Double = $2 + __unwrapped__instance(asyncInfo, progressInfo) + return S_OK + } ) -typealias __x_ABI_C__FIIterator_1_GUIDWrapper = InterfaceWrapperBase -internal class IIteratorUUID: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1_GUID } +typealias __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper = InterfaceWrapperBase +internal class AsyncOperationProgressHandlerInt32_Double: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationProgressHandler_2_int_double } - internal func get_CurrentImpl() throws -> Foundation.UUID { - var result: test_component.GUID = .init() - _ = try perform(as: __x_ABI_C__FIIterator_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &result)) + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ progressInfo: Double) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationProgressHandler_2_int_double.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, progressInfo)) } - return .init(from: result) } - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) +} + +internal class __x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationProgressHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationProgressHandler_2_int_double + internal typealias SwiftABI = test_component.AsyncOperationProgressHandlerInt32_Double + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, progressInfo) in + try! _default.InvokeImpl(asyncInfo, progressInfo) } - return .init(from: result) + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32: test_component.IID { + .init(Data1: 0xea0fe405, Data2: 0xd432, Data3: 0x5ac7, Data4: ( 0x9e,0xf8,0x5a,0x65,0xe1,0xf9,0x7d,0x7e ))// ea0fe405-d432-5ac7-9ef8-5a65e1f97d7e +} - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32 { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32VTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32VTable: __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) + let progressInfo: UInt32 = $2 + __unwrapped__instance(asyncInfo, progressInfo) + return S_OK + } +) +typealias __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper = InterfaceWrapperBase +internal class AsyncOperationProgressHandlerUInt32_UInt32: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32 } + + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ progressInfo: UInt32) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, progressInfo)) } - return .init(from: result) } } -internal enum __x_ABI_C__FIIterator_1_GUIDBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1_GUID - internal typealias SwiftABI = IIteratorUUID - internal typealias SwiftProjection = AnyIIterator - internal static func from(abi: ComPtr?) -> SwiftProjection? { +internal class __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Bridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationProgressHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32 + internal typealias SwiftABI = test_component.AsyncOperationProgressHandlerUInt32_UInt32 + + internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1_GUIDImpl(abi) + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, progressInfo) in + try! _default.InvokeImpl(asyncInfo, progressInfo) + } + return handler } +} +private var IID___x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32: test_component.IID { + .init(Data1: 0xbf666554, Data2: 0x7605, Data3: 0x5d9a, Data4: ( 0xb1,0x4e,0x18,0xd8,0xc8,0x47,0x2a,0xfe ))// bf666554-7605-5d9a-b14e-18d8c8472afe +} - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1_GUIDVTable) { $0 } - return .init(lpVtbl: vtblPtr) +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32VTable) { $0 } + return .init(lpVtbl:vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1_GUIDImpl : IIterator, AbiInterfaceImpl { - typealias T = Foundation.UUID - typealias Bridge = __x_ABI_C__FIIterator_1_GUIDBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) +internal var __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32VTable: __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) + let progressInfo: UInt32 = $2 + __unwrapped__instance(asyncInfo, progressInfo) + return S_OK } +) +typealias __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper = InterfaceWrapperBase +internal class AsyncOperationProgressHandlerIBuffer_UInt32: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ progressInfo: UInt32) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, progressInfo)) + } } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : Foundation.UUID { - get { try! _default.get_CurrentImpl() } - } +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } - } +internal class __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Bridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationProgressHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 + internal typealias SwiftABI = test_component.AsyncOperationProgressHandlerIBuffer_UInt32 - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, progressInfo) in + try! _default.InvokeImpl(asyncInfo, progressInfo) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double: test_component.IID { + .init(Data1: 0x42d14b3d, Data2: 0xcf9b, Data3: 0x5c48, Data4: ( 0x85,0x42,0x74,0xd9,0xf4,0x8f,0x4d,0x27 ))// 42d14b3d-cf9b-5c48-8542-74d9f48f4d27 } -private var IID___x_ABI_C__FIIterator_1_HSTRING: test_component.IID { - .init(Data1: 0x8c304ebb, Data2: 0x6615, Data3: 0x50a4, Data4: ( 0x88,0x29,0x87,0x9e,0xcd,0x44,0x32,0x36 ))// 8c304ebb-6615-50a4-8829-879ecd443236 +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } } -internal var __x_ABI_C__FIIterator_1_HSTRINGVTable: __x_ABI_C__FIIterator_1_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleVTable: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK + } +) +typealias __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper = InterfaceWrapperBase +internal class AsyncOperationWithProgressCompletedHandlerInt32_Double: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double } + + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } + } + +} + +internal class __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleBridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationWithProgressCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_double + internal typealias SwiftABI = test_component.AsyncOperationWithProgressCompletedHandlerInt32_Double + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32: test_component.IID { + .init(Data1: 0x1e466dc5, Data2: 0x840f, Data3: 0x54f9, Data4: ( 0xb8,0x77,0x5e,0x3a,0x9f,0x4b,0x6c,0x74 ))// 1e466dc5-840f-54f9-b877-5e3a9f4b6c74 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32 { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32VTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32VTable: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK + } +) +typealias __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper = InterfaceWrapperBase +internal class AsyncOperationWithProgressCompletedHandlerUInt32_UInt32: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32 } + + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } + } + +} + +internal class __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Bridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationWithProgressCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32 + internal typealias SwiftABI = test_component.AsyncOperationWithProgressCompletedHandlerUInt32_UInt32 + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32: test_component.IID { + .init(Data1: 0x06386a7a, Data2: 0xe009, Data3: 0x5b0b, Data4: ( 0xab,0x68,0xa8,0xe4,0x8b,0x51,0x66,0x47 ))// 06386a7a-e009-5b0b-ab68-a8e48b516647 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32VTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32VTable: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let asyncInfo: test_component.AnyIAsyncOperationWithProgress? = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) + let asyncStatus: test_component.AsyncStatus = $2 + __unwrapped__instance(asyncInfo, asyncStatus) + return S_OK + } +) +typealias __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper = InterfaceWrapperBase +internal class AsyncOperationWithProgressCompletedHandlerIBuffer_UInt32: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 } + + internal func InvokeImpl(_ asyncInfo: test_component.AnyIAsyncOperationWithProgress?, _ asyncStatus: test_component.AsyncStatus) throws { + let asyncInfoWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper(asyncInfo) + let _asyncInfo = try! asyncInfoWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _asyncInfo, asyncStatus)) + } + } + +} + +internal class __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Bridge : WinRTDelegateBridge { + internal typealias Handler = AsyncOperationWithProgressCompletedHandler + internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 + internal typealias SwiftABI = test_component.AsyncOperationWithProgressCompletedHandlerIBuffer_UInt32 + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (asyncInfo, asyncStatus) in + try! _default.InvokeImpl(asyncInfo, asyncStatus) + } + return handler + } +} +private var IID___x_ABI_C__FIIterable_1_IInspectable: test_component.IID { + .init(Data1: 0x092b849b, Data2: 0x60b1, Data3: 0x52be, Data4: ( 0xa4,0x4a,0x6f,0xe8,0xe9,0x33,0xcb,0xe4 ))// 092b849b-60b1-52be-a44a-6fe8e933cbe4 +} + +internal var __x_ABI_C__FIIterable_1_IInspectableVTable: __x_ABI_C__FIIterable_1_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1_HSTRINGWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1_IInspectableWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -1129,7 +1605,7 @@ internal var __x_ABI_C__FIIterator_1_HSTRINGVTable: __x_ABI_C__FIIterator_1_HSTR GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -1140,115 +1616,75 @@ internal var __x_ABI_C__FIIterator_1_HSTRINGVTable: __x_ABI_C__FIIterator_1_HSTR return S_OK }, - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - $1?.initialize(to: try! HString(result).detach()) - return S_OK - }, - - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1_IInspectableWrapper(result) + resultWrapper?.copyTo($1) return S_OK - }, - - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } -) -typealias __x_ABI_C__FIIterator_1_HSTRINGWrapper = InterfaceWrapperBase -internal class IIteratorString: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1_HSTRING } - - internal func get_CurrentImpl() throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIIterator_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &result)) - } - return .init(from: result) - } - - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) - } - return .init(from: result) } +) +typealias __x_ABI_C__FIIterable_1_IInspectableWrapper = InterfaceWrapperBase +internal class IIterableAny: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1_IInspectable } - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) + internal func FirstImpl() throws -> test_component.AnyIIterator? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterable_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) + } } - return .init(from: result) + return test_component.__x_ABI_C__FIIterator_1_IInspectableWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterator_1_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1_HSTRING - internal typealias SwiftABI = IIteratorString - internal typealias SwiftProjection = AnyIIterator +internal enum __x_ABI_C__FIIterable_1_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1_IInspectable + internal typealias SwiftABI = IIterableAny + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1_HSTRINGImpl(abi) + return __x_ABI_C__FIIterable_1_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1_HSTRINGImpl : IIterator, AbiInterfaceImpl { - typealias T = String - typealias Bridge = __x_ABI_C__FIIterator_1_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterable_1_IInspectableImpl : IIterable, AbiInterfaceImpl { + typealias T = Any? + typealias Bridge = __x_ABI_C__FIIterable_1_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : String { - get { try! _default.get_CurrentImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: test_component.IID { - .init(Data1: 0x5db5fa32, Data2: 0x707c, Data3: 0x5849, Data4: ( 0xa0,0x6b,0x91,0xc8,0xeb,0x9d,0x10,0xe8 ))// 5db5fa32-707c-5849-a06b-91c8eb9d10e8 +private var IID___x_ABI_C__FIIterable_1_GUID: test_component.IID { + .init(Data1: 0xf4ca3045, Data2: 0x5dd7, Data3: 0x54be, Data4: ( 0x98,0x2e,0xd8,0x8d,0x8c,0xa0,0x87,0x6e ))// f4ca3045-5dd7-54be-982e-d88d8ca0876e } -internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1_GUIDVTable: __x_ABI_C__FIIterable_1_GUIDVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1_GUIDWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1_GUIDWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1_GUIDWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1_GUIDWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -1256,7 +1692,7 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspec GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -1267,117 +1703,75 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspec return S_OK }, - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - let resultWrapper = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper(result) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1_GUIDWrapper(result) resultWrapper?.copyTo($1) return S_OK - }, + } +) +typealias __x_ABI_C__FIIterable_1_GUIDWrapper = InterfaceWrapperBase +internal class IIterableUUID: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1_GUID } - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } -) -typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase -internal class IIteratorIKeyValuePairString_Any: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } - - internal func get_CurrentImpl() throws -> test_component.AnyIKeyValuePair? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) - } - } - return test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) - } - - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) - } - return .init(from: result) - } - - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) - } - return .init(from: result) - } + internal func FirstImpl() throws -> test_component.AnyIIterator? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterable_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIIterator_1_GUIDWrapper.unwrapFrom(abi: result) + } } -internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable - internal typealias SwiftABI = IIteratorIKeyValuePairString_Any - internal typealias SwiftProjection = AnyIIterator?> +internal enum __x_ABI_C__FIIterable_1_GUIDBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1_GUID + internal typealias SwiftABI = IIterableUUID + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) + return __x_ABI_C__FIIterable_1_GUIDImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1_GUIDVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IIterator, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge +fileprivate class __x_ABI_C__FIIterable_1_GUIDImpl : IIterable, AbiInterfaceImpl { + typealias T = Foundation.UUID + typealias Bridge = __x_ABI_C__FIIterable_1_GUIDBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : AnyIKeyValuePair? { - get { try! _default.get_CurrentImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: test_component.IID { - .init(Data1: 0x05eb86f1, Data2: 0x7140, Data3: 0x5517, Data4: ( 0xb8,0x8d,0xcb,0xae,0xbe,0x57,0xe6,0xb1 ))// 05eb86f1-7140-5517-b88d-cbaebe57e6b1 +private var IID___x_ABI_C__FIIterable_1_HSTRING: test_component.IID { + .init(Data1: 0xe2fcc7c1, Data2: 0x3bfc, Data3: 0x5a0b, Data4: ( 0xb2,0xb0,0x72,0xe7,0x69,0xd1,0xcb,0x7e ))// e2fcc7c1-3bfc-5a0b-b2b0-72e769d1cb7e } -internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1_HSTRINGVTable: __x_ABI_C__FIIterable_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -1385,7 +1779,7 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -1396,117 +1790,75 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING return S_OK }, - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - let resultWrapper = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper(result) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1_HSTRINGWrapper(result) resultWrapper?.copyTo($1) return S_OK - }, - - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } + } ) -typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase -internal class IIteratorIKeyValuePairString_String: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } +typealias __x_ABI_C__FIIterable_1_HSTRINGWrapper = InterfaceWrapperBase +internal class IIterableString: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1_HSTRING } - internal func get_CurrentImpl() throws -> test_component.AnyIKeyValuePair? { + internal func FirstImpl() throws -> test_component.AnyIIterator? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) - } - - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) - } - return .init(from: result) - } - - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) - } - return .init(from: result) + return test_component.__x_ABI_C__FIIterator_1_HSTRINGWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING - internal typealias SwiftABI = IIteratorIKeyValuePairString_String - internal typealias SwiftProjection = AnyIIterator?> +internal enum __x_ABI_C__FIIterable_1_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1_HSTRING + internal typealias SwiftABI = IIterableString + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) + return __x_ABI_C__FIIterable_1_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IIterator, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterable_1_HSTRINGImpl : IIterable, AbiInterfaceImpl { + typealias T = String + typealias Bridge = __x_ABI_C__FIIterable_1_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : AnyIKeyValuePair? { - get { try! _default.get_CurrentImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0xbe30f8a4, Data2: 0x7d2e, Data3: 0x55fa, Data4: ( 0x91,0xd0,0xf0,0x21,0xdf,0xe4,0x6d,0x06 ))// be30f8a4-7d2e-55fa-91d0-f021dfe46d06 +private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0x5498f4f3, Data2: 0xcee4, Data3: 0x5b72, Data4: ( 0x97,0x29,0x81,0x5c,0x4a,0xd7,0xb9,0xdc ))// 5498f4f3-cee4-5b72-9729-815c4ad7b9dc } -internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -1514,7 +1866,7 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -1525,117 +1877,75 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI return S_OK }, - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - let resultWrapper = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(result) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(result) resultWrapper?.copyTo($1) return S_OK - }, - - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } + } ) -typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IIteratorIKeyValuePairString_Base: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IIterableTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegment } - internal func get_CurrentImpl() throws -> test_component.AnyIKeyValuePair? { + internal func FirstImpl() throws -> test_component.AnyIIterator? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) - } - - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) - } - return .init(from: result) - } - - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) - } - return .init(from: result) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IIteratorIKeyValuePairString_Base - internal typealias SwiftProjection = AnyIIterator?> +internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IIterableTextSegment + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IIterator, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IIterable, AbiInterfaceImpl { + typealias T = test_component.TextSegment + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : AnyIKeyValuePair? { - get { try! _default.get_CurrentImpl() } - } + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } - } - - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0xa8f692bf, Data2: 0xebba, Data3: 0x5b53, Data4: ( 0x90,0xd3,0x89,0x00,0x9b,0xcc,0x98,0x14 ))// a8f692bf-ebba-5b53-90d3-89009bcc9814 +private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0xfe2f3d47, Data2: 0x5d47, Data3: 0x5499, Data4: ( 0x83,0x74,0x43,0x0c,0x7c,0xda,0x02,0x04 ))// fe2f3d47-5d47-5499-8374-430c7cda0204 } -internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -1643,7 +1953,7 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() $1!.pointee = hstring return S_OK }, @@ -1654,116 +1964,75 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x return S_OK }, - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - result?.copyTo($1) - return S_OK - }, - - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper(result) + resultWrapper?.copyTo($1) return S_OK - }, - - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } + } ) -typealias __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IIteratorBase: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class IIterableIKeyValuePairString_Any: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } - internal func get_CurrentImpl() throws -> test_component.Base? { + internal func FirstImpl() throws -> test_component.AnyIIterator?>? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return .from(abi: result) - } - - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) - } - return .init(from: result) - } - - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) - } - return .init(from: result) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IIteratorBase - internal typealias SwiftProjection = AnyIIterator +internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable + internal typealias SwiftABI = IIterableIKeyValuePairString_Any + internal typealias SwiftProjection = AnyIIterable?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseImpl : IIterator, AbiInterfaceImpl { - typealias T = Base? - typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IIterable, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : Base? { - get { try! _default.get_CurrentImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator?>? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { - .init(Data1: 0xfc247a63, Data2: 0xc092, Data3: 0x5c5c, Data4: ( 0x8b,0x94,0x66,0xfb,0xfa,0x60,0xf9,0x5f ))// fc247a63-c092-5c5c-8b94-66fbfa60f95f +private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: test_component.IID { + .init(Data1: 0xe9bdaaf0, Data2: 0xcbf6, Data3: 0x5c72, Data4: ( 0xbe,0x90,0x29,0xcb,0xf3,0xa1,0x31,0x9b ))// e9bdaaf0-cbf6-5c72-be90-29cbf3a1319b } -internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( - QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, - Release: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -1771,7 +2040,7 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVTable: _ GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() $1!.pointee = hstring return S_OK }, @@ -1782,117 +2051,75 @@ internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVTable: _ return S_OK }, - get_Current: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.current - let resultWrapper = __ABI_test_component.IBasicWrapper(result) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper(result) resultWrapper?.copyTo($1) return S_OK - }, - - get_HasCurrent: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.hasCurrent - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - MoveNext: { - guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.moveNext() - $1?.initialize(to: .init(from: result)) - return S_OK - }, - - GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } + } ) -typealias __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase -internal class IIteratorIBasic: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic } +typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase +internal class IIterableIKeyValuePairString_String: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } - internal func get_CurrentImpl() throws -> test_component.AnyIBasic? { + internal func FirstImpl() throws -> test_component.AnyIIterator?>? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return __ABI_test_component.IBasicWrapper.unwrapFrom(abi: result) - } - - internal func get_HasCurrentImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) - } - return .init(from: result) - } - - internal func MoveNextImpl() throws -> Bool { - var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) - } - return .init(from: result) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic - internal typealias SwiftABI = IIteratorIBasic - internal typealias SwiftProjection = AnyIIterator +internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING + internal typealias SwiftABI = IIterableIKeyValuePairString_String + internal typealias SwiftProjection = AnyIIterable?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IIterator, AbiInterfaceImpl { - typealias T = AnyIBasic? - typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IIterable, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) - fileprivate func moveNext() -> Bool { - try! _default.MoveNextImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) - fileprivate var current : AnyIBasic? { - get { try! _default.get_CurrentImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) - fileprivate var hasCurrent : Bool { - get { try! _default.get_HasCurrentImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator?>? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: test_component.IID { - .init(Data1: 0x09335560, Data2: 0x6c6b, Data3: 0x5a26, Data4: ( 0x93,0x48,0x97,0xb7,0x81,0x13,0x2b,0x20 ))// 09335560-6c6b-5a26-9348-97b781132b20 +private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0xf819a276, Data2: 0xb3f5, Data3: 0x54d4, Data4: ( 0xb8,0xfd,0xc9,0xad,0xb7,0xf7,0x00,0xe3 ))// f819a276-b3f5-54d4-b8fd-c9adb7f700e3 } -internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -1900,7 +2127,7 @@ internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__ GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>>").detach() $1!.pointee = hstring return S_OK }, @@ -1911,96 +2138,75 @@ internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__ return S_OK }, - get_Key: { - guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.key - $1?.initialize(to: try! HString(result).detach()) - return S_OK - }, - - get_Value: { - guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.value - let resultWrapper = __ABI_.AnyWrapper(result) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(result) resultWrapper?.copyTo($1) return S_OK } ) -typealias __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase -internal class IKeyValuePairString_Any: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } - - internal func get_KeyImpl() throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) - } - return .init(from: result) - } +typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IIterableIKeyValuePairString_IVectorViewTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment } - internal func get_ValueImpl() throws -> Any? { + internal func FirstImpl() throws -> test_component.AnyIIterator?>?>? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return __ABI_.AnyWrapper.unwrapFrom(abi: result) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable - internal typealias SwiftABI = IKeyValuePairString_Any - internal typealias SwiftProjection = AnyIKeyValuePair +internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IIterableIKeyValuePairString_IVectorViewTextSegment + internal typealias SwiftProjection = AnyIIterable?>?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IKeyValuePair, AbiInterfaceImpl { - typealias K = String - typealias V = Any? - typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IIterable, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair?>? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) - fileprivate var key : String { - get { try! _default.get_KeyImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) - fileprivate var value : Any? { - get { try! _default.get_ValueImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator?>?>? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: test_component.IID { - .init(Data1: 0x60310303, Data2: 0x49c5, Data3: 0x52e6, Data4: ( 0xab,0xc6,0xa9,0xb3,0x6e,0xcc,0xc7,0x16 ))// 60310303-49c5-52e6-abc6-a9b36eccc716 +private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0x9ee59ac2, Data2: 0xef36, Data3: 0x560b, Data4: ( 0x8a,0xdc,0xd3,0xea,0x78,0xbd,0x58,0x2b ))// 9ee59ac2-ef36-560b-8adc-d3ea78bd582b } -internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -2008,7 +2214,7 @@ internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIKey GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() $1!.pointee = hstring return S_OK }, @@ -2019,94 +2225,75 @@ internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIKey return S_OK }, - get_Key: { - guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.key - $1?.initialize(to: try! HString(result).detach()) - return S_OK - }, - - get_Value: { - guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.value - $1?.initialize(to: try! HString(result).detach()) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(result) + resultWrapper?.copyTo($1) return S_OK } ) -typealias __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase -internal class IKeyValuePairString_String: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } - - internal func get_KeyImpl() throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) - } - return .init(from: result) - } +typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IIterableIKeyValuePairString_Base: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } - internal func get_ValueImpl() throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &result)) + internal func FirstImpl() throws -> test_component.AnyIIterator?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) + } } - return .init(from: result) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING - internal typealias SwiftABI = IKeyValuePairString_String - internal typealias SwiftProjection = AnyIKeyValuePair +internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IIterableIKeyValuePairString_Base + internal typealias SwiftProjection = AnyIIterable?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IKeyValuePair, AbiInterfaceImpl { - typealias K = String - typealias V = String - typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IIterable, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) - fileprivate var key : String { - get { try! _default.get_KeyImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) - fileprivate var value : String { - get { try! _default.get_ValueImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator?>? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0xc6bff2b3, Data2: 0x09a5, Data3: 0x5fcf, Data4: ( 0xb0,0x78,0x69,0x43,0xdd,0x21,0x5d,0xe7 ))// c6bff2b3-09a5-5fcf-b078-6943dd215de7 +private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry: test_component.IID { + .init(Data1: 0x876be83b, Data2: 0x7218, Data3: 0x5bfb, Data4: ( 0xa1,0x69,0x83,0x15,0x2e,0xf7,0xe1,0x46 ))// 876be83b-7218-5bfb-a169-83152ef7e146 } -internal var __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -2114,7 +2301,7 @@ internal var __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBas GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -2125,95 +2312,75 @@ internal var __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBas return S_OK }, - get_Key: { - guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.key - $1?.initialize(to: try! HString(result).detach()) - return S_OK - }, - - get_Value: { - guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.value - result?.copyTo($1) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper(result) + resultWrapper?.copyTo($1) return S_OK } ) -typealias __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IKeyValuePairString_Base: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } - - internal func get_KeyImpl() throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) - } - return .init(from: result) - } +typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper = InterfaceWrapperBase +internal class IIterableIWwwFormUrlDecoderEntry: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry } - internal func get_ValueImpl() throws -> test_component.Base? { + internal func FirstImpl() throws -> test_component.AnyIIterator? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return .from(abi: result) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IKeyValuePairString_Base - internal typealias SwiftProjection = AnyIKeyValuePair +internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry + internal typealias SwiftABI = IIterableIWwwFormUrlDecoderEntry + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IKeyValuePair, AbiInterfaceImpl { - typealias K = String - typealias V = Base? - typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl : IIterable, AbiInterfaceImpl { + typealias T = test_component.AnyIWwwFormUrlDecoderEntry? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) - fileprivate var key : String { - get { try! _default.get_KeyImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) - fileprivate var value : Base? { - get { try! _default.get_ValueImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIMapChangedEventArgs_1_HSTRING: test_component.IID { - .init(Data1: 0x60141efb, Data2: 0xf2f9, Data3: 0x5377, Data4: ( 0x96,0xfd,0xf8,0xc6,0x0d,0x95,0x58,0xb5 ))// 60141efb-f2f9-5377-96fd-f8c60d9558b5 +private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItem: test_component.IID { + .init(Data1: 0xbb8b8418, Data2: 0x65d1, Data3: 0x544b, Data4: ( 0xb0,0x83,0x6d,0x17,0x2f,0x56,0x8c,0x73 ))// bb8b8418-65d1-544b-b083-6d172f568c73 } -internal var __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable: __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.IID + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK @@ -2221,7 +2388,7 @@ internal var __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable: __x_ABI_C__FIMapC GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IMapChangedEventArgs`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -2232,102 +2399,83 @@ internal var __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable: __x_ABI_C__FIMapC return S_OK }, - get_CollectionChange: { - guard let __unwrapped__instance = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.collectionChange - $1?.initialize(to: result) - return S_OK - }, - - get_Key: { - guard let __unwrapped__instance = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.key - $1?.initialize(to: try! HString(result).detach()) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(result) + resultWrapper?.copyTo($1) return S_OK } ) -typealias __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper = InterfaceWrapperBase -internal class IMapChangedEventArgsString: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIMapChangedEventArgs_1_HSTRING } - - internal func get_CollectionChangeImpl() throws -> test_component.CollectionChange { - var result: __x_ABI_CWindows_CFoundation_CCollections_CCollectionChange = .init(0) - _ = try perform(as: __x_ABI_C__FIMapChangedEventArgs_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_CollectionChange(pThis, &result)) - } - return result - } +typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper = InterfaceWrapperBase +internal class IIterableIStorageItem: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItem } - internal func get_KeyImpl() throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIMapChangedEventArgs_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) + internal func FirstImpl() throws -> test_component.AnyIIterator? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) + } } - return .init(from: result) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIMapChangedEventArgs_1_HSTRING - internal typealias SwiftABI = IMapChangedEventArgsString - internal typealias SwiftProjection = AnyIMapChangedEventArgs +internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItem + internal typealias SwiftABI = IIterableIStorageItem + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGImpl : IMapChangedEventArgs, AbiInterfaceImpl { - typealias K = String - typealias Bridge = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemImpl : IIterable, AbiInterfaceImpl { + typealias T = test_component.AnyIStorageItem? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapchangedeventargs-1.collectionchange) - fileprivate var collectionChange : test_component.CollectionChange { - get { try! _default.get_CollectionChangeImpl() } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapchangedeventargs-1.key) - fileprivate var key : String { - get { try! _default.get_KeyImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIMapView_2_HSTRING_IInspectable: test_component.IID { - .init(Data1: 0xbb78502a, Data2: 0xf79d, Data3: 0x54fa, Data4: ( 0x92,0xc9,0x90,0xc5,0x03,0x9f,0xdf,0x7e ))// bb78502a-f79d-54fa-92c9-90c5039fdf7e +private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry: test_component.IID { + .init(Data1: 0x35aff6f9, Data2: 0xef75, Data3: 0x5280, Data4: ( 0xbb,0x84,0xa2,0xbf,0x83,0x17,0xcf,0x35 ))// 35aff6f9-ef75-5280-bb84-a2bf8317cf35 } -internal var __x_ABI_C__FIMapView_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMapView_2_HSTRING_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -2338,163 +2486,83 @@ internal var __x_ABI_C__FIMapView_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMap return S_OK }, - Lookup: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.lookup(key) - let resultWrapper = __ABI_.AnyWrapper(result) - resultWrapper?.copyTo($2) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper(result) + resultWrapper?.copyTo($1) return S_OK - }, + } +) +typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper = InterfaceWrapperBase +internal class IIterableSortEntry: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry } - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) - return S_OK - }, - - HasKey: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.hasKey(key) - $2?.initialize(to: .init(from: result)) - return S_OK - }, - - Split: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - var first: test_component.AnyIMapView? - var second: test_component.AnyIMapView? - __unwrapped__instance.split(&first, &second) - let firstWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(first) - firstWrapper?.copyTo($1) - let secondWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(second) - secondWrapper?.copyTo($2) - return S_OK - } -) -typealias __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase -internal class IMapViewString_Any: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIMapView_2_HSTRING_IInspectable } - - internal func LookupImpl(_ key: String) throws -> Any? { + internal func FirstImpl() throws -> test_component.AnyIIterator? { let (result) = try ComPtrs.initialize { resultAbi in - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) - } - } - return __ABI_.AnyWrapper.unwrapFrom(abi: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func HasKeyImpl(_ key: String) throws -> Bool { - var result: boolean = 0 - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) - } - return .init(from: result) - } - - internal func SplitImpl(_ first: inout test_component.AnyIMapView?, _ second: inout test_component.AnyIMapView?) throws { - let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - first = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: _first) - second = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: _second) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIMapView_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING_IInspectable - internal typealias SwiftABI = IMapViewString_Any - internal typealias SwiftProjection = AnyIMapView +internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry + internal typealias SwiftABI = IIterableSortEntry + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIMapView_2_HSTRING_IInspectableImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING_IInspectableVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIMapView_2_HSTRING_IInspectableImpl : IMapView, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias K = String - typealias V = Any? - typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING_IInspectableBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl : IIterable, AbiInterfaceImpl { + typealias T = test_component.SortEntry + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) - fileprivate func lookup(_ key: String) -> Any? { - try! _default.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _default.HasKeyImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) - fileprivate func split(_ first: inout AnyIMapView?, _ second: inout AnyIMapView?) { - try! _default.SplitImpl(&first, &second) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } - } - - private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIMapView_2_HSTRING_HSTRING: test_component.IID { - .init(Data1: 0xac7f26f2, Data2: 0xfeb7, Data3: 0x5b2a, Data4: ( 0x8a,0xc4,0x34,0x5b,0xc6,0x2c,0xae,0xde ))// ac7f26f2-feb7-5b2a-8ac4-345bc62caede +private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFile: test_component.IID { + .init(Data1: 0x9ac00304, Data2: 0x83ea, Data3: 0x5688, Data4: ( 0x87,0xb6,0xae,0x38,0xaa,0xb6,0x5d,0x0b ))// 9ac00304-83ea-5688-87b6-ae38aab65d0b } -internal var __x_ABI_C__FIMapView_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMapView_2_HSTRING_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -2505,161 +2573,83 @@ internal var __x_ABI_C__FIMapView_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMapView_ return S_OK }, - Lookup: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.lookup(key) - $2?.initialize(to: try! HString(result).detach()) - return S_OK - }, - - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) - return S_OK - }, - - HasKey: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.hasKey(key) - $2?.initialize(to: .init(from: result)) - return S_OK - }, - - Split: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - var first: test_component.AnyIMapView? - var second: test_component.AnyIMapView? - __unwrapped__instance.split(&first, &second) - let firstWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(first) - firstWrapper?.copyTo($1) - let secondWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(second) - secondWrapper?.copyTo($2) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(result) + resultWrapper?.copyTo($1) return S_OK } ) -typealias __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase -internal class IMapViewString_String: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIMapView_2_HSTRING_HSTRING } - - internal func LookupImpl(_ key: String) throws -> String { - var result: HSTRING? - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &result)) - } - return .init(from: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func HasKeyImpl(_ key: String) throws -> Bool { - var result: boolean = 0 - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) - } - return .init(from: result) - } +typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileWrapper = InterfaceWrapperBase +internal class IIterableStorageFile: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFile } - internal func SplitImpl(_ first: inout test_component.AnyIMapView?, _ second: inout test_component.AnyIMapView?) throws { - let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) + internal func FirstImpl() throws -> test_component.AnyIIterator? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - first = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: _first) - second = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: _second) + return test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIMapView_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING_HSTRING - internal typealias SwiftABI = IMapViewString_String - internal typealias SwiftProjection = AnyIMapView +internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFile + internal typealias SwiftABI = IIterableStorageFile + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIMapView_2_HSTRING_HSTRINGImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIMapView_2_HSTRING_HSTRINGImpl : IMapView, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias K = String - typealias V = String - typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileImpl : IIterable, AbiInterfaceImpl { + typealias T = test_component.StorageFile? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) - fileprivate func lookup(_ key: String) -> String { - try! _default.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _default.HasKeyImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) - fileprivate func split(_ first: inout AnyIMapView?, _ second: inout AnyIMapView?) { - try! _default.SplitImpl(&first, &second) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } - } - - private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0x8c4e7f37, Data2: 0x8bf0, Data3: 0x515a, Data4: ( 0x82,0xc1,0x06,0x45,0x55,0x0b,0xf6,0x0b ))// 8c4e7f37-8bf0-515a-82c1-0645550bf60b +private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolder: test_component.IID { + .init(Data1: 0x4669befc, Data2: 0xae5c, Data3: 0x52b1, Data4: ( 0x8a,0x97,0x54,0x66,0xce,0x61,0xe9,0x4e ))// 4669befc-ae5c-52b1-8a97-5466ce61e94e } -internal var __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -2670,162 +2660,83 @@ internal var __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTab return S_OK }, - Lookup: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.lookup(key) - result?.copyTo($2) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(result) + resultWrapper?.copyTo($1) return S_OK - }, + } +) +typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper = InterfaceWrapperBase +internal class IIterableStorageFolder: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolder } - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) - return S_OK - }, - - HasKey: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.hasKey(key) - $2?.initialize(to: .init(from: result)) - return S_OK - }, - - Split: { - guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - var first: test_component.AnyIMapView? - var second: test_component.AnyIMapView? - __unwrapped__instance.split(&first, &second) - let firstWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(first) - firstWrapper?.copyTo($1) - let secondWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(second) - secondWrapper?.copyTo($2) - return S_OK - } -) -typealias __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IMapViewString_Base: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } - - internal func LookupImpl(_ key: String) throws -> test_component.Base? { - let (result) = try ComPtrs.initialize { resultAbi in - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) - } - } - return .from(abi: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func HasKeyImpl(_ key: String) throws -> Bool { - var result: boolean = 0 - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) - } - return .init(from: result) - } - - internal func SplitImpl(_ first: inout test_component.AnyIMapView?, _ second: inout test_component.AnyIMapView?) throws { - let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in - _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) - } - } - first = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: _first) - second = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: _second) - } + internal func FirstImpl() throws -> test_component.AnyIIterator? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: result) + } } -internal enum __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IMapViewString_Base - internal typealias SwiftProjection = AnyIMapView +internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolder + internal typealias SwiftABI = IIterableStorageFolder + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IMapView, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias K = String - typealias V = Base? - typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderImpl : IIterable, AbiInterfaceImpl { + typealias T = test_component.StorageFolder? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) - fileprivate func lookup(_ key: String) -> Base? { - try! _default.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _default.HasKeyImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) - fileprivate func split(_ first: inout AnyIMapView?, _ second: inout AnyIMapView?) { - try! _default.SplitImpl(&first, &second) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } - } - - private lazy var _IIterable: IIterableIKeyValuePairString_Base! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIMap_2_HSTRING_IInspectable: test_component.IID { - .init(Data1: 0x1b0d3570, Data2: 0x0877, Data3: 0x5ec2, Data4: ( 0x8a,0x2c,0x3b,0x95,0x39,0x50,0x6a,0xca ))// 1b0d3570-0877-5ec2-8a2c-3b9539506aca +private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChange: test_component.IID { + .init(Data1: 0x87c15dfc, Data2: 0x0c5e, Data3: 0x518b, Data4: ( 0x92,0x06,0x97,0xd3,0xd9,0x82,0x3c,0x61 ))// 87c15dfc-0c5e-518b-9206-97d3d9823c61 } -internal var __x_ABI_C__FIMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMap_2_HSTRING_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -2836,219 +2747,83 @@ internal var __x_ABI_C__FIMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMap_2_H return S_OK }, - Lookup: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.lookup(key) - let resultWrapper = __ABI_.AnyWrapper(result) - resultWrapper?.copyTo($2) - return S_OK - }, - - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) - return S_OK - }, - - HasKey: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.hasKey(key) - $2?.initialize(to: .init(from: result)) - return S_OK - }, - - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(result) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper(result) resultWrapper?.copyTo($1) return S_OK - }, - - Insert: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) - let result = __unwrapped__instance.insert(key, value) - $3?.initialize(to: .init(from: result)) - return S_OK - }, - - Remove: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - __unwrapped__instance.remove(key) - return S_OK - }, - - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() - return S_OK } ) -typealias __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase -internal class IMapString_Any: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIMap_2_HSTRING_IInspectable } - - internal func LookupImpl(_ key: String) throws -> Any? { - let (result) = try ComPtrs.initialize { resultAbi in - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) - } - } - return __ABI_.AnyWrapper.unwrapFrom(abi: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func HasKeyImpl(_ key: String) throws -> Bool { - var result: boolean = 0 - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) - } - return .init(from: result) - } +typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper = InterfaceWrapperBase +internal class IIterableStorageLibraryChange: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChange } - internal func GetViewImpl() throws -> test_component.AnyIMapView? { + internal func FirstImpl() throws -> test_component.AnyIIterator? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) - } - - internal func InsertImpl(_ key: String, _ value: Any?) throws -> Bool { - var result: boolean = 0 - let _key = try! HString(key) - let valueWrapper = __ABI_.AnyWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), _value, &result)) - } - return .init(from: result) - } - - internal func RemoveImpl(_ key: String) throws { - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) - } - } - - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) - } + return test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIMap_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING_IInspectable - internal typealias SwiftABI = IMapString_Any - internal typealias SwiftProjection = AnyIMap +internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChange + internal typealias SwiftABI = IIterableStorageLibraryChange + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIMap_2_HSTRING_IInspectableImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING_IInspectableVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIMap_2_HSTRING_IInspectableImpl : IMap, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias K = String - typealias V = Any? - typealias Bridge = __x_ABI_C__FIMap_2_HSTRING_IInspectableBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl : IIterable, AbiInterfaceImpl { + typealias T = test_component.StorageLibraryChange? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) - fileprivate func lookup(_ key: String) -> Any? { - try! _default.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _default.HasKeyImpl(key) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) - fileprivate func getView() -> AnyIMapView? { - try! _default.GetViewImpl() - } + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) - fileprivate func insert(_ key: String, _ value: Any?) -> Bool { - try! _default.InsertImpl(key, value) - } +private var IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0xb826dcab, Data2: 0xca2a, Data3: 0x5fbc, Data4: ( 0x8c,0xbd,0xed,0x75,0x9a,0x9a,0x1c,0x00 ))// b826dcab-ca2a-5fbc-8cbd-ed759a9a1c00 +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) - fileprivate func remove(_ key: String) { - try! _default.RemoveImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) - fileprivate func clear() { - try! _default.ClearImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } - } - - private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() - } - - public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } -} - -private var IID___x_ABI_C__FIMap_2_HSTRING_HSTRING: test_component.IID { - .init(Data1: 0xf6d1f700, Data2: 0x49c2, Data3: 0x52ae, Data4: ( 0x81,0x54,0x82,0x6f,0x99,0x08,0x77,0x3c ))// f6d1f700-49c2-52ae-8154-826f9908773c -} - -internal var __x_ABI_C__FIMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMap_2_HSTRING_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -3059,216 +2834,83 @@ internal var __x_ABI_C__FIMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMap_2_HSTRIN return S_OK }, - Lookup: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.lookup(key) - $2?.initialize(to: try! HString(result).detach()) - return S_OK - }, - - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) - return S_OK - }, - - HasKey: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.hasKey(key) - $2?.initialize(to: .init(from: result)) - return S_OK - }, - - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(result) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper(result) resultWrapper?.copyTo($1) return S_OK - }, - - Insert: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let value: String = .init(from: $2) - let result = __unwrapped__instance.insert(key, value) - $3?.initialize(to: .init(from: result)) - return S_OK - }, - - Remove: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - __unwrapped__instance.remove(key) - return S_OK - }, - - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() - return S_OK } ) -typealias __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase -internal class IMapString_String: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIMap_2_HSTRING_HSTRING } - - internal func LookupImpl(_ key: String) throws -> String { - var result: HSTRING? - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &result)) - } - return .init(from: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func HasKeyImpl(_ key: String) throws -> Bool { - var result: boolean = 0 - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) - } - return .init(from: result) - } +typealias __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IIterableBase: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase } - internal func GetViewImpl() throws -> test_component.AnyIMapView? { + internal func FirstImpl() throws -> test_component.AnyIIterator? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } - return test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) - } - - internal func InsertImpl(_ key: String, _ value: String) throws -> Bool { - var result: boolean = 0 - let _key = try! HString(key) - let _value = try! HString(value) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), _value.get(), &result)) - } - return .init(from: result) - } - - internal func RemoveImpl(_ key: String) throws { - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) - } - } - - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) - } + return test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIMap_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING_HSTRING - internal typealias SwiftABI = IMapString_String - internal typealias SwiftProjection = AnyIMap +internal enum __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IIterableBase + internal typealias SwiftProjection = AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIMap_2_HSTRING_HSTRINGImpl(abi) + return __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIMap_2_HSTRING_HSTRINGImpl : IMap, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias K = String - typealias V = String - typealias Bridge = __x_ABI_C__FIMap_2_HSTRING_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseImpl : IIterable, AbiInterfaceImpl { + typealias T = Base? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) - fileprivate func lookup(_ key: String) -> String { - try! _default.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _default.HasKeyImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) - fileprivate func getView() -> AnyIMapView? { - try! _default.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) - fileprivate func insert(_ key: String, _ value: String) -> Bool { - try! _default.InsertImpl(key, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) - fileprivate func remove(_ key: String) { - try! _default.RemoveImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) - fileprivate func clear() { - try! _default.ClearImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } - } - - private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0x73430fe6, Data2: 0xa622, Data3: 0x5945, Data4: ( 0xa5,0x86,0x6f,0x3a,0x84,0xef,0x15,0xe3 ))// 73430fe6-a622-5945-a586-6f3a84ef15e3 +private var IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { + .init(Data1: 0x2ec46808, Data2: 0xad2e, Data3: 0x5438, Data4: ( 0xa5,0x84,0xfa,0xb6,0x0a,0x1b,0x07,0xe3 ))// 2ec46808-ad2e-5438-a584-fab60a1b07e3 } -internal var __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, @@ -3279,217 +2921,212 @@ internal var __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: return S_OK }, - Lookup: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.lookup(key) - result?.copyTo($2) + First: { + guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.first() + let resultWrapper = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(result) + resultWrapper?.copyTo($1) return S_OK - }, + } +) +typealias __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase +internal class IIterableIBasic: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic } - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + internal func FirstImpl() throws -> test_component.AnyIIterator? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasic + internal typealias SwiftABI = IIterableIBasic + internal typealias SwiftProjection = AnyIIterable + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IIterable, AbiInterfaceImpl { + typealias T = AnyIBasic? + typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) + fileprivate func first() -> AnyIIterator? { + try! _default.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIIterator_1_IInspectable: test_component.IID { + .init(Data1: 0x44a94f2d, Data2: 0x04f8, Data3: 0x5091, Data4: ( 0xb3,0x36,0xbe,0x78,0x92,0xdd,0x10,0xbe ))// 44a94f2d-04f8-5091-b336-be7892dd10be +} + +internal var __x_ABI_C__FIIterator_1_IInspectableVTable: __x_ABI_C__FIIterator_1_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIIterator_1_IInspectableWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids return S_OK }, - HasKey: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let result = __unwrapped__instance.hasKey(key) - $2?.initialize(to: .init(from: result)) + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() + $1!.pointee = hstring return S_OK }, - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(result) - resultWrapper?.copyTo($1) + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, - Insert: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - let value: test_component.Base? = .from(abi: ComPtr($2)) - let result = __unwrapped__instance.insert(key, value) - $3?.initialize(to: .init(from: result)) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = __ABI_.AnyWrapper(result) + resultWrapper?.copyTo($1) return S_OK }, - Remove: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let key: String = .init(from: $1) - __unwrapped__instance.remove(key) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK - } + }, + + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IMapString_Base: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIIterator_1_IInspectableWrapper = InterfaceWrapperBase +internal class IIteratorAny: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1_IInspectable } - internal func LookupImpl(_ key: String) throws -> test_component.Base? { + internal func get_CurrentImpl() throws -> Any? { let (result) = try ComPtrs.initialize { resultAbi in - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterator_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } - return .from(abi: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result + return __ABI_.AnyWrapper.unwrapFrom(abi: result) } - internal func HasKeyImpl(_ key: String) throws -> Bool { + internal func get_HasCurrentImpl() throws -> Bool { var result: boolean = 0 - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } return .init(from: result) } - internal func GetViewImpl() throws -> test_component.AnyIMapView? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) - } - } - return test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) - } - - internal func InsertImpl(_ key: String, _ value: test_component.Base?) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), RawPointer(value), &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } - internal func RemoveImpl(_ key: String) throws { - let _key = try! HString(key) - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) - } - } - - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) - } - } - } -internal enum __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IMapString_Base - internal typealias SwiftProjection = AnyIMap +internal enum __x_ABI_C__FIIterator_1_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1_IInspectable + internal typealias SwiftABI = IIteratorAny + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIIterator_1_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IMap, AbiInterfaceImpl { - typealias T = AnyIKeyValuePair? - typealias K = String - typealias V = Base? - typealias Bridge = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIIterator_1_IInspectableImpl : IIterator, AbiInterfaceImpl { + typealias T = Any? + typealias Bridge = __x_ABI_C__FIIterator_1_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) - fileprivate func lookup(_ key: String) -> Base? { - try! _default.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _default.HasKeyImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) - fileprivate func getView() -> AnyIMapView? { - try! _default.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) - fileprivate func insert(_ key: String, _ value: Base?) -> Bool { - try! _default.InsertImpl(key, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) - fileprivate func remove(_ key: String) { - try! _default.RemoveImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) - fileprivate func clear() { - try! _default.ClearImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : Any? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableIKeyValuePairString_Base! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIObservableMap_2_HSTRING_IInspectable: test_component.IID { - .init(Data1: 0x236aac9d, Data2: 0xfb12, Data3: 0x5c4d, Data4: ( 0xa4,0x1c,0x9e,0x44,0x5f,0xb4,0xd7,0xec ))// 236aac9d-fb12-5c4d-a41c-9e445fb4d7ec +private var IID___x_ABI_C__FIIterator_1_GUID: test_component.IID { + .init(Data1: 0xd3d64048, Data2: 0x82b3, Data3: 0x53c7, Data4: ( 0x92,0x85,0xb0,0xbe,0x18,0x36,0x84,0x82 ))// d3d64048-82b3-53c7-9285-b0be18368482 } -internal var __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1_GUIDVTable: __x_ABI_C__FIIterator_1_GUIDVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1_GUIDWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1_GUIDWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1_GUIDWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.IID - iids[3] = test_component.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.IID - iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID - $1!.pointee = 5 + iids[2] = test_component.__x_ABI_C__FIIterator_1_GUIDWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IObservableMap`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -3500,151 +3137,123 @@ internal var __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVTable: __x_ABI_C_ return S_OK }, - add_MapChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - guard let vhnd = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } - let result = __unwrapped__instance.mapChanged.addHandler(vhnd) - $2?.initialize(to: .from(swift: result)) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + $1?.initialize(to: .init(from: result)) return S_OK }, - remove_MapChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let token: EventRegistrationToken = $1 - __unwrapped__instance.mapChanged.removeHandler(token) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK - } + }, + + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase -internal class IObservableMapString_Any: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableMap_2_HSTRING_IInspectable } +typealias __x_ABI_C__FIIterator_1_GUIDWrapper = InterfaceWrapperBase +internal class IIteratorUUID: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1_GUID } - internal func add_MapChangedImpl(_ vhnd: MapChangedEventHandler?) throws -> EventRegistrationToken { - var result: EventRegistrationToken = .init() - let vhndWrapper = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper(vhnd) - let _vhnd = try! vhndWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.add_MapChanged(pThis, _vhnd, &result)) + internal func get_CurrentImpl() throws -> Foundation.UUID { + var result: test_component.GUID = .init() + _ = try perform(as: __x_ABI_C__FIIterator_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &result)) } - return result + return .init(from: result) } - internal func remove_MapChangedImpl(_ token: EventRegistrationToken) throws { - _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.remove_MapChanged(pThis, token)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) + } + return .init(from: result) + } + + internal func MoveNextImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } + return .init(from: result) } } -internal enum __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable - internal typealias SwiftABI = IObservableMapString_Any - internal typealias SwiftProjection = AnyIObservableMap +internal enum __x_ABI_C__FIIterator_1_GUIDBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1_GUID + internal typealias SwiftABI = IIteratorUUID + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableImpl(abi) + return __x_ABI_C__FIIterator_1_GUIDImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1_GUIDVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableImpl : IObservableMap, AbiInterfaceImpl { - typealias K = String - typealias V = Any? - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableBridge +fileprivate class __x_ABI_C__FIIterator_1_GUIDImpl : IIterator, AbiInterfaceImpl { + typealias T = Foundation.UUID + typealias Bridge = __x_ABI_C__FIIterator_1_GUIDBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.mapchanged) - fileprivate lazy var mapChanged : Event> = { - .init( - add: { [weak self] in - guard let this = self?._default else { return .init() } - return try! this.add_MapChangedImpl($0) - }, - remove: { [weak self] in - try? self?._default.remove_MapChangedImpl($0) - } - ) - }() - - private lazy var _IMap: IMapString_Any! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.lookup) - fileprivate func lookup(_ key: String) -> Any? { - try! _IMap.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _IMap.HasKeyImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.getview) - fileprivate func getView() -> AnyIMapView? { - try! _IMap.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.insert) - fileprivate func insert(_ key: String, _ value: Any?) -> Bool { - try! _IMap.InsertImpl(key, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.remove) - fileprivate func remove(_ key: String) { - try! _IMap.RemoveImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.clear) - fileprivate func clear() { - try! _IMap.ClearImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.size) - fileprivate var size : UInt32 { - get { try! _IMap.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : Foundation.UUID { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIObservableMap_2_HSTRING_HSTRING: test_component.IID { - .init(Data1: 0x1e036276, Data2: 0x2f60, Data3: 0x55f6, Data4: ( 0xb7,0xf3,0xf8,0x60,0x79,0xe6,0x90,0x0b ))// 1e036276-2f60-55f6-b7f3-f86079e6900b +private var IID___x_ABI_C__FIIterator_1_HSTRING: test_component.IID { + .init(Data1: 0x8c304ebb, Data2: 0x6615, Data3: 0x50a4, Data4: ( 0x88,0x29,0x87,0x9e,0xcd,0x44,0x32,0x36 ))// 8c304ebb-6615-50a4-8829-879ecd443236 } -internal var __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1_HSTRINGVTable: __x_ABI_C__FIIterator_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.IID - iids[3] = test_component.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.IID - iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID - $1!.pointee = 5 + iids[2] = test_component.__x_ABI_C__FIIterator_1_HSTRINGWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IObservableMap`2").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -3655,151 +3264,123 @@ internal var __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIOb return S_OK }, - add_MapChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - guard let vhnd = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } - let result = __unwrapped__instance.mapChanged.addHandler(vhnd) - $2?.initialize(to: .from(swift: result)) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + $1?.initialize(to: try! HString(result).detach()) return S_OK }, - remove_MapChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let token: EventRegistrationToken = $1 - __unwrapped__instance.mapChanged.removeHandler(token) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK - } + }, + + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase -internal class IObservableMapString_String: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableMap_2_HSTRING_HSTRING } +typealias __x_ABI_C__FIIterator_1_HSTRINGWrapper = InterfaceWrapperBase +internal class IIteratorString: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1_HSTRING } - internal func add_MapChangedImpl(_ vhnd: MapChangedEventHandler?) throws -> EventRegistrationToken { - var result: EventRegistrationToken = .init() - let vhndWrapper = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper(vhnd) - let _vhnd = try! vhndWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.add_MapChanged(pThis, _vhnd, &result)) + internal func get_CurrentImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIIterator_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &result)) } - return result + return .init(from: result) } - internal func remove_MapChangedImpl(_ token: EventRegistrationToken) throws { - _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.remove_MapChanged(pThis, token)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) + } + return .init(from: result) + } + + internal func MoveNextImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } + return .init(from: result) } } -internal enum __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING - internal typealias SwiftABI = IObservableMapString_String - internal typealias SwiftProjection = AnyIObservableMap +internal enum __x_ABI_C__FIIterator_1_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1_HSTRING + internal typealias SwiftABI = IIteratorString + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGImpl(abi) + return __x_ABI_C__FIIterator_1_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGImpl : IObservableMap, AbiInterfaceImpl { - typealias K = String - typealias V = String - typealias T = AnyIKeyValuePair? - typealias Bridge = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterator_1_HSTRINGImpl : IIterator, AbiInterfaceImpl { + typealias T = String + typealias Bridge = __x_ABI_C__FIIterator_1_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.mapchanged) - fileprivate lazy var mapChanged : Event> = { - .init( - add: { [weak self] in - guard let this = self?._default else { return .init() } - return try! this.add_MapChangedImpl($0) - }, - remove: { [weak self] in - try? self?._default.remove_MapChangedImpl($0) - } - ) - }() - - private lazy var _IMap: IMapString_String! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.lookup) - fileprivate func lookup(_ key: String) -> String { - try! _IMap.LookupImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.haskey) - fileprivate func hasKey(_ key: String) -> Bool { - try! _IMap.HasKeyImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.getview) - fileprivate func getView() -> AnyIMapView? { - try! _IMap.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.insert) - fileprivate func insert(_ key: String, _ value: String) -> Bool { - try! _IMap.InsertImpl(key, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.remove) - fileprivate func remove(_ key: String) { - try! _IMap.RemoveImpl(key) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.clear) - fileprivate func clear() { - try! _IMap.ClearImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.size) - fileprivate var size : UInt32 { - get { try! _IMap.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : String { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.first) - fileprivate func first() -> AnyIIterator?>? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0x04ca85dc, Data2: 0x5d3e, Data3: 0x573d, Data4: ( 0xb4,0xe3,0x46,0xde,0x30,0x3f,0x6c,0x35 ))// 04ca85dc-5d3e-573d-b4e3-46de303f6c35 +private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0x645a39b4, Data2: 0xf001, Data3: 0x5272, Data4: ( 0x90,0x15,0xfb,0x4a,0x32,0x71,0x79,0xae ))// 645a39b4-f001-5272-9015-fb4a327179ae } -internal var __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - iids[3] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - $1!.pointee = 5 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IObservableVector`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -3810,194 +3391,123 @@ internal var __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseVTa return S_OK }, - add_VectorChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - guard let vhnd = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } - let result = __unwrapped__instance.vectorChanged.addHandler(vhnd) - $2?.initialize(to: .from(swift: result)) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + $1?.initialize(to: .from(swift: result)) return S_OK }, - remove_VectorChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let token: EventRegistrationToken = $1 - __unwrapped__instance.vectorChanged.removeHandler(token) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK - } + }, + + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IObservableVectorBase: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IIteratorTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegment } - internal func add_VectorChangedImpl(_ vhnd: VectorChangedEventHandler?) throws -> EventRegistrationToken { - var result: EventRegistrationToken = .init() - let vhndWrapper = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper(vhnd) - let _vhnd = try! vhndWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.add_VectorChanged(pThis, _vhnd, &result)) + internal func get_CurrentImpl() throws -> test_component.TextSegment { + var result: __x_ABI_CWindows_CData_CText_CTextSegment = .init() + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &result)) } - return result + return .from(abi: result) } - internal func remove_VectorChangedImpl(_ token: EventRegistrationToken) throws { - _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.remove_VectorChanged(pThis, token)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) + } + return .init(from: result) + } + + internal func MoveNextImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } + return .init(from: result) } } -internal enum __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IObservableVectorBase - internal typealias SwiftProjection = AnyIObservableVector +internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IIteratorTextSegment + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseImpl : IObservableVector, AbiInterfaceImpl { - typealias T = Base? - typealias Bridge = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IIterator, AbiInterfaceImpl { + typealias T = test_component.TextSegment + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - set(newValue) { - setAt(UInt32(position), newValue) - } - } - - func removeLast() { - removeAtEnd() - } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.vectorchanged) - fileprivate lazy var vectorChanged : Event> = { - .init( - add: { [weak self] in - guard let this = self?._default else { return .init() } - return try! this.add_VectorChangedImpl($0) - }, - remove: { [weak self] in - try? self?._default.remove_VectorChangedImpl($0) - } - ) - }() - - private lazy var _IVector: IVectorBase! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getat) - fileprivate func getAt(_ index: UInt32) -> Base? { - try! _IVector.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getview) - fileprivate func getView() -> AnyIVectorView? { - try! _IVector.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.indexof) - fileprivate func indexOf(_ value: Base?, _ index: inout UInt32) -> Bool { - try! _IVector.IndexOfImpl(value, &index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.setat) - fileprivate func setAt(_ index: UInt32, _ value: Base?) { - try! _IVector.SetAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.insertat) - fileprivate func insertAt(_ index: UInt32, _ value: Base?) { - try! _IVector.InsertAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeat) - fileprivate func removeAt(_ index: UInt32) { - try! _IVector.RemoveAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.append) - fileprivate func append(_ value: Base?) { - try! _IVector.AppendImpl(value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeatend) - fileprivate func removeAtEnd() { - try! _IVector.RemoveAtEndImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.clear) - fileprivate func clear() { - try! _IVector.ClearImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.size) - fileprivate var size : UInt32 { - get { try! _IVector.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : test_component.TextSegment { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableBase! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { - .init(Data1: 0xd0fc0651, Data2: 0x9791, Data3: 0x5130, Data4: ( 0xa7,0x41,0xb0,0xef,0xea,0xfa,0xbc,0xa9 ))// d0fc0651-9791-5130-a741-b0efeafabca9 +private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0x5db5fa32, Data2: 0x707c, Data3: 0x5849, Data4: ( 0xa0,0x6b,0x91,0xc8,0xeb,0x9d,0x10,0xe8 ))// 5db5fa32-707c-5849-a06b-91c8eb9d10e8 } -internal var __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( - QueryInterface: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, - Release: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - iids[3] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - $1!.pointee = 5 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IObservableVector`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() $1!.pointee = hstring return S_OK }, @@ -4008,193 +3518,125 @@ internal var __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicV return S_OK }, - add_VectorChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - guard let vhnd = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } - let result = __unwrapped__instance.vectorChanged.addHandler(vhnd) - $2?.initialize(to: .from(swift: result)) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper(result) + resultWrapper?.copyTo($1) return S_OK }, - remove_VectorChanged: { - guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let token: EventRegistrationToken = $1 - __unwrapped__instance.vectorChanged.removeHandler(token) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK - } + }, + + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase -internal class IObservableVectorIBasic: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic } +typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class IIteratorIKeyValuePairString_Any: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } - internal func add_VectorChangedImpl(_ vhnd: VectorChangedEventHandler?) throws -> EventRegistrationToken { - var result: EventRegistrationToken = .init() - let vhndWrapper = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(vhnd) - let _vhnd = try! vhndWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.add_VectorChanged(pThis, _vhnd, &result)) + internal func get_CurrentImpl() throws -> test_component.AnyIKeyValuePair? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + } } - return result + return test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) } - internal func remove_VectorChangedImpl(_ token: EventRegistrationToken) throws { - _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.remove_VectorChanged(pThis, token)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) + } + return .init(from: result) + } + + internal func MoveNextImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } + return .init(from: result) } } -internal enum __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic - internal typealias SwiftABI = IObservableVectorIBasic - internal typealias SwiftProjection = AnyIObservableVector +internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable + internal typealias SwiftABI = IIteratorIKeyValuePairString_Any + internal typealias SwiftProjection = AnyIIterator?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IObservableVector, AbiInterfaceImpl { - typealias T = AnyIBasic? - typealias Bridge = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IIterator, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - set(newValue) { - setAt(UInt32(position), newValue) - } - } - - func removeLast() { - removeAtEnd() - } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.vectorchanged) - fileprivate lazy var vectorChanged : Event> = { - .init( - add: { [weak self] in - guard let this = self?._default else { return .init() } - return try! this.add_VectorChangedImpl($0) - }, - remove: { [weak self] in - try? self?._default.remove_VectorChangedImpl($0) - } - ) - }() - - private lazy var _IVector: IVectorIBasic! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getat) - fileprivate func getAt(_ index: UInt32) -> AnyIBasic? { - try! _IVector.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getview) - fileprivate func getView() -> AnyIVectorView? { - try! _IVector.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.indexof) - fileprivate func indexOf(_ value: AnyIBasic?, _ index: inout UInt32) -> Bool { - try! _IVector.IndexOfImpl(value, &index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.setat) - fileprivate func setAt(_ index: UInt32, _ value: AnyIBasic?) { - try! _IVector.SetAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.insertat) - fileprivate func insertAt(_ index: UInt32, _ value: AnyIBasic?) { - try! _IVector.InsertAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeat) - fileprivate func removeAt(_ index: UInt32) { - try! _IVector.RemoveAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.append) - fileprivate func append(_ value: AnyIBasic?) { - try! _IVector.AppendImpl(value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeatend) - fileprivate func removeAtEnd() { - try! _IVector.RemoveAtEndImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.clear) - fileprivate func clear() { - try! _IVector.ClearImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.size) - fileprivate var size : UInt32 { - get { try! _IVector.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : AnyIKeyValuePair? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableIBasic! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVectorView_1_IInspectable: test_component.IID { - .init(Data1: 0xa6487363, Data2: 0xb074, Data3: 0x5c60, Data4: ( 0xab,0x16,0x86,0x6d,0xce,0x4e,0xe5,0x4d ))// a6487363-b074-5c60-ab16-866dce4ee54d +private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: test_component.IID { + .init(Data1: 0x05eb86f1, Data2: 0x7140, Data3: 0x5517, Data4: ( 0xb8,0x8d,0xcb,0xae,0xbe,0x57,0xe6,0xb1 ))// 05eb86f1-7140-5517-b88d-cbaebe57e6b1 } -internal var __x_ABI_C__FIVectorView_1_IInspectableVTable: __x_ABI_C__FIVectorView_1_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIVectorView_1_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVectorView_1_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVectorView_1_IInspectableWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVectorView_1_IInspectableWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1_IInspectableWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() $1!.pointee = hstring return S_OK }, @@ -4205,159 +3647,125 @@ internal var __x_ABI_C__FIVectorView_1_IInspectableVTable: __x_ABI_C__FIVectorVi return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - let resultWrapper = __ABI_.AnyWrapper(result) - resultWrapper?.copyTo($2) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper(result) + resultWrapper?.copyTo($1) return S_OK }, - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIVectorView_1_IInspectableWrapper = InterfaceWrapperBase -internal class IVectorViewAny: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1_IInspectable } +typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase +internal class IIteratorIKeyValuePairString_String: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } - internal func GetAtImpl(_ index: UInt32) throws -> Any? { + internal func get_CurrentImpl() throws -> test_component.AnyIKeyValuePair? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVectorView_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } - return __ABI_.AnyWrapper.unwrapFrom(abi: result) + return test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) } - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVectorView_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } - return result + return .init(from: result) } - internal func IndexOfImpl(_ value: Any?, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - let valueWrapper = __ABI_.AnyWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVectorView_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } -internal enum __x_ABI_C__FIVectorView_1_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVectorView_1_IInspectable - internal typealias SwiftABI = IVectorViewAny - internal typealias SwiftProjection = AnyIVectorView +internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING + internal typealias SwiftABI = IIteratorIKeyValuePairString_String + internal typealias SwiftProjection = AnyIIterator?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVectorView_1_IInspectableImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1_IInspectableVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVectorView_1_IInspectableImpl : IVectorView, AbiInterfaceImpl { - typealias T = Any? - typealias Bridge = __x_ABI_C__FIVectorView_1_IInspectableBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IIterator, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) - fileprivate func getAt(_ index: UInt32) -> Any? { - try! _default.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) - fileprivate func indexOf(_ value: Any?, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : AnyIKeyValuePair? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableAny! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVectorView_1_GUID: test_component.IID { - .init(Data1: 0x9520e64b, Data2: 0x15b2, Data3: 0x52a6, Data4: ( 0x98,0xed,0x31,0x91,0xfa,0x6c,0xf6,0x8a ))// 9520e64b-15b2-52a6-98ed-3191fa6cf68a +private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0x00078aa3, Data2: 0x8676, Data3: 0x5f06, Data4: ( 0xad,0xf5,0xff,0xe5,0xd6,0x61,0xd6,0x70 ))// 00078aa3-8676-5f06-adf5-ffe5d661d670 } -internal var __x_ABI_C__FIVectorView_1_GUIDVTable: __x_ABI_C__FIVectorView_1_GUIDVtbl = .init( - QueryInterface: { __x_ABI_C__FIVectorView_1_GUIDWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVectorView_1_GUIDWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVectorView_1_GUIDWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVectorView_1_GUIDWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1_GUIDWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>>").detach() $1!.pointee = hstring return S_OK }, @@ -4368,155 +3776,125 @@ internal var __x_ABI_C__FIVectorView_1_GUIDVTable: __x_ABI_C__FIVectorView_1_GUI return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - $2?.initialize(to: .init(from: result)) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(result) + resultWrapper?.copyTo($1) return S_OK }, - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: Foundation.UUID = .init(from: $1) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIVectorView_1_GUIDWrapper = InterfaceWrapperBase -internal class IVectorViewUUID: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1_GUID } +typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IIteratorIKeyValuePairString_IVectorViewTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment } - internal func GetAtImpl(_ index: UInt32) throws -> Foundation.UUID { - var result: test_component.GUID = .init() - _ = try perform(as: __x_ABI_C__FIVectorView_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + internal func get_CurrentImpl() throws -> test_component.AnyIKeyValuePair?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + } } - return .init(from: result) + return test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) } - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVectorView_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } - return result + return .init(from: result) } - internal func IndexOfImpl(_ value: Foundation.UUID, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIVectorView_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, .init(from: value), &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } -internal enum __x_ABI_C__FIVectorView_1_GUIDBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVectorView_1_GUID - internal typealias SwiftABI = IVectorViewUUID - internal typealias SwiftProjection = AnyIVectorView +internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IIteratorIKeyValuePairString_IVectorViewTextSegment + internal typealias SwiftProjection = AnyIIterator?>?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVectorView_1_GUIDImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1_GUIDVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVectorView_1_GUIDImpl : IVectorView, AbiInterfaceImpl { - typealias T = Foundation.UUID - typealias Bridge = __x_ABI_C__FIVectorView_1_GUIDBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IIterator, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair?>? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) - fileprivate func getAt(_ index: UInt32) -> Foundation.UUID { - try! _default.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) - fileprivate func indexOf(_ value: Foundation.UUID, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : AnyIKeyValuePair?>? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableUUID! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVectorView_1_HSTRING: test_component.IID { - .init(Data1: 0x2f13c006, Data2: 0xa03a, Data3: 0x5f69, Data4: ( 0xb0,0x90,0x75,0xa4,0x3e,0x33,0x42,0x3e ))// 2f13c006-a03a-5f69-b090-75a43e33423e +private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0xbe30f8a4, Data2: 0x7d2e, Data3: 0x55fa, Data4: ( 0x91,0xd0,0xf0,0x21,0xdf,0xe4,0x6d,0x06 ))// be30f8a4-7d2e-55fa-91d0-f021dfe46d06 } -internal var __x_ABI_C__FIVectorView_1_HSTRINGVTable: __x_ABI_C__FIVectorView_1_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIVectorView_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVectorView_1_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVectorView_1_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVectorView_1_HSTRINGWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() $1!.pointee = hstring return S_OK }, @@ -4527,156 +3905,125 @@ internal var __x_ABI_C__FIVectorView_1_HSTRINGVTable: __x_ABI_C__FIVectorView_1_ return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - $2?.initialize(to: try! HString(result).detach()) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(result) + resultWrapper?.copyTo($1) return S_OK }, - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: String = .init(from: $1) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIVectorView_1_HSTRINGWrapper = InterfaceWrapperBase -internal class IVectorViewString: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1_HSTRING } +typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IIteratorIKeyValuePairString_Base: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } - internal func GetAtImpl(_ index: UInt32) throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIVectorView_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + internal func get_CurrentImpl() throws -> test_component.AnyIKeyValuePair? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) + } + + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } return .init(from: result) } - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVectorView_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func IndexOfImpl(_ value: String, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - let _value = try! HString(value) - _ = try perform(as: __x_ABI_C__FIVectorView_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value.get(), &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } -internal enum __x_ABI_C__FIVectorView_1_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVectorView_1_HSTRING - internal typealias SwiftABI = IVectorViewString - internal typealias SwiftProjection = AnyIVectorView +internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IIteratorIKeyValuePairString_Base + internal typealias SwiftProjection = AnyIIterator?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVectorView_1_HSTRINGImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVectorView_1_HSTRINGImpl : IVectorView, AbiInterfaceImpl { - typealias T = String - typealias Bridge = __x_ABI_C__FIVectorView_1_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IIterator, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) - fileprivate func getAt(_ index: UInt32) -> String { - try! _default.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) - fileprivate func indexOf(_ value: String, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : AnyIKeyValuePair? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableString! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0x92c07225, Data2: 0x1151, Data3: 0x51be, Data4: ( 0x83,0x03,0xf0,0x11,0x9f,0x4a,0xac,0xe6 ))// 92c07225-1151-51be-8303-f0119f4aace6 +private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry: test_component.IID { + .init(Data1: 0x32e54295, Data2: 0x373c, Data3: 0x50cb, Data4: ( 0x80,0xa1,0x46,0x8a,0x99,0x0c,0xa7,0x80 ))// 32e54295-373c-50cb-80a1-468a990ca780 } -internal var __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -4687,156 +4034,125 @@ internal var __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseVTable: _ return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - result?.copyTo($2) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper(result) + resultWrapper?.copyTo($1) return S_OK }, - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: test_component.Base? = .from(abi: ComPtr($1)) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IVectorViewBase: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper = InterfaceWrapperBase +internal class IIteratorIWwwFormUrlDecoderEntry: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry } - internal func GetAtImpl(_ index: UInt32) throws -> test_component.Base? { + internal func get_CurrentImpl() throws -> test_component.AnyIWwwFormUrlDecoderEntry? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } - return .from(abi: result) + return __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: result) } - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } - return result + return .init(from: result) } - internal func IndexOfImpl(_ value: test_component.Base?, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, RawPointer(value), &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } -internal enum __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IVectorViewBase - internal typealias SwiftProjection = AnyIVectorView +internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry + internal typealias SwiftABI = IIteratorIWwwFormUrlDecoderEntry + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseImpl : IVectorView, AbiInterfaceImpl { - typealias T = Base? - typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl : IIterator, AbiInterfaceImpl { + typealias T = test_component.AnyIWwwFormUrlDecoderEntry? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) - fileprivate func getAt(_ index: UInt32) -> Base? { - try! _default.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) - fileprivate func indexOf(_ value: Base?, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : test_component.AnyIWwwFormUrlDecoderEntry? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableBase! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { - .init(Data1: 0x90050e25, Data2: 0xb754, Data3: 0x51a3, Data4: ( 0x83,0x44,0x87,0xdf,0x43,0xe9,0x03,0xb7 ))// 90050e25-b754-51a3-8344-87df43e903b7 +private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItem: test_component.IID { + .init(Data1: 0x05b487c2, Data2: 0x3830, Data3: 0x5d3c, Data4: ( 0x98,0xda,0x25,0xfa,0x11,0x54,0x2d,0xbd ))// 05b487c2-3830-5d3c-98da-25fa11542dbd } -internal var __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( - QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -4847,159 +4163,125 @@ internal var __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicVTable: return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - let resultWrapper = __ABI_test_component.IBasicWrapper(result) - resultWrapper?.copyTo($2) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = __ABI_Windows_Storage.IStorageItemWrapper(result) + resultWrapper?.copyTo($1) return S_OK }, - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($1)) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase -internal class IVectorViewIBasic: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic } +typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper = InterfaceWrapperBase +internal class IIteratorIStorageItem: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItem } - internal func GetAtImpl(_ index: UInt32) throws -> test_component.AnyIBasic? { + internal func get_CurrentImpl() throws -> test_component.AnyIStorageItem? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } - return __ABI_test_component.IBasicWrapper.unwrapFrom(abi: result) + return __ABI_Windows_Storage.IStorageItemWrapper.unwrapFrom(abi: result) } - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } - return result + return .init(from: result) } - internal func IndexOfImpl(_ value: test_component.AnyIBasic?, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - let valueWrapper = __ABI_test_component.IBasicWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } -internal enum __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic - internal typealias SwiftABI = IVectorViewIBasic - internal typealias SwiftProjection = AnyIVectorView +internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItem + internal typealias SwiftABI = IIteratorIStorageItem + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IVectorView, AbiInterfaceImpl { - typealias T = AnyIBasic? - typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemImpl : IIterator, AbiInterfaceImpl { + typealias T = test_component.AnyIStorageItem? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CIStorageItemBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) - fileprivate func getAt(_ index: UInt32) -> AnyIBasic? { - try! _default.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) - fileprivate func indexOf(_ value: AnyIBasic?, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : test_component.AnyIStorageItem? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableIBasic! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVector_1_IInspectable: test_component.IID { - .init(Data1: 0xb32bdca4, Data2: 0x5e52, Data3: 0x5b27, Data4: ( 0xbc,0x5d,0xd6,0x6a,0x1a,0x26,0x8c,0x2a ))// b32bdca4-5e52-5b27-bc5d-d66a1a268c2a +private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry: test_component.IID { + .init(Data1: 0x520434a2, Data2: 0xacf7, Data3: 0x58c9, Data4: ( 0xb4,0x7a,0x27,0x41,0xf2,0xfa,0xc2,0xc2 ))// 520434a2-acf7-58c9-b47a-2741f2fac2c2 } -internal var __x_ABI_C__FIVector_1_IInspectableVTable: __x_ABI_C__FIVector_1_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIVector_1_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVector_1_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVector_1_IInspectableWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVector_1_IInspectableWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1_IInspectableWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -5010,306 +4292,380 @@ internal var __x_ABI_C__FIVector_1_IInspectableVTable: __x_ABI_C__FIVector_1_IIn return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - let resultWrapper = __ABI_.AnyWrapper(result) - resultWrapper?.copyTo($2) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let _result = __ABI_Windows_Storage_Search._ABI_SortEntry(from: result) + $1?.initialize(to: _result.detach()) return S_OK }, - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIVectorView_1_IInspectableWrapper(result) - resultWrapper?.copyTo($1) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) - return S_OK - }, + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper = InterfaceWrapperBase +internal class IIteratorSortEntry: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry } - SetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance.setAt(index, value) + internal func get_CurrentImpl() throws -> test_component.SortEntry { + var result: __x_ABI_CWindows_CStorage_CSearch_CSortEntry = .init() + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &result)) + } + return .from(abi: result) + } + + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) + } + return .init(from: result) + } + + internal func MoveNextImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry + internal typealias SwiftABI = IIteratorSortEntry + internal typealias SwiftProjection = AnyIIterator + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl : IIterator, AbiInterfaceImpl { + typealias T = test_component.SortEntry + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : test_component.SortEntry { + get { try! _default.get_CurrentImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFile: test_component.IID { + .init(Data1: 0x43e29f53, Data2: 0x0298, Data3: 0x55aa, Data4: ( 0xa6,0xc8,0x4e,0xdd,0x32,0x3d,0x95,0x98 ))// 43e29f53-0298-55aa-a6c8-4edd323d9598 +} + +internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids return S_OK }, - InsertAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance.insertAt(index, value) + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() + $1!.pointee = hstring return S_OK }, - RemoveAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - __unwrapped__instance.removeAt(index) + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, - Append: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) - __unwrapped__instance.append(value) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + result?.copyTo($1) return S_OK }, - RemoveAtEnd: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.removeAtEnd() + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, - - ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIVector_1_IInspectableWrapper = InterfaceWrapperBase -internal class IVectorAny: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1_IInspectable } +typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileWrapper = InterfaceWrapperBase +internal class IIteratorStorageFile: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFile } - internal func GetAtImpl(_ index: UInt32) throws -> Any? { + internal func get_CurrentImpl() throws -> test_component.StorageFile? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } - return __ABI_.AnyWrapper.unwrapFrom(abi: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result + return .from(abi: result) } - internal func GetViewImpl() throws -> test_component.AnyIVectorView? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) - } + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } - return test_component.__x_ABI_C__FIVectorView_1_IInspectableWrapper.unwrapFrom(abi: result) + return .init(from: result) } - internal func IndexOfImpl(_ value: Any?, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - let valueWrapper = __ABI_.AnyWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } - internal func SetAtImpl(_ index: UInt32, _ value: Any?) throws { - let valueWrapper = __ABI_.AnyWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value)) - } +} + +internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFile + internal typealias SwiftABI = IIteratorStorageFile + internal typealias SwiftProjection = AnyIIterator + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileImpl(abi) } - internal func InsertAtImpl(_ index: UInt32, _ value: Any?) throws { - let valueWrapper = __ABI_.AnyWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value)) - } + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileVTable) { $0 } + return .init(lpVtbl: vtblPtr) } +} - internal func RemoveAtImpl(_ index: UInt32) throws { - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) - } +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileImpl : IIterator, AbiInterfaceImpl { + typealias T = test_component.StorageFile? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFileBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) } - internal func AppendImpl(_ value: Any?) throws { - let valueWrapper = __ABI_.AnyWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value)) - } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - internal func RemoveAtEndImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) - } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : test_component.StorageFile? { + get { try! _default.get_CurrentImpl() } } - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) - } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -internal enum __x_ABI_C__FIVector_1_IInspectableBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVector_1_IInspectable - internal typealias SwiftABI = IVectorAny - internal typealias SwiftProjection = AnyIVector - internal static func from(abi: ComPtr?) -> SwiftProjection? { - guard let abi = abi else { return nil } - return __x_ABI_C__FIVector_1_IInspectableImpl(abi) - } - - internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1_IInspectableVTable) { $0 } - return .init(lpVtbl: vtblPtr) - } +private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolder: test_component.IID { + .init(Data1: 0x5aac96fb, Data2: 0xb3b9, Data3: 0x5a7f, Data4: ( 0xa9,0x20,0x4b,0x5a,0x8d,0xf8,0x11,0x68 ))// 5aac96fb-b3b9-5a7f-a920-4b5a8df81168 } -fileprivate class __x_ABI_C__FIVector_1_IInspectableImpl : IVector, AbiInterfaceImpl { - typealias T = Any? - typealias Bridge = __x_ABI_C__FIVector_1_IInspectableBridge - let _default: Bridge.SwiftABI - init(_ fromAbi: ComPtr) { - _default = Bridge.SwiftABI(fromAbi) - } +internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() + $1!.pointee = hstring + return S_OK + }, - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + result?.copyTo($1) + return S_OK + }, - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - set(newValue) { - setAt(UInt32(position), newValue) - } - } + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) + return S_OK + }, - func removeLast() { - removeAtEnd() - } + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) + return S_OK + }, - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) - fileprivate func getAt(_ index: UInt32) -> Any? { - try! _default.GetAtImpl(index) - } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper = InterfaceWrapperBase +internal class IIteratorStorageFolder: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolder } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) - fileprivate func getView() -> AnyIVectorView? { - try! _default.GetViewImpl() + internal func get_CurrentImpl() throws -> test_component.StorageFolder? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + } + } + return .from(abi: result) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) - fileprivate func indexOf(_ value: Any?, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) + } + return .init(from: result) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) - fileprivate func setAt(_ index: UInt32, _ value: Any?) { - try! _default.SetAtImpl(index, value) + internal func MoveNextImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) + } + return .init(from: result) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) - fileprivate func insertAt(_ index: UInt32, _ value: Any?) { - try! _default.InsertAtImpl(index, value) - } +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) - fileprivate func removeAt(_ index: UInt32) { - try! _default.RemoveAtImpl(index) +internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolder + internal typealias SwiftABI = IIteratorStorageFolder + internal typealias SwiftProjection = AnyIIterator + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderImpl(abi) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) - fileprivate func append(_ value: Any?) { - try! _default.AppendImpl(value) + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderVTable) { $0 } + return .init(lpVtbl: vtblPtr) } +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) - fileprivate func removeAtEnd() { - try! _default.RemoveAtEndImpl() +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderImpl : IIterator, AbiInterfaceImpl { + typealias T = test_component.StorageFolder? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageFolderBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) - fileprivate func clear() { - try! _default.ClearImpl() + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : test_component.StorageFolder? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableAny! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVector_1_GUID: test_component.IID { - .init(Data1: 0x482e676d, Data2: 0xb913, Data3: 0x5ec1, Data4: ( 0xaf,0xa8,0x5f,0x96,0x92,0x2e,0x94,0xae ))// 482e676d-b913-5ec1-afa8-5f96922e94ae +private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChange: test_component.IID { + .init(Data1: 0xc48a1103, Data2: 0x56e6, Data3: 0x5398, Data4: ( 0x84,0xfe,0x92,0xed,0xad,0x7f,0xc1,0x11 ))// c48a1103-56e6-5398-84fe-92edad7fc111 } -internal var __x_ABI_C__FIVector_1_GUIDVTable: __x_ABI_C__FIVector_1_GUIDVtbl = .init( - QueryInterface: { __x_ABI_C__FIVector_1_GUIDWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVector_1_GUIDWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVector_1_GUIDWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVector_1_GUIDWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1_GUIDWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -5320,296 +4676,124 @@ internal var __x_ABI_C__FIVector_1_GUIDVTable: __x_ABI_C__FIVector_1_GUIDVtbl = return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - $2?.initialize(to: .init(from: result)) - return S_OK - }, - - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + result?.copyTo($1) return S_OK }, - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIVectorView_1_GUIDWrapper(result) - resultWrapper?.copyTo($1) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: Foundation.UUID = .init(from: $1) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - SetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: Foundation.UUID = .init(from: $2) - __unwrapped__instance.setAt(index, value) - return S_OK - }, + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper = InterfaceWrapperBase +internal class IIteratorStorageLibraryChange: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChange } - InsertAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: Foundation.UUID = .init(from: $2) - __unwrapped__instance.insertAt(index, value) - return S_OK - }, + internal func get_CurrentImpl() throws -> test_component.StorageLibraryChange? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) + } + } + return .from(abi: result) + } - RemoveAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - __unwrapped__instance.removeAt(index) - return S_OK - }, - - Append: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: Foundation.UUID = .init(from: $1) - __unwrapped__instance.append(value) - return S_OK - }, - - RemoveAtEnd: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.removeAtEnd() - return S_OK - }, - - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() - return S_OK - }, - - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, - - ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } -) -typealias __x_ABI_C__FIVector_1_GUIDWrapper = InterfaceWrapperBase -internal class IVectorUUID: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1_GUID } - - internal func GetAtImpl(_ index: UInt32) throws -> Foundation.UUID { - var result: test_component.GUID = .init() - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } return .init(from: result) } - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func GetViewImpl() throws -> test_component.AnyIVectorView? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) - } - } - return test_component.__x_ABI_C__FIVectorView_1_GUIDWrapper.unwrapFrom(abi: result) - } - - internal func IndexOfImpl(_ value: Foundation.UUID, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, .init(from: value), &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } - internal func SetAtImpl(_ index: UInt32, _ value: Foundation.UUID) throws { - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, .init(from: value))) - } - } - - internal func InsertAtImpl(_ index: UInt32, _ value: Foundation.UUID) throws { - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, .init(from: value))) - } - } - - internal func RemoveAtImpl(_ index: UInt32) throws { - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) - } - } - - internal func AppendImpl(_ value: Foundation.UUID) throws { - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, .init(from: value))) - } - } - - internal func RemoveAtEndImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) - } - } - - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) - } - } - } -internal enum __x_ABI_C__FIVector_1_GUIDBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVector_1_GUID - internal typealias SwiftABI = IVectorUUID - internal typealias SwiftProjection = AnyIVector +internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChange + internal typealias SwiftABI = IIteratorStorageLibraryChange + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVector_1_GUIDImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1_GUIDVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVector_1_GUIDImpl : IVector, AbiInterfaceImpl { - typealias T = Foundation.UUID - typealias Bridge = __x_ABI_C__FIVector_1_GUIDBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl : IIterator, AbiInterfaceImpl { + typealias T = test_component.StorageLibraryChange? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - set(newValue) { - setAt(UInt32(position), newValue) - } - } - - func removeLast() { - removeAtEnd() - } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) - fileprivate func getAt(_ index: UInt32) -> Foundation.UUID { - try! _default.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) - fileprivate func getView() -> AnyIVectorView? { - try! _default.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) - fileprivate func indexOf(_ value: Foundation.UUID, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) - fileprivate func setAt(_ index: UInt32, _ value: Foundation.UUID) { - try! _default.SetAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) - fileprivate func insertAt(_ index: UInt32, _ value: Foundation.UUID) { - try! _default.InsertAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) - fileprivate func removeAt(_ index: UInt32) { - try! _default.RemoveAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) - fileprivate func append(_ value: Foundation.UUID) { - try! _default.AppendImpl(value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) - fileprivate func removeAtEnd() { - try! _default.RemoveAtEndImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) - fileprivate func clear() { - try! _default.ClearImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : test_component.StorageLibraryChange? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableUUID! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVector_1_HSTRING: test_component.IID { - .init(Data1: 0x98b9acc1, Data2: 0x4b56, Data3: 0x532e, Data4: ( 0xac,0x73,0x03,0xd5,0x29,0x1c,0xca,0x90 ))// 98b9acc1-4b56-532e-ac73-03d5291cca90 +private var IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0xa8f692bf, Data2: 0xebba, Data3: 0x5b53, Data4: ( 0x90,0xd3,0x89,0x00,0x9b,0xcc,0x98,0x14 ))// a8f692bf-ebba-5b53-90d3-89009bcc9814 } -internal var __x_ABI_C__FIVector_1_HSTRINGVTable: __x_ABI_C__FIVector_1_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FIVector_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVector_1_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVector_1_HSTRINGWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -5620,300 +4804,124 @@ internal var __x_ABI_C__FIVector_1_HSTRINGVTable: __x_ABI_C__FIVector_1_HSTRINGV return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - $2?.initialize(to: try! HString(result).detach()) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + result?.copyTo($1) return S_OK }, - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIVectorView_1_HSTRINGWrapper(result) - resultWrapper?.copyTo($1) + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: String = .init(from: $1) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) - return S_OK - }, + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IIteratorBase: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase } - SetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: String = .init(from: $2) - __unwrapped__instance.setAt(index, value) - return S_OK - }, - - InsertAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: String = .init(from: $2) - __unwrapped__instance.insertAt(index, value) - return S_OK - }, - - RemoveAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - __unwrapped__instance.removeAt(index) - return S_OK - }, - - Append: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: String = .init(from: $1) - __unwrapped__instance.append(value) - return S_OK - }, - - RemoveAtEnd: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.removeAtEnd() - return S_OK - }, - - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() - return S_OK - }, - - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, - - ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } -) -typealias __x_ABI_C__FIVector_1_HSTRINGWrapper = InterfaceWrapperBase -internal class IVectorString: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1_HSTRING } - - internal func GetAtImpl(_ index: UInt32) throws -> String { - var result: HSTRING? - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) - } - return .init(from: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } - - internal func GetViewImpl() throws -> test_component.AnyIVectorView? { + internal func get_CurrentImpl() throws -> test_component.Base? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } - return test_component.__x_ABI_C__FIVectorView_1_HSTRINGWrapper.unwrapFrom(abi: result) + return .from(abi: result) } - internal func IndexOfImpl(_ value: String, _ index: inout UInt32) throws -> Bool { + internal func get_HasCurrentImpl() throws -> Bool { var result: boolean = 0 - let _value = try! HString(value) - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value.get(), &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } return .init(from: result) } - internal func SetAtImpl(_ index: UInt32, _ value: String) throws { - let _value = try! HString(value) - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value.get())) - } - } - - internal func InsertAtImpl(_ index: UInt32, _ value: String) throws { - let _value = try! HString(value) - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value.get())) - } - } - - internal func RemoveAtImpl(_ index: UInt32) throws { - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) - } - } - - internal func AppendImpl(_ value: String) throws { - let _value = try! HString(value) - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value.get())) - } - } - - internal func RemoveAtEndImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) - } - } - - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + internal func MoveNextImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } + return .init(from: result) } } -internal enum __x_ABI_C__FIVector_1_HSTRINGBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVector_1_HSTRING - internal typealias SwiftABI = IVectorString - internal typealias SwiftProjection = AnyIVector +internal enum __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IIteratorBase + internal typealias SwiftProjection = AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVector_1_HSTRINGImpl(abi) + return __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1_HSTRINGVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVector_1_HSTRINGImpl : IVector, AbiInterfaceImpl { - typealias T = String - typealias Bridge = __x_ABI_C__FIVector_1_HSTRINGBridge +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseImpl : IIterator, AbiInterfaceImpl { + typealias T = Base? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CBaseBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 - } - - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) - } - var count: Int { Int(size) } - - - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - set(newValue) { - setAt(UInt32(position), newValue) - } - } - - func removeLast() { - removeAtEnd() - } - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) - fileprivate func getAt(_ index: UInt32) -> String { - try! _default.GetAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) - fileprivate func getView() -> AnyIVectorView? { - try! _default.GetViewImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) - fileprivate func indexOf(_ value: String, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) - fileprivate func setAt(_ index: UInt32, _ value: String) { - try! _default.SetAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) - fileprivate func insertAt(_ index: UInt32, _ value: String) { - try! _default.InsertAtImpl(index, value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) - fileprivate func removeAt(_ index: UInt32) { - try! _default.RemoveAtImpl(index) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) - fileprivate func append(_ value: String) { - try! _default.AppendImpl(value) - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) - fileprivate func removeAtEnd() { - try! _default.RemoveAtEndImpl() - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) - fileprivate func clear() { - try! _default.ClearImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : Base? { + get { try! _default.get_CurrentImpl() } } - private lazy var _IIterable: IIterableString! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0xcb559561, Data2: 0x6732, Data3: 0x54ba, Data4: ( 0xa0,0x75,0xb5,0x03,0x46,0x27,0x5b,0x9e ))// cb559561-6732-54ba-a075-b50346275b9e +private var IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { + .init(Data1: 0xfc247a63, Data2: 0xc092, Data3: 0x5c5c, Data4: ( 0x8b,0x94,0x66,0xfb,0xfa,0x60,0xf9,0x5f ))// fc247a63-c092-5c5c-8b94-66fbfa60f95f } -internal var __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, +internal var __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( + QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, + Release: { __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, @@ -5924,297 +4932,339 @@ internal var __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_A return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - result?.copyTo($2) - return S_OK - }, - - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) - return S_OK - }, - - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper(result) + get_Current: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.current + let resultWrapper = __ABI_test_component.IBasicWrapper(result) resultWrapper?.copyTo($1) return S_OK }, - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: test_component.Base? = .from(abi: ComPtr($1)) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) - return S_OK - }, - - SetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: test_component.Base? = .from(abi: ComPtr($2)) - __unwrapped__instance.setAt(index, value) - return S_OK - }, - - InsertAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: test_component.Base? = .from(abi: ComPtr($2)) - __unwrapped__instance.insertAt(index, value) - return S_OK - }, - - RemoveAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - __unwrapped__instance.removeAt(index) - return S_OK - }, - - Append: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: test_component.Base? = .from(abi: ComPtr($1)) - __unwrapped__instance.append(value) - return S_OK - }, - - RemoveAtEnd: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.removeAtEnd() + get_HasCurrent: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.hasCurrent + $1?.initialize(to: .init(from: result)) return S_OK }, - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() + MoveNext: { + guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.moveNext() + $1?.initialize(to: .init(from: result)) return S_OK }, - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, - - ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } + GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) -typealias __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class IVectorBase: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase } +typealias __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase +internal class IIteratorIBasic: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic } - internal func GetAtImpl(_ index: UInt32) throws -> test_component.Base? { + internal func get_CurrentImpl() throws -> test_component.AnyIBasic? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } - return .from(abi: result) - } - - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result + return __ABI_test_component.IBasicWrapper.unwrapFrom(abi: result) } - internal func GetViewImpl() throws -> test_component.AnyIVectorView? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) - } + internal func get_HasCurrentImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } - return test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) + return .init(from: result) } - internal func IndexOfImpl(_ value: test_component.Base?, _ index: inout UInt32) throws -> Bool { + internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, RawPointer(value), &index, &result)) + _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } - internal func SetAtImpl(_ index: UInt32, _ value: test_component.Base?) throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, RawPointer(value))) - } +} + +internal enum __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasic + internal typealias SwiftABI = IIteratorIBasic + internal typealias SwiftProjection = AnyIIterator + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) } - internal func InsertAtImpl(_ index: UInt32, _ value: test_component.Base?) throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, RawPointer(value))) - } + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + return .init(lpVtbl: vtblPtr) } +} - internal func RemoveAtImpl(_ index: UInt32) throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) - } +fileprivate class __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IIterator, AbiInterfaceImpl { + typealias T = AnyIBasic? + typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_Ctest__zcomponent__CIBasicBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) } - internal func AppendImpl(_ value: test_component.Base?) throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, RawPointer(value))) - } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) + fileprivate func moveNext() -> Bool { + try! _default.MoveNextImpl() } - internal func RemoveAtEndImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) + fileprivate var current : AnyIBasic? { + get { try! _default.get_CurrentImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) + fileprivate var hasCurrent : Bool { + get { try! _default.get_HasCurrentImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0x09335560, Data2: 0x6c6b, Data3: 0x5a26, Data4: ( 0x93,0x48,0x97,0xb7,0x81,0x13,0x2b,0x20 ))// 09335560-6c6b-5a26-9348-97b781132b20 +} + +internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_Key: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.key + $1?.initialize(to: try! HString(result).detach()) + return S_OK + }, + + get_Value: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.value + let resultWrapper = __ABI_.AnyWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } +) +typealias __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class IKeyValuePairString_Any: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } + + internal func get_KeyImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) } + return .init(from: result) } - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + internal func get_ValueImpl() throws -> Any? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &resultAbi)) + } } + return __ABI_.AnyWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = IVectorBase - internal typealias SwiftProjection = AnyIVector +internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable + internal typealias SwiftABI = IKeyValuePairString_Any + internal typealias SwiftProjection = AnyIKeyValuePair internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + return __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseImpl : IVector, AbiInterfaceImpl { - typealias T = Base? - typealias Bridge = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseBridge +fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IKeyValuePair, AbiInterfaceImpl { + typealias K = String + typealias V = Any? + typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) + fileprivate var key : String { + get { try! _default.get_KeyImpl() } } - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) + fileprivate var value : Any? { + get { try! _default.get_ValueImpl() } } - var count: Int { Int(size) } + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - set(newValue) { - setAt(UInt32(position), newValue) - } - } +private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: test_component.IID { + .init(Data1: 0x60310303, Data2: 0x49c5, Data3: 0x52e6, Data4: ( 0xab,0xc6,0xa9,0xb3,0x6e,0xcc,0xc7,0x16 ))// 60310303-49c5-52e6-abc6-a9b36eccc716 +} - func removeLast() { - removeAtEnd() - } +internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) - fileprivate func getAt(_ index: UInt32) -> Base? { - try! _default.GetAtImpl(index) - } + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() + $1!.pointee = hstring + return S_OK + }, - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) - fileprivate func getView() -> AnyIVectorView? { - try! _default.GetViewImpl() - } + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) - fileprivate func indexOf(_ value: Base?, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) - } + get_Key: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.key + $1?.initialize(to: try! HString(result).detach()) + return S_OK + }, - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) - fileprivate func setAt(_ index: UInt32, _ value: Base?) { - try! _default.SetAtImpl(index, value) + get_Value: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.value + $1?.initialize(to: try! HString(result).detach()) + return S_OK } +) +typealias __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase +internal class IKeyValuePairString_String: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) - fileprivate func insertAt(_ index: UInt32, _ value: Base?) { - try! _default.InsertAtImpl(index, value) + internal func get_KeyImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) + } + return .init(from: result) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) - fileprivate func removeAt(_ index: UInt32) { - try! _default.RemoveAtImpl(index) + internal func get_ValueImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &result)) + } + return .init(from: result) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) - fileprivate func append(_ value: Base?) { - try! _default.AppendImpl(value) +} + +internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING + internal typealias SwiftABI = IKeyValuePairString_String + internal typealias SwiftProjection = AnyIKeyValuePair + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) - fileprivate func removeAtEnd() { - try! _default.RemoveAtEndImpl() + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) } +} - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) - fileprivate func clear() { - try! _default.ClearImpl() +fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IKeyValuePair, AbiInterfaceImpl { + typealias K = String + typealias V = String + typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) + fileprivate var key : String { + get { try! _default.get_KeyImpl() } } - private lazy var _IIterable: IIterableBase! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) + fileprivate var value : String { + get { try! _default.get_ValueImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { - .init(Data1: 0x966413d6, Data2: 0x6520, Data3: 0x5148, Data4: ( 0x9f,0xf1,0xf7,0x35,0x9c,0xb4,0x1c,0x6a ))// 966413d6-6520-5148-9ff1-f7359cb41c6a +private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0x77b4daf4, Data2: 0x4f4f, Data3: 0x5568, Data4: ( 0x90,0xee,0x1a,0x32,0xcf,0x0c,0xaa,0xea ))// 77b4daf4-4f4f-5568-90ee-1a32cf0caaea } -internal var __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( - QueryInterface: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, - Release: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, +internal var __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, GetIids: { let size = MemoryLayout.size - let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID - $1!.pointee = 4 + iids[2] = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2>").detach() $1!.pointee = hstring return S_OK }, @@ -6225,252 +5275,6281 @@ internal var __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x return S_OK }, - GetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let result = __unwrapped__instance.getAt(index) - let resultWrapper = __ABI_test_component.IBasicWrapper(result) - resultWrapper?.copyTo($2) - return S_OK - }, - - get_Size: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.size - $1?.initialize(to: result) + get_Key: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.key + $1?.initialize(to: try! HString(result).detach()) return S_OK }, - GetView: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.getView() - let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(result) + get_Value: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.value + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(result) resultWrapper?.copyTo($1) return S_OK - }, - - IndexOf: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($1)) - var index: UInt32 = 0 - let result = __unwrapped__instance.indexOf(value, &index) - $2?.initialize(to: index) - $3?.initialize(to: .init(from: result)) - return S_OK - }, - - SetAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance.setAt(index, value) - return S_OK - }, - - InsertAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance.insertAt(index, value) - return S_OK - }, - - RemoveAt: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let index: UInt32 = $1 - __unwrapped__instance.removeAt(index) - return S_OK - }, - - Append: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($1)) - __unwrapped__instance.append(value) - return S_OK - }, - - RemoveAtEnd: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.removeAtEnd() - return S_OK - }, - - Clear: { - guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - __unwrapped__instance.clear() - return S_OK - }, - - GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, - - ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } + } ) -typealias __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase -internal class IVectorIBasic: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic } +typealias __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IKeyValuePairString_IVectorViewTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment } - internal func GetAtImpl(_ index: UInt32) throws -> test_component.AnyIBasic? { + internal func get_KeyImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) + } + return .init(from: result) + } + + internal func get_ValueImpl() throws -> test_component.AnyIVectorView? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &resultAbi)) } } - return __ABI_test_component.IBasicWrapper.unwrapFrom(abi: result) + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) } - internal func get_SizeImpl() throws -> UInt32 { - var result: UINT32 = 0 - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) - } - return result - } +} - internal func GetViewImpl() throws -> test_component.AnyIVectorView? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) - } - } - return test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: result) +internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IKeyValuePairString_IVectorViewTextSegment + internal typealias SwiftProjection = AnyIKeyValuePair?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) } - internal func IndexOfImpl(_ value: test_component.AnyIBasic?, _ index: inout UInt32) throws -> Bool { - var result: boolean = 0 - let valueWrapper = __ABI_test_component.IBasicWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) - } - return .init(from: result) + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } + return .init(lpVtbl: vtblPtr) } +} - internal func SetAtImpl(_ index: UInt32, _ value: test_component.AnyIBasic?) throws { - let valueWrapper = __ABI_test_component.IBasicWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value)) - } +fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IKeyValuePair, AbiInterfaceImpl { + typealias K = String + typealias V = AnyIVectorView? + typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) } - internal func InsertAtImpl(_ index: UInt32, _ value: test_component.AnyIBasic?) throws { - let valueWrapper = __ABI_test_component.IBasicWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value)) - } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) + fileprivate var key : String { + get { try! _default.get_KeyImpl() } } - internal func RemoveAtImpl(_ index: UInt32) throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) - } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) + fileprivate var value : AnyIVectorView? { + get { try! _default.get_ValueImpl() } } - internal func AppendImpl(_ value: test_component.AnyIBasic?) throws { - let valueWrapper = __ABI_test_component.IBasicWrapper(value) - let _value = try! valueWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value)) - } + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0xc6bff2b3, Data2: 0x09a5, Data3: 0x5fcf, Data4: ( 0xb0,0x78,0x69,0x43,0xdd,0x21,0x5d,0xe7 ))// c6bff2b3-09a5-5fcf-b078-6943dd215de7 +} + +internal var __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_Key: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.key + $1?.initialize(to: try! HString(result).detach()) + return S_OK + }, + + get_Value: { + guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.value + result?.copyTo($1) + return S_OK } +) +typealias __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IKeyValuePairString_Base: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } - internal func RemoveAtEndImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + internal func get_KeyImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) } + return .init(from: result) } - internal func ClearImpl() throws { - _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + internal func get_ValueImpl() throws -> test_component.Base? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &resultAbi)) + } } + return .from(abi: result) } } -internal enum __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic - internal typealias SwiftABI = IVectorIBasic - internal typealias SwiftProjection = AnyIVector +internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IKeyValuePairString_Base + internal typealias SwiftProjection = AnyIKeyValuePair internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + return __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IVector, AbiInterfaceImpl { - typealias T = AnyIBasic? - typealias Bridge = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge +fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IKeyValuePair, AbiInterfaceImpl { + typealias K = String + typealias V = Base? + typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } - // MARK: Collection - typealias Element = T - var startIndex: Int { 0 } - var endIndex: Int { Int(size) } - func index(after i: Int) -> Int { - i+1 + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) + fileprivate var key : String { + get { try! _default.get_KeyImpl() } } - func index(of: Element) -> Int? { - var index: UInt32 = 0 - let result = indexOf(of, &index) - guard result else { return nil } - return Int(index) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) + fileprivate var value : Base? { + get { try! _default.get_ValueImpl() } } - var count: Int { Int(size) } + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} - subscript(position: Int) -> Element { - get { - getAt(UInt32(position)) - } - set(newValue) { - setAt(UInt32(position), newValue) - } - } +private var IID___x_ABI_C__FIMapChangedEventArgs_1_HSTRING: test_component.IID { + .init(Data1: 0x60141efb, Data2: 0xf2f9, Data3: 0x5377, Data4: ( 0x96,0xfd,0xf8,0xc6,0x0d,0x95,0x58,0xb5 ))// 60141efb-f2f9-5377-96fd-f8c60d9558b5 +} - func removeLast() { - removeAtEnd() - } +internal var __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable: __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.IID + $1!.pointee = 3 + $2!.pointee = iids + return S_OK + }, - // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) - fileprivate func getAt(_ index: UInt32) -> AnyIBasic? { - try! _default.GetAtImpl(index) - } + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMapChangedEventArgs`1").detach() + $1!.pointee = hstring + return S_OK + }, - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) - fileprivate func getView() -> AnyIVectorView? { - try! _default.GetViewImpl() - } + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) - fileprivate func indexOf(_ value: AnyIBasic?, _ index: inout UInt32) -> Bool { - try! _default.IndexOfImpl(value, &index) - } + get_CollectionChange: { + guard let __unwrapped__instance = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.collectionChange + $1?.initialize(to: result) + return S_OK + }, - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) - fileprivate func setAt(_ index: UInt32, _ value: AnyIBasic?) { - try! _default.SetAtImpl(index, value) + get_Key: { + guard let __unwrapped__instance = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.key + $1?.initialize(to: try! HString(result).detach()) + return S_OK } +) +typealias __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper = InterfaceWrapperBase +internal class IMapChangedEventArgsString: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMapChangedEventArgs_1_HSTRING } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) - fileprivate func insertAt(_ index: UInt32, _ value: AnyIBasic?) { - try! _default.InsertAtImpl(index, value) + internal func get_CollectionChangeImpl() throws -> test_component.CollectionChange { + var result: __x_ABI_CWindows_CFoundation_CCollections_CCollectionChange = .init(0) + _ = try perform(as: __x_ABI_C__FIMapChangedEventArgs_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_CollectionChange(pThis, &result)) + } + return result } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) - fileprivate func removeAt(_ index: UInt32) { - try! _default.RemoveAtImpl(index) + internal func get_KeyImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIMapChangedEventArgs_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMapChangedEventArgs_1_HSTRING + internal typealias SwiftABI = IMapChangedEventArgsString + internal typealias SwiftProjection = AnyIMapChangedEventArgs + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGImpl : IMapChangedEventArgs, AbiInterfaceImpl { + typealias K = String + typealias Bridge = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapchangedeventargs-1.collectionchange) + fileprivate var collectionChange : test_component.CollectionChange { + get { try! _default.get_CollectionChangeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapchangedeventargs-1.key) + fileprivate var key : String { + get { try! _default.get_KeyImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMapView_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0xbb78502a, Data2: 0xf79d, Data3: 0x54fa, Data4: ( 0x92,0xc9,0x90,0xc5,0x03,0x9f,0xdf,0x7e ))// bb78502a-f79d-54fa-92c9-90c5039fdf7e +} + +internal var __x_ABI_C__FIMapView_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMapView_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + let resultWrapper = __ABI_.AnyWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + Split: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + var first: test_component.AnyIMapView? + var second: test_component.AnyIMapView? + __unwrapped__instance.split(&first, &second) + let firstWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(first) + firstWrapper?.copyTo($1) + let secondWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(second) + secondWrapper?.copyTo($2) + return S_OK + } +) +typealias __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class IMapViewString_Any: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMapView_2_HSTRING_IInspectable } + + internal func LookupImpl(_ key: String) throws -> Any? { + let (result) = try ComPtrs.initialize { resultAbi in + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) + } + } + return __ABI_.AnyWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func SplitImpl(_ first: inout test_component.AnyIMapView?, _ second: inout test_component.AnyIMapView?) throws { + let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) + } + } + first = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: _first) + second = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: _second) + } + +} + +internal enum __x_ABI_C__FIMapView_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING_IInspectable + internal typealias SwiftABI = IMapViewString_Any + internal typealias SwiftProjection = AnyIMapView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMapView_2_HSTRING_IInspectableImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING_IInspectableVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMapView_2_HSTRING_IInspectableImpl : IMapView, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias K = String + typealias V = Any? + typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING_IInspectableBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) + fileprivate func lookup(_ key: String) -> Any? { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) + fileprivate func split(_ first: inout AnyIMapView?, _ second: inout AnyIMapView?) { + try! _default.SplitImpl(&first, &second) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMapView_2_HSTRING_HSTRING: test_component.IID { + .init(Data1: 0xac7f26f2, Data2: 0xfeb7, Data3: 0x5b2a, Data4: ( 0x8a,0xc4,0x34,0x5b,0xc6,0x2c,0xae,0xde ))// ac7f26f2-feb7-5b2a-8ac4-345bc62caede +} + +internal var __x_ABI_C__FIMapView_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMapView_2_HSTRING_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + $2?.initialize(to: try! HString(result).detach()) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + Split: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + var first: test_component.AnyIMapView? + var second: test_component.AnyIMapView? + __unwrapped__instance.split(&first, &second) + let firstWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(first) + firstWrapper?.copyTo($1) + let secondWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(second) + secondWrapper?.copyTo($2) + return S_OK + } +) +typealias __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase +internal class IMapViewString_String: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMapView_2_HSTRING_HSTRING } + + internal func LookupImpl(_ key: String) throws -> String { + var result: HSTRING? + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func SplitImpl(_ first: inout test_component.AnyIMapView?, _ second: inout test_component.AnyIMapView?) throws { + let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) + } + } + first = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: _first) + second = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: _second) + } + +} + +internal enum __x_ABI_C__FIMapView_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING_HSTRING + internal typealias SwiftABI = IMapViewString_String + internal typealias SwiftProjection = AnyIMapView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMapView_2_HSTRING_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMapView_2_HSTRING_HSTRINGImpl : IMapView, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias K = String + typealias V = String + typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) + fileprivate func lookup(_ key: String) -> String { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) + fileprivate func split(_ first: inout AnyIMapView?, _ second: inout AnyIMapView?) { + try! _default.SplitImpl(&first, &second) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0x91d443d6, Data2: 0x3777, Data3: 0x5102, Data4: ( 0xb0,0xbc,0x3d,0x41,0x83,0xa2,0x6f,0xf9 ))// 91d443d6-3777-5102-b0bc-3d4183a26ff9 +} + +internal var __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMapView`2>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + Split: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + var first: test_component.AnyIMapView?>? + var second: test_component.AnyIMapView?>? + __unwrapped__instance.split(&first, &second) + let firstWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(first) + firstWrapper?.copyTo($1) + let secondWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(second) + secondWrapper?.copyTo($2) + return S_OK + } +) +typealias __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IMapViewString_IVectorViewTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment } + + internal func LookupImpl(_ key: String) throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func SplitImpl(_ first: inout test_component.AnyIMapView?>?, _ second: inout test_component.AnyIMapView?>?) throws { + let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) + } + } + first = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: _first) + second = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: _second) + } + +} + +internal enum __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IMapViewString_IVectorViewTextSegment + internal typealias SwiftProjection = AnyIMapView?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IMapView, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair?>? + typealias K = String + typealias V = AnyIVectorView? + typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) + fileprivate func lookup(_ key: String) -> AnyIVectorView? { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) + fileprivate func split(_ first: inout AnyIMapView?>?, _ second: inout AnyIMapView?>?) { + try! _default.SplitImpl(&first, &second) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_IVectorViewTextSegment! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) + fileprivate func first() -> AnyIIterator?>?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0x8c4e7f37, Data2: 0x8bf0, Data3: 0x515a, Data4: ( 0x82,0xc1,0x06,0x45,0x55,0x0b,0xf6,0x0b ))// 8c4e7f37-8bf0-515a-82c1-0645550bf60b +} + +internal var __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + result?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + Split: { + guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + var first: test_component.AnyIMapView? + var second: test_component.AnyIMapView? + __unwrapped__instance.split(&first, &second) + let firstWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(first) + firstWrapper?.copyTo($1) + let secondWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(second) + secondWrapper?.copyTo($2) + return S_OK + } +) +typealias __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IMapViewString_Base: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } + + internal func LookupImpl(_ key: String) throws -> test_component.Base? { + let (result) = try ComPtrs.initialize { resultAbi in + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) + } + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func SplitImpl(_ first: inout test_component.AnyIMapView?, _ second: inout test_component.AnyIMapView?) throws { + let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in + _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) + } + } + first = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: _first) + second = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: _second) + } + +} + +internal enum __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IMapViewString_Base + internal typealias SwiftProjection = AnyIMapView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IMapView, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias K = String + typealias V = Base? + typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) + fileprivate func lookup(_ key: String) -> Base? { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) + fileprivate func split(_ first: inout AnyIMapView?, _ second: inout AnyIMapView?) { + try! _default.SplitImpl(&first, &second) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_Base! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMap_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0x1b0d3570, Data2: 0x0877, Data3: 0x5ec2, Data4: ( 0x8a,0x2c,0x3b,0x95,0x39,0x50,0x6a,0xca ))// 1b0d3570-0877-5ec2-8a2c-3b9539506aca +} + +internal var __x_ABI_C__FIMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMap_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + let resultWrapper = __ABI_.AnyWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + Insert: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) + let result = __unwrapped__instance.insert(key, value) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + Remove: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + __unwrapped__instance.remove(key) + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + } +) +typealias __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class IMapString_Any: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMap_2_HSTRING_IInspectable } + + internal func LookupImpl(_ key: String) throws -> Any? { + let (result) = try ComPtrs.initialize { resultAbi in + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) + } + } + return __ABI_.AnyWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func GetViewImpl() throws -> test_component.AnyIMapView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) + } + + internal func InsertImpl(_ key: String, _ value: Any?) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + let valueWrapper = __ABI_.AnyWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), _value, &result)) + } + return .init(from: result) + } + + internal func RemoveImpl(_ key: String) throws { + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIMap_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING_IInspectable + internal typealias SwiftABI = IMapString_Any + internal typealias SwiftProjection = AnyIMap + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMap_2_HSTRING_IInspectableImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING_IInspectableVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMap_2_HSTRING_IInspectableImpl : IMap, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias K = String + typealias V = Any? + typealias Bridge = __x_ABI_C__FIMap_2_HSTRING_IInspectableBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) + fileprivate func lookup(_ key: String) -> Any? { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) + fileprivate func getView() -> AnyIMapView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) + fileprivate func insert(_ key: String, _ value: Any?) -> Bool { + try! _default.InsertImpl(key, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) + fileprivate func remove(_ key: String) { + try! _default.RemoveImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMap_2_HSTRING_HSTRING: test_component.IID { + .init(Data1: 0xf6d1f700, Data2: 0x49c2, Data3: 0x52ae, Data4: ( 0x81,0x54,0x82,0x6f,0x99,0x08,0x77,0x3c ))// f6d1f700-49c2-52ae-8154-826f9908773c +} + +internal var __x_ABI_C__FIMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMap_2_HSTRING_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + $2?.initialize(to: try! HString(result).detach()) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + Insert: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let value: String = .init(from: $2) + let result = __unwrapped__instance.insert(key, value) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + Remove: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + __unwrapped__instance.remove(key) + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + } +) +typealias __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase +internal class IMapString_String: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMap_2_HSTRING_HSTRING } + + internal func LookupImpl(_ key: String) throws -> String { + var result: HSTRING? + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func GetViewImpl() throws -> test_component.AnyIMapView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) + } + + internal func InsertImpl(_ key: String, _ value: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + let _value = try! HString(value) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), _value.get(), &result)) + } + return .init(from: result) + } + + internal func RemoveImpl(_ key: String) throws { + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIMap_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING_HSTRING + internal typealias SwiftABI = IMapString_String + internal typealias SwiftProjection = AnyIMap + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMap_2_HSTRING_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMap_2_HSTRING_HSTRINGImpl : IMap, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias K = String + typealias V = String + typealias Bridge = __x_ABI_C__FIMap_2_HSTRING_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) + fileprivate func lookup(_ key: String) -> String { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) + fileprivate func getView() -> AnyIMapView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) + fileprivate func insert(_ key: String, _ value: String) -> Bool { + try! _default.InsertImpl(key, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) + fileprivate func remove(_ key: String) { + try! _default.RemoveImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0xa31b6540, Data2: 0xb2b1, Data3: 0x536d, Data4: ( 0x81,0x8f,0x8a,0xde,0x70,0x51,0xc3,0xb3 ))// a31b6540-b2b1-536d-818f-8ade7051c3b3 +} + +internal var __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMap`2>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + Insert: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let value: test_component.AnyIVectorView? = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: ComPtr($2)) + let result = __unwrapped__instance.insert(key, value) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + Remove: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + __unwrapped__instance.remove(key) + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + } +) +typealias __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IMapString_IVectorViewTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment } + + internal func LookupImpl(_ key: String) throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func GetViewImpl() throws -> test_component.AnyIMapView?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) + } + + internal func InsertImpl(_ key: String, _ value: test_component.AnyIVectorView?) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + let valueWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), _value, &result)) + } + return .init(from: result) + } + + internal func RemoveImpl(_ key: String) throws { + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IMapString_IVectorViewTextSegment + internal typealias SwiftProjection = AnyIMap?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IMap, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair?>? + typealias K = String + typealias V = AnyIVectorView? + typealias Bridge = __x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) + fileprivate func lookup(_ key: String) -> AnyIVectorView? { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) + fileprivate func getView() -> AnyIMapView?>? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) + fileprivate func insert(_ key: String, _ value: AnyIVectorView?) -> Bool { + try! _default.InsertImpl(key, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) + fileprivate func remove(_ key: String) { + try! _default.RemoveImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_IVectorViewTextSegment! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) + fileprivate func first() -> AnyIIterator?>?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0x73430fe6, Data2: 0xa622, Data3: 0x5945, Data4: ( 0xa5,0x86,0x6f,0x3a,0x84,0xef,0x15,0xe3 ))// 73430fe6-a622-5945-a586-6f3a84ef15e3 +} + +internal var __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + Lookup: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.lookup(key) + result?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + HasKey: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let result = __unwrapped__instance.hasKey(key) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + Insert: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + let value: test_component.Base? = .from(abi: ComPtr($2)) + let result = __unwrapped__instance.insert(key, value) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + Remove: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let key: String = .init(from: $1) + __unwrapped__instance.remove(key) + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + } +) +typealias __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IMapString_Base: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase } + + internal func LookupImpl(_ key: String) throws -> test_component.Base? { + let (result) = try ComPtrs.initialize { resultAbi in + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) + } + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func HasKeyImpl(_ key: String) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) + } + return .init(from: result) + } + + internal func GetViewImpl() throws -> test_component.AnyIMapView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIMapView_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) + } + + internal func InsertImpl(_ key: String, _ value: test_component.Base?) throws -> Bool { + var result: boolean = 0 + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), RawPointer(value), &result)) + } + return .init(from: result) + } + + internal func RemoveImpl(_ key: String) throws { + let _key = try! HString(key) + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IMapString_Base + internal typealias SwiftProjection = AnyIMap + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseImpl : IMap, AbiInterfaceImpl { + typealias T = AnyIKeyValuePair? + typealias K = String + typealias V = Base? + typealias Bridge = __x_ABI_C__FIMap_2_HSTRING___x_ABI_Ctest__zcomponent__CBaseBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) + fileprivate func lookup(_ key: String) -> Base? { + try! _default.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _default.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) + fileprivate func getView() -> AnyIMapView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) + fileprivate func insert(_ key: String, _ value: Base?) -> Bool { + try! _default.InsertImpl(key, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) + fileprivate func remove(_ key: String) { + try! _default.RemoveImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_Base! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIObservableMap_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0x236aac9d, Data2: 0xfb12, Data3: 0x5c4d, Data4: ( 0xa4,0x1c,0x9e,0x44,0x5f,0xb4,0xd7,0xec ))// 236aac9d-fb12-5c4d-a41c-9e445fb4d7ec +} + +internal var __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.IID + iids[3] = test_component.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.IID + iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID + $1!.pointee = 5 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IObservableMap`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + add_MapChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let vhnd = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + let result = __unwrapped__instance.mapChanged.addHandler(vhnd) + $2?.initialize(to: .from(swift: result)) + return S_OK + }, + + remove_MapChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let token: EventRegistrationToken = $1 + __unwrapped__instance.mapChanged.removeHandler(token) + return S_OK + } +) +typealias __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class IObservableMapString_Any: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableMap_2_HSTRING_IInspectable } + + internal func add_MapChangedImpl(_ vhnd: MapChangedEventHandler?) throws -> EventRegistrationToken { + var result: EventRegistrationToken = .init() + let vhndWrapper = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper(vhnd) + let _vhnd = try! vhndWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.add_MapChanged(pThis, _vhnd, &result)) + } + return result + } + + internal func remove_MapChangedImpl(_ token: EventRegistrationToken) throws { + _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.remove_MapChanged(pThis, token)) + } + } + +} + +internal enum __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable + internal typealias SwiftABI = IObservableMapString_Any + internal typealias SwiftProjection = AnyIObservableMap + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableImpl : IObservableMap, AbiInterfaceImpl { + typealias K = String + typealias V = Any? + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.mapchanged) + fileprivate lazy var mapChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._default else { return .init() } + return try! this.add_MapChangedImpl($0) + }, + remove: { [weak self] in + try? self?._default.remove_MapChangedImpl($0) + } + ) + }() + + private lazy var _IMap: IMapString_Any! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.lookup) + fileprivate func lookup(_ key: String) -> Any? { + try! _IMap.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _IMap.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.getview) + fileprivate func getView() -> AnyIMapView? { + try! _IMap.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.insert) + fileprivate func insert(_ key: String, _ value: Any?) -> Bool { + try! _IMap.InsertImpl(key, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.remove) + fileprivate func remove(_ key: String) { + try! _IMap.RemoveImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.clear) + fileprivate func clear() { + try! _IMap.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.size) + fileprivate var size : UInt32 { + get { try! _IMap.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIObservableMap_2_HSTRING_HSTRING: test_component.IID { + .init(Data1: 0x1e036276, Data2: 0x2f60, Data3: 0x55f6, Data4: ( 0xb7,0xf3,0xf8,0x60,0x79,0xe6,0x90,0x0b ))// 1e036276-2f60-55f6-b7f3-f86079e6900b +} + +internal var __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.IID + iids[3] = test_component.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.IID + iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID + $1!.pointee = 5 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IObservableMap`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + add_MapChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let vhnd = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + let result = __unwrapped__instance.mapChanged.addHandler(vhnd) + $2?.initialize(to: .from(swift: result)) + return S_OK + }, + + remove_MapChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let token: EventRegistrationToken = $1 + __unwrapped__instance.mapChanged.removeHandler(token) + return S_OK + } +) +typealias __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase +internal class IObservableMapString_String: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableMap_2_HSTRING_HSTRING } + + internal func add_MapChangedImpl(_ vhnd: MapChangedEventHandler?) throws -> EventRegistrationToken { + var result: EventRegistrationToken = .init() + let vhndWrapper = test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper(vhnd) + let _vhnd = try! vhndWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.add_MapChanged(pThis, _vhnd, &result)) + } + return result + } + + internal func remove_MapChangedImpl(_ token: EventRegistrationToken) throws { + _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.remove_MapChanged(pThis, token)) + } + } + +} + +internal enum __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING + internal typealias SwiftABI = IObservableMapString_String + internal typealias SwiftProjection = AnyIObservableMap + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGImpl : IObservableMap, AbiInterfaceImpl { + typealias K = String + typealias V = String + typealias T = AnyIKeyValuePair? + typealias Bridge = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.mapchanged) + fileprivate lazy var mapChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._default else { return .init() } + return try! this.add_MapChangedImpl($0) + }, + remove: { [weak self] in + try? self?._default.remove_MapChangedImpl($0) + } + ) + }() + + private lazy var _IMap: IMapString_String! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.lookup) + fileprivate func lookup(_ key: String) -> String { + try! _IMap.LookupImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.haskey) + fileprivate func hasKey(_ key: String) -> Bool { + try! _IMap.HasKeyImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.getview) + fileprivate func getView() -> AnyIMapView? { + try! _IMap.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.insert) + fileprivate func insert(_ key: String, _ value: String) -> Bool { + try! _IMap.InsertImpl(key, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.remove) + fileprivate func remove(_ key: String) { + try! _IMap.RemoveImpl(key) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.clear) + fileprivate func clear() { + try! _IMap.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.size) + fileprivate var size : UInt32 { + get { try! _IMap.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.first) + fileprivate func first() -> AnyIIterator?>? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0x04ca85dc, Data2: 0x5d3e, Data3: 0x573d, Data4: ( 0xb4,0xe3,0x46,0xde,0x30,0x3f,0x6c,0x35 ))// 04ca85dc-5d3e-573d-b4e3-46de303f6c35 +} + +internal var __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[3] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 5 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IObservableVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + add_VectorChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let vhnd = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + let result = __unwrapped__instance.vectorChanged.addHandler(vhnd) + $2?.initialize(to: .from(swift: result)) + return S_OK + }, + + remove_VectorChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let token: EventRegistrationToken = $1 + __unwrapped__instance.vectorChanged.removeHandler(token) + return S_OK + } +) +typealias __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IObservableVectorBase: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase } + + internal func add_VectorChangedImpl(_ vhnd: VectorChangedEventHandler?) throws -> EventRegistrationToken { + var result: EventRegistrationToken = .init() + let vhndWrapper = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper(vhnd) + let _vhnd = try! vhndWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.add_VectorChanged(pThis, _vhnd, &result)) + } + return result + } + + internal func remove_VectorChangedImpl(_ token: EventRegistrationToken) throws { + _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.remove_VectorChanged(pThis, token)) + } + } + +} + +internal enum __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IObservableVectorBase + internal typealias SwiftProjection = AnyIObservableVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseImpl : IObservableVector, AbiInterfaceImpl { + typealias T = Base? + typealias Bridge = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.vectorchanged) + fileprivate lazy var vectorChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._default else { return .init() } + return try! this.add_VectorChangedImpl($0) + }, + remove: { [weak self] in + try? self?._default.remove_VectorChangedImpl($0) + } + ) + }() + + private lazy var _IVector: IVectorBase! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getat) + fileprivate func getAt(_ index: UInt32) -> Base? { + try! _IVector.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _IVector.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.indexof) + fileprivate func indexOf(_ value: Base?, _ index: inout UInt32) -> Bool { + try! _IVector.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: Base?) { + try! _IVector.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: Base?) { + try! _IVector.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _IVector.RemoveAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.append) + fileprivate func append(_ value: Base?) { + try! _IVector.AppendImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeatend) + fileprivate func removeAtEnd() { + try! _IVector.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.clear) + fileprivate func clear() { + try! _IVector.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.size) + fileprivate var size : UInt32 { + get { try! _IVector.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableBase! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { + .init(Data1: 0xd0fc0651, Data2: 0x9791, Data3: 0x5130, Data4: ( 0xa7,0x41,0xb0,0xef,0xea,0xfa,0xbc,0xa9 ))// d0fc0651-9791-5130-a741-b0efeafabca9 +} + +internal var __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( + QueryInterface: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, + Release: { __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + iids[3] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + iids[4] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + $1!.pointee = 5 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IObservableVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + add_VectorChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let vhnd = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + let result = __unwrapped__instance.vectorChanged.addHandler(vhnd) + $2?.initialize(to: .from(swift: result)) + return S_OK + }, + + remove_VectorChanged: { + guard let __unwrapped__instance = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let token: EventRegistrationToken = $1 + __unwrapped__instance.vectorChanged.removeHandler(token) + return S_OK + } +) +typealias __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase +internal class IObservableVectorIBasic: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic } + + internal func add_VectorChangedImpl(_ vhnd: VectorChangedEventHandler?) throws -> EventRegistrationToken { + var result: EventRegistrationToken = .init() + let vhndWrapper = test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(vhnd) + let _vhnd = try! vhndWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.add_VectorChanged(pThis, _vhnd, &result)) + } + return result + } + + internal func remove_VectorChangedImpl(_ token: EventRegistrationToken) throws { + _ = try perform(as: __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.remove_VectorChanged(pThis, token)) + } + } + +} + +internal enum __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasic + internal typealias SwiftABI = IObservableVectorIBasic + internal typealias SwiftProjection = AnyIObservableVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IObservableVector, AbiInterfaceImpl { + typealias T = AnyIBasic? + typealias Bridge = __x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.vectorchanged) + fileprivate lazy var vectorChanged : Event> = { + .init( + add: { [weak self] in + guard let this = self?._default else { return .init() } + return try! this.add_VectorChangedImpl($0) + }, + remove: { [weak self] in + try? self?._default.remove_VectorChangedImpl($0) + } + ) + }() + + private lazy var _IVector: IVectorIBasic! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getat) + fileprivate func getAt(_ index: UInt32) -> AnyIBasic? { + try! _IVector.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _IVector.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.indexof) + fileprivate func indexOf(_ value: AnyIBasic?, _ index: inout UInt32) -> Bool { + try! _IVector.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: AnyIBasic?) { + try! _IVector.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: AnyIBasic?) { + try! _IVector.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _IVector.RemoveAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.append) + fileprivate func append(_ value: AnyIBasic?) { + try! _IVector.AppendImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.removeatend) + fileprivate func removeAtEnd() { + try! _IVector.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.clear) + fileprivate func clear() { + try! _IVector.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.size) + fileprivate var size : UInt32 { + get { try! _IVector.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIBasic! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablevector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1_IInspectable: test_component.IID { + .init(Data1: 0xa6487363, Data2: 0xb074, Data3: 0x5c60, Data4: ( 0xab,0x16,0x86,0x6d,0xce,0x4e,0xe5,0x4d ))// a6487363-b074-5c60-ab16-866dce4ee54d +} + +internal var __x_ABI_C__FIVectorView_1_IInspectableVTable: __x_ABI_C__FIVectorView_1_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1_IInspectableWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1_IInspectableWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let resultWrapper = __ABI_.AnyWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1_IInspectableWrapper = InterfaceWrapperBase +internal class IVectorViewAny: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1_IInspectable } + + internal func GetAtImpl(_ index: UInt32) throws -> Any? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return __ABI_.AnyWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: Any?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let valueWrapper = __ABI_.AnyWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVectorView_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1_IInspectable + internal typealias SwiftABI = IVectorViewAny + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1_IInspectableImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1_IInspectableVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1_IInspectableImpl : IVectorView, AbiInterfaceImpl { + typealias T = Any? + typealias Bridge = __x_ABI_C__FIVectorView_1_IInspectableBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> Any? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: Any?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableAny! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1_GUID: test_component.IID { + .init(Data1: 0x9520e64b, Data2: 0x15b2, Data3: 0x52a6, Data4: ( 0x98,0xed,0x31,0x91,0xfa,0x6c,0xf6,0x8a ))// 9520e64b-15b2-52a6-98ed-3191fa6cf68a +} + +internal var __x_ABI_C__FIVectorView_1_GUIDVTable: __x_ABI_C__FIVectorView_1_GUIDVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1_GUIDWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1_GUIDWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1_GUIDWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1_GUIDWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1_GUIDWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: Foundation.UUID = .init(from: $1) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1_GUIDWrapper = InterfaceWrapperBase +internal class IVectorViewUUID: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1_GUID } + + internal func GetAtImpl(_ index: UInt32) throws -> Foundation.UUID { + var result: test_component.GUID = .init() + _ = try perform(as: __x_ABI_C__FIVectorView_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + } + return .init(from: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: Foundation.UUID, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, .init(from: value), &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1_GUIDBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1_GUID + internal typealias SwiftABI = IVectorViewUUID + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1_GUIDImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1_GUIDVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1_GUIDImpl : IVectorView, AbiInterfaceImpl { + typealias T = Foundation.UUID + typealias Bridge = __x_ABI_C__FIVectorView_1_GUIDBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> Foundation.UUID { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: Foundation.UUID, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableUUID! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1_HSTRING: test_component.IID { + .init(Data1: 0x2f13c006, Data2: 0xa03a, Data3: 0x5f69, Data4: ( 0xb0,0x90,0x75,0xa4,0x3e,0x33,0x42,0x3e ))// 2f13c006-a03a-5f69-b090-75a43e33423e +} + +internal var __x_ABI_C__FIVectorView_1_HSTRINGVTable: __x_ABI_C__FIVectorView_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1_HSTRINGWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + $2?.initialize(to: try! HString(result).detach()) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: String = .init(from: $1) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1_HSTRINGWrapper = InterfaceWrapperBase +internal class IVectorViewString: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1_HSTRING } + + internal func GetAtImpl(_ index: UInt32) throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIVectorView_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + } + return .init(from: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: String, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let _value = try! HString(value) + _ = try perform(as: __x_ABI_C__FIVectorView_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value.get(), &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1_HSTRING + internal typealias SwiftABI = IVectorViewString + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1_HSTRINGImpl : IVectorView, AbiInterfaceImpl { + typealias T = String + typealias Bridge = __x_ABI_C__FIVectorView_1_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> String { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: String, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableString! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment: test_component.IID { + .init(Data1: 0x2f245f9d, Data2: 0xeb5f, Data3: 0x5641, Data4: ( 0x9d,0xcc,0x6a,0xb1,0x94,0x6c,0xc7,0xe6 ))// 2f245f9d-eb5f-5641-9dcc-6ab1946cc7e6 +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + $2?.initialize(to: .from(swift: result)) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.TextSegment = .from(abi: $1) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper = InterfaceWrapperBase +internal class IVectorViewTextSegment: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.TextSegment { + var result: __x_ABI_CWindows_CData_CText_CTextSegment = .init() + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.TextSegment, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, .from(swift: value), &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegment + internal typealias SwiftABI = IVectorViewTextSegment + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentImpl : IVectorView, AbiInterfaceImpl { + typealias T = test_component.TextSegment + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.TextSegment { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: test_component.TextSegment, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableTextSegment! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry: test_component.IID { + .init(Data1: 0xb1f00d3b, Data2: 0x1f06, Data3: 0x5117, Data4: ( 0x93,0xea,0x2a,0x0d,0x79,0x11,0x67,0x01 ))// b1f00d3b-1f06-5117-93ea-2a0d79116701 +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let resultWrapper = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.AnyIWwwFormUrlDecoderEntry? = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper = InterfaceWrapperBase +internal class IVectorViewIWwwFormUrlDecoderEntry: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.AnyIWwwFormUrlDecoderEntry? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.AnyIWwwFormUrlDecoderEntry?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let valueWrapper = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry + internal typealias SwiftABI = IVectorViewIWwwFormUrlDecoderEntry + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl : IVectorView, AbiInterfaceImpl { + typealias T = test_component.AnyIWwwFormUrlDecoderEntry? + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.AnyIWwwFormUrlDecoderEntry? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: test_component.AnyIWwwFormUrlDecoderEntry?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIWwwFormUrlDecoderEntry! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem: test_component.IID { + .init(Data1: 0x85575a41, Data2: 0x06cb, Data3: 0x58d0, Data4: ( 0xb9,0x8a,0x7c,0x8f,0x06,0xe6,0xe9,0xd7 ))// 85575a41-06cb-58d0-b98a-7c8f06e6e9d7 +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let resultWrapper = __ABI_Windows_Storage.IStorageItemWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.AnyIStorageItem? = __ABI_Windows_Storage.IStorageItemWrapper.unwrapFrom(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper = InterfaceWrapperBase +internal class IVectorViewIStorageItem: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.AnyIStorageItem? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return __ABI_Windows_Storage.IStorageItemWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.AnyIStorageItem?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let valueWrapper = __ABI_Windows_Storage.IStorageItemWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem + internal typealias SwiftABI = IVectorViewIStorageItem + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemImpl : IVectorView, AbiInterfaceImpl { + typealias T = test_component.AnyIStorageItem? + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.AnyIStorageItem? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: test_component.AnyIStorageItem?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIStorageItem! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry: test_component.IID { + .init(Data1: 0x823c7604, Data2: 0xb37b, Data3: 0x5465, Data4: ( 0xa1,0x69,0x29,0x49,0x78,0x93,0xcd,0xb9 ))// 823c7604-b37b-5465-a169-29497893cdb9 +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let _result = __ABI_Windows_Storage_Search._ABI_SortEntry(from: result) + $2?.initialize(to: _result.detach()) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.SortEntry = .from(abi: $1) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper = InterfaceWrapperBase +internal class IVectorViewSortEntry: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.SortEntry { + var result: __x_ABI_CWindows_CStorage_CSearch_CSortEntry = .init() + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.SortEntry, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let _value = __ABI_Windows_Storage_Search._ABI_SortEntry(from: value) + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value.val, &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry + internal typealias SwiftABI = IVectorViewSortEntry + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl : IVectorView, AbiInterfaceImpl { + typealias T = test_component.SortEntry + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.SortEntry { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: test_component.SortEntry, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableSortEntry! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile: test_component.IID { + .init(Data1: 0x80646519, Data2: 0x5e2a, Data3: 0x595d, Data4: ( 0xa8,0xcd,0x2a,0x24,0xb4,0x06,0x7f,0x1b ))// 80646519-5e2a-595d-a8cd-2a24b4067f1b +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + result?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.StorageFile? = .from(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper = InterfaceWrapperBase +internal class IVectorViewStorageFile: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.StorageFile? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.StorageFile?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, RawPointer(value), &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile + internal typealias SwiftABI = IVectorViewStorageFile + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileImpl : IVectorView, AbiInterfaceImpl { + typealias T = test_component.StorageFile? + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.StorageFile? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: test_component.StorageFile?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableStorageFile! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder: test_component.IID { + .init(Data1: 0xe20debc6, Data2: 0xdc4e, Data3: 0x542e, Data4: ( 0xa2,0xe7,0xa2,0x4d,0x19,0xc8,0xdd,0x62 ))// e20debc6-dc4e-542e-a2e7-a24d19c8dd62 +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + result?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.StorageFolder? = .from(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper = InterfaceWrapperBase +internal class IVectorViewStorageFolder: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.StorageFolder? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.StorageFolder?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, RawPointer(value), &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder + internal typealias SwiftABI = IVectorViewStorageFolder + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderImpl : IVectorView, AbiInterfaceImpl { + typealias T = test_component.StorageFolder? + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.StorageFolder? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: test_component.StorageFolder?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableStorageFolder! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange: test_component.IID { + .init(Data1: 0x0d3879e2, Data2: 0x5c7e, Data3: 0x5b6c, Data4: ( 0x95,0x4d,0x10,0xc6,0xda,0x95,0xfb,0xff ))// 0d3879e2-5c7e-5b6c-954d-10c6da95fbff +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + result?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.StorageLibraryChange? = .from(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper = InterfaceWrapperBase +internal class IVectorViewStorageLibraryChange: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.StorageLibraryChange? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.StorageLibraryChange?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, RawPointer(value), &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange + internal typealias SwiftABI = IVectorViewStorageLibraryChange + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl : IVectorView, AbiInterfaceImpl { + typealias T = test_component.StorageLibraryChange? + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.StorageLibraryChange? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: test_component.StorageLibraryChange?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableStorageLibraryChange! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0x92c07225, Data2: 0x1151, Data3: 0x51be, Data4: ( 0x83,0x03,0xf0,0x11,0x9f,0x4a,0xac,0xe6 ))// 92c07225-1151-51be-8303-f0119f4aace6 +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + result?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.Base? = .from(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IVectorViewBase: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.Base? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.Base?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, RawPointer(value), &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IVectorViewBase + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseImpl : IVectorView, AbiInterfaceImpl { + typealias T = Base? + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> Base? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: Base?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableBase! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { + .init(Data1: 0x90050e25, Data2: 0xb754, Data3: 0x51a3, Data4: ( 0x83,0x44,0x87,0xdf,0x43,0xe9,0x03,0xb7 ))// 90050e25-b754-51a3-8344-87df43e903b7 +} + +internal var __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( + QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let resultWrapper = __ABI_test_component.IBasicWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase +internal class IVectorViewIBasic: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.AnyIBasic? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return __ABI_test_component.IBasicWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func IndexOfImpl(_ value: test_component.AnyIBasic?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let valueWrapper = __ABI_test_component.IBasicWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasic + internal typealias SwiftABI = IVectorViewIBasic + internal typealias SwiftProjection = AnyIVectorView + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IVectorView, AbiInterfaceImpl { + typealias T = AnyIBasic? + typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) + fileprivate func getAt(_ index: UInt32) -> AnyIBasic? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) + fileprivate func indexOf(_ value: AnyIBasic?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIBasic! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVector_1_IInspectable: test_component.IID { + .init(Data1: 0xb32bdca4, Data2: 0x5e52, Data3: 0x5b27, Data4: ( 0xbc,0x5d,0xd6,0x6a,0x1a,0x26,0x8c,0x2a ))// b32bdca4-5e52-5b27-bc5d-d66a1a268c2a +} + +internal var __x_ABI_C__FIVector_1_IInspectableVTable: __x_ABI_C__FIVector_1_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIVector_1_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVector_1_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVector_1_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVector_1_IInspectableWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1_IInspectableWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let resultWrapper = __ABI_.AnyWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1_IInspectableWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + SetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance.setAt(index, value) + return S_OK + }, + + InsertAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance.insertAt(index, value) + return S_OK + }, + + RemoveAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + __unwrapped__instance.removeAt(index) + return S_OK + }, + + Append: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) + __unwrapped__instance.append(value) + return S_OK + }, + + RemoveAtEnd: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.removeAtEnd() + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, + + ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVector_1_IInspectableWrapper = InterfaceWrapperBase +internal class IVectorAny: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1_IInspectable } + + internal func GetAtImpl(_ index: UInt32) throws -> Any? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return __ABI_.AnyWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func GetViewImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1_IInspectableWrapper.unwrapFrom(abi: result) + } + + internal func IndexOfImpl(_ value: Any?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let valueWrapper = __ABI_.AnyWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + } + return .init(from: result) + } + + internal func SetAtImpl(_ index: UInt32, _ value: Any?) throws { + let valueWrapper = __ABI_.AnyWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value)) + } + } + + internal func InsertAtImpl(_ index: UInt32, _ value: Any?) throws { + let valueWrapper = __ABI_.AnyWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value)) + } + } + + internal func RemoveAtImpl(_ index: UInt32) throws { + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) + } + } + + internal func AppendImpl(_ value: Any?) throws { + let valueWrapper = __ABI_.AnyWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value)) + } + } + + internal func RemoveAtEndImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIVector_1_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVector_1_IInspectable + internal typealias SwiftABI = IVectorAny + internal typealias SwiftProjection = AnyIVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVector_1_IInspectableImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1_IInspectableVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVector_1_IInspectableImpl : IVector, AbiInterfaceImpl { + typealias T = Any? + typealias Bridge = __x_ABI_C__FIVector_1_IInspectableBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) + fileprivate func getAt(_ index: UInt32) -> Any? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) + fileprivate func indexOf(_ value: Any?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: Any?) { + try! _default.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: Any?) { + try! _default.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _default.RemoveAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) + fileprivate func append(_ value: Any?) { + try! _default.AppendImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) + fileprivate func removeAtEnd() { + try! _default.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableAny! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVector_1_GUID: test_component.IID { + .init(Data1: 0x482e676d, Data2: 0xb913, Data3: 0x5ec1, Data4: ( 0xaf,0xa8,0x5f,0x96,0x92,0x2e,0x94,0xae ))// 482e676d-b913-5ec1-afa8-5f96922e94ae +} + +internal var __x_ABI_C__FIVector_1_GUIDVTable: __x_ABI_C__FIVector_1_GUIDVtbl = .init( + QueryInterface: { __x_ABI_C__FIVector_1_GUIDWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVector_1_GUIDWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVector_1_GUIDWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVector_1_GUIDWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1_GUIDWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + $2?.initialize(to: .init(from: result)) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1_GUIDWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: Foundation.UUID = .init(from: $1) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + SetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: Foundation.UUID = .init(from: $2) + __unwrapped__instance.setAt(index, value) + return S_OK + }, + + InsertAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: Foundation.UUID = .init(from: $2) + __unwrapped__instance.insertAt(index, value) + return S_OK + }, + + RemoveAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + __unwrapped__instance.removeAt(index) + return S_OK + }, + + Append: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: Foundation.UUID = .init(from: $1) + __unwrapped__instance.append(value) + return S_OK + }, + + RemoveAtEnd: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.removeAtEnd() + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_GUIDWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, + + ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVector_1_GUIDWrapper = InterfaceWrapperBase +internal class IVectorUUID: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1_GUID } + + internal func GetAtImpl(_ index: UInt32) throws -> Foundation.UUID { + var result: test_component.GUID = .init() + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + } + return .init(from: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func GetViewImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1_GUIDWrapper.unwrapFrom(abi: result) + } + + internal func IndexOfImpl(_ value: Foundation.UUID, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, .init(from: value), &index, &result)) + } + return .init(from: result) + } + + internal func SetAtImpl(_ index: UInt32, _ value: Foundation.UUID) throws { + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, .init(from: value))) + } + } + + internal func InsertAtImpl(_ index: UInt32, _ value: Foundation.UUID) throws { + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, .init(from: value))) + } + } + + internal func RemoveAtImpl(_ index: UInt32) throws { + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) + } + } + + internal func AppendImpl(_ value: Foundation.UUID) throws { + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, .init(from: value))) + } + } + + internal func RemoveAtEndImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1_GUID.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIVector_1_GUIDBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVector_1_GUID + internal typealias SwiftABI = IVectorUUID + internal typealias SwiftProjection = AnyIVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVector_1_GUIDImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1_GUIDVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVector_1_GUIDImpl : IVector, AbiInterfaceImpl { + typealias T = Foundation.UUID + typealias Bridge = __x_ABI_C__FIVector_1_GUIDBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) + fileprivate func getAt(_ index: UInt32) -> Foundation.UUID { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) + fileprivate func indexOf(_ value: Foundation.UUID, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: Foundation.UUID) { + try! _default.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: Foundation.UUID) { + try! _default.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _default.RemoveAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) + fileprivate func append(_ value: Foundation.UUID) { + try! _default.AppendImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) + fileprivate func removeAtEnd() { + try! _default.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableUUID! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVector_1_HSTRING: test_component.IID { + .init(Data1: 0x98b9acc1, Data2: 0x4b56, Data3: 0x532e, Data4: ( 0xac,0x73,0x03,0xd5,0x29,0x1c,0xca,0x90 ))// 98b9acc1-4b56-532e-ac73-03d5291cca90 +} + +internal var __x_ABI_C__FIVector_1_HSTRINGVTable: __x_ABI_C__FIVector_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIVector_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVector_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVector_1_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1_HSTRINGWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + $2?.initialize(to: try! HString(result).detach()) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1_HSTRINGWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: String = .init(from: $1) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + SetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: String = .init(from: $2) + __unwrapped__instance.setAt(index, value) + return S_OK + }, + + InsertAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: String = .init(from: $2) + __unwrapped__instance.insertAt(index, value) + return S_OK + }, + + RemoveAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + __unwrapped__instance.removeAt(index) + return S_OK + }, + + Append: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: String = .init(from: $1) + __unwrapped__instance.append(value) + return S_OK + }, + + RemoveAtEnd: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.removeAtEnd() + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, + + ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVector_1_HSTRINGWrapper = InterfaceWrapperBase +internal class IVectorString: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1_HSTRING } + + internal func GetAtImpl(_ index: UInt32) throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + } + return .init(from: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func GetViewImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1_HSTRINGWrapper.unwrapFrom(abi: result) + } + + internal func IndexOfImpl(_ value: String, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let _value = try! HString(value) + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value.get(), &index, &result)) + } + return .init(from: result) + } + + internal func SetAtImpl(_ index: UInt32, _ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value.get())) + } + } + + internal func InsertAtImpl(_ index: UInt32, _ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value.get())) + } + } + + internal func RemoveAtImpl(_ index: UInt32) throws { + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) + } + } + + internal func AppendImpl(_ value: String) throws { + let _value = try! HString(value) + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value.get())) + } + } + + internal func RemoveAtEndImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIVector_1_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVector_1_HSTRING + internal typealias SwiftABI = IVectorString + internal typealias SwiftProjection = AnyIVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVector_1_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVector_1_HSTRINGImpl : IVector, AbiInterfaceImpl { + typealias T = String + typealias Bridge = __x_ABI_C__FIVector_1_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) + fileprivate func getAt(_ index: UInt32) -> String { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) + fileprivate func indexOf(_ value: String, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: String) { + try! _default.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: String) { + try! _default.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _default.RemoveAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) + fileprivate func append(_ value: String) { + try! _default.AppendImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) + fileprivate func removeAtEnd() { + try! _default.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableString! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry: test_component.IID { + .init(Data1: 0xd8ea401b, Data2: 0x47b3, Data3: 0x5254, Data4: ( 0x84,0xf4,0xee,0xa1,0x0c,0x4c,0xf0,0x68 ))// d8ea401b-47b3-5254-84f4-eea10c4cf068 +} + +internal var __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVtbl = .init( + QueryInterface: { __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let _result = __ABI_Windows_Storage_Search._ABI_SortEntry(from: result) + $2?.initialize(to: _result.detach()) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.SortEntry = .from(abi: $1) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + SetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: test_component.SortEntry = .from(abi: $2) + __unwrapped__instance.setAt(index, value) + return S_OK + }, + + InsertAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: test_component.SortEntry = .from(abi: $2) + __unwrapped__instance.insertAt(index, value) + return S_OK + }, + + RemoveAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + __unwrapped__instance.removeAt(index) + return S_OK + }, + + Append: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.SortEntry = .from(abi: $1) + __unwrapped__instance.append(value) + return S_OK + }, + + RemoveAtEnd: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.removeAtEnd() + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, + + ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper = InterfaceWrapperBase +internal class IVectorSortEntry: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.SortEntry { + var result: __x_ABI_CWindows_CStorage_CSearch_CSortEntry = .init() + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &result)) + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func GetViewImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryWrapper.unwrapFrom(abi: result) + } + + internal func IndexOfImpl(_ value: test_component.SortEntry, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let _value = __ABI_Windows_Storage_Search._ABI_SortEntry(from: value) + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value.val, &index, &result)) + } + return .init(from: result) + } + + internal func SetAtImpl(_ index: UInt32, _ value: test_component.SortEntry) throws { + let _value = __ABI_Windows_Storage_Search._ABI_SortEntry(from: value) + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value.val)) + } + } + + internal func InsertAtImpl(_ index: UInt32, _ value: test_component.SortEntry) throws { + let _value = __ABI_Windows_Storage_Search._ABI_SortEntry(from: value) + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value.val)) + } + } + + internal func RemoveAtImpl(_ index: UInt32) throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) + } + } + + internal func AppendImpl(_ value: test_component.SortEntry) throws { + let _value = __ABI_Windows_Storage_Search._ABI_SortEntry(from: value) + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value.val)) + } + } + + internal func RemoveAtEndImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntry + internal typealias SwiftABI = IVectorSortEntry + internal typealias SwiftProjection = AnyIVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryImpl : IVector, AbiInterfaceImpl { + typealias T = test_component.SortEntry + typealias Bridge = __x_ABI_C__FIVector_1___x_ABI_CWindows__CStorage__CSearch__CSortEntryBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) + fileprivate func getAt(_ index: UInt32) -> test_component.SortEntry { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) + fileprivate func indexOf(_ value: test_component.SortEntry, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: test_component.SortEntry) { + try! _default.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: test_component.SortEntry) { + try! _default.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _default.RemoveAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) + fileprivate func append(_ value: test_component.SortEntry) { + try! _default.AppendImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) + fileprivate func removeAtEnd() { + try! _default.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableSortEntry! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0xcb559561, Data2: 0x6732, Data3: 0x54ba, Data4: ( 0xa0,0x75,0xb5,0x03,0x46,0x27,0x5b,0x9e ))// cb559561-6732-54ba-a075-b50346275b9e +} + +internal var __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CBaseWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + result?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.Base? = .from(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + SetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: test_component.Base? = .from(abi: ComPtr($2)) + __unwrapped__instance.setAt(index, value) + return S_OK + }, + + InsertAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: test_component.Base? = .from(abi: ComPtr($2)) + __unwrapped__instance.insertAt(index, value) + return S_OK + }, + + RemoveAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + __unwrapped__instance.removeAt(index) + return S_OK + }, + + Append: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.Base? = .from(abi: ComPtr($1)) + __unwrapped__instance.append(value) + return S_OK + }, + + RemoveAtEnd: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.removeAtEnd() + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, + + ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class IVectorBase: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.Base? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return .from(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func GetViewImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: result) + } + + internal func IndexOfImpl(_ value: test_component.Base?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, RawPointer(value), &index, &result)) + } + return .init(from: result) + } + + internal func SetAtImpl(_ index: UInt32, _ value: test_component.Base?) throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, RawPointer(value))) + } + } + + internal func InsertAtImpl(_ index: UInt32, _ value: test_component.Base?) throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, RawPointer(value))) + } + } + + internal func RemoveAtImpl(_ index: UInt32) throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) + } + } + + internal func AppendImpl(_ value: test_component.Base?) throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, RawPointer(value))) + } + } + + internal func RemoveAtEndImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = IVectorBase + internal typealias SwiftProjection = AnyIVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseImpl : IVector, AbiInterfaceImpl { + typealias T = Base? + typealias Bridge = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CBaseBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) + fileprivate func getAt(_ index: UInt32) -> Base? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) + fileprivate func indexOf(_ value: Base?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: Base?) { + try! _default.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: Base?) { + try! _default.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _default.RemoveAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) + fileprivate func append(_ value: Base?) { + try! _default.AppendImpl(value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) + fileprivate func removeAtEnd() { + try! _default.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableBase! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { + .init(Data1: 0x966413d6, Data2: 0x6520, Data3: 0x5148, Data4: ( 0x9f,0xf1,0xf7,0x35,0x9c,0xb4,0x1c,0x6a ))// 966413d6-6520-5148-9ff1-f7359cb41c6a +} + +internal var __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( + QueryInterface: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, + Release: { __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + iids[3] = test_component.__x_ABI_C__FIIterable_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.Collections.IVector`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + GetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let result = __unwrapped__instance.getAt(index) + let resultWrapper = __ABI_test_component.IBasicWrapper(result) + resultWrapper?.copyTo($2) + return S_OK + }, + + get_Size: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.size + $1?.initialize(to: result) + return S_OK + }, + + GetView: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.getView() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + IndexOf: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($1)) + var index: UInt32 = 0 + let result = __unwrapped__instance.indexOf(value, &index) + $2?.initialize(to: index) + $3?.initialize(to: .init(from: result)) + return S_OK + }, + + SetAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance.setAt(index, value) + return S_OK + }, + + InsertAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance.insertAt(index, value) + return S_OK + }, + + RemoveAt: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let index: UInt32 = $1 + __unwrapped__instance.removeAt(index) + return S_OK + }, + + Append: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let value: test_component.AnyIBasic? = __ABI_test_component.IBasicWrapper.unwrapFrom(abi: ComPtr($1)) + __unwrapped__instance.append(value) + return S_OK + }, + + RemoveAtEnd: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.removeAtEnd() + return S_OK + }, + + Clear: { + guard let __unwrapped__instance = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + __unwrapped__instance.clear() + return S_OK + }, + + GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) }, + + ReplaceAll: { _, _, _ in return failWith(err: E_NOTIMPL) } +) +typealias __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase +internal class IVectorIBasic: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic } + + internal func GetAtImpl(_ index: UInt32) throws -> test_component.AnyIBasic? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) + } + } + return __ABI_test_component.IBasicWrapper.unwrapFrom(abi: result) + } + + internal func get_SizeImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) + } + return result + } + + internal func GetViewImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: result) + } + + internal func IndexOfImpl(_ value: test_component.AnyIBasic?, _ index: inout UInt32) throws -> Bool { + var result: boolean = 0 + let valueWrapper = __ABI_test_component.IBasicWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) + } + return .init(from: result) + } + + internal func SetAtImpl(_ index: UInt32, _ value: test_component.AnyIBasic?) throws { + let valueWrapper = __ABI_test_component.IBasicWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value)) + } + } + + internal func InsertAtImpl(_ index: UInt32, _ value: test_component.AnyIBasic?) throws { + let valueWrapper = __ABI_test_component.IBasicWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value)) + } + } + + internal func RemoveAtImpl(_ index: UInt32) throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index)) + } + } + + internal func AppendImpl(_ value: test_component.AnyIBasic?) throws { + let valueWrapper = __ABI_test_component.IBasicWrapper(value) + let _value = try! valueWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value)) + } + } + + internal func RemoveAtEndImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis)) + } + } + + internal func ClearImpl() throws { + _ = try perform(as: __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) + } + } + +} + +internal enum __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasic + internal typealias SwiftABI = IVectorIBasic + internal typealias SwiftProjection = AnyIVector + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl : IVector, AbiInterfaceImpl { + typealias T = AnyIBasic? + typealias Bridge = __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: Collection + typealias Element = T + var startIndex: Int { 0 } + var endIndex: Int { Int(size) } + func index(after i: Int) -> Int { + i+1 + } + + func index(of: Element) -> Int? { + var index: UInt32 = 0 + let result = indexOf(of, &index) + guard result else { return nil } + return Int(index) + } + var count: Int { Int(size) } + + + subscript(position: Int) -> Element { + get { + getAt(UInt32(position)) + } + set(newValue) { + setAt(UInt32(position), newValue) + } + } + + func removeLast() { + removeAtEnd() + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getat) + fileprivate func getAt(_ index: UInt32) -> AnyIBasic? { + try! _default.GetAtImpl(index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.getview) + fileprivate func getView() -> AnyIVectorView? { + try! _default.GetViewImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.indexof) + fileprivate func indexOf(_ value: AnyIBasic?, _ index: inout UInt32) -> Bool { + try! _default.IndexOfImpl(value, &index) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.setat) + fileprivate func setAt(_ index: UInt32, _ value: AnyIBasic?) { + try! _default.SetAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.insertat) + fileprivate func insertAt(_ index: UInt32, _ value: AnyIBasic?) { + try! _default.InsertAtImpl(index, value) + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeat) + fileprivate func removeAt(_ index: UInt32) { + try! _default.RemoveAtImpl(index) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.append) @@ -6478,309 +11557,4407 @@ fileprivate class __x_ABI_C__FIVector_1___x_ABI_Ctest__zcomponent__CIBasicImpl : try! _default.AppendImpl(value) } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) - fileprivate func removeAtEnd() { - try! _default.RemoveAtEndImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.removeatend) + fileprivate func removeAtEnd() { + try! _default.RemoveAtEndImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) + fileprivate func clear() { + try! _default.ClearImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) + fileprivate var size : UInt32 { + get { try! _default.get_SizeImpl() } + } + + private lazy var _IIterable: IIterableIBasic! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) + fileprivate func first() -> AnyIIterator? { + try! _IIterable.FirstImpl() + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0x24f981e5, Data2: 0xddca, Data3: 0x538d, Data4: ( 0xaa,0xda,0xa5,0x99,0x06,0x08,0x4c,0xf1 ))// 24f981e5-ddca-538d-aada-a59906084cf1 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVTable: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let sender: test_component.AnyIObservableMap? = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) + let event: test_component.AnyIMapChangedEventArgs? = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance(sender, event) + return S_OK + } +) +typealias __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class MapChangedEventHandlerString_Any: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable } + + internal func InvokeImpl(_ sender: test_component.AnyIObservableMap?, _ event: test_component.AnyIMapChangedEventArgs?) throws { + let senderWrapper = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper(sender) + let _sender = try! senderWrapper?.toABI { $0 } + let eventWrapper = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper(event) + let _event = try! eventWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) + } + } + +} + +internal class __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableBridge : WinRTDelegateBridge { + internal typealias Handler = MapChangedEventHandler + internal typealias CABI = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable + internal typealias SwiftABI = test_component.MapChangedEventHandlerString_Any + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (sender, event) in + try! _default.InvokeImpl(sender, event) + } + return handler + } +} +private var IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING: test_component.IID { + .init(Data1: 0xe2663f37, Data2: 0x2e1b, Data3: 0x500c, Data4: ( 0xad,0x68,0xc3,0xed,0x7a,0x8f,0x74,0xc8 ))// e2663f37-2e1b-500c-ad68-c3ed7a8f74c8 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVTable: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let sender: test_component.AnyIObservableMap? = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) + let event: test_component.AnyIMapChangedEventArgs? = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance(sender, event) + return S_OK + } +) +typealias __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase +internal class MapChangedEventHandlerString_String: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING } + + internal func InvokeImpl(_ sender: test_component.AnyIObservableMap?, _ event: test_component.AnyIMapChangedEventArgs?) throws { + let senderWrapper = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper(sender) + let _sender = try! senderWrapper?.toABI { $0 } + let eventWrapper = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper(event) + let _event = try! eventWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) + } + } + +} + +internal class __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGBridge : WinRTDelegateBridge { + internal typealias Handler = MapChangedEventHandler + internal typealias CABI = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING + internal typealias SwiftABI = test_component.MapChangedEventHandlerString_String + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (sender, event) in + try! _default.InvokeImpl(sender, event) + } + return handler + } +} +private var IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { + .init(Data1: 0x4175f8a0, Data2: 0x51bf, Data3: 0x561d, Data4: ( 0xbe,0xaf,0x41,0x55,0x41,0xdb,0xbf,0x69 ))// 4175f8a0-51bf-561d-beaf-415541dbbf69 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( + QueryInterface: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, + Release: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let sender: test_component.AnyIObservableVector? = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: ComPtr($1)) + let event: test_component.AnyIVectorChangedEventArgs? = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance(sender, event) + return S_OK + } +) +typealias __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase +internal class VectorChangedEventHandlerBase: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase } + + internal func InvokeImpl(_ sender: test_component.AnyIObservableVector?, _ event: test_component.AnyIVectorChangedEventArgs?) throws { + let senderWrapper = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper(sender) + let _sender = try! senderWrapper?.toABI { $0 } + let eventWrapper = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper(event) + let _event = try! eventWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) + } + } + +} + +internal class __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseBridge : WinRTDelegateBridge { + internal typealias Handler = VectorChangedEventHandler + internal typealias CABI = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase + internal typealias SwiftABI = test_component.VectorChangedEventHandlerBase + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (sender, event) in + try! _default.InvokeImpl(sender, event) + } + return handler + } +} +private var IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { + .init(Data1: 0xea4e2c41, Data2: 0x3051, Data3: 0x539a, Data4: ( 0xa0,0xde,0x7e,0x2e,0x2c,0xb0,0xdb,0xf8 ))// ea4e2c41-3051-539a-a0de-7e2e2cb0dbf8 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( + QueryInterface: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, + Release: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let sender: test_component.AnyIObservableVector? = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: ComPtr($1)) + let event: test_component.AnyIVectorChangedEventArgs? = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance(sender, event) + return S_OK + } +) +typealias __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase +internal class VectorChangedEventHandlerIBasic: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic } + + internal func InvokeImpl(_ sender: test_component.AnyIObservableVector?, _ event: test_component.AnyIVectorChangedEventArgs?) throws { + let senderWrapper = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(sender) + let _sender = try! senderWrapper?.toABI { $0 } + let eventWrapper = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper(event) + let _event = try! eventWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) + } + } + +} + +internal class __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicBridge : WinRTDelegateBridge { + internal typealias Handler = VectorChangedEventHandler + internal typealias CABI = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic + internal typealias SwiftABI = test_component.VectorChangedEventHandlerIBasic + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (sender, event) in + try! _default.InvokeImpl(sender, event) + } + return handler + } +} +private var IID___x_ABI_C__FIEventHandler_1_IInspectable: test_component.IID { + .init(Data1: 0xc50898f6, Data2: 0xc536, Data3: 0x5f47, Data4: ( 0x85,0x83,0x8b,0x2c,0x24,0x38,0xa1,0x3b ))// c50898f6-c536-5f47-8583-8b2c2438a13b +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIEventHandler_1_IInspectable { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIEventHandler_1_IInspectableVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FIEventHandler_1_IInspectableVTable: __x_ABI_C__FIEventHandler_1_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIEventHandler_1_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIEventHandler_1_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIEventHandler_1_IInspectableWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FIEventHandler_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let sender: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) + let args: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance(sender, args) + return S_OK + } +) +typealias __x_ABI_C__FIEventHandler_1_IInspectableWrapper = InterfaceWrapperBase +internal class EventHandlerAny: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FIEventHandler_1_IInspectable } + + internal func InvokeImpl(_ sender: Any?, _ args: Any?) throws { + let senderWrapper = __ABI_.AnyWrapper(sender) + let _sender = try! senderWrapper?.toABI { $0 } + let argsWrapper = __ABI_.AnyWrapper(args) + let _args = try! argsWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIEventHandler_1_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _args)) + } + } + +} + +internal class __x_ABI_C__FIEventHandler_1_IInspectableBridge : WinRTDelegateBridge { + internal typealias Handler = EventHandler + internal typealias CABI = __x_ABI_C__FIEventHandler_1_IInspectable + internal typealias SwiftABI = test_component.EventHandlerAny + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (sender, args) in + try! _default.InvokeImpl(sender, args) + } + return handler + } +} +private var IID___x_ABI_C__FIAsyncOperationWithProgress_2_int_double: test_component.IID { + .init(Data1: 0x17c0e85a, Data2: 0x64cb, Data3: 0x593a, Data4: ( 0x8e,0x4d,0x90,0x1c,0xa8,0x38,0xaa,0x92 ))// 17c0e85a-64cb-593a-8e4d-901ca838aa92 +} + +internal var __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVTable: __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.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.IAsyncOperationWithProgress`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Progress: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.progress = handler + return S_OK + }, + + get_Progress: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.progress + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + $1?.initialize(to: result) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper = InterfaceWrapperBase +internal class IAsyncOperationWithProgressInt32_Double: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgress_2_int_double } + + internal func put_ProgressImpl(_ handler: AsyncOperationProgressHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Progress(pThis, _handler)) + } + } + + internal func get_ProgressImpl() throws -> AsyncOperationProgressHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Progress(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.unwrapFrom(abi: result) + } + + internal func put_CompletedImpl(_ handler: AsyncOperationWithProgressCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationWithProgressCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> Int32 { + var result: INT32 = 0 + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + } + return result + } + +} + +internal enum __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgress_2_int_double + internal typealias SwiftABI = IAsyncOperationWithProgressInt32_Double + internal typealias SwiftProjection = AnyIAsyncOperationWithProgress + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleImpl : IAsyncOperationWithProgress, AbiInterfaceImpl { + typealias TResult = Int32 + typealias TProgress = Double + typealias Bridge = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.getresults) + fileprivate func getResults() throws -> Int32 { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.progress) + fileprivate var progress : AsyncOperationProgressHandler? { + get { try! _default.get_ProgressImpl() } + set { try! _default.put_ProgressImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.completed) + fileprivate var completed : AsyncOperationWithProgressCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32: test_component.IID { + .init(Data1: 0xeccb574a, Data2: 0xc684, Data3: 0x5572, Data4: ( 0xa6,0x79,0x6b,0x08,0x42,0xcf,0xb5,0x7f ))// eccb574a-c684-5572-a679-6b0842cfb57f +} + +internal var __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32VTable: __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.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.IAsyncOperationWithProgress`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Progress: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.progress = handler + return S_OK + }, + + get_Progress: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.progress + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + $1?.initialize(to: result) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Wrapper = InterfaceWrapperBase +internal class IAsyncOperationWithProgressUInt32_UInt32: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32 } + + internal func put_ProgressImpl(_ handler: AsyncOperationProgressHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Progress(pThis, _handler)) + } + } + + internal func get_ProgressImpl() throws -> AsyncOperationProgressHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Progress(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_UINT32_UINT32Wrapper.unwrapFrom(abi: result) + } + + internal func put_CompletedImpl(_ handler: AsyncOperationWithProgressCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationWithProgressCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_UINT32_UINT32Wrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + } + return result + } + +} + +internal enum __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Bridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32 + internal typealias SwiftABI = IAsyncOperationWithProgressUInt32_UInt32 + internal typealias SwiftProjection = AnyIAsyncOperationWithProgress + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Impl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32VTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Impl : IAsyncOperationWithProgress, AbiInterfaceImpl { + typealias TResult = UInt32 + typealias TProgress = UInt32 + typealias Bridge = __x_ABI_C__FIAsyncOperationWithProgress_2_UINT32_UINT32Bridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.getresults) + fileprivate func getResults() throws -> UInt32 { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.progress) + fileprivate var progress : AsyncOperationProgressHandler? { + get { try! _default.get_ProgressImpl() } + set { try! _default.put_ProgressImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.completed) + fileprivate var completed : AsyncOperationWithProgressCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32: test_component.IID { + .init(Data1: 0xd26b2819, Data2: 0x897f, Data3: 0x5c7d, Data4: ( 0x84,0xd6,0x56,0xd7,0x96,0x56,0x14,0x31 ))// d26b2819-897f-5c7d-84d6-56d796561431 +} + +internal var __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32VTable: __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.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.IAsyncOperationWithProgress`2").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Progress: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.progress = handler + return S_OK + }, + + get_Progress: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.progress + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper = InterfaceWrapperBase +internal class IAsyncOperationWithProgressIBuffer_UInt32: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 } + + internal func put_ProgressImpl(_ handler: AsyncOperationProgressHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Progress(pThis, _handler)) + } + } + + internal func get_ProgressImpl() throws -> AsyncOperationProgressHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Progress(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.unwrapFrom(abi: result) + } + + internal func put_CompletedImpl(_ handler: AsyncOperationWithProgressCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationWithProgressCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Wrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIBuffer? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return __ABI_Windows_Storage_Streams.IBufferWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Bridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32 + internal typealias SwiftABI = IAsyncOperationWithProgressIBuffer_UInt32 + internal typealias SwiftProjection = AnyIAsyncOperationWithProgress + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Impl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32VTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Impl : IAsyncOperationWithProgress, AbiInterfaceImpl { + typealias TResult = test_component.AnyIBuffer? + typealias TProgress = UInt32 + typealias Bridge = __x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CStorage__CStreams__CIBuffer_UINT32Bridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.getresults) + fileprivate func getResults() throws -> test_component.AnyIBuffer? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.progress) + fileprivate var progress : AsyncOperationProgressHandler? { + get { try! _default.get_ProgressImpl() } + set { try! _default.put_ProgressImpl(newValue) } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.completed) + fileprivate var completed : AsyncOperationWithProgressCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1_boolean: test_component.IID { + .init(Data1: 0xcdb5efb3, Data2: 0x5788, Data3: 0x509d, Data4: ( 0x9b,0xe1,0x71,0xcc,0xb8,0xa3,0x36,0x2a ))// cdb5efb3-5788-509d-9be1-71ccb8a3362a +} + +internal var __x_ABI_C__FIAsyncOperation_1_booleanVTable: __x_ABI_C__FIAsyncOperation_1_booleanVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1_booleanWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1_booleanWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1_booleanWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1_booleanWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_booleanWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_booleanWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_booleanWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + $1?.initialize(to: .init(from: result)) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1_booleanWrapper = InterfaceWrapperBase +internal class IAsyncOperationBool: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1_boolean } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_boolean.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_boolean.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_booleanWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> Bool { + var result: boolean = 0 + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_boolean.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1_booleanBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1_boolean + internal typealias SwiftABI = IAsyncOperationBool + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1_booleanImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1_booleanVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1_booleanImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = Bool + typealias Bridge = __x_ABI_C__FIAsyncOperation_1_booleanBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> Bool { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1_int: test_component.IID { + .init(Data1: 0x968b9665, Data2: 0x06ed, Data3: 0x5774, Data4: ( 0x8f,0x53,0x8e,0xde,0xab,0xd5,0xf7,0xb5 ))// 968b9665-06ed-5774-8f53-8edeabd5f7b5 +} + +internal var __x_ABI_C__FIAsyncOperation_1_intVTable: __x_ABI_C__FIAsyncOperation_1_intVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1_intWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1_intWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1_intWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1_intWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_intWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_intWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_intWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + $1?.initialize(to: result) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1_intWrapper = InterfaceWrapperBase +internal class IAsyncOperationInt32: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1_int } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_int.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_int.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> Int32 { + var result: INT32 = 0 + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_int.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + } + return result + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1_intBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1_int + internal typealias SwiftABI = IAsyncOperationInt32 + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1_intImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1_intVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1_intImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = Int32 + typealias Bridge = __x_ABI_C__FIAsyncOperation_1_intBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> Int32 { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1_HSTRING: test_component.IID { + .init(Data1: 0x3e1fe603, Data2: 0xf897, Data3: 0x5263, Data4: ( 0xb3,0x28,0x08,0x06,0x42,0x6b,0x8a,0x79 ))// 3e1fe603-f897-5263-b328-0806426b8a79 +} + +internal var __x_ABI_C__FIAsyncOperation_1_HSTRINGVTable: __x_ABI_C__FIAsyncOperation_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + $1?.initialize(to: try! HString(result).detach()) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper = InterfaceWrapperBase +internal class IAsyncOperationString: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1_HSTRING } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_HSTRINGWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> String { + var result: HSTRING? + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + } + return .init(from: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1_HSTRING + internal typealias SwiftABI = IAsyncOperationString + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1_HSTRINGImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = String + typealias Bridge = __x_ABI_C__FIAsyncOperation_1_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> String { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1_UINT32: test_component.IID { + .init(Data1: 0xef60385f, Data2: 0xbe78, Data3: 0x584b, Data4: ( 0xaa,0xef,0x78,0x29,0xad,0xa2,0xb0,0xde ))// ef60385f-be78-584b-aaef-7829ada2b0de +} + +internal var __x_ABI_C__FIAsyncOperation_1_UINT32VTable: __x_ABI_C__FIAsyncOperation_1_UINT32Vtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + $1?.initialize(to: result) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1_UINT32Wrapper = InterfaceWrapperBase +internal class IAsyncOperationUInt32: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1_UINT32 } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_UINT32Wrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> UInt32 { + var result: UINT32 = 0 + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_UINT32.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + } + return result + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1_UINT32Bridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1_UINT32 + internal typealias SwiftABI = IAsyncOperationUInt32 + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1_UINT32Impl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1_UINT32VTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1_UINT32Impl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = UInt32 + typealias Bridge = __x_ABI_C__FIAsyncOperation_1_UINT32Bridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> UInt32 { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectable: test_component.IID { + .init(Data1: 0x127e39c7, Data2: 0x07c1, Data3: 0x58e5, Data4: ( 0xb4,0x8e,0x3a,0x47,0x29,0x83,0x9f,0xec ))// 127e39c7-07c1-58e5-b48e-3a4729839fec +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.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.IAsyncOperation`1>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = test_component.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase +internal class IAsyncOperationIMapString_Any: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectable } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?>?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIMap? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectable + internal typealias SwiftABI = IAsyncOperationIMapString_Any + internal typealias SwiftProjection = AnyIAsyncOperation?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = AnyIMap? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIMap_2_HSTRING_IInspectableBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> AnyIMap? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler?>? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem: test_component.IID { + .init(Data1: 0x4b1c0fd7, Data2: 0x7a01, Data3: 0x5e7a, Data4: ( 0xa6,0xfe,0xbe,0x45,0x00,0x28,0x3f,0x23 ))// 4b1c0fd7-7a01-5e7a-a6fe-be4500283f23 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.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.IAsyncOperation`1>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper = InterfaceWrapperBase +internal class IAsyncOperationIVectorViewIStorageItem: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?>?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItem + internal typealias SwiftABI = IAsyncOperationIVectorViewIStorageItem + internal typealias SwiftProjection = AnyIAsyncOperation?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = AnyIVectorView? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> AnyIVectorView? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler?>? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile: test_component.IID { + .init(Data1: 0x03362e33, Data2: 0xe413, Data3: 0x5f29, Data4: ( 0x97,0xd0,0x48,0xa4,0x78,0x09,0x35,0xf9 ))// 03362e33-e413-5f29-97d0-48a4780935f9 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.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.IAsyncOperation`1>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper = InterfaceWrapperBase +internal class IAsyncOperationIVectorViewStorageFile: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?>?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFile + internal typealias SwiftABI = IAsyncOperationIVectorViewStorageFile + internal typealias SwiftProjection = AnyIAsyncOperation?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = AnyIVectorView? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> AnyIVectorView? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler?>? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder: test_component.IID { + .init(Data1: 0xca40b21b, Data2: 0xaeb1, Data3: 0x5a61, Data4: ( 0x9e,0x08,0x3b,0xd5,0xd9,0x59,0x40,0x23 ))// ca40b21b-aeb1-5a61-9e08-3bd5d9594023 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.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.IAsyncOperation`1>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper = InterfaceWrapperBase +internal class IAsyncOperationIVectorViewStorageFolder: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?>?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolder + internal typealias SwiftABI = IAsyncOperationIVectorViewStorageFolder + internal typealias SwiftProjection = AnyIAsyncOperation?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = AnyIVectorView? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> AnyIVectorView? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler?>? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange: test_component.IID { + .init(Data1: 0x66e11b8a, Data2: 0x9003, Data3: 0x52c9, Data4: ( 0x84,0xa8,0xae,0x5c,0xce,0xbe,0x8c,0xf9 ))// 66e11b8a-9003-52c9-84a8-ae5ccebe8cf9 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.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.IAsyncOperation`1>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper = InterfaceWrapperBase +internal class IAsyncOperationIVectorViewStorageLibraryChange: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?>?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIVectorView? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChange + internal typealias SwiftABI = IAsyncOperationIVectorViewStorageLibraryChange + internal typealias SwiftProjection = AnyIAsyncOperation?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = AnyIVectorView? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageLibraryChangeBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> AnyIVectorView? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler?>? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRING: test_component.IID { + .init(Data1: 0x92b02cd3, Data2: 0xaa6e, Data3: 0x573d, Data4: ( 0xbc,0x03,0x8d,0x23,0x09,0xcb,0xa3,0xeb ))// 92b02cd3-aa6e-573d-bc03-8d2309cba3eb +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.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.IAsyncOperation`1>").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGWrapper = InterfaceWrapperBase +internal class IAsyncOperationIVectorString: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRING } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?>?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler?>? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIVector? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRING.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRING + internal typealias SwiftABI = IAsyncOperationIVectorString + internal typealias SwiftProjection = AnyIAsyncOperation?> + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = AnyIVector? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVector_1_HSTRINGBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> AnyIVector? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler?>? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties: test_component.IID { + .init(Data1: 0x5186131a, Data2: 0x4467, Data3: 0x504b, Data4: ( 0x97,0x7a,0x07,0x85,0xa8,0x23,0x04,0x85 ))// 5186131a-4467-504b-977a-0785a8230485 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper = InterfaceWrapperBase +internal class IAsyncOperationBasicProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.BasicProperties? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicProperties + internal typealias SwiftABI = IAsyncOperationBasicProperties + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.BasicProperties? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CBasicPropertiesBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.BasicProperties? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties: test_component.IID { + .init(Data1: 0x6c86e97c, Data2: 0x5699, Data3: 0x5700, Data4: ( 0x8d,0x35,0xd3,0x50,0xad,0x3e,0x4d,0xf2 ))// 6c86e97c-5699-5700-8d35-d350ad3e4df2 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper = InterfaceWrapperBase +internal class IAsyncOperationDocumentProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.DocumentProperties? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentProperties + internal typealias SwiftABI = IAsyncOperationDocumentProperties + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.DocumentProperties? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CDocumentPropertiesBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.DocumentProperties? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties: test_component.IID { + .init(Data1: 0xfcd07511, Data2: 0xe7f8, Data3: 0x5bda, Data4: ( 0x8c,0x04,0x79,0x5a,0x63,0x9d,0xae,0x8f ))// fcd07511-e7f8-5bda-8c04-795a639dae8f +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper = InterfaceWrapperBase +internal class IAsyncOperationImageProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.ImageProperties? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImageProperties + internal typealias SwiftABI = IAsyncOperationImageProperties + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.ImageProperties? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CImagePropertiesBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.ImageProperties? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties: test_component.IID { + .init(Data1: 0x0d023b76, Data2: 0x20a7, Data3: 0x56f3, Data4: ( 0x84,0xab,0xce,0x31,0xe6,0x54,0x4b,0x71 ))// 0d023b76-20a7-56f3-84ab-ce31e6544b71 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper = InterfaceWrapperBase +internal class IAsyncOperationMusicProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.MusicProperties? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicProperties + internal typealias SwiftABI = IAsyncOperationMusicProperties + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.MusicProperties? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CMusicPropertiesBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.MusicProperties? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail: test_component.IID { + .init(Data1: 0x11c7cc5e, Data2: 0xc04e, Data3: 0x50e7, Data4: ( 0xa6,0x5e,0x6f,0x69,0x03,0x69,0x0c,0x16 ))// 11c7cc5e-c04e-50e7-a65e-6f6903690c16 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper = InterfaceWrapperBase +internal class IAsyncOperationStorageItemThumbnail: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.StorageItemThumbnail? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnail + internal typealias SwiftABI = IAsyncOperationStorageItemThumbnail + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.StorageItemThumbnail? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CStorageItemThumbnailBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.StorageItemThumbnail? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties: test_component.IID { + .init(Data1: 0x447d4590, Data2: 0xd3f9, Data3: 0x58bf, Data4: ( 0xac,0x58,0x6f,0x9a,0x50,0x83,0x9e,0xfe ))// 447d4590-d3f9-58bf-ac58-6f9a50839efe +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper = InterfaceWrapperBase +internal class IAsyncOperationVideoProperties: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.VideoProperties? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoProperties + internal typealias SwiftABI = IAsyncOperationVideoProperties + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.VideoProperties? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CFileProperties__CVideoPropertiesBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.VideoProperties? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItem: test_component.IID { + .init(Data1: 0x5fc9c137, Data2: 0xebb7, Data3: 0x5e6c, Data4: ( 0x9c,0xba,0x68,0x6f,0x2e,0xc2,0xb0,0xbb ))// 5fc9c137-ebb7-5e6c-9cba-686f2ec2b0bb +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = __ABI_Windows_Storage.IStorageItemWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper = InterfaceWrapperBase +internal class IAsyncOperationIStorageItem: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItem } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIStorageItem? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItem.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return __ABI_Windows_Storage.IStorageItemWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItem + internal typealias SwiftABI = IAsyncOperationIStorageItem + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.AnyIStorageItem? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CIStorageItemBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.AnyIStorageItem? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState: test_component.IID { + .init(Data1: 0x88694b1f, Data2: 0xf380, Data3: 0x574d, Data4: ( 0x8a,0x05,0x4f,0x67,0xbd,0x52,0xcd,0x11 ))// 88694b1f-f380-574d-8a05-4f67bd52cd11 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + $1?.initialize(to: result) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper = InterfaceWrapperBase +internal class IAsyncOperationIndexedState: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.IndexedState { + var result: __x_ABI_CWindows_CStorage_CSearch_CIndexedState = .init(0) + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + } + return result + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedState + internal typealias SwiftABI = IAsyncOperationIndexedState + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.IndexedState + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.IndexedState { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFile: test_component.IID { + .init(Data1: 0x5e52f8ce, Data2: 0xaced, Data3: 0x5a42, Data4: ( 0x95,0xb4,0xf6,0x74,0xdd,0x84,0x88,0x5e ))// 5e52f8ce-aced-5a42-95b4-f674dd84885e +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileWrapper = InterfaceWrapperBase +internal class IAsyncOperationStorageFile: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFile } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.StorageFile? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFile.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFile + internal typealias SwiftABI = IAsyncOperationStorageFile + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.StorageFile? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFileBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.StorageFile? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } + } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } +} + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolder: test_component.IID { + .init(Data1: 0x6be9e7d7, Data2: 0xe83a, Data3: 0x5cbc, Data4: ( 0x80,0x2c,0x17,0x68,0x96,0x0b,0x52,0xc3 ))// 6be9e7d7-e83a-5cbc-802c-1768960b52c3 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } + } +) +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper = InterfaceWrapperBase +internal class IAsyncOperationStorageFolder: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolder } + + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.StorageFolder? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolder.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } + } + return .from(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolder + internal typealias SwiftABI = IAsyncOperationStorageFolder + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} + +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.StorageFolder? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageFolderBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.StorageFolder? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.clear) - fileprivate func clear() { - try! _default.ClearImpl() + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.size) - fileprivate var size : UInt32 { - get { try! _default.get_SizeImpl() } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() } - private lazy var _IIterable: IIterableIBasic! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivector-1.first) - fileprivate func first() -> AnyIIterator? { - try! _IIterable.FirstImpl() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } } public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable: test_component.IID { - .init(Data1: 0x24f981e5, Data2: 0xddca, Data3: 0x538d, Data4: ( 0xaa,0xda,0xa5,0x99,0x06,0x08,0x4c,0xf1 ))// 24f981e5-ddca-538d-aada-a59906084cf1 +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction: test_component.IID { + .init(Data1: 0x0d81405a, Data2: 0x9bd3, Data3: 0x5e87, Data4: ( 0x82,0xf4,0x9b,0x41,0x28,0xa8,0x87,0xeb ))// 0d81405a-9bd3-5e87-82f4-9b4128a887eb } -internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable { - static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVTable) { $0 } - return .init(lpVtbl:vtblPtr) - } -} +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.IID + iids[3] = __ABI_Windows_Foundation.IAsyncInfoWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, -internal var __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVTable: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.release($0) }, - Invoke: { - guard let __unwrapped__instance = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let sender: test_component.AnyIObservableMap? = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) - let event: test_component.AnyIMapChangedEventArgs? = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance(sender, event) + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper(result) + resultWrapper?.copyTo($1) return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + result?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } } ) -typealias __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase -internal class MapChangedEventHandlerString_Any: test_component.IUnknown { - override public class var IID: test_component.IID { IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable } +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper = InterfaceWrapperBase +internal class IAsyncOperationStorageStreamTransaction: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction } - internal func InvokeImpl(_ sender: test_component.AnyIObservableMap?, _ event: test_component.AnyIMapChangedEventArgs?) throws { - let senderWrapper = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper(sender) - let _sender = try! senderWrapper?.toABI { $0 } - let eventWrapper = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper(event) - let _event = try! eventWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) } } -} - -internal class __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableBridge : WinRTDelegateBridge { - internal typealias Handler = MapChangedEventHandler - internal typealias CABI = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable - internal typealias SwiftABI = test_component.MapChangedEventHandlerString_Any + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionWrapper.unwrapFrom(abi: result) + } - internal static func from(abi: ComPtr?) -> Handler? { - guard let abi = abi else { return nil } - let _default = SwiftABI(abi) - let handler: Handler = { (sender, event) in - try! _default.InvokeImpl(sender, event) + internal func GetResultsImpl() throws -> test_component.StorageStreamTransaction? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } } - return handler + return .from(abi: result) } + } -private var IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING: test_component.IID { - .init(Data1: 0xe2663f37, Data2: 0x2e1b, Data3: 0x500c, Data4: ( 0xad,0x68,0xc3,0xed,0x7a,0x8f,0x74,0xc8 ))// e2663f37-2e1b-500c-ad68-c3ed7a8f74c8 + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransaction + internal typealias SwiftABI = IAsyncOperationStorageStreamTransaction + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } } -internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING { - static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVTable) { $0 } - return .init(lpVtbl:vtblPtr) +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.StorageStreamTransaction? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStorageStreamTransactionBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } + + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.StorageStreamTransaction? { + try _default.GetResultsImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } + + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -internal var __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVTable: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVtbl = .init( - QueryInterface: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.addRef($0) }, - Release: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.release($0) }, - Invoke: { - guard let __unwrapped__instance = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let sender: test_component.AnyIObservableMap? = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) - let event: test_component.AnyIMapChangedEventArgs? = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance(sender, event) +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer: test_component.IID { + .init(Data1: 0x3bee8834, Data2: 0xb9a7, Data3: 0x5a80, Data4: ( 0xa7,0x46,0x5e,0xf0,0x97,0x22,0x78,0x78 ))// 3bee8834-b9a7-5a80-a746-5ef097227878 +} + +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper(result) + resultWrapper?.copyTo($1) return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = __ABI_Windows_Storage_Streams.IBufferWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } } ) -typealias __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase -internal class MapChangedEventHandlerString_String: test_component.IUnknown { - override public class var IID: test_component.IID { IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING } +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper = InterfaceWrapperBase +internal class IAsyncOperationIBuffer: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer } - internal func InvokeImpl(_ sender: test_component.AnyIObservableMap?, _ event: test_component.AnyIMapChangedEventArgs?) throws { - let senderWrapper = test_component.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper(sender) - let _sender = try! senderWrapper?.toABI { $0 } - let eventWrapper = test_component.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper(event) - let _event = try! eventWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) + } + } + + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIBufferWrapper.unwrapFrom(abi: result) + } + + internal func GetResultsImpl() throws -> test_component.AnyIBuffer? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } } + return __ABI_Windows_Storage_Streams.IBufferWrapper.unwrapFrom(abi: result) + } + +} + +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBuffer + internal typealias SwiftABI = IAsyncOperationIBuffer + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferImpl(abi) } + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } } -internal class __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGBridge : WinRTDelegateBridge { - internal typealias Handler = MapChangedEventHandler - internal typealias CABI = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING - internal typealias SwiftABI = test_component.MapChangedEventHandlerString_String +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.AnyIBuffer? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIBufferBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) + } - internal static func from(abi: ComPtr?) -> Handler? { - guard let abi = abi else { return nil } - let _default = SwiftABI(abi) - let handler: Handler = { (sender, event) in - try! _default.InvokeImpl(sender, event) - } - return handler + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.AnyIBuffer? { + try _default.GetResultsImpl() } -} -private var IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase: test_component.IID { - .init(Data1: 0x4175f8a0, Data2: 0x51bf, Data3: 0x561d, Data4: ( 0xbe,0xaf,0x41,0x55,0x41,0xdb,0xbf,0x69 ))// 4175f8a0-51bf-561d-beaf-415541dbbf69 -} -internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase { - static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseVTable) { $0 } - return .init(lpVtbl:vtblPtr) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } } -} -internal var __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseVTable: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseVtbl = .init( - QueryInterface: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.addRef($0) }, - Release: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.release($0) }, - Invoke: { - guard let __unwrapped__instance = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let sender: test_component.AnyIObservableVector? = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper.unwrapFrom(abi: ComPtr($1)) - let event: test_component.AnyIVectorChangedEventArgs? = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance(sender, event) - return S_OK + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() } -) -typealias __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseWrapper = InterfaceWrapperBase -internal class VectorChangedEventHandlerBase: test_component.IUnknown { - override public class var IID: test_component.IID { IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase } - internal func InvokeImpl(_ sender: test_component.AnyIObservableVector?, _ event: test_component.AnyIVectorChangedEventArgs?) throws { - let senderWrapper = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CBaseWrapper(sender) - let _sender = try! senderWrapper?.toABI { $0 } - let eventWrapper = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper(event) - let _event = try! eventWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) - } + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() } -} + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } -internal class __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBaseBridge : WinRTDelegateBridge { - internal typealias Handler = VectorChangedEventHandler - internal typealias CABI = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CBase - internal typealias SwiftABI = test_component.VectorChangedEventHandlerBase + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } - internal static func from(abi: ComPtr?) -> Handler? { - guard let abi = abi else { return nil } - let _default = SwiftABI(abi) - let handler: Handler = { (sender, event) in - try! _default.InvokeImpl(sender, event) - } - return handler + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } } -} -private var IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic: test_component.IID { - .init(Data1: 0xea4e2c41, Data2: 0x3051, Data3: 0x539a, Data4: ( 0xa0,0xde,0x7e,0x2e,0x2c,0xb0,0xdb,0xf8 ))// ea4e2c41-3051-539a-a0de-7e2e2cb0dbf8 + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic { - static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicVTable) { $0 } - return .init(lpVtbl:vtblPtr) - } +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream: test_component.IID { + .init(Data1: 0xa8fe0732, Data2: 0x556d, Data3: 0x5841, Data4: ( 0xb7,0xee,0xb3,0x45,0x0f,0xb5,0x26,0x66 ))// a8fe0732-556d-5841-b7ee-b3450fb52666 } -internal var __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicVTable: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicVtbl = .init( - QueryInterface: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.addRef($0) }, - Release: { __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.release($0) }, - Invoke: { - guard let __unwrapped__instance = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let sender: test_component.AnyIObservableVector? = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper.unwrapFrom(abi: ComPtr($1)) - let event: test_component.AnyIVectorChangedEventArgs? = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance(sender, event) +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.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.IAsyncOperation`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + put_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + __unwrapped__instance.completed = handler + return S_OK + }, + + get_Completed: { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance.completed + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper(result) + resultWrapper?.copyTo($1) return S_OK + }, + + GetResults: { + do { + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = try __unwrapped__instance.getResults() + let resultWrapper = __ABI_Windows_Storage_Streams.IInputStreamWrapper(result) + resultWrapper?.copyTo($1) + return S_OK + } catch { return failWith(err: E_FAIL) } } ) -typealias __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicWrapper = InterfaceWrapperBase -internal class VectorChangedEventHandlerIBasic: test_component.IUnknown { - override public class var IID: test_component.IID { IID___x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic } +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper = InterfaceWrapperBase +internal class IAsyncOperationIInputStream: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream } - internal func InvokeImpl(_ sender: test_component.AnyIObservableVector?, _ event: test_component.AnyIVectorChangedEventArgs?) throws { - let senderWrapper = test_component.__x_ABI_C__FIObservableVector_1___x_ABI_Ctest__zcomponent__CIBasicWrapper(sender) - let _sender = try! senderWrapper?.toABI { $0 } - let eventWrapper = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgsWrapper(event) - let _event = try! eventWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper(handler) + let _handler = try! handlerWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) } } -} - -internal class __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasicBridge : WinRTDelegateBridge { - internal typealias Handler = VectorChangedEventHandler - internal typealias CABI = __x_ABI_C__FVectorChangedEventHandler_1___x_ABI_Ctest__zcomponent__CIBasic - internal typealias SwiftABI = test_component.VectorChangedEventHandlerIBasic + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) + } + } + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamWrapper.unwrapFrom(abi: result) + } - internal static func from(abi: ComPtr?) -> Handler? { - guard let abi = abi else { return nil } - let _default = SwiftABI(abi) - let handler: Handler = { (sender, event) in - try! _default.InvokeImpl(sender, event) + internal func GetResultsImpl() throws -> test_component.AnyIInputStream? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } } - return handler + return __ABI_Windows_Storage_Streams.IInputStreamWrapper.unwrapFrom(abi: result) } -} -private var IID___x_ABI_C__FIEventHandler_1_IInspectable: test_component.IID { - .init(Data1: 0xc50898f6, Data2: 0xc536, Data3: 0x5f47, Data4: ( 0x85,0x83,0x8b,0x2c,0x24,0x38,0xa1,0x3b ))// c50898f6-c536-5f47-8583-8b2c2438a13b + } -internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FIEventHandler_1_IInspectable { - static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FIEventHandler_1_IInspectableVTable) { $0 } - return .init(lpVtbl:vtblPtr) +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStream + internal typealias SwiftABI = IAsyncOperationIInputStream + internal typealias SwiftProjection = AnyIAsyncOperation + internal static func from(abi: ComPtr?) -> SwiftProjection? { + guard let abi = abi else { return nil } + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamImpl(abi) + } + + internal static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamVTable) { $0 } + return .init(lpVtbl: vtblPtr) } } -internal var __x_ABI_C__FIEventHandler_1_IInspectableVTable: __x_ABI_C__FIEventHandler_1_IInspectableVtbl = .init( - QueryInterface: { __x_ABI_C__FIEventHandler_1_IInspectableWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIEventHandler_1_IInspectableWrapper.addRef($0) }, - Release: { __x_ABI_C__FIEventHandler_1_IInspectableWrapper.release($0) }, - Invoke: { - guard let __unwrapped__instance = __x_ABI_C__FIEventHandler_1_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let sender: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1)) - let args: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) - __unwrapped__instance(sender, args) - return S_OK +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.AnyIInputStream? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIInputStreamBridge + let _default: Bridge.SwiftABI + init(_ fromAbi: ComPtr) { + _default = Bridge.SwiftABI(fromAbi) } -) -typealias __x_ABI_C__FIEventHandler_1_IInspectableWrapper = InterfaceWrapperBase -internal class EventHandlerAny: test_component.IUnknown { - override public class var IID: test_component.IID { IID___x_ABI_C__FIEventHandler_1_IInspectable } - internal func InvokeImpl(_ sender: Any?, _ args: Any?) throws { - let senderWrapper = __ABI_.AnyWrapper(sender) - let _sender = try! senderWrapper?.toABI { $0 } - let argsWrapper = __ABI_.AnyWrapper(args) - let _args = try! argsWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIEventHandler_1_IInspectable.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _args)) - } + // MARK: WinRT + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.AnyIInputStream? { + try _default.GetResultsImpl() } -} + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { + get { try! _default.get_CompletedImpl() } + set { try! _default.put_CompletedImpl(newValue) } + } -internal class __x_ABI_C__FIEventHandler_1_IInspectableBridge : WinRTDelegateBridge { - internal typealias Handler = EventHandler - internal typealias CABI = __x_ABI_C__FIEventHandler_1_IInspectable - internal typealias SwiftABI = test_component.EventHandlerAny + private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) + fileprivate func cancel() throws { + try _IAsyncInfo.CancelImpl() + } - internal static func from(abi: ComPtr?) -> Handler? { - guard let abi = abi else { return nil } - let _default = SwiftABI(abi) - let handler: Handler = { (sender, args) in - try! _default.InvokeImpl(sender, args) - } - return handler + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) + fileprivate func close() throws { + try _IAsyncInfo.CloseImpl() + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) + fileprivate var errorCode : HRESULT { + get { try! _IAsyncInfo.get_ErrorCodeImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) + fileprivate var id : UInt32 { + get { try! _IAsyncInfo.get_IdImpl() } + } + + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) + fileprivate var status : test_component.AsyncStatus { + get { try! _IAsyncInfo.get_StatusImpl() } } + + public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIAsyncOperationWithProgress_2_int_double: test_component.IID { - .init(Data1: 0x17c0e85a, Data2: 0x64cb, Data3: 0x593a, Data4: ( 0x8e,0x4d,0x90,0x1c,0xa8,0x38,0xaa,0x92 ))// 17c0e85a-64cb-593a-8e4d-901ca838aa92 + +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream: test_component.IID { + .init(Data1: 0x430ecece, Data2: 0x1418, Data3: 0x5d19, Data4: ( 0x81,0xb2,0x5d,0xdb,0x38,0x16,0x03,0xcc ))// 430ecece-1418-5d19-81b2-5ddb381603cc } -internal var __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVTable: __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVtbl = .init( - QueryInterface: { __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.addRef($0) }, - Release: { __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.release($0) }, +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.IID iids[3] = __ABI_Windows_Foundation.IAsyncInfoWrapper.IID $1!.pointee = 4 $2!.pointee = iids @@ -6789,7 +15966,7 @@ internal var __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVTable: __x_ABI GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.IAsyncOperationWithProgress`2").detach() + let hstring = try! HString("Windows.Foundation.IAsyncOperation`1").detach() $1!.pointee = hstring return S_OK }, @@ -6800,157 +15977,120 @@ internal var __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVTable: __x_ABI return S_OK }, - put_Progress: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - guard let handler = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } - __unwrapped__instance.progress = handler - return S_OK - }, - - get_Progress: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - let result = __unwrapped__instance.progress - let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper(result) - resultWrapper?.copyTo($1) - return S_OK - }, - put_Completed: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - guard let handler = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } __unwrapped__instance.completed = handler return S_OK }, get_Completed: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.completed - let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper(result) + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper(result) resultWrapper?.copyTo($1) return S_OK }, GetResults: { do { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = try __unwrapped__instance.getResults() - $1?.initialize(to: result) + let resultWrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper(result) + resultWrapper?.copyTo($1) return S_OK } catch { return failWith(err: E_FAIL) } } ) -typealias __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleWrapper = InterfaceWrapperBase -internal class IAsyncOperationWithProgressInt32_Double: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperationWithProgress_2_int_double } - - internal func put_ProgressImpl(_ handler: AsyncOperationProgressHandler?) throws { - let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper(handler) - let _handler = try! handlerWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.put_Progress(pThis, _handler)) - } - } - - internal func get_ProgressImpl() throws -> AsyncOperationProgressHandler? { - let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.get_Progress(pThis, &resultAbi)) - } - } - return test_component.__x_ABI_C__FIAsyncOperationProgressHandler_2_int_doubleWrapper.unwrapFrom(abi: result) - } +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper = InterfaceWrapperBase +internal class IAsyncOperationIRandomAccessStream: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream } - internal func put_CompletedImpl(_ handler: AsyncOperationWithProgressCompletedHandler?) throws { - let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper(handler) + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) } } - internal func get_CompletedImpl() throws -> AsyncOperationWithProgressCompletedHandler? { + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) } } - return test_component.__x_ABI_C__FIAsyncOperationWithProgressCompletedHandler_2_int_doubleWrapper.unwrapFrom(abi: result) + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWrapper.unwrapFrom(abi: result) } - internal func GetResultsImpl() throws -> Int32 { - var result: INT32 = 0 - _ = try perform(as: __x_ABI_C__FIAsyncOperationWithProgress_2_int_double.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + internal func GetResultsImpl() throws -> test_component.AnyIRandomAccessStream? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } } - return result + return __ABI_Windows_Storage_Streams.IRandomAccessStreamWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIAsyncOperationWithProgress_2_int_double - internal typealias SwiftABI = IAsyncOperationWithProgressInt32_Double - internal typealias SwiftProjection = AnyIAsyncOperationWithProgress +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStream + internal typealias SwiftABI = IAsyncOperationIRandomAccessStream + internal typealias SwiftProjection = AnyIAsyncOperation internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleImpl(abi) + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleImpl : IAsyncOperationWithProgress, AbiInterfaceImpl { - typealias TResult = Int32 - typealias TProgress = Double - typealias Bridge = __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleBridge +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.AnyIRandomAccessStream? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.getresults) - fileprivate func getResults() throws -> Int32 { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) + fileprivate func getResults() throws -> test_component.AnyIRandomAccessStream? { try _default.GetResultsImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.progress) - fileprivate var progress : AsyncOperationProgressHandler? { - get { try! _default.get_ProgressImpl() } - set { try! _default.put_ProgressImpl(newValue) } - } - - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.completed) - fileprivate var completed : AsyncOperationWithProgressCompletedHandler? { + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) + fileprivate var completed : AsyncOperationCompletedHandler? { get { try! _default.get_CompletedImpl() } set { try! _default.put_CompletedImpl(newValue) } } private lazy var _IAsyncInfo: __ABI_Windows_Foundation.IAsyncInfo! = getInterfaceForCaching() - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.cancel) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.cancel) fileprivate func cancel() throws { try _IAsyncInfo.CancelImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.close) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.close) fileprivate func close() throws { try _IAsyncInfo.CloseImpl() } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.errorcode) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.errorcode) fileprivate var errorCode : HRESULT { get { try! _IAsyncInfo.get_ErrorCodeImpl() } } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.id) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.id) fileprivate var id : UInt32 { get { try! _IAsyncInfo.get_IdImpl() } } - /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperationwithprogress-2.status) + /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.status) fileprivate var status : test_component.AsyncStatus { get { try! _IAsyncInfo.get_StatusImpl() } } @@ -6958,20 +16098,20 @@ fileprivate class __x_ABI_C__FIAsyncOperationWithProgress_2_int_doubleImpl : IAs public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } -private var IID___x_ABI_C__FIAsyncOperation_1_int: test_component.IID { - .init(Data1: 0x968b9665, Data2: 0x06ed, Data3: 0x5774, Data4: ( 0x8f,0x53,0x8e,0xde,0xab,0xd5,0xf7,0xb5 ))// 968b9665-06ed-5774-8f53-8edeabd5f7b5 +private var IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType: test_component.IID { + .init(Data1: 0xc4a57c5e, Data2: 0x32b0, Data3: 0x55b3, Data4: ( 0xad,0x13,0xce,0x1c,0x23,0x04,0x1e,0xd6 ))// c4a57c5e-32b0-55b3-ad13-ce1c23041ed6 } -internal var __x_ABI_C__FIAsyncOperation_1_intVTable: __x_ABI_C__FIAsyncOperation_1_intVtbl = .init( - QueryInterface: { __x_ABI_C__FIAsyncOperation_1_intWrapper.queryInterface($0, $1, $2) }, - AddRef: { __x_ABI_C__FIAsyncOperation_1_intWrapper.addRef($0) }, - Release: { __x_ABI_C__FIAsyncOperation_1_intWrapper.release($0) }, +internal var __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeVTable: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeVtbl = .init( + QueryInterface: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.addRef($0) }, + Release: { __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID - iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1_intWrapper.IID + iids[2] = test_component.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.IID iids[3] = __ABI_Windows_Foundation.IAsyncInfoWrapper.IID $1!.pointee = 4 $2!.pointee = iids @@ -6980,7 +16120,7 @@ internal var __x_ABI_C__FIAsyncOperation_1_intVTable: __x_ABI_C__FIAsyncOperatio GetRuntimeClassName: { _ = $0 - let hstring = try! HString("Windows.Foundation.IAsyncOperation`1").detach() + let hstring = try! HString("Windows.Foundation.IAsyncOperation`1").detach() $1!.pointee = hstring return S_OK }, @@ -6992,78 +16132,80 @@ internal var __x_ABI_C__FIAsyncOperation_1_intVTable: __x_ABI_C__FIAsyncOperatio }, put_Completed: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_intWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } - guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let handler = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } __unwrapped__instance.completed = handler return S_OK }, get_Completed: { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_intWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.completed - let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper(result) + let resultWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper(result) resultWrapper?.copyTo($1) return S_OK }, GetResults: { do { - guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1_intWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + guard let __unwrapped__instance = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = try __unwrapped__instance.getResults() - $1?.initialize(to: result) + let resultWrapper = __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeWrapper(result) + resultWrapper?.copyTo($1) return S_OK } catch { return failWith(err: E_FAIL) } } ) -typealias __x_ABI_C__FIAsyncOperation_1_intWrapper = InterfaceWrapperBase -internal class IAsyncOperationInt32: test_component.IInspectable { - override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1_int } +typealias __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper = InterfaceWrapperBase +internal class IAsyncOperationIRandomAccessStreamWithContentType: test_component.IInspectable { + override public class var IID: test_component.IID { IID___x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType } - internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { - let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper(handler) + internal func put_CompletedImpl(_ handler: AsyncOperationCompletedHandler?) throws { + let handlerWrapper = test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } - _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_int.self) { pThis in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_Completed(pThis, _handler)) } } - internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { + internal func get_CompletedImpl() throws -> AsyncOperationCompletedHandler? { let (result) = try ComPtrs.initialize { resultAbi in - _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_int.self) { pThis in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completed(pThis, &resultAbi)) } } - return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1_intWrapper.unwrapFrom(abi: result) + return test_component.__x_ABI_C__FIAsyncOperationCompletedHandler_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeWrapper.unwrapFrom(abi: result) } - internal func GetResultsImpl() throws -> Int32 { - var result: INT32 = 0 - _ = try perform(as: __x_ABI_C__FIAsyncOperation_1_int.self) { pThis in - try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &result)) + internal func GetResultsImpl() throws -> test_component.AnyIRandomAccessStreamWithContentType? { + let (result) = try ComPtrs.initialize { resultAbi in + _ = try perform(as: __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.GetResults(pThis, &resultAbi)) + } } - return result + return __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeWrapper.unwrapFrom(abi: result) } } -internal enum __x_ABI_C__FIAsyncOperation_1_intBridge : AbiInterfaceBridge { - internal typealias CABI = __x_ABI_C__FIAsyncOperation_1_int - internal typealias SwiftABI = IAsyncOperationInt32 - internal typealias SwiftProjection = AnyIAsyncOperation +internal enum __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeBridge : AbiInterfaceBridge { + internal typealias CABI = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentType + internal typealias SwiftABI = IAsyncOperationIRandomAccessStreamWithContentType + internal typealias SwiftProjection = AnyIAsyncOperation internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } - return __x_ABI_C__FIAsyncOperation_1_intImpl(abi) + return __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeImpl(abi) } internal static func makeAbi() -> CABI { - let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1_intVTable) { $0 } + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeVTable) { $0 } return .init(lpVtbl: vtblPtr) } } -fileprivate class __x_ABI_C__FIAsyncOperation_1_intImpl : IAsyncOperation, AbiInterfaceImpl { - typealias TResult = Int32 - typealias Bridge = __x_ABI_C__FIAsyncOperation_1_intBridge +fileprivate class __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeImpl : IAsyncOperation, AbiInterfaceImpl { + typealias TResult = test_component.AnyIRandomAccessStreamWithContentType? + typealias Bridge = __x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CStreams__CIRandomAccessStreamWithContentTypeBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) @@ -7071,12 +16213,12 @@ fileprivate class __x_ABI_C__FIAsyncOperation_1_intImpl : IAsyncOperation, AbiIn // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.getresults) - fileprivate func getResults() throws -> Int32 { + fileprivate func getResults() throws -> test_component.AnyIRandomAccessStreamWithContentType? { try _default.GetResultsImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.iasyncoperation-1.completed) - fileprivate var completed : AsyncOperationCompletedHandler? { + fileprivate var completed : AsyncOperationCompletedHandler? { get { try! _default.get_CompletedImpl() } set { try! _default.put_CompletedImpl(newValue) } } @@ -7110,6 +16252,64 @@ fileprivate class __x_ABI_C__FIAsyncOperation_1_intImpl : IAsyncOperation, AbiIn public func queryInterface(_ iid: test_component.IID) -> IUnknownRef? { nil } } +private var IID___x_ABI_C__FIReference_1_double: test_component.IID { + .init(Data1: 0x2f2d6c29, Data2: 0x5473, Data3: 0x5f3e, Data4: ( 0x92,0xe7,0x96,0x57,0x2b,0xb9,0x90,0xe2 ))// 2f2d6c29-5473-5f3e-92e7-96572bb990e2 +} + +internal enum __x_ABI_C__FIReference_1_doubleBridge: ReferenceBridge { + typealias CABI = __x_ABI_C__FIReference_1_double + typealias SwiftProjection = Double + static var IID: test_component.IID { IID___x_ABI_C__FIReference_1_double } + + static func from(abi: ComPtr?) -> SwiftProjection? { + guard let val = abi else { return nil } + var result: DOUBLE = 0.0 + try! CHECKED(val.get().pointee.lpVtbl.pointee.get_Value(val.get(), &result)) + return result + } + + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIReference_1_doubleVTable) { $0 } + return .init(lpVtbl: vtblPtr) + } +} +internal var __x_ABI_C__FIReference_1_doubleVTable: __x_ABI_C__FIReference_1_doubleVtbl = .init( + QueryInterface: { __x_ABI_C__FIReference_1_doubleWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FIReference_1_doubleWrapper.addRef($0) }, + Release: { __x_ABI_C__FIReference_1_doubleWrapper.release($0) }, + GetIids: { + let size = MemoryLayout.size + let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: test_component.IID.self) + iids[0] = IUnknown.IID + iids[1] = IInspectable.IID + iids[2] = test_component.__x_ABI_C__FIReference_1_doubleWrapper.IID + iids[3] = __ABI_Windows_Foundation.IPropertyValueWrapper.IID + $1!.pointee = 4 + $2!.pointee = iids + return S_OK + }, + + GetRuntimeClassName: { + _ = $0 + let hstring = try! HString("Windows.Foundation.IReference`1").detach() + $1!.pointee = hstring + return S_OK + }, + + GetTrustLevel: { + _ = $0 + $1!.pointee = TrustLevel(rawValue: 0) + return S_OK + }, + + get_Value: { + guard let __unwrapped__instance = __x_ABI_C__FIReference_1_doubleWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let result = __unwrapped__instance + $1?.initialize(to: result) + return S_OK + } +) +typealias __x_ABI_C__FIReference_1_doubleWrapper = ReferenceWrapperBase private var IID___x_ABI_C__FIReference_1_GUID: test_component.IID { .init(Data1: 0x7d50f649, Data2: 0x632c, Data3: 0x51f9, Data4: ( 0x84,0x9a,0xee,0x49,0x42,0x89,0x33,0xea ))// 7d50f649-632c-51f9-849a-ee49428933ea } @@ -7284,6 +16484,112 @@ internal var __x_ABI_C__FIReference_1___x_ABI_Ctest__zcomponent__CSignedVTable: } ) typealias __x_ABI_C__FIReference_1___x_ABI_Ctest__zcomponent__CSignedWrapper = ReferenceWrapperBase +private var IID___x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable: test_component.IID { + .init(Data1: 0xf4637d4a, Data2: 0x0760, Data3: 0x5431, Data4: ( 0xbf,0xc0,0x24,0xeb,0x1d,0x4f,0x6c,0x4f ))// f4637d4a-0760-5431-bfc0-24eb1d4f6c4f +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableVTable: __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let sender: test_component.AnyIMemoryBufferReference? = __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper.unwrapFrom(abi: ComPtr($1)) + let args: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance(sender, args) + return S_OK + } +) +typealias __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper = InterfaceWrapperBase +internal class TypedEventHandlerIMemoryBufferReference_Any: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable } + + internal func InvokeImpl(_ sender: test_component.AnyIMemoryBufferReference?, _ args: Any?) throws { + let senderWrapper = __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper(sender) + let _sender = try! senderWrapper?.toABI { $0 } + let argsWrapper = __ABI_.AnyWrapper(args) + let _args = try! argsWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _args)) + } + } + +} + +internal class __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableBridge : WinRTDelegateBridge { + internal typealias Handler = TypedEventHandler + internal typealias CABI = __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable + internal typealias SwiftABI = test_component.TypedEventHandlerIMemoryBufferReference_Any + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (sender, args) in + try! _default.InvokeImpl(sender, args) + } + return handler + } +} +private var IID___x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectable: test_component.IID { + .init(Data1: 0x4ba22861, Data2: 0x00c4, Data3: 0x597f, Data4: ( 0xb6,0xbf,0x3a,0xf5,0x16,0xf3,0xb8,0x70 ))// 4ba22861-00c4-597f-b6bf-3af516f3b870 +} + +internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectable { + static func makeAbi() -> CABI { + let vtblPtr = withUnsafeMutablePointer(to: &test_component.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableVTable) { $0 } + return .init(lpVtbl:vtblPtr) + } +} + +internal var __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableVTable: __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableVtbl = .init( + QueryInterface: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper.queryInterface($0, $1, $2) }, + AddRef: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper.addRef($0) }, + Release: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper.release($0) }, + Invoke: { + guard let __unwrapped__instance = __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } + let sender: test_component.AnyIStorageQueryResultBase? = __ABI_Windows_Storage_Search.IStorageQueryResultBaseWrapper.unwrapFrom(abi: ComPtr($1)) + let args: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) + __unwrapped__instance(sender, args) + return S_OK + } +) +typealias __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableWrapper = InterfaceWrapperBase +internal class TypedEventHandlerIStorageQueryResultBase_Any: test_component.IUnknown { + override public class var IID: test_component.IID { IID___x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectable } + + internal func InvokeImpl(_ sender: test_component.AnyIStorageQueryResultBase?, _ args: Any?) throws { + let senderWrapper = __ABI_Windows_Storage_Search.IStorageQueryResultBaseWrapper(sender) + let _sender = try! senderWrapper?.toABI { $0 } + let argsWrapper = __ABI_.AnyWrapper(args) + let _args = try! argsWrapper?.toABI { $0 } + _ = try perform(as: __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectable.self) { pThis in + try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _args)) + } + } + +} + +internal class __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectableBridge : WinRTDelegateBridge { + internal typealias Handler = TypedEventHandler + internal typealias CABI = __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CStorage__CSearch__CIStorageQueryResultBase_IInspectable + internal typealias SwiftABI = test_component.TypedEventHandlerIStorageQueryResultBase_Any + + internal static func from(abi: ComPtr?) -> Handler? { + guard let abi = abi else { return nil } + let _default = SwiftABI(abi) + let handler: Handler = { (sender, args) in + try! _default.InvokeImpl(sender, args) + } + return handler + } +} private var IID___x_ABI_C__FITypedEventHandler_2___x_ABI_Ctest__zcomponent__CClass___x_ABI_Ctest__zcomponent__CDeferrableEventArgs: test_component.IID { .init(Data1: 0x60e30bb2, Data2: 0x55fe, Data3: 0x5e7e, Data4: ( 0xb1,0xe6,0xf9,0xba,0x28,0x90,0x0a,0x82 ))// 60e30bb2-55fe-5e7e-b1e6-f9ba28900a82 } @@ -7390,3 +16696,19 @@ public extension EventSource where Handler == EventHandler { } } +public extension EventSource where Handler == TypedEventHandler { + func invoke(_ sender: test_component.AnyIMemoryBufferReference!, _ args: Any!) { + for handler in getInvocationList() { + handler(sender, args) + } + } +} + +public extension EventSource where Handler == TypedEventHandler { + func invoke(_ sender: test_component.AnyIStorageQueryResultBase!, _ args: Any!) { + for handler in getInvocationList() { + handler(sender, args) + } + } +} + diff --git a/tests/test_component/Sources/test_component/test_component+MakeFromAbi.swift b/tests/test_component/Sources/test_component/test_component+MakeFromAbi.swift index fbd0f563..d1aae6a0 100644 --- a/tests/test_component/Sources/test_component/test_component+MakeFromAbi.swift +++ b/tests/test_component/Sources/test_component/test_component+MakeFromAbi.swift @@ -18,11 +18,26 @@ fileprivate func makeIClosableFrom(abi: test_component.IInspectable) -> Any { return __IMPL_Windows_Foundation.IClosableBridge.from(abi: RawPointer(swiftAbi))! } +fileprivate func makeIMemoryBufferFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Foundation.IMemoryBuffer = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IMemoryBufferBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIMemoryBufferReferenceFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Foundation.IMemoryBufferReference = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IMemoryBufferReferenceBridge.from(abi: RawPointer(swiftAbi))! +} + fileprivate func makeIStringableFrom(abi: test_component.IInspectable) -> Any { let swiftAbi: __ABI_Windows_Foundation.IStringable = try! abi.QueryInterface() return __IMPL_Windows_Foundation.IStringableBridge.from(abi: RawPointer(swiftAbi))! } +fileprivate func makeIWwwFormUrlDecoderEntryFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Foundation.IWwwFormUrlDecoderEntry = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IWwwFormUrlDecoderEntryBridge.from(abi: RawPointer(swiftAbi))! +} + fileprivate func makeIPropertySetFrom(abi: test_component.IInspectable) -> Any { let swiftAbi: __ABI_Windows_Foundation_Collections.IPropertySet = try! abi.QueryInterface() return __IMPL_Windows_Foundation_Collections.IPropertySetBridge.from(abi: RawPointer(swiftAbi))! @@ -33,6 +48,116 @@ fileprivate func makeIVectorChangedEventArgsFrom(abi: test_component.IInspectabl return __IMPL_Windows_Foundation_Collections.IVectorChangedEventArgsBridge.from(abi: RawPointer(swiftAbi))! } +fileprivate func makeIStorageFileFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageFile = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFileBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageFile2From(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageFile2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFile2Bridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageFilePropertiesWithAvailabilityFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageFilePropertiesWithAvailability = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFilePropertiesWithAvailabilityBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageFolderFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageFolder = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFolderBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageFolder2From(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageFolder2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFolder2Bridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageItemFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageItem = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageItem2From(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageItem2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItem2Bridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageItemPropertiesFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageItemProperties = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemPropertiesBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageItemProperties2From(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageItemProperties2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemProperties2Bridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageItemPropertiesWithProviderFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStorageItemPropertiesWithProvider = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemPropertiesWithProviderBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStreamedFileDataRequestFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage.IStreamedFileDataRequest = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStreamedFileDataRequestBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageItemExtraPropertiesFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties = try! abi.QueryInterface() + return __IMPL_Windows_Storage_FileProperties.IStorageItemExtraPropertiesBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageFolderQueryOperationsFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Search.IStorageFolderQueryOperations = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Search.IStorageFolderQueryOperationsBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIStorageQueryResultBaseFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Search.IStorageQueryResultBase = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Search.IStorageQueryResultBaseBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIBufferFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IBuffer = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IBufferBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIContentTypeProviderFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IContentTypeProvider = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IContentTypeProviderBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIInputStreamFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IInputStream = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IInputStreamBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIInputStreamReferenceFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IInputStreamReference = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IInputStreamReferenceBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIOutputStreamFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IOutputStream = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IOutputStreamBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIRandomAccessStreamFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStream = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IRandomAccessStreamBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIRandomAccessStreamReferenceFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStreamReference = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IRandomAccessStreamReferenceBridge.from(abi: RawPointer(swiftAbi))! +} + +fileprivate func makeIRandomAccessStreamWithContentTypeFrom(abi: test_component.IInspectable) -> Any { + let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentType = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeBridge.from(abi: RawPointer(swiftAbi))! +} + fileprivate func makeIAsyncMethodsWithProgressFrom(abi: test_component.IInspectable) -> Any { let swiftAbi: __ABI_test_component.IAsyncMethodsWithProgress = try! abi.QueryInterface() return __IMPL_test_component.IAsyncMethodsWithProgressBridge.from(abi: RawPointer(swiftAbi))! @@ -82,6 +207,18 @@ fileprivate func makeDeferralFrom(abi: test_component.IInspectable) -> Any { return Deferral(fromAbi: abi) } +fileprivate func makeMemoryBufferFrom(abi: test_component.IInspectable) -> Any { + return MemoryBuffer(fromAbi: abi) +} + +fileprivate func makeUriFrom(abi: test_component.IInspectable) -> Any { + return Uri(fromAbi: abi) +} + +fileprivate func makeWwwFormUrlDecoderFrom(abi: test_component.IInspectable) -> Any { + return WwwFormUrlDecoder(fromAbi: abi) +} + fileprivate func makePropertySetFrom(abi: test_component.IInspectable) -> Any { return PropertySet(fromAbi: abi) } @@ -94,6 +231,86 @@ fileprivate func makeValueSetFrom(abi: test_component.IInspectable) -> Any { return ValueSet(fromAbi: abi) } +fileprivate func makeStorageFileFrom(abi: test_component.IInspectable) -> Any { + return StorageFile(fromAbi: abi) +} + +fileprivate func makeStorageFolderFrom(abi: test_component.IInspectable) -> Any { + return StorageFolder(fromAbi: abi) +} + +fileprivate func makeStorageLibraryChangeFrom(abi: test_component.IInspectable) -> Any { + return StorageLibraryChange(fromAbi: abi) +} + +fileprivate func makeStorageLibraryChangeReaderFrom(abi: test_component.IInspectable) -> Any { + return StorageLibraryChangeReader(fromAbi: abi) +} + +fileprivate func makeStorageLibraryChangeTrackerFrom(abi: test_component.IInspectable) -> Any { + return StorageLibraryChangeTracker(fromAbi: abi) +} + +fileprivate func makeStorageProviderFrom(abi: test_component.IInspectable) -> Any { + return StorageProvider(fromAbi: abi) +} + +fileprivate func makeStorageStreamTransactionFrom(abi: test_component.IInspectable) -> Any { + return StorageStreamTransaction(fromAbi: abi) +} + +fileprivate func makeStreamedFileDataRequestFrom(abi: test_component.IInspectable) -> Any { + return StreamedFileDataRequest(fromAbi: abi) +} + +fileprivate func makeBasicPropertiesFrom(abi: test_component.IInspectable) -> Any { + return BasicProperties(fromAbi: abi) +} + +fileprivate func makeDocumentPropertiesFrom(abi: test_component.IInspectable) -> Any { + return DocumentProperties(fromAbi: abi) +} + +fileprivate func makeImagePropertiesFrom(abi: test_component.IInspectable) -> Any { + return ImageProperties(fromAbi: abi) +} + +fileprivate func makeMusicPropertiesFrom(abi: test_component.IInspectable) -> Any { + return MusicProperties(fromAbi: abi) +} + +fileprivate func makeStorageItemContentPropertiesFrom(abi: test_component.IInspectable) -> Any { + return StorageItemContentProperties(fromAbi: abi) +} + +fileprivate func makeStorageItemThumbnailFrom(abi: test_component.IInspectable) -> Any { + return StorageItemThumbnail(fromAbi: abi) +} + +fileprivate func makeVideoPropertiesFrom(abi: test_component.IInspectable) -> Any { + return VideoProperties(fromAbi: abi) +} + +fileprivate func makeQueryOptionsFrom(abi: test_component.IInspectable) -> Any { + return QueryOptions(fromAbi: abi) +} + +fileprivate func makeStorageFileQueryResultFrom(abi: test_component.IInspectable) -> Any { + return StorageFileQueryResult(fromAbi: abi) +} + +fileprivate func makeStorageFolderQueryResultFrom(abi: test_component.IInspectable) -> Any { + return StorageFolderQueryResult(fromAbi: abi) +} + +fileprivate func makeStorageItemQueryResultFrom(abi: test_component.IInspectable) -> Any { + return StorageItemQueryResult(fromAbi: abi) +} + +fileprivate func makeBufferFrom(abi: test_component.IInspectable) -> Any { + return Buffer(fromAbi: abi) +} + fileprivate func makeAsyncOperationIntFrom(abi: test_component.IInspectable) -> Any { return AsyncOperationInt(fromAbi: abi) } @@ -177,9 +394,34 @@ public class __MakeFromAbi: MakeFromAbi { case "IAsyncAction": return makeIAsyncActionFrom(abi: abi) case "IAsyncInfo": return makeIAsyncInfoFrom(abi: abi) case "IClosable": return makeIClosableFrom(abi: abi) + case "IMemoryBuffer": return makeIMemoryBufferFrom(abi: abi) + case "IMemoryBufferReference": return makeIMemoryBufferReferenceFrom(abi: abi) case "IStringable": return makeIStringableFrom(abi: abi) + case "IWwwFormUrlDecoderEntry": return makeIWwwFormUrlDecoderEntryFrom(abi: abi) case "IPropertySet": return makeIPropertySetFrom(abi: abi) case "IVectorChangedEventArgs": return makeIVectorChangedEventArgsFrom(abi: abi) + case "IStorageFile": return makeIStorageFileFrom(abi: abi) + case "IStorageFile2": return makeIStorageFile2From(abi: abi) + case "IStorageFilePropertiesWithAvailability": return makeIStorageFilePropertiesWithAvailabilityFrom(abi: abi) + case "IStorageFolder": return makeIStorageFolderFrom(abi: abi) + case "IStorageFolder2": return makeIStorageFolder2From(abi: abi) + case "IStorageItem": return makeIStorageItemFrom(abi: abi) + case "IStorageItem2": return makeIStorageItem2From(abi: abi) + case "IStorageItemProperties": return makeIStorageItemPropertiesFrom(abi: abi) + case "IStorageItemProperties2": return makeIStorageItemProperties2From(abi: abi) + case "IStorageItemPropertiesWithProvider": return makeIStorageItemPropertiesWithProviderFrom(abi: abi) + case "IStreamedFileDataRequest": return makeIStreamedFileDataRequestFrom(abi: abi) + case "IStorageItemExtraProperties": return makeIStorageItemExtraPropertiesFrom(abi: abi) + case "IStorageFolderQueryOperations": return makeIStorageFolderQueryOperationsFrom(abi: abi) + case "IStorageQueryResultBase": return makeIStorageQueryResultBaseFrom(abi: abi) + case "IBuffer": return makeIBufferFrom(abi: abi) + case "IContentTypeProvider": return makeIContentTypeProviderFrom(abi: abi) + case "IInputStream": return makeIInputStreamFrom(abi: abi) + case "IInputStreamReference": return makeIInputStreamReferenceFrom(abi: abi) + case "IOutputStream": return makeIOutputStreamFrom(abi: abi) + case "IRandomAccessStream": return makeIRandomAccessStreamFrom(abi: abi) + case "IRandomAccessStreamReference": return makeIRandomAccessStreamReferenceFrom(abi: abi) + case "IRandomAccessStreamWithContentType": return makeIRandomAccessStreamWithContentTypeFrom(abi: abi) case "IAsyncMethodsWithProgress": return makeIAsyncMethodsWithProgressFrom(abi: abi) case "IAsyncOperationInt": return makeIAsyncOperationIntFrom(abi: abi) case "IBasic": return makeIBasicFrom(abi: abi) @@ -190,9 +432,32 @@ public class __MakeFromAbi: MakeFromAbi { case "WithIterableGuids": return makeWithIterableGuidsFrom(abi: abi) case "WithKeyword": return makeWithKeywordFrom(abi: abi) case "Deferral": return makeDeferralFrom(abi: abi) + case "MemoryBuffer": return makeMemoryBufferFrom(abi: abi) + case "Uri": return makeUriFrom(abi: abi) + case "WwwFormUrlDecoder": return makeWwwFormUrlDecoderFrom(abi: abi) case "PropertySet": return makePropertySetFrom(abi: abi) case "StringMap": return makeStringMapFrom(abi: abi) case "ValueSet": return makeValueSetFrom(abi: abi) + case "StorageFile": return makeStorageFileFrom(abi: abi) + case "StorageFolder": return makeStorageFolderFrom(abi: abi) + case "StorageLibraryChange": return makeStorageLibraryChangeFrom(abi: abi) + case "StorageLibraryChangeReader": return makeStorageLibraryChangeReaderFrom(abi: abi) + case "StorageLibraryChangeTracker": return makeStorageLibraryChangeTrackerFrom(abi: abi) + case "StorageProvider": return makeStorageProviderFrom(abi: abi) + case "StorageStreamTransaction": return makeStorageStreamTransactionFrom(abi: abi) + case "StreamedFileDataRequest": return makeStreamedFileDataRequestFrom(abi: abi) + case "BasicProperties": return makeBasicPropertiesFrom(abi: abi) + case "DocumentProperties": return makeDocumentPropertiesFrom(abi: abi) + case "ImageProperties": return makeImagePropertiesFrom(abi: abi) + case "MusicProperties": return makeMusicPropertiesFrom(abi: abi) + case "StorageItemContentProperties": return makeStorageItemContentPropertiesFrom(abi: abi) + case "StorageItemThumbnail": return makeStorageItemThumbnailFrom(abi: abi) + case "VideoProperties": return makeVideoPropertiesFrom(abi: abi) + case "QueryOptions": return makeQueryOptionsFrom(abi: abi) + case "StorageFileQueryResult": return makeStorageFileQueryResultFrom(abi: abi) + case "StorageFolderQueryResult": return makeStorageFolderQueryResultFrom(abi: abi) + case "StorageItemQueryResult": return makeStorageItemQueryResultFrom(abi: abi) + case "Buffer": return makeBufferFrom(abi: abi) case "AsyncOperationInt": return makeAsyncOperationIntFrom(abi: abi) case "Base": return makeBaseFrom(abi: abi) case "BaseCollection": return makeBaseCollectionFrom(abi: abi) diff --git a/tests/test_component/Sources/test_component/test_component.swift b/tests/test_component/Sources/test_component/test_component.swift index 85295c57..9bfcca23 100644 --- a/tests/test_component/Sources/test_component/test_component.swift +++ b/tests/test_component/Sources/test_component/test_component.swift @@ -568,6 +568,14 @@ public final class BaseObservableCollection : WinRTClass, IObservableVector, IVe } } +public final class BufferTester { + private static let _IBufferTesterStatics: __ABI_test_component.IBufferTesterStatics = try! RoGetActivationFactory(HString("test_component.BufferTester")) + public static func getDataFrom(_ buffer: test_component.AnyIBuffer!, _ index: UInt32) -> UInt8 { + return try! _IBufferTesterStatics.GetDataFromImpl(buffer, index) + } + +} + public final class Class : WinRTClass, IBasic { private typealias SwiftABI = __ABI_test_component.IClass private typealias CABI = __x_ABI_Ctest__component_CIClass diff --git a/tests/test_component/cpp/BufferTester.cpp b/tests/test_component/cpp/BufferTester.cpp new file mode 100644 index 00000000..36eee341 --- /dev/null +++ b/tests/test_component/cpp/BufferTester.cpp @@ -0,0 +1,16 @@ +#include "pch.h" +#include "BufferTester.h" +#include "BufferTester.g.cpp" + +namespace winrt::test_component::implementation +{ + uint8_t BufferTester::GetDataFrom(winrt::Windows::Storage::Streams::IBuffer const& buffer, uint32_t index) + { + if (index >= buffer.Length()) + { + throw winrt::hresult_out_of_bounds(); + } + auto data = buffer.data(); + return data[index]; + } +} diff --git a/tests/test_component/cpp/BufferTester.h b/tests/test_component/cpp/BufferTester.h new file mode 100644 index 00000000..fafe0a73 --- /dev/null +++ b/tests/test_component/cpp/BufferTester.h @@ -0,0 +1,18 @@ +#pragma once +#include "BufferTester.g.h" + +namespace winrt::test_component::implementation +{ + struct BufferTester + { + BufferTester() = default; + + static uint8_t GetDataFrom(winrt::Windows::Storage::Streams::IBuffer const& buffer, uint32_t index); + }; +} +namespace winrt::test_component::factory_implementation +{ + struct BufferTester : BufferTesterT + { + }; +} diff --git a/tests/test_component/cpp/BufferTests.idl b/tests/test_component/cpp/BufferTests.idl new file mode 100644 index 00000000..83a224b4 --- /dev/null +++ b/tests/test_component/cpp/BufferTests.idl @@ -0,0 +1,9 @@ +import "Windows.Foundation.idl"; +import "Windows.Storage.Streams.idl"; + +namespace test_component { + + static runtimeclass BufferTester { + static UInt8 GetDataFrom(Windows.Storage.Streams.IBuffer buffer, UInt32 index); + } +} diff --git a/tests/test_component/cpp/CMakeLists.txt b/tests/test_component/cpp/CMakeLists.txt index 61f8929f..1f77f261 100644 --- a/tests/test_component/cpp/CMakeLists.txt +++ b/tests/test_component/cpp/CMakeLists.txt @@ -106,7 +106,7 @@ add_custom_command( COMMAND midlrt.exe /metadata_dir $ENV{SystemRoot}/system32/winmetadata /winrt /winmd ${WINMD_FILE} /h ${H_FILE} /ns_prefix /nomidl ${MIDL_FILE} COMMAND ${CPPWINRT_EXE_PATH} -input ${WINMD_FILE} -comp ${CPP_WINRT_OUTPUT_DIR} -output ${CPP_WINRT_OUTPUT_DIR} -include test_component -include Microsoft.UI.Xaml.Interop -verbose -opt -lib test -overwrite -reference ${CMAKE_SYSTEM_VERSION} -name test_component COMMAND ${CPPWINRT_EXE_PATH} -output ${CPP_WINRT_OUTPUT_DIR} -include Windows.Foundation -opt -verbose -reference ${CMAKE_SYSTEM_VERSION} - DEPENDS ${MIDL_FILE} NullValues.idl Keywords.idl EventTester.idl CollectionTester.idl + DEPENDS ${MIDL_FILE} NullValues.idl Keywords.idl EventTester.idl CollectionTester.idl BufferTests.idl MAIN_DEPENDENCY ${MIDL_FILE} VERBATIM ) @@ -130,6 +130,7 @@ target_sources(test_component_cpp PRIVATE BaseCollection.cpp BaseMapCollection.cpp BaseNoOverrides.cpp + BufferTester.cpp Class.cpp CollectionTester.cpp Derived.cpp diff --git a/tests/test_component/cpp/test_component.idl b/tests/test_component/cpp/test_component.idl index 46ffdbd6..1db9f489 100644 --- a/tests/test_component/cpp/test_component.idl +++ b/tests/test_component/cpp/test_component.idl @@ -1,8 +1,9 @@ #include "AsyncMethods.idl" -#include "NullValues.idl" -#include "Keywords.idl" -#include "EventTester.idl" +#include "BufferTests.idl" #include "CollectionTester.idl" +#include "EventTester.idl" +#include "Keywords.idl" +#include "NullValues.idl" import "Windows.Foundation.idl"; // import "Windows.Foundation.Numerics.idl";