objc2_media_player/generated/
MPPlayableContentManagerContext.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// MPPlayableContentManagerContext represents the current state of
10    /// the playable content endpoint. A context is retrievable from an instance
11    /// of MPPlayableContentManager.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpplayablecontentmanagercontext?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[deprecated = "Use CarPlay framework"]
17    pub struct MPPlayableContentManagerContext;
18);
19
20unsafe impl NSObjectProtocol for MPPlayableContentManagerContext {}
21
22impl MPPlayableContentManagerContext {
23    extern_methods!(
24        /// The number of items the content server will display when content limiting is enforced.
25        /// Returns NSIntegerMax if the content server will never limit the number of items.
26        #[deprecated = "Use CarPlay framework"]
27        #[unsafe(method(enforcedContentItemsCount))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn enforcedContentItemsCount(&self) -> NSInteger;
30
31        /// The depth of the navigation hierarchy the content server will allow. Exceeding this limit will result in a crash.
32        #[deprecated = "Use CarPlay framework"]
33        #[unsafe(method(enforcedContentTreeDepth))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn enforcedContentTreeDepth(&self) -> NSInteger;
36
37        /// Represents whether content limits are being enforced by the content server or not.
38        #[deprecated = "Use CarPlay framework"]
39        #[unsafe(method(contentLimitsEnforced))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn contentLimitsEnforced(&self) -> bool;
42
43        #[deprecated]
44        #[unsafe(method(contentLimitsEnabled))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn contentLimitsEnabled(&self) -> bool;
47
48        /// Represents whether the content server is available or not.
49        #[deprecated = "Use CarPlay framework"]
50        #[unsafe(method(endpointAvailable))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn endpointAvailable(&self) -> bool;
53    );
54}
55
56/// Methods declared on superclass `NSObject`.
57impl MPPlayableContentManagerContext {
58    extern_methods!(
59        #[unsafe(method(init))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63        #[unsafe(method(new))]
64        #[unsafe(method_family = new)]
65        pub unsafe fn new() -> Retained<Self>;
66    );
67}