objc2_intents/generated/
INSearchForMessagesIntentResponse.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 INSearchForMessagesIntentResponseCode(pub NSInteger);
15impl INSearchForMessagesIntentResponseCode {
16 #[doc(alias = "INSearchForMessagesIntentResponseCodeUnspecified")]
17 pub const Unspecified: Self = Self(0);
18 #[doc(alias = "INSearchForMessagesIntentResponseCodeReady")]
19 pub const Ready: Self = Self(1);
20 #[doc(alias = "INSearchForMessagesIntentResponseCodeInProgress")]
21 pub const InProgress: Self = Self(2);
22 #[doc(alias = "INSearchForMessagesIntentResponseCodeSuccess")]
23 pub const Success: Self = Self(3);
24 #[doc(alias = "INSearchForMessagesIntentResponseCodeFailure")]
25 pub const Failure: Self = Self(4);
26 #[doc(alias = "INSearchForMessagesIntentResponseCodeFailureRequiringAppLaunch")]
27 pub const FailureRequiringAppLaunch: Self = Self(5);
28 #[doc(alias = "INSearchForMessagesIntentResponseCodeFailureMessageServiceNotAvailable")]
29 pub const FailureMessageServiceNotAvailable: Self = Self(6);
30 #[doc(alias = "INSearchForMessagesIntentResponseCodeFailureMessageTooManyResults")]
31 pub const FailureMessageTooManyResults: Self = Self(7);
32 #[doc(alias = "INSearchForMessagesIntentResponseCodeFailureRequiringInAppAuthentication")]
33 pub const FailureRequiringInAppAuthentication: Self = Self(8);
34}
35
36unsafe impl Encode for INSearchForMessagesIntentResponseCode {
37 const ENCODING: Encoding = NSInteger::ENCODING;
38}
39
40unsafe impl RefEncode for INSearchForMessagesIntentResponseCode {
41 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
42}
43
44extern_class!(
45 #[unsafe(super(INIntentResponse, NSObject))]
47 #[derive(Debug, PartialEq, Eq, Hash)]
48 #[cfg(feature = "INIntentResponse")]
49 pub struct INSearchForMessagesIntentResponse;
50);
51
52#[cfg(feature = "INIntentResponse")]
53extern_conformance!(
54 unsafe impl NSCoding for INSearchForMessagesIntentResponse {}
55);
56
57#[cfg(feature = "INIntentResponse")]
58extern_conformance!(
59 unsafe impl NSCopying for INSearchForMessagesIntentResponse {}
60);
61
62#[cfg(feature = "INIntentResponse")]
63unsafe impl CopyingHelper for INSearchForMessagesIntentResponse {
64 type Result = Self;
65}
66
67#[cfg(feature = "INIntentResponse")]
68extern_conformance!(
69 unsafe impl NSObjectProtocol for INSearchForMessagesIntentResponse {}
70);
71
72#[cfg(feature = "INIntentResponse")]
73extern_conformance!(
74 unsafe impl NSSecureCoding for INSearchForMessagesIntentResponse {}
75);
76
77#[cfg(feature = "INIntentResponse")]
78impl INSearchForMessagesIntentResponse {
79 extern_methods!(
80 #[unsafe(method(init))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84 #[unsafe(method(initWithCode:userActivity:))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn initWithCode_userActivity(
87 this: Allocated<Self>,
88 code: INSearchForMessagesIntentResponseCode,
89 user_activity: Option<&NSUserActivity>,
90 ) -> Retained<Self>;
91
92 #[unsafe(method(code))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn code(&self) -> INSearchForMessagesIntentResponseCode;
95
96 #[cfg(feature = "INMessage")]
97 #[unsafe(method(messages))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn messages(&self) -> Option<Retained<NSArray<INMessage>>>;
100
101 #[cfg(feature = "INMessage")]
102 #[unsafe(method(setMessages:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setMessages(&self, messages: Option<&NSArray<INMessage>>);
108 );
109}
110
111#[cfg(feature = "INIntentResponse")]
113impl INSearchForMessagesIntentResponse {
114 extern_methods!(
115 #[unsafe(method(new))]
116 #[unsafe(method_family = new)]
117 pub unsafe fn new() -> Retained<Self>;
118 );
119}