// 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_CMedia_CCasting_CICastingConnection: WindowsFoundation.IID { .init(Data1: 0xCD951653, Data2: 0xC2F1, Data3: 0x4498, Data4: ( 0x8B,0x78,0x5F,0xB4,0xCD,0x36,0x40,0xDD ))// CD951653-C2F1-4498-8B78-5FB4CD3640DD } private var IID___x_ABI_CWindows_CMedia_CCasting_CICastingConnectionErrorOccurredEventArgs: WindowsFoundation.IID { .init(Data1: 0xA7FB3C69, Data2: 0x8719, Data3: 0x4F00, Data4: ( 0x81,0xFB,0x96,0x18,0x63,0xC7,0x9A,0x32 ))// A7FB3C69-8719-4F00-81FB-961863C79A32 } private var IID___x_ABI_CWindows_CMedia_CCasting_CICastingDevice: WindowsFoundation.IID { .init(Data1: 0xDE721C83, Data2: 0x4A43, Data3: 0x4AD1, Data4: ( 0xA6,0xD2,0x24,0x92,0xA7,0x96,0xC3,0xF2 ))// DE721C83-4A43-4AD1-A6D2-2492A796C3F2 } private var IID___x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker: WindowsFoundation.IID { .init(Data1: 0xDCD39924, Data2: 0x0591, Data3: 0x49BE, Data4: ( 0xAA,0xCB,0x4B,0x82,0xEE,0x75,0x6A,0x95 ))// DCD39924-0591-49BE-AACB-4B82EE756A95 } private var IID___x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter: WindowsFoundation.IID { .init(Data1: 0xBE8C619C, Data2: 0xB563, Data3: 0x4354, Data4: ( 0xAE,0x33,0x9F,0xDA,0xAD,0x8C,0x62,0x91 ))// BE8C619C-B563-4354-AE33-9FDAAD8C6291 } private var IID___x_ABI_CWindows_CMedia_CCasting_CICastingDeviceSelectedEventArgs: WindowsFoundation.IID { .init(Data1: 0xDC439E86, Data2: 0xDD57, Data3: 0x4D0D, Data4: ( 0x94,0x00,0xAF,0x45,0xE4,0xFB,0x36,0x63 ))// DC439E86-DD57-4D0D-9400-AF45E4FB3663 } private var IID___x_ABI_CWindows_CMedia_CCasting_CICastingDeviceStatics: WindowsFoundation.IID { .init(Data1: 0xE7D958D7, Data2: 0x4D13, Data3: 0x4237, Data4: ( 0xA3,0x65,0x4C,0x4F,0x6A,0x4C,0xFD,0x2F ))// E7D958D7-4D13-4237-A365-4C4F6A4CFD2F } private var IID___x_ABI_CWindows_CMedia_CCasting_CICastingSource: WindowsFoundation.IID { .init(Data1: 0xF429EA72, Data2: 0x3467, Data3: 0x47E6, Data4: ( 0xA0,0x27,0x52,0x29,0x23,0xE9,0xD7,0x27 ))// F429EA72-3467-47E6-A027-522923E9D727 } public enum __ABI_Windows_Media_Casting { public class ICastingConnection: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingConnection } internal func get_StateImpl() throws -> UWP.CastingConnectionState { var value: __x_ABI_CWindows_CMedia_CCasting_CCastingConnectionState = .init(0) _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_State(pThis, &value)) } return value } internal func get_DeviceImpl() throws -> UWP.CastingDevice? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Device(pThis, &valueAbi)) } } return .from(abi: value) } internal func get_SourceImpl() throws -> UWP.CastingSource? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Source(pThis, &valueAbi)) } } return .from(abi: value) } internal func put_SourceImpl(_ value: UWP.CastingSource?) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_Source(pThis, RawPointer(value))) } } internal func add_StateChangedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CMedia__CCasting__CCastingConnection_IInspectableWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_StateChanged(pThis, _handler, &token)) } return token } internal func remove_StateChangedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_StateChanged(pThis, token)) } } internal func add_ErrorOccurredImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CMedia__CCasting__CCastingConnection___x_ABI_CWindows__CMedia__CCasting__CCastingConnectionErrorOccurredEventArgsWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_ErrorOccurred(pThis, _handler, &token)) } return token } internal func remove_ErrorOccurredImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ErrorOccurred(pThis, token)) } } internal func RequestStartCastingAsyncImpl(_ value: UWP.CastingSource?) throws -> WindowsFoundation.AnyIAsyncOperation? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.RequestStartCastingAsync(pThis, RawPointer(value), &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CMedia__CCasting__CCastingConnectionErrorStatusWrapper.unwrapFrom(abi: operation) } internal func DisconnectAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperation? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnection.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.DisconnectAsync(pThis, &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CMedia__CCasting__CCastingConnectionErrorStatusWrapper.unwrapFrom(abi: operation) } } public class ICastingConnectionErrorOccurredEventArgs: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingConnectionErrorOccurredEventArgs } internal func get_ErrorStatusImpl() throws -> UWP.CastingConnectionErrorStatus { var value: __x_ABI_CWindows_CMedia_CCasting_CCastingConnectionErrorStatus = .init(0) _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnectionErrorOccurredEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ErrorStatus(pThis, &value)) } return value } internal func get_MessageImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingConnectionErrorOccurredEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Message(pThis, &value)) } return .init(from: value) } } public class ICastingDevice: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingDevice } internal func get_IdImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevice.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Id(pThis, &value)) } return .init(from: value) } internal func get_FriendlyNameImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevice.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_FriendlyName(pThis, &value)) } return .init(from: value) } internal func get_IconImpl() throws -> UWP.AnyIRandomAccessStreamWithContentType? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevice.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Icon(pThis, &valueAbi)) } } return __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeWrapper.unwrapFrom(abi: value) } internal func GetSupportedCastingPlaybackTypesAsyncImpl() throws -> WindowsFoundation.AnyIAsyncOperation? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevice.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetSupportedCastingPlaybackTypesAsync(pThis, &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CMedia__CCasting__CCastingPlaybackTypesWrapper.unwrapFrom(abi: operation) } internal func CreateCastingConnectionImpl() throws -> UWP.CastingConnection? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevice.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateCastingConnection(pThis, &valueAbi)) } } return .from(abi: value) } } public class ICastingDevicePicker: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker } internal func get_FilterImpl() throws -> UWP.CastingDevicePickerFilter? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Filter(pThis, &valueAbi)) } } return .from(abi: value) } internal func get_AppearanceImpl() throws -> UWP.DevicePickerAppearance? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Appearance(pThis, &valueAbi)) } } return .from(abi: value) } internal func add_CastingDeviceSelectedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CMedia__CCasting__CCastingDevicePicker___x_ABI_CWindows__CMedia__CCasting__CCastingDeviceSelectedEventArgsWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_CastingDeviceSelected(pThis, _handler, &token)) } return token } internal func remove_CastingDeviceSelectedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_CastingDeviceSelected(pThis, token)) } } internal func add_CastingDevicePickerDismissedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CMedia__CCasting__CCastingDevicePicker_IInspectableWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_CastingDevicePickerDismissed(pThis, _handler, &token)) } return token } internal func remove_CastingDevicePickerDismissedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_CastingDevicePickerDismissed(pThis, token)) } } internal func ShowImpl(_ selection: WindowsFoundation.Rect) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Show(pThis, .from(swift: selection))) } } internal func ShowWithPlacementImpl(_ selection: WindowsFoundation.Rect, _ preferredPlacement: UWP.Placement) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.ShowWithPlacement(pThis, .from(swift: selection), preferredPlacement)) } } internal func HideImpl() throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePicker.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Hide(pThis)) } } } public class ICastingDevicePickerFilter: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter } internal func get_SupportsAudioImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SupportsAudio(pThis, &value)) } return .init(from: value) } internal func put_SupportsAudioImpl(_ value: Bool) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_SupportsAudio(pThis, .init(from: value))) } } internal func get_SupportsVideoImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SupportsVideo(pThis, &value)) } return .init(from: value) } internal func put_SupportsVideoImpl(_ value: Bool) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_SupportsVideo(pThis, .init(from: value))) } } internal func get_SupportsPicturesImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SupportsPictures(pThis, &value)) } return .init(from: value) } internal func put_SupportsPicturesImpl(_ value: Bool) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_SupportsPictures(pThis, .init(from: value))) } } internal func get_SupportedCastingSourcesImpl() throws -> WindowsFoundation.AnyIVector? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDevicePickerFilter.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SupportedCastingSources(pThis, &valueAbi)) } } return UWP.__x_ABI_C__FIVector_1___x_ABI_CWindows__CMedia__CCasting__CCastingSourceWrapper.unwrapFrom(abi: value) } } public class ICastingDeviceSelectedEventArgs: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingDeviceSelectedEventArgs } internal func get_SelectedCastingDeviceImpl() throws -> UWP.CastingDevice? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDeviceSelectedEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_SelectedCastingDevice(pThis, &valueAbi)) } } return .from(abi: value) } } public class ICastingDeviceStatics: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingDeviceStatics } internal func GetDeviceSelectorImpl(_ type: UWP.CastingPlaybackTypes) throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDeviceStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetDeviceSelector(pThis, type, &value)) } return .init(from: value) } internal func GetDeviceSelectorFromCastingSourceAsyncImpl(_ castingSource: UWP.CastingSource?) throws -> WindowsFoundation.AnyIAsyncOperation? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDeviceStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetDeviceSelectorFromCastingSourceAsync(pThis, RawPointer(castingSource), &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1_HSTRINGWrapper.unwrapFrom(abi: operation) } internal func FromIdAsyncImpl(_ value: String) throws -> WindowsFoundation.AnyIAsyncOperation? { let (operation) = try ComPtrs.initialize { operationAbi in let _value = try! HString(value) _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDeviceStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.FromIdAsync(pThis, _value.get(), &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1___x_ABI_CWindows__CMedia__CCasting__CCastingDeviceWrapper.unwrapFrom(abi: operation) } internal func DeviceInfoSupportsCastingAsyncImpl(_ device: UWP.DeviceInformation?) throws -> WindowsFoundation.AnyIAsyncOperation? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingDeviceStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.DeviceInfoSupportsCastingAsync(pThis, RawPointer(device), &operationAbi)) } } return UWP.__x_ABI_C__FIAsyncOperation_1_booleanWrapper.unwrapFrom(abi: operation) } } public class ICastingSource: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CCasting_CICastingSource } internal func get_PreferredSourceUriImpl() throws -> WindowsFoundation.Uri? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingSource.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_PreferredSourceUri(pThis, &valueAbi)) } } return .from(abi: value) } internal func put_PreferredSourceUriImpl(_ value: WindowsFoundation.Uri?) throws { _ = try perform(as: __x_ABI_CWindows_CMedia_CCasting_CICastingSource.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_PreferredSourceUri(pThis, RawPointer(value))) } } } }