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::ffi::*;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-av-foundation")]
use objc2_av_foundation::*;
use objc2_foundation::*;

use crate::*;

mod private_AVPlayerItemMPAdditions {
    pub trait Sealed {}
}

/// Category "MPAdditions" on [`AVPlayerItem`].
#[doc(alias = "MPAdditions")]
pub unsafe trait AVPlayerItemMPAdditions:
    ClassType + Sized + private_AVPlayerItemMPAdditions::Sealed
{
    extern_methods!(
        /// The current now playing info for the player item.
        /// Setting the info to nil will clear it.
        #[unsafe(method(nowPlayingInfo))]
        #[unsafe(method_family = none)]
        unsafe fn nowPlayingInfo(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        /// Setter for [`nowPlayingInfo`][Self::nowPlayingInfo].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `now_playing_info` generic should be of the correct type.
        #[unsafe(method(setNowPlayingInfo:))]
        #[unsafe(method_family = none)]
        unsafe fn setNowPlayingInfo(
            &self,
            now_playing_info: Option<&NSDictionary<NSString, AnyObject>>,
        );
    );
}

#[cfg(feature = "objc2-av-foundation")]
impl private_AVPlayerItemMPAdditions::Sealed for AVPlayerItem {}
#[cfg(feature = "objc2-av-foundation")]
unsafe impl AVPlayerItemMPAdditions for AVPlayerItem {}