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