365 lines
16 KiB
Swift
365 lines
16 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
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalreasons)
|
|
public typealias RevocationAndRenewalReasons = __x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.componentloadfailedeventargs)
|
|
public final class ComponentLoadFailedEventArgs : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Media_Protection.IComponentLoadFailedEventArgs
|
|
private typealias CABI = __x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventArgs
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CMedia_CProtection_CIComponentLoadFailedEventArgs>?) -> ComponentLoadFailedEventArgs? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.componentloadfailedeventargs.completion)
|
|
public var completion : MediaProtectionServiceCompletion! {
|
|
get { try! _default.get_CompletionImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.componentloadfailedeventargs.information)
|
|
public var information : RevocationAndRenewalInformation! {
|
|
get { try! _default.get_InformationImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.mediaprotectionmanager)
|
|
public final class MediaProtectionManager : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Media_Protection.IMediaProtectionManager
|
|
private typealias CABI = __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionManager>?) -> MediaProtectionManager? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
override public init() {
|
|
super.init(try! RoActivateInstance(HString("Windows.Media.Protection.MediaProtectionManager")))
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.mediaprotectionmanager.properties)
|
|
public var properties : WindowsFoundation.AnyIPropertySet! {
|
|
get { try! _default.get_PropertiesImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.mediaprotectionmanager.componentloadfailed)
|
|
public lazy var componentLoadFailed : Event<ComponentLoadFailedEventHandler> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_ComponentLoadFailedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_ComponentLoadFailedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.mediaprotectionmanager.rebootneeded)
|
|
public lazy var rebootNeeded : Event<RebootNeededEventHandler> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_RebootNeededImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_RebootNeededImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.mediaprotectionmanager.servicerequested)
|
|
public lazy var serviceRequested : Event<ServiceRequestedEventHandler> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_ServiceRequestedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_ServiceRequestedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.mediaprotectionservicecompletion)
|
|
public final class MediaProtectionServiceCompletion : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Media_Protection.IMediaProtectionServiceCompletion
|
|
private typealias CABI = __x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceCompletion
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CMedia_CProtection_CIMediaProtectionServiceCompletion>?) -> MediaProtectionServiceCompletion? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.mediaprotectionservicecompletion.complete)
|
|
public func complete(_ success: Bool) throws {
|
|
try _default.CompleteImpl(success)
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalinformation)
|
|
public final class RevocationAndRenewalInformation : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Media_Protection.IRevocationAndRenewalInformation
|
|
private typealias CABI = __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalInformation
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalInformation>?) -> RevocationAndRenewalInformation? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalinformation.items)
|
|
public var items : WindowsFoundation.AnyIVector<RevocationAndRenewalItem?>! {
|
|
get { try! _default.get_ItemsImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalitem)
|
|
public final class RevocationAndRenewalItem : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Media_Protection.IRevocationAndRenewalItem
|
|
private typealias CABI = __x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CMedia_CProtection_CIRevocationAndRenewalItem>?) -> RevocationAndRenewalItem? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalitem.headerhash)
|
|
public var headerHash : String {
|
|
get { try! _default.get_HeaderHashImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalitem.name)
|
|
public var name : String {
|
|
get { try! _default.get_NameImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalitem.publickeyhash)
|
|
public var publicKeyHash : String {
|
|
get { try! _default.get_PublicKeyHashImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalitem.reasons)
|
|
public var reasons : RevocationAndRenewalReasons {
|
|
get { try! _default.get_ReasonsImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.revocationandrenewalitem.renewalid)
|
|
public var renewalId : String {
|
|
get { try! _default.get_RenewalIdImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
}
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.servicerequestedeventargs)
|
|
public final class ServiceRequestedEventArgs : WinRTClass {
|
|
private typealias SwiftABI = __ABI_Windows_Media_Protection.IServiceRequestedEventArgs
|
|
private typealias CABI = __x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs
|
|
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
|
@_spi(WinRTInternal)
|
|
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
|
if T.self == CABI.self {
|
|
return RawPointer(_default)
|
|
}
|
|
return super._getABI()
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public static func from(abi: ComPtr<__x_ABI_CWindows_CMedia_CProtection_CIServiceRequestedEventArgs>?) -> ServiceRequestedEventArgs? {
|
|
guard let abi = abi else { return nil }
|
|
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
|
}
|
|
|
|
@_spi(WinRTInternal)
|
|
public init(fromAbi: WindowsFoundation.IInspectable) {
|
|
super.init(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.servicerequestedeventargs.completion)
|
|
public var completion : MediaProtectionServiceCompletion! {
|
|
get { try! _default.get_CompletionImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.servicerequestedeventargs.request)
|
|
public var request : AnyIMediaProtectionServiceRequest! {
|
|
get { try! _default.get_RequestImpl() }
|
|
}
|
|
|
|
private lazy var _IServiceRequestedEventArgs2: __ABI_Windows_Media_Protection.IServiceRequestedEventArgs2! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.servicerequestedeventargs.mediaplaybackitem)
|
|
public var mediaPlaybackItem : UWP.MediaPlaybackItem! {
|
|
get { try! _IServiceRequestedEventArgs2.get_MediaPlaybackItemImpl() }
|
|
}
|
|
|
|
deinit {
|
|
_default = nil
|
|
_IServiceRequestedEventArgs2 = nil
|
|
}
|
|
}
|
|
|
|
public typealias ComponentLoadFailedEventHandler = (MediaProtectionManager?, ComponentLoadFailedEventArgs?) -> ()
|
|
public typealias RebootNeededEventHandler = (MediaProtectionManager?) -> ()
|
|
public typealias ServiceRequestedEventHandler = (MediaProtectionManager?, ServiceRequestedEventArgs?) -> ()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.imediaprotectionservicerequest)
|
|
public protocol IMediaProtectionServiceRequest : WinRTInterface {
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.imediaprotectionservicerequest.protectionsystem)
|
|
var protectionSystem: Foundation.UUID { get }
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.media.protection.imediaprotectionservicerequest.type)
|
|
var type: Foundation.UUID { get }
|
|
}
|
|
|
|
extension IMediaProtectionServiceRequest {
|
|
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
|
switch iid {
|
|
case __ABI_Windows_Media_Protection.IMediaProtectionServiceRequestWrapper.IID:
|
|
let wrapper = __ABI_Windows_Media_Protection.IMediaProtectionServiceRequestWrapper(self)
|
|
return wrapper!.queryInterface(iid)
|
|
default: return nil
|
|
}
|
|
}
|
|
}
|
|
public typealias AnyIMediaProtectionServiceRequest = any IMediaProtectionServiceRequest
|
|
|
|
extension UWP.RevocationAndRenewalReasons {
|
|
public static var userModeComponentLoad : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_UserModeComponentLoad
|
|
}
|
|
public static var kernelModeComponentLoad : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_KernelModeComponentLoad
|
|
}
|
|
public static var appComponent : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_AppComponent
|
|
}
|
|
public static var globalRevocationListLoadFailed : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_GlobalRevocationListLoadFailed
|
|
}
|
|
public static var invalidGlobalRevocationListSignature : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_InvalidGlobalRevocationListSignature
|
|
}
|
|
public static var globalRevocationListAbsent : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_GlobalRevocationListAbsent
|
|
}
|
|
public static var componentRevoked : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_ComponentRevoked
|
|
}
|
|
public static var invalidComponentCertificateExtendedKeyUse : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_InvalidComponentCertificateExtendedKeyUse
|
|
}
|
|
public static var componentCertificateRevoked : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_ComponentCertificateRevoked
|
|
}
|
|
public static var invalidComponentCertificateRoot : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_InvalidComponentCertificateRoot
|
|
}
|
|
public static var componentHighSecurityCertificateRevoked : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_ComponentHighSecurityCertificateRevoked
|
|
}
|
|
public static var componentLowSecurityCertificateRevoked : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_ComponentLowSecurityCertificateRevoked
|
|
}
|
|
public static var bootDriverVerificationFailed : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_BootDriverVerificationFailed
|
|
}
|
|
public static var componentSignedWithTestCertificate : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_ComponentSignedWithTestCertificate
|
|
}
|
|
public static var encryptionFailure : UWP.RevocationAndRenewalReasons {
|
|
__x_ABI_CWindows_CMedia_CProtection_CRevocationAndRenewalReasons_EncryptionFailure
|
|
}
|
|
}
|
|
extension UWP.RevocationAndRenewalReasons: @retroactive Hashable, @retroactive Codable {}
|
|
|