objc2_intents/generated/
INSearchForMediaIntentResponse.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INSearchForMediaIntentResponseCode(pub NSInteger);
15impl INSearchForMediaIntentResponseCode {
16 #[doc(alias = "INSearchForMediaIntentResponseCodeUnspecified")]
17 pub const Unspecified: Self = Self(0);
18 #[doc(alias = "INSearchForMediaIntentResponseCodeReady")]
19 pub const Ready: Self = Self(1);
20 #[doc(alias = "INSearchForMediaIntentResponseCodeContinueInApp")]
21 pub const ContinueInApp: Self = Self(2);
22 #[doc(alias = "INSearchForMediaIntentResponseCodeInProgress")]
23 pub const InProgress: Self = Self(3);
24 #[doc(alias = "INSearchForMediaIntentResponseCodeSuccess")]
25 pub const Success: Self = Self(4);
26 #[doc(alias = "INSearchForMediaIntentResponseCodeFailure")]
27 pub const Failure: Self = Self(5);
28 #[doc(alias = "INSearchForMediaIntentResponseCodeFailureRequiringAppLaunch")]
29 pub const FailureRequiringAppLaunch: Self = Self(6);
30}
31
32unsafe impl Encode for INSearchForMediaIntentResponseCode {
33 const ENCODING: Encoding = NSInteger::ENCODING;
34}
35
36unsafe impl RefEncode for INSearchForMediaIntentResponseCode {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40extern_class!(
41 #[unsafe(super(INIntentResponse, NSObject))]
43 #[derive(Debug, PartialEq, Eq, Hash)]
44 #[cfg(feature = "INIntentResponse")]
45 pub struct INSearchForMediaIntentResponse;
46);
47
48#[cfg(feature = "INIntentResponse")]
49extern_conformance!(
50 unsafe impl NSCoding for INSearchForMediaIntentResponse {}
51);
52
53#[cfg(feature = "INIntentResponse")]
54extern_conformance!(
55 unsafe impl NSCopying for INSearchForMediaIntentResponse {}
56);
57
58#[cfg(feature = "INIntentResponse")]
59unsafe impl CopyingHelper for INSearchForMediaIntentResponse {
60 type Result = Self;
61}
62
63#[cfg(feature = "INIntentResponse")]
64extern_conformance!(
65 unsafe impl NSObjectProtocol for INSearchForMediaIntentResponse {}
66);
67
68#[cfg(feature = "INIntentResponse")]
69extern_conformance!(
70 unsafe impl NSSecureCoding for INSearchForMediaIntentResponse {}
71);
72
73#[cfg(feature = "INIntentResponse")]
74impl INSearchForMediaIntentResponse {
75 extern_methods!(
76 #[unsafe(method(init))]
77 #[unsafe(method_family = init)]
78 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
79
80 #[unsafe(method(initWithCode:userActivity:))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn initWithCode_userActivity(
83 this: Allocated<Self>,
84 code: INSearchForMediaIntentResponseCode,
85 user_activity: Option<&NSUserActivity>,
86 ) -> Retained<Self>;
87
88 #[unsafe(method(code))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn code(&self) -> INSearchForMediaIntentResponseCode;
91
92 #[cfg(feature = "INMediaItem")]
93 #[unsafe(method(mediaItems))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn mediaItems(&self) -> Option<Retained<NSArray<INMediaItem>>>;
96
97 #[cfg(feature = "INMediaItem")]
98 #[unsafe(method(setMediaItems:))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn setMediaItems(&self, media_items: Option<&NSArray<INMediaItem>>);
104 );
105}
106
107#[cfg(feature = "INIntentResponse")]
109impl INSearchForMediaIntentResponse {
110 extern_methods!(
111 #[unsafe(method(new))]
112 #[unsafe(method_family = new)]
113 pub unsafe fn new() -> Retained<Self>;
114 );
115}