// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 // swiftlint:disable all import Foundation @_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation import CWinRT private var IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptions: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.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: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptions } internal func get_FileTypeFilterImpl() throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) } internal func get_FolderDepthImpl() throws -> UWP.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: UWP.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 -> UWP.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: UWP.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 -> WindowsFoundation.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 UWP.__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 -> UWP.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: UWP.ThumbnailMode, _ requestedSize: UInt32, _ options: UWP.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: UWP.PropertyPrefetchOptions, _ propertiesToRetrieve: WindowsFoundation.AnyIIterable?) throws { let propertiesToRetrieveWrapper = UWP.__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: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsFactory } internal func CreateCommonFileQueryImpl(_ query: UWP.CommonFileQuery, _ fileTypeFilter: WindowsFoundation.AnyIIterable?) throws -> IQueryOptions { let (queryOptions) = try ComPtrs.initialize { queryOptionsAbi in let fileTypeFilterWrapper = UWP.__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: UWP.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: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIQueryOptionsWithProviderFilter } internal func get_StorageProviderIdFilterImpl() throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIVector_1_HSTRINGWrapper.unwrapFrom(abi: value) } } public class IStorageFileQueryResult: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult } internal func GetFilesAsyncImpl(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) } internal func GetFilesAsyncDefaultStartAndCountImpl() throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) } } public class IStorageFileQueryResult2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFileQueryResult2 } internal func GetMatchingPropertiesWithRangesImpl(_ file: UWP.StorageFile?) throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIMap_2_HSTRING___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CData__CText__CTextSegmentWrapper.unwrapFrom(abi: result) } } public class IStorageFolderQueryOperations: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryOperations } open func GetIndexedStateAsyncImpl() throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CStorage__CSearch__CIndexedStateWrapper.unwrapFrom(abi: operation) } open func CreateFileQueryOverloadDefaultImpl() throws -> UWP.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: UWP.CommonFileQuery) throws -> UWP.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: UWP.QueryOptions?) throws -> UWP.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 -> UWP.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: UWP.CommonFolderQuery) throws -> UWP.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: UWP.QueryOptions?) throws -> UWP.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 -> UWP.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: UWP.QueryOptions?) throws -> UWP.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: UWP.CommonFileQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) } open func GetFilesAsyncOverloadDefaultStartAndCountImpl(_ query: UWP.CommonFileQuery) throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFileWrapper.unwrapFrom(abi: operation) } open func GetFoldersAsyncImpl(_ query: UWP.CommonFolderQuery, _ startIndex: UInt32, _ maxItemsToRetrieve: UInt32) throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) } open func GetFoldersAsyncOverloadDefaultStartAndCountImpl(_ query: UWP.CommonFolderQuery) throws -> WindowsFoundation.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 UWP.__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 -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) } open func AreQueryOptionsSupportedImpl(_ queryOptions: UWP.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: UWP.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: UWP.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: WindowsFoundation.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 = UWP.__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: UWP.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: UWP.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: UWP.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: UWP.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: UWP.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: UWP.CommonFileQuery = $1 let startIndex: UInt32 = $2 let maxItemsToRetrieve: UInt32 = $3 let operation = try __unwrapped__instance.getFilesAsync(query, startIndex, maxItemsToRetrieve) let operationWrapper = UWP.__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: UWP.CommonFileQuery = $1 let operation = try __unwrapped__instance.getFilesAsync(query) let operationWrapper = UWP.__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: UWP.CommonFolderQuery = $1 let startIndex: UInt32 = $2 let maxItemsToRetrieve: UInt32 = $3 let operation = try __unwrapped__instance.getFoldersAsync(query, startIndex, maxItemsToRetrieve) let operationWrapper = UWP.__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: UWP.CommonFolderQuery = $1 let operation = try __unwrapped__instance.getFoldersAsync(query) let operationWrapper = UWP.__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 = UWP.__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: UWP.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: UWP.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: UWP.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: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageFolderQueryResult } internal func GetFoldersAsyncImpl(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) } internal func GetFoldersAsyncDefaultStartAndCountImpl() throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CStorageFolderWrapper.unwrapFrom(abi: operation) } } public class IStorageItemQueryResult: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageItemQueryResult } internal func GetItemsAsyncImpl(_ startIndex: UInt32, _ maxNumberOfItems: UInt32) throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) } internal func GetItemsAsyncDefaultStartAndCountImpl() throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CStorage__CIStorageItemWrapper.unwrapFrom(abi: operation) } } public class IStorageQueryResultBase: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CStorage_CSearch_CIStorageQueryResultBase } open func GetItemCountAsyncImpl() throws -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.unwrapFrom(abi: operation) } open func get_FolderImpl() throws -> UWP.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 = UWP.__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 = UWP.__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 -> WindowsFoundation.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 UWP.__x_ABI_C__FIAsyncOperation_1_UINT32Wrapper.unwrapFrom(abi: operation) } open func GetCurrentQueryOptionsImpl() throws -> UWP.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: UWP.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: WindowsFoundation.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 = UWP.__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 = UWP.__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 = UWP.__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 = UWP.__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: UWP.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: UWP.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) } } }