// 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_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroup: WindowsFoundation.IID { .init(Data1: 0xD8C3E3E4, Data2: 0x6459, Data3: 0x4540, Data4: ( 0x85,0xEB,0xAA,0xA1,0xC8,0x90,0x36,0x77 ))// D8C3E3E4-6459-4540-85EB-AAA1C8903677 } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroupStatics: WindowsFoundation.IID { .init(Data1: 0x02EC50B2, Data2: 0x7D18, Data3: 0x495B, Data4: ( 0xAA,0x22,0x32,0xA9,0x7D,0x45,0xD3,0xE2 ))// 02EC50B2-7D18-495B-AA22-32A97D45D3E2 } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation: WindowsFoundation.IID { .init(Data1: 0xDED06846, Data2: 0x90CA, Data3: 0x44FB, Data4: ( 0x8F,0xB1,0x12,0x41,0x54,0xC0,0xD5,0x39 ))// DED06846-90CA-44FB-8FB1-124154C0D539 } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperationPriority: WindowsFoundation.IID { .init(Data1: 0x04854327, Data2: 0x5254, Data3: 0x4B3A, Data4: ( 0x91,0x5E,0x0A,0xA4,0x92,0x75,0xC0,0xF9 ))// 04854327-5254-4B3A-915E-0AA49275C0F9 } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferRangesDownloadedEventArgs: WindowsFoundation.IID { .init(Data1: 0x3EBC7453, Data2: 0xBF48, Data3: 0x4A88, Data4: ( 0x92,0x48,0xB0,0xC1,0x65,0x18,0x4F,0x5C ))// 3EBC7453-BF48-4A88-9248-B0C165184F5C } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation: WindowsFoundation.IID { .init(Data1: 0xBD87EBB0, Data2: 0x5714, Data3: 0x4E09, Data4: ( 0xBA,0x68,0xBE,0xF7,0x39,0x03,0xB0,0xD7 ))// BD87EBB0-5714-4E09-BA68-BEF73903B0D7 } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation2: WindowsFoundation.IID { .init(Data1: 0xA3CCED40, Data2: 0x8F9C, Data3: 0x4353, Data4: ( 0x9C,0xD4,0x29,0x0D,0xEE,0x38,0x7C,0x38 ))// A3CCED40-8F9C-4353-9CD4-290DEE387C38 } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3: WindowsFoundation.IID { .init(Data1: 0x5027351C, Data2: 0x7D5E, Data3: 0x4ADC, Data4: ( 0xB8,0xD3,0xDF,0x5C,0x60,0x31,0xB9,0xCC ))// 5027351C-7D5E-4ADC-B8D3-DF5C6031B9CC } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation4: WindowsFoundation.IID { .init(Data1: 0x0CDAAEF4, Data2: 0x8CEF, Data3: 0x404A, Data4: ( 0x96,0x6D,0xF0,0x58,0x40,0x0B,0xED,0x80 ))// 0CDAAEF4-8CEF-404A-966D-F058400BED80 } private var IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIResponseInformation: WindowsFoundation.IID { .init(Data1: 0xF8BB9A12, Data2: 0xF713, Data3: 0x4792, Data4: ( 0x8B,0x68,0xD9,0xD2,0x97,0xF9,0x1D,0x2E ))// F8BB9A12-F713-4792-8B68-D9D297F91D2E } public enum __ABI_Windows_Networking_BackgroundTransfer { public class IBackgroundTransferGroup: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroup } internal func get_NameImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroup.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Name(pThis, &value)) } return .init(from: value) } internal func get_TransferBehaviorImpl() throws -> UWP.BackgroundTransferBehavior { var value: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundTransferBehavior = .init(0) _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroup.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_TransferBehavior(pThis, &value)) } return value } internal func put_TransferBehaviorImpl(_ value: UWP.BackgroundTransferBehavior) throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroup.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_TransferBehavior(pThis, value)) } } } public class IBackgroundTransferGroupStatics: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroupStatics } internal func CreateGroupImpl(_ name: String) throws -> UWP.BackgroundTransferGroup? { let (value) = try ComPtrs.initialize { valueAbi in let _name = try! HString(name) _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferGroupStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateGroup(pThis, _name.get(), &valueAbi)) } } return .from(abi: value) } } public class IBackgroundTransferOperation: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation } open func get_GuidImpl() throws -> Foundation.UUID { var value: WindowsFoundation.GUID = .init() _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Guid(pThis, &value)) } return .init(from: value) } open func get_RequestedUriImpl() throws -> WindowsFoundation.Uri? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_RequestedUri(pThis, &valueAbi)) } } return .from(abi: value) } open func get_MethodImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Method(pThis, &value)) } return .init(from: value) } open func get_GroupImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Group(pThis, &value)) } return .init(from: value) } open func get_CostPolicyImpl() throws -> UWP.BackgroundTransferCostPolicy { var value: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundTransferCostPolicy = .init(0) _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_CostPolicy(pThis, &value)) } return value } open func put_CostPolicyImpl(_ value: UWP.BackgroundTransferCostPolicy) throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_CostPolicy(pThis, value)) } } open func GetResultStreamAtImpl(_ position: UInt64) throws -> UWP.AnyIInputStream? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetResultStreamAt(pThis, position, &valueAbi)) } } return __ABI_Windows_Storage_Streams.IInputStreamWrapper.unwrapFrom(abi: value) } open func GetResponseInformationImpl() throws -> UWP.ResponseInformation? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetResponseInformation(pThis, &valueAbi)) } } return .from(abi: value) } } internal static var IBackgroundTransferOperationVTable: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperationVtbl = .init( QueryInterface: { IBackgroundTransferOperationWrapper.queryInterface($0, $1, $2) }, AddRef: { IBackgroundTransferOperationWrapper.addRef($0) }, Release: { IBackgroundTransferOperationWrapper.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_Networking_BackgroundTransfer.IBackgroundTransferOperationWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_Guid: { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.guid $1?.initialize(to: .init(from: value)) return S_OK }, get_RequestedUri: { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.requestedUri value?.copyTo($1) return S_OK }, get_Method: { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.method $1?.initialize(to: try! HString(value).detach()) return S_OK }, get_Group: { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.group $1?.initialize(to: try! HString(value).detach()) return S_OK }, get_CostPolicy: { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.costPolicy $1?.initialize(to: value) return S_OK }, put_CostPolicy: { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value: UWP.BackgroundTransferCostPolicy = $1 __unwrapped__instance.costPolicy = value return S_OK }, GetResultStreamAt: { do { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let position: UInt64 = $1 let value = try __unwrapped__instance.getResultStreamAt(position) let valueWrapper = __ABI_Windows_Storage_Streams.IInputStreamWrapper(value) valueWrapper?.copyTo($2) return S_OK } catch { return failWith(err: E_FAIL) } }, GetResponseInformation: { do { guard let __unwrapped__instance = IBackgroundTransferOperationWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = try __unwrapped__instance.getResponseInformation() value?.copyTo($1) return S_OK } catch { return failWith(err: E_FAIL) } } ) public typealias IBackgroundTransferOperationWrapper = InterfaceWrapperBase<__IMPL_Windows_Networking_BackgroundTransfer.IBackgroundTransferOperationBridge> public class IBackgroundTransferOperationPriority: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperationPriority } open func get_PriorityImpl() throws -> UWP.BackgroundTransferPriority { var value: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundTransferPriority = .init(0) _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperationPriority.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Priority(pThis, &value)) } return value } open func put_PriorityImpl(_ value: UWP.BackgroundTransferPriority) throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperationPriority.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_Priority(pThis, value)) } } } internal static var IBackgroundTransferOperationPriorityVTable: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferOperationPriorityVtbl = .init( QueryInterface: { IBackgroundTransferOperationPriorityWrapper.queryInterface($0, $1, $2) }, AddRef: { IBackgroundTransferOperationPriorityWrapper.addRef($0) }, Release: { IBackgroundTransferOperationPriorityWrapper.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_Networking_BackgroundTransfer.IBackgroundTransferOperationPriorityWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Networking.BackgroundTransfer.IBackgroundTransferOperationPriority").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_Priority: { guard let __unwrapped__instance = IBackgroundTransferOperationPriorityWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.priority $1?.initialize(to: value) return S_OK }, put_Priority: { guard let __unwrapped__instance = IBackgroundTransferOperationPriorityWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value: UWP.BackgroundTransferPriority = $1 __unwrapped__instance.priority = value return S_OK } ) public typealias IBackgroundTransferOperationPriorityWrapper = InterfaceWrapperBase<__IMPL_Windows_Networking_BackgroundTransfer.IBackgroundTransferOperationPriorityBridge> public class IBackgroundTransferRangesDownloadedEventArgs: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferRangesDownloadedEventArgs } internal func get_WasDownloadRestartedImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferRangesDownloadedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_WasDownloadRestarted(pThis, &value)) } return .init(from: value) } internal func get_AddedRangesImpl() throws -> WindowsFoundation.AnyIVector? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferRangesDownloadedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_AddedRanges(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIVector_1___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CBackgroundTransferFileRangeWrapper.unwrapFrom(abi: value) } internal func GetDeferralImpl() throws -> WindowsFoundation.Deferral? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIBackgroundTransferRangesDownloadedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetDeferral(pThis, &resultAbi)) } } return .from(abi: result) } } public class IDownloadOperation: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation } internal func get_ResultFileImpl() throws -> UWP.AnyIStorageFile? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ResultFile(pThis, &valueAbi)) } } return __ABI_Windows_Storage.IStorageFileWrapper.unwrapFrom(abi: value) } internal func get_ProgressImpl() throws -> UWP.BackgroundDownloadProgress { var value: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundDownloadProgress = .init() _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Progress(pThis, &value)) } return .from(abi: value) } internal func StartAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperationWithProgress? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.StartAsync(pThis, &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CDownloadOperation___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CDownloadOperationWrapper.unwrapFrom(abi: operation) } internal func AttachAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperationWithProgress? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.AttachAsync(pThis, &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperationWithProgress_2___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CDownloadOperation___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CDownloadOperationWrapper.unwrapFrom(abi: operation) } internal func PauseImpl() throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Pause(pThis)) } } internal func ResumeImpl() throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Resume(pThis)) } } } public class IDownloadOperation2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation2 } internal func get_TransferGroupImpl() throws -> UWP.BackgroundTransferGroup? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_TransferGroup(pThis, &valueAbi)) } } return .from(abi: value) } } public class IDownloadOperation3: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3 } internal func get_IsRandomAccessRequiredImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsRandomAccessRequired(pThis, &value)) } return .init(from: value) } internal func put_IsRandomAccessRequiredImpl(_ value: Bool) throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsRandomAccessRequired(pThis, .init(from: value))) } } internal func GetResultRandomAccessStreamReferenceImpl() throws -> UWP.AnyIRandomAccessStreamReference? { let (stream) = try ComPtrs.initialize { streamAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetResultRandomAccessStreamReference(pThis, &streamAbi)) } } return __ABI_Windows_Storage_Streams.IRandomAccessStreamReferenceWrapper.unwrapFrom(abi: stream) } internal func GetDownloadedRangesImpl() throws -> WindowsFoundation.AnyIVector? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetDownloadedRanges(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIVector_1___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CBackgroundTransferFileRangeWrapper.unwrapFrom(abi: value) } internal func add_RangesDownloadedImpl(_ eventHandler: TypedEventHandler?) throws -> EventRegistrationToken { var eventCookie: EventRegistrationToken = .init() let eventHandlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CDownloadOperation___x_ABI_CWindows__CNetworking__CBackgroundTransfer__CBackgroundTransferRangesDownloadedEventArgsWrapper(eventHandler) let _eventHandler = try! eventHandlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_RangesDownloaded(pThis, _eventHandler, &eventCookie)) } return eventCookie } internal func remove_RangesDownloadedImpl(_ eventCookie: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_RangesDownloaded(pThis, eventCookie)) } } internal func put_RequestedUriImpl(_ value: WindowsFoundation.Uri?) throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_RequestedUri(pThis, RawPointer(value))) } } internal func get_RecoverableWebErrorStatusesImpl() throws -> WindowsFoundation.AnyIVector? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_RecoverableWebErrorStatuses(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIVector_1___x_ABI_CWindows__CWeb__CWebErrorStatusWrapper.unwrapFrom(abi: value) } internal func get_CurrentWebErrorStatusImpl() throws -> UWP.WebErrorStatus? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_CurrentWebErrorStatus(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIReference_1___x_ABI_CWindows__CWeb__CWebErrorStatusWrapper.unwrapFrom(abi: value) } } public class IDownloadOperation4: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation4 } internal func MakeCurrentInTransferGroupImpl() throws { _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIDownloadOperation4.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.MakeCurrentInTransferGroup(pThis)) } } } public class IResponseInformation: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIResponseInformation } internal func get_IsResumableImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIResponseInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsResumable(pThis, &value)) } return .init(from: value) } internal func get_ActualUriImpl() throws -> WindowsFoundation.Uri? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIResponseInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ActualUri(pThis, &valueAbi)) } } return .from(abi: value) } internal func get_StatusCodeImpl() throws -> UInt32 { var value: UINT32 = 0 _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIResponseInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_StatusCode(pThis, &value)) } return value } internal func get_HeadersImpl() throws -> WindowsFoundation.AnyIMapView? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CIResponseInformation.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Headers(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: value) } } public class _ABI_BackgroundDownloadProgress { public var val: __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundDownloadProgress = .init() public init() { } public init(from swift: UWP.BackgroundDownloadProgress) { val.BytesReceived = swift.bytesReceived val.TotalBytesToReceive = swift.totalBytesToReceive val.Status = swift.status val.HasResponseChanged = .init(from: swift.hasResponseChanged) val.HasRestarted = .init(from: swift.hasRestarted) } public func detach() -> __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundDownloadProgress { let result = val return result } deinit { } } } extension __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundTransferFileRange { public static func from(swift: UWP.BackgroundTransferFileRange) -> __x_ABI_CWindows_CNetworking_CBackgroundTransfer_CBackgroundTransferFileRange { .init(Offset: swift.offset, Length: swift.length) } }