objc2_media_player/generated/
MPPlayableContentManager.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// MPPlayableContentManager is a class that manages the interactions between a
12    /// media application and an external media player interface. The application
13    /// provides the content manager with a data source, which allows the media player
14    /// to browse the media content offered by the application, as well as a delegate,
15    /// which allows the media player to relay non-media remote playback commands to the application.
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpplayablecontentmanager?language=objc)
18    #[unsafe(super(NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[deprecated = "Use CarPlay framework"]
21    pub struct MPPlayableContentManager;
22);
23
24unsafe impl NSObjectProtocol for MPPlayableContentManager {}
25
26impl MPPlayableContentManager {
27    extern_methods!(
28        #[cfg(feature = "MPPlayableContentDataSource")]
29        #[deprecated = "Use CarPlay framework"]
30        #[unsafe(method(dataSource))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn dataSource(
33            &self,
34        ) -> Option<Retained<ProtocolObject<dyn MPPlayableContentDataSource>>>;
35
36        #[cfg(feature = "MPPlayableContentDataSource")]
37        /// This is a [weak property][objc2::topics::weak_property].
38        /// Setter for [`dataSource`][Self::dataSource].
39        #[deprecated = "Use CarPlay framework"]
40        #[unsafe(method(setDataSource:))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn setDataSource(
43            &self,
44            data_source: Option<&ProtocolObject<dyn MPPlayableContentDataSource>>,
45        );
46
47        #[cfg(feature = "MPPlayableContentDelegate")]
48        #[deprecated = "Use CarPlay framework"]
49        #[unsafe(method(delegate))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn delegate(
52            &self,
53        ) -> Option<Retained<ProtocolObject<dyn MPPlayableContentDelegate>>>;
54
55        #[cfg(feature = "MPPlayableContentDelegate")]
56        /// This is a [weak property][objc2::topics::weak_property].
57        /// Setter for [`delegate`][Self::delegate].
58        #[deprecated = "Use CarPlay framework"]
59        #[unsafe(method(setDelegate:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn setDelegate(
62            &self,
63            delegate: Option<&ProtocolObject<dyn MPPlayableContentDelegate>>,
64        );
65
66        #[cfg(feature = "MPPlayableContentManagerContext")]
67        #[deprecated = "Use CarPlay framework"]
68        #[unsafe(method(context))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn context(&self) -> Retained<MPPlayableContentManagerContext>;
71
72        /// Tells the content manager which MPContentItems are currently playing based on their identifiers.
73        #[deprecated = "Use CarPlay framework"]
74        #[unsafe(method(nowPlayingIdentifiers))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn nowPlayingIdentifiers(&self) -> Retained<NSArray<NSString>>;
77
78        /// Setter for [`nowPlayingIdentifiers`][Self::nowPlayingIdentifiers].
79        #[deprecated = "Use CarPlay framework"]
80        #[unsafe(method(setNowPlayingIdentifiers:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn setNowPlayingIdentifiers(&self, now_playing_identifiers: &NSArray<NSString>);
83
84        /// Returns the application's instance of the content manager.
85        #[deprecated = "Use CarPlay framework"]
86        #[unsafe(method(sharedContentManager))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn sharedContentManager() -> Retained<Self>;
89
90        /// Tells the content manager that the data source has changed and that we need to
91        /// reload data from the data source.
92        #[deprecated = "Use CarPlay framework"]
93        #[unsafe(method(reloadData))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn reloadData(&self);
96
97        /// Used to begin a synchronized update to multiple MPContentItems at once.
98        #[deprecated = "Use CarPlay framework"]
99        #[unsafe(method(beginUpdates))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn beginUpdates(&self);
102
103        /// Ends a synchronized update.
104        #[deprecated = "Use CarPlay framework"]
105        #[unsafe(method(endUpdates))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn endUpdates(&self);
108    );
109}
110
111/// Methods declared on superclass `NSObject`.
112impl MPPlayableContentManager {
113    extern_methods!(
114        #[unsafe(method(init))]
115        #[unsafe(method_family = init)]
116        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
117
118        #[unsafe(method(new))]
119        #[unsafe(method_family = new)]
120        pub unsafe fn new() -> Retained<Self>;
121    );
122}