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
22unsafe impl NSObjectProtocol for MPContentItem {}
23
24impl MPContentItem {
25 extern_methods!(
26 #[unsafe(method(initWithIdentifier:))]
29 #[unsafe(method_family = init)]
30 pub unsafe fn initWithIdentifier(
31 this: Allocated<Self>,
32 identifier: &NSString,
33 ) -> Retained<Self>;
34
35 #[unsafe(method(identifier))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn identifier(&self) -> Retained<NSString>;
39
40 #[unsafe(method(title))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn title(&self) -> Option<Retained<NSString>>;
45
46 #[unsafe(method(setTitle:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn setTitle(&self, title: Option<&NSString>);
50
51 #[unsafe(method(subtitle))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
56
57 #[unsafe(method(setSubtitle:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
61
62 #[cfg(feature = "MPMediaItem")]
63 #[unsafe(method(artwork))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn artwork(&self) -> Option<Retained<MPMediaItemArtwork>>;
68
69 #[cfg(feature = "MPMediaItem")]
70 #[unsafe(method(setArtwork:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setArtwork(&self, artwork: Option<&MPMediaItemArtwork>);
74
75 #[unsafe(method(playbackProgress))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn playbackProgress(&self) -> c_float;
81
82 #[unsafe(method(setPlaybackProgress:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn setPlaybackProgress(&self, playback_progress: c_float);
86
87 #[unsafe(method(isStreamingContent))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn isStreamingContent(&self) -> bool;
92
93 #[unsafe(method(setStreamingContent:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn setStreamingContent(&self, streaming_content: bool);
97
98 #[unsafe(method(isExplicitContent))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn isExplicitContent(&self) -> bool;
102
103 #[unsafe(method(setExplicitContent:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn setExplicitContent(&self, explicit_content: bool);
107
108 #[unsafe(method(isContainer))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn isContainer(&self) -> bool;
113
114 #[unsafe(method(setContainer:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setContainer(&self, container: bool);
118
119 #[unsafe(method(isPlayable))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn isPlayable(&self) -> bool;
127
128 #[unsafe(method(setPlayable:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn setPlayable(&self, playable: bool);
132 );
133}
134
135impl MPContentItem {
137 extern_methods!(
138 #[unsafe(method(init))]
139 #[unsafe(method_family = init)]
140 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
141
142 #[unsafe(method(new))]
143 #[unsafe(method_family = new)]
144 pub unsafe fn new() -> Retained<Self>;
145 );
146}