objc2-media-player 0.3.2

Bindings to the MediaPlayer framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    /// MPPlayableContentManagerContext represents the current state of
    /// the playable content endpoint. A context is retrievable from an instance
    /// of MPPlayableContentManager.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpplayablecontentmanagercontext?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Use CarPlay framework"]
    pub struct MPPlayableContentManagerContext;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for MPPlayableContentManagerContext {}
);

impl MPPlayableContentManagerContext {
    extern_methods!(
        /// The number of items the content server will display when content limiting is enforced.
        /// Returns NSIntegerMax if the content server will never limit the number of items.
        #[deprecated = "Use CarPlay framework"]
        #[unsafe(method(enforcedContentItemsCount))]
        #[unsafe(method_family = none)]
        pub unsafe fn enforcedContentItemsCount(&self) -> NSInteger;

        /// The depth of the navigation hierarchy the content server will allow. Exceeding this limit will result in a crash.
        #[deprecated = "Use CarPlay framework"]
        #[unsafe(method(enforcedContentTreeDepth))]
        #[unsafe(method_family = none)]
        pub unsafe fn enforcedContentTreeDepth(&self) -> NSInteger;

        /// Represents whether content limits are being enforced by the content server or not.
        #[deprecated = "Use CarPlay framework"]
        #[unsafe(method(contentLimitsEnforced))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentLimitsEnforced(&self) -> bool;

        #[deprecated]
        #[unsafe(method(contentLimitsEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentLimitsEnabled(&self) -> bool;

        /// Represents whether the content server is available or not.
        #[deprecated = "Use CarPlay framework"]
        #[unsafe(method(endpointAvailable))]
        #[unsafe(method_family = none)]
        pub unsafe fn endpointAvailable(&self) -> bool;
    );
}

/// Methods declared on superclass `NSObject`.
impl MPPlayableContentManagerContext {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}