swift-uwp/Sources/UWP/Generated/Windows.Storage+Impl.swift
2024-02-15 17:14:48 -08:00

785 lines
43 KiB
Swift

// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
// swiftlint:disable all
import Foundation
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
import CWinRT
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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_default = Bridge.SwiftABI(fromAbi)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.openasync)
fileprivate func openAsync(_ accessMode: FileAccessMode) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.AnyIRandomAccessStream?>! {
try _default.OpenAsyncImpl(accessMode)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.opentransactedwriteasync)
fileprivate func openTransactedWriteAsync() throws -> WindowsFoundation.AnyIAsyncOperation<StorageStreamTransaction?>! {
try _default.OpenTransactedWriteAsyncImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.copyasync)
fileprivate func copyAsync(_ destinationFolder: AnyIStorageFolder!) throws -> WindowsFoundation.AnyIAsyncOperation<StorageFile?>! {
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 -> WindowsFoundation.AnyIAsyncOperation<StorageFile?>! {
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 -> WindowsFoundation.AnyIAsyncOperation<StorageFile?>! {
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 -> WindowsFoundation.AnyIAsyncAction! {
try _default.CopyAndReplaceAsyncImpl(fileToReplace)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.moveasync)
fileprivate func moveAsync(_ destinationFolder: AnyIStorageFolder!) throws -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.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 -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.RenameAsyncImpl(desiredName, option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.deleteasync)
fileprivate func deleteAsync() throws -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.deleteasync)
fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.DeleteAsyncImpl(option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile.getbasicpropertiesasync)
fileprivate func getBasicPropertiesAsync() throws -> WindowsFoundation.AnyIAsyncOperation<UWP.BasicProperties?>! {
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 : WindowsFoundation.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 -> WindowsFoundation.AnyIAsyncOperation<UWP.AnyIRandomAccessStreamWithContentType?>! {
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 -> WindowsFoundation.AnyIAsyncOperation<UWP.AnyIInputStream?>! {
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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_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 -> WindowsFoundation.AnyIAsyncOperation<UWP.AnyIRandomAccessStream?>! {
try _default.OpenWithOptionsAsyncImpl(accessMode, options)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefile2.opentransactedwriteasync)
fileprivate func openTransactedWriteAsync(_ options: StorageOpenOptions) throws -> WindowsFoundation.AnyIAsyncOperation<StorageStreamTransaction?>! {
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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_default = Bridge.SwiftABI(fromAbi)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfileasync)
fileprivate func createFileAsync(_ desiredName: String) throws -> WindowsFoundation.AnyIAsyncOperation<StorageFile?>! {
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 -> WindowsFoundation.AnyIAsyncOperation<StorageFile?>! {
try _default.CreateFileAsyncImpl(desiredName, options)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.createfolderasync)
fileprivate func createFolderAsync(_ desiredName: String) throws -> WindowsFoundation.AnyIAsyncOperation<StorageFolder?>! {
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 -> WindowsFoundation.AnyIAsyncOperation<StorageFolder?>! {
try _default.CreateFolderAsyncImpl(desiredName, options)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfileasync)
fileprivate func getFileAsync(_ name: String) throws -> WindowsFoundation.AnyIAsyncOperation<StorageFile?>! {
try _default.GetFileAsyncImpl(name)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfolderasync)
fileprivate func getFolderAsync(_ name: String) throws -> WindowsFoundation.AnyIAsyncOperation<StorageFolder?>! {
try _default.GetFolderAsyncImpl(name)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getitemasync)
fileprivate func getItemAsync(_ name: String) throws -> WindowsFoundation.AnyIAsyncOperation<AnyIStorageItem?>! {
try _default.GetItemAsyncImpl(name)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfilesasync)
fileprivate func getFilesAsync() throws -> WindowsFoundation.AnyIAsyncOperation<WindowsFoundation.AnyIVectorView<StorageFile?>?>! {
try _default.GetFilesAsyncOverloadDefaultOptionsStartAndCountImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getfoldersasync)
fileprivate func getFoldersAsync() throws -> WindowsFoundation.AnyIAsyncOperation<WindowsFoundation.AnyIVectorView<StorageFolder?>?>! {
try _default.GetFoldersAsyncOverloadDefaultOptionsStartAndCountImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getitemsasync)
fileprivate func getItemsAsync() throws -> WindowsFoundation.AnyIAsyncOperation<WindowsFoundation.AnyIVectorView<AnyIStorageItem?>?>! {
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 -> WindowsFoundation.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 -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.RenameAsyncImpl(desiredName, option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.deleteasync)
fileprivate func deleteAsync() throws -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.deleteasync)
fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.DeleteAsyncImpl(option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder.getbasicpropertiesasync)
fileprivate func getBasicPropertiesAsync() throws -> WindowsFoundation.AnyIAsyncOperation<UWP.BasicProperties?>! {
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 : WindowsFoundation.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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_default = Bridge.SwiftABI(fromAbi)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istoragefolder2.trygetitemasync)
fileprivate func tryGetItemAsync(_ name: String) throws -> WindowsFoundation.AnyIAsyncOperation<AnyIStorageItem?>! {
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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_default = Bridge.SwiftABI(fromAbi)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.renameasync)
fileprivate func renameAsync(_ desiredName: String) throws -> WindowsFoundation.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 -> WindowsFoundation.AnyIAsyncAction! {
try _default.RenameAsyncImpl(desiredName, option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.deleteasync)
fileprivate func deleteAsync() throws -> WindowsFoundation.AnyIAsyncAction! {
try _default.DeleteAsyncOverloadDefaultOptionsImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.deleteasync)
fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> WindowsFoundation.AnyIAsyncAction! {
try _default.DeleteAsyncImpl(option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem.getbasicpropertiesasync)
fileprivate func getBasicPropertiesAsync() throws -> WindowsFoundation.AnyIAsyncOperation<UWP.BasicProperties?>! {
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 : WindowsFoundation.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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_default = Bridge.SwiftABI(fromAbi)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.getparentasync)
fileprivate func getParentAsync() throws -> WindowsFoundation.AnyIAsyncOperation<StorageFolder?>! {
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 -> WindowsFoundation.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 -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.RenameAsyncImpl(desiredName, option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.deleteasync)
fileprivate func deleteAsync() throws -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.DeleteAsyncOverloadDefaultOptionsImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.deleteasync)
fileprivate func deleteAsync(_ option: StorageDeleteOption) throws -> WindowsFoundation.AnyIAsyncAction! {
try _IStorageItem.DeleteAsyncImpl(option)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitem2.getbasicpropertiesasync)
fileprivate func getBasicPropertiesAsync() throws -> WindowsFoundation.AnyIAsyncOperation<UWP.BasicProperties?>! {
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 : WindowsFoundation.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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_default = Bridge.SwiftABI(fromAbi)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync)
fileprivate func getThumbnailAsync(_ mode: UWP.ThumbnailMode) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _default.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync)
fileprivate func getThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _default.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties.getthumbnailasync)
fileprivate func getThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32, _ options: UWP.ThumbnailOptions) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
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 : UWP.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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_default = Bridge.SwiftABI(fromAbi)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync)
fileprivate func getScaledImageAsThumbnailAsync(_ mode: UWP.ThumbnailMode) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _default.GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync)
fileprivate func getScaledImageAsThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _default.GetScaledImageAsThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getscaledimageasthumbnailasync)
fileprivate func getScaledImageAsThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32, _ options: UWP.ThumbnailOptions) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
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: UWP.ThumbnailMode) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getthumbnailasync)
fileprivate func getThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitemproperties2.getthumbnailasync)
fileprivate func getThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32, _ options: UWP.ThumbnailOptions) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
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 : UWP.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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_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: UWP.ThumbnailMode) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultSizeDefaultOptionsImpl(mode)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.getthumbnailasync)
fileprivate func getThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
try _IStorageItemProperties.GetThumbnailAsyncOverloadDefaultOptionsImpl(mode, requestedSize)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.storage.istorageitempropertieswithprovider.getthumbnailasync)
fileprivate func getThumbnailAsync(_ mode: UWP.ThumbnailMode, _ requestedSize: UInt32, _ options: UWP.ThumbnailOptions) throws -> WindowsFoundation.AnyIAsyncOperation<UWP.StorageItemThumbnail?>! {
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 : UWP.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<CABI>?) -> 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: WindowsFoundation.IInspectable { _default }
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
_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<CABI>?) -> Handler? {
guard let abi = abi else { return nil }
let _default = SwiftABI(abi)
let handler: Handler = { (stream) in
try! _default.InvokeImpl(stream)
}
return handler
}
}
}