objc2_media_player/generated/
MPMusicPlayerQueueDescriptor.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    /// [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpmusicplayerqueuedescriptor?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct MPMusicPlayerQueueDescriptor;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for MPMusicPlayerQueueDescriptor {}
19);
20
21impl MPMusicPlayerQueueDescriptor {
22    extern_methods!(
23        #[unsafe(method(new))]
24        #[unsafe(method_family = new)]
25        pub unsafe fn new() -> Retained<Self>;
26
27        #[unsafe(method(init))]
28        #[unsafe(method_family = init)]
29        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
30    );
31}
32
33extern_class!(
34    /// [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpmusicplayermediaitemqueuedescriptor?language=objc)
35    #[unsafe(super(MPMusicPlayerQueueDescriptor, NSObject))]
36    #[derive(Debug, PartialEq, Eq, Hash)]
37    pub struct MPMusicPlayerMediaItemQueueDescriptor;
38);
39
40extern_conformance!(
41    unsafe impl NSObjectProtocol for MPMusicPlayerMediaItemQueueDescriptor {}
42);
43
44impl MPMusicPlayerMediaItemQueueDescriptor {
45    extern_methods!(
46        #[cfg(feature = "MPMediaQuery")]
47        #[unsafe(method(initWithQuery:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithQuery(this: Allocated<Self>, query: &MPMediaQuery) -> Retained<Self>;
50
51        #[cfg(all(feature = "MPMediaEntity", feature = "MPMediaItemCollection"))]
52        #[unsafe(method(initWithItemCollection:))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn initWithItemCollection(
55            this: Allocated<Self>,
56            item_collection: &MPMediaItemCollection,
57        ) -> Retained<Self>;
58
59        #[cfg(feature = "MPMediaQuery")]
60        #[unsafe(method(query))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn query(&self) -> Retained<MPMediaQuery>;
63
64        #[cfg(all(feature = "MPMediaEntity", feature = "MPMediaItemCollection"))]
65        #[unsafe(method(itemCollection))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn itemCollection(&self) -> Retained<MPMediaItemCollection>;
68
69        #[cfg(all(feature = "MPMediaEntity", feature = "MPMediaItem"))]
70        #[unsafe(method(startItem))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn startItem(&self) -> Option<Retained<MPMediaItem>>;
73
74        #[cfg(all(feature = "MPMediaEntity", feature = "MPMediaItem"))]
75        /// Setter for [`startItem`][Self::startItem].
76        #[unsafe(method(setStartItem:))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn setStartItem(&self, start_item: Option<&MPMediaItem>);
79
80        #[cfg(all(feature = "MPMediaEntity", feature = "MPMediaItem"))]
81        #[unsafe(method(setStartTime:forItem:))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn setStartTime_forItem(
84            &self,
85            start_time: NSTimeInterval,
86            media_item: &MPMediaItem,
87        );
88
89        #[cfg(all(feature = "MPMediaEntity", feature = "MPMediaItem"))]
90        #[unsafe(method(setEndTime:forItem:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setEndTime_forItem(&self, end_time: NSTimeInterval, media_item: &MPMediaItem);
93    );
94}
95
96/// Methods declared on superclass `MPMusicPlayerQueueDescriptor`.
97impl MPMusicPlayerMediaItemQueueDescriptor {
98    extern_methods!(
99        #[unsafe(method(new))]
100        #[unsafe(method_family = new)]
101        pub unsafe fn new() -> Retained<Self>;
102
103        #[unsafe(method(init))]
104        #[unsafe(method_family = init)]
105        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
106    );
107}
108
109extern_class!(
110    /// [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpmusicplayerstorequeuedescriptor?language=objc)
111    #[unsafe(super(MPMusicPlayerQueueDescriptor, NSObject))]
112    #[derive(Debug, PartialEq, Eq, Hash)]
113    pub struct MPMusicPlayerStoreQueueDescriptor;
114);
115
116extern_conformance!(
117    unsafe impl NSObjectProtocol for MPMusicPlayerStoreQueueDescriptor {}
118);
119
120impl MPMusicPlayerStoreQueueDescriptor {
121    extern_methods!(
122        #[unsafe(method(initWithStoreIDs:))]
123        #[unsafe(method_family = init)]
124        pub unsafe fn initWithStoreIDs(
125            this: Allocated<Self>,
126            store_i_ds: &NSArray<NSString>,
127        ) -> Retained<Self>;
128
129        #[unsafe(method(storeIDs))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn storeIDs(&self) -> Option<Retained<NSArray<NSString>>>;
132
133        /// Setter for [`storeIDs`][Self::storeIDs].
134        ///
135        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
136        #[unsafe(method(setStoreIDs:))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn setStoreIDs(&self, store_i_ds: Option<&NSArray<NSString>>);
139
140        #[unsafe(method(startItemID))]
141        #[unsafe(method_family = none)]
142        pub unsafe fn startItemID(&self) -> Option<Retained<NSString>>;
143
144        /// Setter for [`startItemID`][Self::startItemID].
145        ///
146        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
147        #[unsafe(method(setStartItemID:))]
148        #[unsafe(method_family = none)]
149        pub unsafe fn setStartItemID(&self, start_item_id: Option<&NSString>);
150
151        #[unsafe(method(setStartTime:forItemWithStoreID:))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn setStartTime_forItemWithStoreID(
154            &self,
155            start_time: NSTimeInterval,
156            store_id: &NSString,
157        );
158
159        #[unsafe(method(setEndTime:forItemWithStoreID:))]
160        #[unsafe(method_family = none)]
161        pub unsafe fn setEndTime_forItemWithStoreID(
162            &self,
163            end_time: NSTimeInterval,
164            store_id: &NSString,
165        );
166    );
167}
168
169/// Methods declared on superclass `MPMusicPlayerQueueDescriptor`.
170impl MPMusicPlayerStoreQueueDescriptor {
171    extern_methods!(
172        #[unsafe(method(new))]
173        #[unsafe(method_family = new)]
174        pub unsafe fn new() -> Retained<Self>;
175
176        #[unsafe(method(init))]
177        #[unsafe(method_family = init)]
178        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
179    );
180}
181
182extern_class!(
183    /// [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpmusicplayerplayparameters?language=objc)
184    #[unsafe(super(NSObject))]
185    #[derive(Debug, PartialEq, Eq, Hash)]
186    pub struct MPMusicPlayerPlayParameters;
187);
188
189extern_conformance!(
190    unsafe impl NSObjectProtocol for MPMusicPlayerPlayParameters {}
191);
192
193impl MPMusicPlayerPlayParameters {
194    extern_methods!(
195        /// # Safety
196        ///
197        /// `dictionary` generic should be of the correct type.
198        #[unsafe(method(initWithDictionary:))]
199        #[unsafe(method_family = init)]
200        pub unsafe fn initWithDictionary(
201            this: Allocated<Self>,
202            dictionary: &NSDictionary<NSString, AnyObject>,
203        ) -> Option<Retained<Self>>;
204
205        #[unsafe(method(dictionary))]
206        #[unsafe(method_family = none)]
207        pub unsafe fn dictionary(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
208    );
209}
210
211/// Methods declared on superclass `NSObject`.
212impl MPMusicPlayerPlayParameters {
213    extern_methods!(
214        #[unsafe(method(init))]
215        #[unsafe(method_family = init)]
216        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
217
218        #[unsafe(method(new))]
219        #[unsafe(method_family = new)]
220        pub unsafe fn new() -> Retained<Self>;
221    );
222}
223
224extern_class!(
225    /// [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpmusicplayerplayparametersqueuedescriptor?language=objc)
226    #[unsafe(super(MPMusicPlayerQueueDescriptor, NSObject))]
227    #[derive(Debug, PartialEq, Eq, Hash)]
228    pub struct MPMusicPlayerPlayParametersQueueDescriptor;
229);
230
231extern_conformance!(
232    unsafe impl NSObjectProtocol for MPMusicPlayerPlayParametersQueueDescriptor {}
233);
234
235impl MPMusicPlayerPlayParametersQueueDescriptor {
236    extern_methods!(
237        #[unsafe(method(initWithPlayParametersQueue:))]
238        #[unsafe(method_family = init)]
239        pub unsafe fn initWithPlayParametersQueue(
240            this: Allocated<Self>,
241            play_parameters_queue: &NSArray<MPMusicPlayerPlayParameters>,
242        ) -> Retained<Self>;
243
244        #[unsafe(method(playParametersQueue))]
245        #[unsafe(method_family = none)]
246        pub unsafe fn playParametersQueue(&self) -> Retained<NSArray<MPMusicPlayerPlayParameters>>;
247
248        /// Setter for [`playParametersQueue`][Self::playParametersQueue].
249        ///
250        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
251        #[unsafe(method(setPlayParametersQueue:))]
252        #[unsafe(method_family = none)]
253        pub unsafe fn setPlayParametersQueue(
254            &self,
255            play_parameters_queue: &NSArray<MPMusicPlayerPlayParameters>,
256        );
257
258        #[unsafe(method(startItemPlayParameters))]
259        #[unsafe(method_family = none)]
260        pub unsafe fn startItemPlayParameters(
261            &self,
262        ) -> Option<Retained<MPMusicPlayerPlayParameters>>;
263
264        /// Setter for [`startItemPlayParameters`][Self::startItemPlayParameters].
265        #[unsafe(method(setStartItemPlayParameters:))]
266        #[unsafe(method_family = none)]
267        pub unsafe fn setStartItemPlayParameters(
268            &self,
269            start_item_play_parameters: Option<&MPMusicPlayerPlayParameters>,
270        );
271
272        #[unsafe(method(setStartTime:forItemWithPlayParameters:))]
273        #[unsafe(method_family = none)]
274        pub unsafe fn setStartTime_forItemWithPlayParameters(
275            &self,
276            start_time: NSTimeInterval,
277            play_parameters: &MPMusicPlayerPlayParameters,
278        );
279
280        #[unsafe(method(setEndTime:forItemWithPlayParameters:))]
281        #[unsafe(method_family = none)]
282        pub unsafe fn setEndTime_forItemWithPlayParameters(
283            &self,
284            end_time: NSTimeInterval,
285            play_parameters: &MPMusicPlayerPlayParameters,
286        );
287    );
288}
289
290/// Methods declared on superclass `MPMusicPlayerQueueDescriptor`.
291impl MPMusicPlayerPlayParametersQueueDescriptor {
292    extern_methods!(
293        #[unsafe(method(new))]
294        #[unsafe(method_family = new)]
295        pub unsafe fn new() -> Retained<Self>;
296
297        #[unsafe(method(init))]
298        #[unsafe(method_family = init)]
299        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
300    );
301}