// 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 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: WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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: WindowsFoundation.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 -> WindowsFoundation.AnyIAsyncOperation! { try _default.GetItemCountAsyncImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.search.istoragequeryresultbase.findstartindexasync) fileprivate func findStartIndexAsync(_ value: Any!) throws -> WindowsFoundation.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 : UWP.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) } ) }() } }