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
20extern_conformance!(
21    unsafe impl NSObjectProtocol for MPPlayableContentManagerContext {}
22);
23
24impl MPPlayableContentManagerContext {
25    extern_methods!(
26        /// The number of items the content server will display when content limiting is enforced.
27        /// Returns NSIntegerMax if the content server will never limit the number of items.
28        #[deprecated = "Use CarPlay framework"]
29        #[unsafe(method(enforcedContentItemsCount))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn enforcedContentItemsCount(&self) -> NSInteger;
32
33        /// The depth of the navigation hierarchy the content server will allow. Exceeding this limit will result in a crash.
34        #[deprecated = "Use CarPlay framework"]
35        #[unsafe(method(enforcedContentTreeDepth))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn enforcedContentTreeDepth(&self) -> NSInteger;
38
39        /// Represents whether content limits are being enforced by the content server or not.
40        #[deprecated = "Use CarPlay framework"]
41        #[unsafe(method(contentLimitsEnforced))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn contentLimitsEnforced(&self) -> bool;
44
45        #[deprecated]
46        #[unsafe(method(contentLimitsEnabled))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn contentLimitsEnabled(&self) -> bool;
49
50        /// Represents whether the content server is available or not.
51        #[deprecated = "Use CarPlay framework"]
52        #[unsafe(method(endpointAvailable))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn endpointAvailable(&self) -> bool;
55    );
56}
57
58/// Methods declared on superclass `NSObject`.
59impl MPPlayableContentManagerContext {
60    extern_methods!(
61        #[unsafe(method(init))]
62        #[unsafe(method_family = init)]
63        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
64
65        #[unsafe(method(new))]
66        #[unsafe(method_family = new)]
67        pub unsafe fn new() -> Retained<Self>;
68    );
69}