414 lines
21 KiB
Swift
414 lines
21 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
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x95972E93, Data2: 0x7746, Data3: 0x417E, Data4: ( 0x84,0x95,0xF0,0x31,0xBB,0xC5,0x86,0x2C ))// 95972E93-7746-417E-8495-F031BBC5862C
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager: WindowsFoundation.IID {
|
|
.init(Data1: 0x45694947, Data2: 0xC741, Data3: 0x434B, Data4: ( 0xA7,0x9E,0x47,0x4C,0x12,0xD9,0x3D,0x2F ))// 45694947-C741-434B-A79E-474C12D93D2F
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceCompletion: WindowsFoundation.IID {
|
|
.init(Data1: 0x8B5CCA18, Data2: 0xCFD5, Data3: 0x44EE, Data4: ( 0xA2,0xED,0xDF,0x76,0x01,0x0C,0x14,0xB5 ))// 8B5CCA18-CFD5-44EE-A2ED-DF76010C14B5
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceRequest: WindowsFoundation.IID {
|
|
.init(Data1: 0xB1DE0EA6, Data2: 0x2094, Data3: 0x478D, Data4: ( 0x87,0xA4,0x8B,0x95,0x20,0x0F,0x85,0xC6 ))// B1DE0EA6-2094-478D-87A4-8B95200F85C6
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalInformation: WindowsFoundation.IID {
|
|
.init(Data1: 0xF3A1937B, Data2: 0x2501, Data3: 0x439E, Data4: ( 0xA6,0xE7,0x6F,0xC9,0x5E,0x17,0x5F,0xCF ))// F3A1937B-2501-439E-A6E7-6FC95E175FCF
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem: WindowsFoundation.IID {
|
|
.init(Data1: 0x3099C20C, Data2: 0x3CF0, Data3: 0x49EA, Data4: ( 0x90,0x2D,0xCA,0xF3,0x2D,0x2D,0xDE,0x2C ))// 3099C20C-3CF0-49EA-902D-CAF32D2DDE2C
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x34283BAF, Data2: 0xABB4, Data3: 0x4FC1, Data4: ( 0xBD,0x89,0x93,0xF1,0x06,0x57,0x3A,0x49 ))// 34283BAF-ABB4-4FC1-BD89-93F106573A49
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs2: WindowsFoundation.IID {
|
|
.init(Data1: 0x553C69D6, Data2: 0xFAFE, Data3: 0x4128, Data4: ( 0x8D,0xFA,0x13,0x0E,0x39,0x8A,0x13,0xA7 ))// 553C69D6-FAFE-4128-8DFA-130E398A13A7
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventHandler: WindowsFoundation.IID {
|
|
.init(Data1: 0x95DA643C, Data2: 0x6DB9, Data3: 0x424B, Data4: ( 0x86,0xCA,0x09,0x1A,0xF4,0x32,0x08,0x1C ))// 95DA643C-6DB9-424B-86CA-091AF432081C
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIRebootNeededEventHandler: WindowsFoundation.IID {
|
|
.init(Data1: 0x64E12A45, Data2: 0x973B, Data3: 0x4A3A, Data4: ( 0xB2,0x60,0x91,0x89,0x8A,0x49,0xA8,0x2C ))// 64E12A45-973B-4A3A-B260-91898A49A82C
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventHandler: WindowsFoundation.IID {
|
|
.init(Data1: 0xD2D690BA, Data2: 0xCAC9, Data3: 0x48E1, Data4: ( 0x95,0xC0,0xD3,0x84,0x95,0xA8,0x40,0x55 ))// D2D690BA-CAC9-48E1-95C0-D38495A84055
|
|
}
|
|
|
|
public enum __ABI_Windows_Media_Protection {
|
|
public class IComponentLoadFailedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventArgs }
|
|
|
|
internal func get_InformationImpl() throws -> UWP.RevocationAndRenewalInformation? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Information(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func get_CompletionImpl() throws -> UWP.MediaProtectionServiceCompletion? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completion(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IMediaProtectionManager: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager }
|
|
|
|
internal func add_ServiceRequestedImpl(_ handler: UWP.ServiceRequestedEventHandler?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = __ABI_Windows_Media_Protection.ServiceRequestedEventHandlerWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ServiceRequested(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
internal func remove_ServiceRequestedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ServiceRequested(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
internal func add_RebootNeededImpl(_ handler: UWP.RebootNeededEventHandler?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = __ABI_Windows_Media_Protection.RebootNeededEventHandlerWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_RebootNeeded(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
internal func remove_RebootNeededImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_RebootNeeded(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
internal func add_ComponentLoadFailedImpl(_ handler: UWP.ComponentLoadFailedEventHandler?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = __ABI_Windows_Media_Protection.ComponentLoadFailedEventHandlerWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ComponentLoadFailed(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
internal func remove_ComponentLoadFailedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ComponentLoadFailed(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
internal func get_PropertiesImpl() throws -> WindowsFoundation.AnyIPropertySet? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Properties(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_Windows_Foundation_Collections.IPropertySetWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IMediaProtectionServiceCompletion: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceCompletion }
|
|
|
|
internal func CompleteImpl(_ success: Bool) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceCompletion.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Complete(pThis, .init(from: success)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class IMediaProtectionServiceRequest: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceRequest }
|
|
|
|
open func get_ProtectionSystemImpl() throws -> Foundation.UUID {
|
|
var system: WindowsFoundation.GUID = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceRequest.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ProtectionSystem(pThis, &system))
|
|
}
|
|
return .init(from: system)
|
|
}
|
|
|
|
open func get_TypeImpl() throws -> Foundation.UUID {
|
|
var type: WindowsFoundation.GUID = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceRequest.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Type(pThis, &type))
|
|
}
|
|
return .init(from: type)
|
|
}
|
|
|
|
}
|
|
|
|
internal static var IMediaProtectionServiceRequestVTable: __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceRequestVtbl = .init(
|
|
QueryInterface: { IMediaProtectionServiceRequestWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { IMediaProtectionServiceRequestWrapper.addRef($0) },
|
|
Release: { IMediaProtectionServiceRequestWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Windows_Media_Protection.IMediaProtectionServiceRequestWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Windows.Media.Protection.IMediaProtectionServiceRequest").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
get_ProtectionSystem: {
|
|
guard let __unwrapped__instance = IMediaProtectionServiceRequestWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let system = __unwrapped__instance.protectionSystem
|
|
$1?.initialize(to: .init(from: system))
|
|
return S_OK
|
|
},
|
|
|
|
get_Type: {
|
|
guard let __unwrapped__instance = IMediaProtectionServiceRequestWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let type = __unwrapped__instance.type
|
|
$1?.initialize(to: .init(from: type))
|
|
return S_OK
|
|
}
|
|
)
|
|
|
|
public typealias IMediaProtectionServiceRequestWrapper = InterfaceWrapperBase<__IMPL_Windows_Media_Protection.IMediaProtectionServiceRequestBridge>
|
|
public class IRevocationAndRenewalInformation: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalInformation }
|
|
|
|
internal func get_ItemsImpl() throws -> WindowsFoundation.AnyIVector<UWP.RevocationAndRenewalItem?>? {
|
|
let (items) = try ComPtrs.initialize { itemsAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalInformation.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Items(pThis, &itemsAbi))
|
|
}
|
|
}
|
|
return UWP.__x_ABI_C__FIVector_1___x_ABI_CWindows__CMedia__CProtection__CRevocationAndRenewalItemWrapper.unwrapFrom(abi: items)
|
|
}
|
|
|
|
}
|
|
|
|
public class IRevocationAndRenewalItem: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem }
|
|
|
|
internal func get_ReasonsImpl() throws -> UWP.RevocationAndRenewalReasons {
|
|
var reasons: __x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Reasons(pThis, &reasons))
|
|
}
|
|
return reasons
|
|
}
|
|
|
|
internal func get_HeaderHashImpl() throws -> String {
|
|
var value: HSTRING?
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_HeaderHash(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
internal func get_PublicKeyHashImpl() throws -> String {
|
|
var value: HSTRING?
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_PublicKeyHash(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
internal func get_NameImpl() throws -> String {
|
|
var name: HSTRING?
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Name(pThis, &name))
|
|
}
|
|
return .init(from: name)
|
|
}
|
|
|
|
internal func get_RenewalIdImpl() throws -> String {
|
|
var value: HSTRING?
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_RenewalId(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IServiceRequestedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs }
|
|
|
|
internal func get_RequestImpl() throws -> UWP.AnyIMediaProtectionServiceRequest? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Request(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_Windows_Media_Protection.IMediaProtectionServiceRequestWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
internal func get_CompletionImpl() throws -> UWP.MediaProtectionServiceCompletion? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Completion(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IServiceRequestedEventArgs2: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs2 }
|
|
|
|
internal func get_MediaPlaybackItemImpl() throws -> UWP.MediaPlaybackItem? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs2.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_MediaPlaybackItem(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
// MARK - ComponentLoadFailedEventHandler
|
|
extension __ABI_Windows_Media_Protection {
|
|
public class ComponentLoadFailedEventHandler: WindowsFoundation.IUnknown {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventHandler }
|
|
|
|
open func InvokeImpl(_ sender: UWP.MediaProtectionManager?, _ e: UWP.ComponentLoadFailedEventArgs?) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventHandler.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, RawPointer(sender), RawPointer(e)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
typealias ComponentLoadFailedEventHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_Media_Protection.ComponentLoadFailedEventHandlerBridge>
|
|
internal static var ComponentLoadFailedEventHandlerVTable: __x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventHandlerVtbl = .init(
|
|
QueryInterface: { ComponentLoadFailedEventHandlerWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { ComponentLoadFailedEventHandlerWrapper.addRef($0) },
|
|
Release: { ComponentLoadFailedEventHandlerWrapper.release($0) },
|
|
Invoke: {
|
|
guard let __unwrapped__instance = ComponentLoadFailedEventHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let sender: UWP.MediaProtectionManager? = .from(abi: ComPtr($1))
|
|
let e: UWP.ComponentLoadFailedEventArgs? = .from(abi: ComPtr($2))
|
|
__unwrapped__instance(sender, e)
|
|
return S_OK
|
|
}
|
|
)
|
|
}
|
|
public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventHandler {
|
|
static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Media_Protection.ComponentLoadFailedEventHandlerVTable) { $0 }
|
|
return .init(lpVtbl:vtblPtr)
|
|
}
|
|
}
|
|
|
|
// MARK - RebootNeededEventHandler
|
|
extension __ABI_Windows_Media_Protection {
|
|
public class RebootNeededEventHandler: WindowsFoundation.IUnknown {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIRebootNeededEventHandler }
|
|
|
|
open func InvokeImpl(_ sender: UWP.MediaProtectionManager?) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIRebootNeededEventHandler.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, RawPointer(sender)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
typealias RebootNeededEventHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_Media_Protection.RebootNeededEventHandlerBridge>
|
|
internal static var RebootNeededEventHandlerVTable: __x_ABI_CWindows_CMedia_CProtection_CIRebootNeededEventHandlerVtbl = .init(
|
|
QueryInterface: { RebootNeededEventHandlerWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { RebootNeededEventHandlerWrapper.addRef($0) },
|
|
Release: { RebootNeededEventHandlerWrapper.release($0) },
|
|
Invoke: {
|
|
guard let __unwrapped__instance = RebootNeededEventHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let sender: UWP.MediaProtectionManager? = .from(abi: ComPtr($1))
|
|
__unwrapped__instance(sender)
|
|
return S_OK
|
|
}
|
|
)
|
|
}
|
|
public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CMedia_CProtection_CIRebootNeededEventHandler {
|
|
static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Media_Protection.RebootNeededEventHandlerVTable) { $0 }
|
|
return .init(lpVtbl:vtblPtr)
|
|
}
|
|
}
|
|
|
|
// MARK - ServiceRequestedEventHandler
|
|
extension __ABI_Windows_Media_Protection {
|
|
public class ServiceRequestedEventHandler: WindowsFoundation.IUnknown {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventHandler }
|
|
|
|
open func InvokeImpl(_ sender: UWP.MediaProtectionManager?, _ e: UWP.ServiceRequestedEventArgs?) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventHandler.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, RawPointer(sender), RawPointer(e)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
typealias ServiceRequestedEventHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_Media_Protection.ServiceRequestedEventHandlerBridge>
|
|
internal static var ServiceRequestedEventHandlerVTable: __x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventHandlerVtbl = .init(
|
|
QueryInterface: { ServiceRequestedEventHandlerWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { ServiceRequestedEventHandlerWrapper.addRef($0) },
|
|
Release: { ServiceRequestedEventHandlerWrapper.release($0) },
|
|
Invoke: {
|
|
guard let __unwrapped__instance = ServiceRequestedEventHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let sender: UWP.MediaProtectionManager? = .from(abi: ComPtr($1))
|
|
let e: UWP.ServiceRequestedEventArgs? = .from(abi: ComPtr($2))
|
|
__unwrapped__instance(sender, e)
|
|
return S_OK
|
|
}
|
|
)
|
|
}
|
|
public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventHandler {
|
|
static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Media_Protection.ServiceRequestedEventHandlerVTable) { $0 }
|
|
return .init(lpVtbl:vtblPtr)
|
|
}
|
|
}
|
|
|