1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MPContentItem;

    unsafe impl ClassType for MPContentItem {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for MPContentItem {}

extern_methods!(
    unsafe impl MPContentItem {
        #[method_id(@__retain_semantics Init initWithIdentifier:)]
        pub unsafe fn initWithIdentifier(this: Allocated<Self>, identifier: &NSString) -> Id<Self>;

        #[method_id(@__retain_semantics Other identifier)]
        pub unsafe fn identifier(&self) -> Id<NSString>;

        #[method_id(@__retain_semantics Other title)]
        pub unsafe fn title(&self) -> Option<Id<NSString>>;

        #[method(setTitle:)]
        pub unsafe fn setTitle(&self, title: Option<&NSString>);

        #[method_id(@__retain_semantics Other subtitle)]
        pub unsafe fn subtitle(&self) -> Option<Id<NSString>>;

        #[method(setSubtitle:)]
        pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);

        #[cfg(feature = "MPMediaItem")]
        #[method_id(@__retain_semantics Other artwork)]
        pub unsafe fn artwork(&self) -> Option<Id<MPMediaItemArtwork>>;

        #[cfg(feature = "MPMediaItem")]
        #[method(setArtwork:)]
        pub unsafe fn setArtwork(&self, artwork: Option<&MPMediaItemArtwork>);

        #[method(playbackProgress)]
        pub unsafe fn playbackProgress(&self) -> c_float;

        #[method(setPlaybackProgress:)]
        pub unsafe fn setPlaybackProgress(&self, playback_progress: c_float);

        #[method(isStreamingContent)]
        pub unsafe fn isStreamingContent(&self) -> bool;

        #[method(setStreamingContent:)]
        pub unsafe fn setStreamingContent(&self, streaming_content: bool);

        #[method(isExplicitContent)]
        pub unsafe fn isExplicitContent(&self) -> bool;

        #[method(setExplicitContent:)]
        pub unsafe fn setExplicitContent(&self, explicit_content: bool);

        #[method(isContainer)]
        pub unsafe fn isContainer(&self) -> bool;

        #[method(setContainer:)]
        pub unsafe fn setContainer(&self, container: bool);

        #[method(isPlayable)]
        pub unsafe fn isPlayable(&self) -> bool;

        #[method(setPlayable:)]
        pub unsafe fn setPlayable(&self, playable: bool);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl MPContentItem {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);