objc2_intents/generated/
INMediaItem.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct INMediaItem;
14);
15
16extern_conformance!(
17 unsafe impl NSCoding for INMediaItem {}
18);
19
20extern_conformance!(
21 unsafe impl NSCopying for INMediaItem {}
22);
23
24unsafe impl CopyingHelper for INMediaItem {
25 type Result = Self;
26}
27
28extern_conformance!(
29 unsafe impl NSObjectProtocol for INMediaItem {}
30);
31
32extern_conformance!(
33 unsafe impl NSSecureCoding for INMediaItem {}
34);
35
36impl INMediaItem {
37 extern_methods!(
38 #[unsafe(method(init))]
39 #[unsafe(method_family = init)]
40 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
41
42 #[cfg(all(feature = "INImage", feature = "INMediaItemType"))]
43 #[unsafe(method(initWithIdentifier:title:type:artwork:artist:))]
44 #[unsafe(method_family = init)]
45 pub unsafe fn initWithIdentifier_title_type_artwork_artist(
46 this: Allocated<Self>,
47 identifier: Option<&NSString>,
48 title: Option<&NSString>,
49 r#type: INMediaItemType,
50 artwork: Option<&INImage>,
51 artist: Option<&NSString>,
52 ) -> Retained<Self>;
53
54 #[cfg(all(feature = "INImage", feature = "INMediaItemType"))]
55 #[unsafe(method(initWithIdentifier:title:type:artwork:))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn initWithIdentifier_title_type_artwork(
58 this: Allocated<Self>,
59 identifier: Option<&NSString>,
60 title: Option<&NSString>,
61 r#type: INMediaItemType,
62 artwork: Option<&INImage>,
63 ) -> Retained<Self>;
64
65 #[unsafe(method(identifier))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
68
69 #[unsafe(method(title))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn title(&self) -> Option<Retained<NSString>>;
72
73 #[cfg(feature = "INMediaItemType")]
74 #[unsafe(method(type))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn r#type(&self) -> INMediaItemType;
77
78 #[cfg(feature = "INImage")]
79 #[unsafe(method(artwork))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn artwork(&self) -> Option<Retained<INImage>>;
82
83 #[unsafe(method(artist))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn artist(&self) -> Option<Retained<NSString>>;
86 );
87}
88
89impl INMediaItem {
91 extern_methods!(
92 #[unsafe(method(new))]
93 #[unsafe(method_family = new)]
94 pub unsafe fn new() -> Retained<Self>;
95 );
96}