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
24extern_conformance!(
25    unsafe impl NSObjectProtocol for MPPlayableContentManager {}
26);
27
28impl MPPlayableContentManager {
29    extern_methods!(
30        #[cfg(feature = "MPPlayableContentDataSource")]
31        #[deprecated = "Use CarPlay framework"]
32        #[unsafe(method(dataSource))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn dataSource(
35            &self,
36        ) -> Option<Retained<ProtocolObject<dyn MPPlayableContentDataSource>>>;
37
38        #[cfg(feature = "MPPlayableContentDataSource")]
39        /// This is a [weak property][objc2::topics::weak_property].
40        /// Setter for [`dataSource`][Self::dataSource].
41        #[deprecated = "Use CarPlay framework"]
42        #[unsafe(method(setDataSource:))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn setDataSource(
45            &self,
46            data_source: Option<&ProtocolObject<dyn MPPlayableContentDataSource>>,
47        );
48
49        #[cfg(feature = "MPPlayableContentDelegate")]
50        #[deprecated = "Use CarPlay framework"]
51        #[unsafe(method(delegate))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn delegate(
54            &self,
55        ) -> Option<Retained<ProtocolObject<dyn MPPlayableContentDelegate>>>;
56
57        #[cfg(feature = "MPPlayableContentDelegate")]
58        /// This is a [weak property][objc2::topics::weak_property].
59        /// Setter for [`delegate`][Self::delegate].
60        #[deprecated = "Use CarPlay framework"]
61        #[unsafe(method(setDelegate:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn setDelegate(
64            &self,
65            delegate: Option<&ProtocolObject<dyn MPPlayableContentDelegate>>,
66        );
67
68        #[cfg(feature = "MPPlayableContentManagerContext")]
69        #[deprecated = "Use CarPlay framework"]
70        #[unsafe(method(context))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn context(&self) -> Retained<MPPlayableContentManagerContext>;
73
74        /// Tells the content manager which MPContentItems are currently playing based on their identifiers.
75        #[deprecated = "Use CarPlay framework"]
76        #[unsafe(method(nowPlayingIdentifiers))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn nowPlayingIdentifiers(&self) -> Retained<NSArray<NSString>>;
79
80        /// Setter for [`nowPlayingIdentifiers`][Self::nowPlayingIdentifiers].
81        #[deprecated = "Use CarPlay framework"]
82        #[unsafe(method(setNowPlayingIdentifiers:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn setNowPlayingIdentifiers(&self, now_playing_identifiers: &NSArray<NSString>);
85
86        /// Returns the application's instance of the content manager.
87        #[deprecated = "Use CarPlay framework"]
88        #[unsafe(method(sharedContentManager))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn sharedContentManager() -> Retained<Self>;
91
92        /// Tells the content manager that the data source has changed and that we need to
93        /// reload data from the data source.
94        #[deprecated = "Use CarPlay framework"]
95        #[unsafe(method(reloadData))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn reloadData(&self);
98
99        /// Used to begin a synchronized update to multiple MPContentItems at once.
100        #[deprecated = "Use CarPlay framework"]
101        #[unsafe(method(beginUpdates))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn beginUpdates(&self);
104
105        /// Ends a synchronized update.
106        #[deprecated = "Use CarPlay framework"]
107        #[unsafe(method(endUpdates))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn endUpdates(&self);
110    );
111}
112
113/// Methods declared on superclass `NSObject`.
114impl MPPlayableContentManager {
115    extern_methods!(
116        #[unsafe(method(init))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
119
120        #[unsafe(method(new))]
121        #[unsafe(method_family = new)]
122        pub unsafe fn new() -> Retained<Self>;
123    );
124}