objc2_media_player/generated/
MPContentItem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct MPContentItem;
20);
21
22extern_conformance!(
23 unsafe impl NSObjectProtocol for MPContentItem {}
24);
25
26impl MPContentItem {
27 extern_methods!(
28 #[unsafe(method(initWithIdentifier:))]
31 #[unsafe(method_family = init)]
32 pub unsafe fn initWithIdentifier(
33 this: Allocated<Self>,
34 identifier: &NSString,
35 ) -> Retained<Self>;
36
37 #[unsafe(method(identifier))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn identifier(&self) -> Retained<NSString>;
41
42 #[unsafe(method(title))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn title(&self) -> Option<Retained<NSString>>;
47
48 #[unsafe(method(setTitle:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setTitle(&self, title: Option<&NSString>);
52
53 #[unsafe(method(subtitle))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
58
59 #[unsafe(method(setSubtitle:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
63
64 #[cfg(feature = "MPMediaItem")]
65 #[unsafe(method(artwork))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn artwork(&self) -> Option<Retained<MPMediaItemArtwork>>;
70
71 #[cfg(feature = "MPMediaItem")]
72 #[unsafe(method(setArtwork:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn setArtwork(&self, artwork: Option<&MPMediaItemArtwork>);
76
77 #[unsafe(method(playbackProgress))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn playbackProgress(&self) -> c_float;
83
84 #[unsafe(method(setPlaybackProgress:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn setPlaybackProgress(&self, playback_progress: c_float);
88
89 #[unsafe(method(isStreamingContent))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn isStreamingContent(&self) -> bool;
94
95 #[unsafe(method(setStreamingContent:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn setStreamingContent(&self, streaming_content: bool);
99
100 #[unsafe(method(isExplicitContent))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn isExplicitContent(&self) -> bool;
104
105 #[unsafe(method(setExplicitContent:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn setExplicitContent(&self, explicit_content: bool);
109
110 #[unsafe(method(isContainer))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn isContainer(&self) -> bool;
115
116 #[unsafe(method(setContainer:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn setContainer(&self, container: bool);
120
121 #[unsafe(method(isPlayable))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn isPlayable(&self) -> bool;
129
130 #[unsafe(method(setPlayable:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setPlayable(&self, playable: bool);
134 );
135}
136
137impl MPContentItem {
139 extern_methods!(
140 #[unsafe(method(init))]
141 #[unsafe(method_family = init)]
142 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
143
144 #[unsafe(method(new))]
145 #[unsafe(method_family = new)]
146 pub unsafe fn new() -> Retained<Self>;
147 );
148}