objc2_intents/generated/
INSearchForMessagesIntent.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(INIntent, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "INIntent")]
15 pub struct INSearchForMessagesIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INSearchForMessagesIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INSearchForMessagesIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INSearchForMessagesIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INSearchForMessagesIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INSearchForMessagesIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INSearchForMessagesIntent {
45 extern_methods!(
46 #[cfg(all(
47 feature = "INDateComponentsRange",
48 feature = "INMessageAttributeOptions",
49 feature = "INPerson",
50 feature = "INSpeakableString"
51 ))]
52 #[unsafe(method(initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:conversationIdentifiers:))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn initWithRecipients_senders_searchTerms_attributes_dateTimeRange_identifiers_notificationIdentifiers_speakableGroupNames_conversationIdentifiers(
55 this: Allocated<Self>,
56 recipients: Option<&NSArray<INPerson>>,
57 senders: Option<&NSArray<INPerson>>,
58 search_terms: Option<&NSArray<NSString>>,
59 attributes: INMessageAttributeOptions,
60 date_time_range: Option<&INDateComponentsRange>,
61 identifiers: Option<&NSArray<NSString>>,
62 notification_identifiers: Option<&NSArray<NSString>>,
63 speakable_group_names: Option<&NSArray<INSpeakableString>>,
64 conversation_identifiers: Option<&NSArray<NSString>>,
65 ) -> Retained<Self>;
66
67 #[cfg(feature = "INPerson")]
68 #[unsafe(method(recipients))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn recipients(&self) -> Option<Retained<NSArray<INPerson>>>;
71
72 #[cfg(feature = "INConditionalOperator")]
73 #[unsafe(method(recipientsOperator))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn recipientsOperator(&self) -> INConditionalOperator;
76
77 #[cfg(feature = "INPerson")]
78 #[unsafe(method(senders))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn senders(&self) -> Option<Retained<NSArray<INPerson>>>;
81
82 #[cfg(feature = "INConditionalOperator")]
83 #[unsafe(method(sendersOperator))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn sendersOperator(&self) -> INConditionalOperator;
86
87 #[unsafe(method(searchTerms))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn searchTerms(&self) -> Option<Retained<NSArray<NSString>>>;
90
91 #[cfg(feature = "INConditionalOperator")]
92 #[unsafe(method(searchTermsOperator))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn searchTermsOperator(&self) -> INConditionalOperator;
95
96 #[cfg(feature = "INMessageAttributeOptions")]
97 #[unsafe(method(attributes))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn attributes(&self) -> INMessageAttributeOptions;
100
101 #[cfg(feature = "INDateComponentsRange")]
102 #[unsafe(method(dateTimeRange))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn dateTimeRange(&self) -> Option<Retained<INDateComponentsRange>>;
105
106 #[unsafe(method(identifiers))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn identifiers(&self) -> Option<Retained<NSArray<NSString>>>;
109
110 #[cfg(feature = "INConditionalOperator")]
111 #[unsafe(method(identifiersOperator))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn identifiersOperator(&self) -> INConditionalOperator;
114
115 #[unsafe(method(notificationIdentifiers))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn notificationIdentifiers(&self) -> Option<Retained<NSArray<NSString>>>;
118
119 #[cfg(feature = "INConditionalOperator")]
120 #[unsafe(method(notificationIdentifiersOperator))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn notificationIdentifiersOperator(&self) -> INConditionalOperator;
123
124 #[cfg(feature = "INSpeakableString")]
125 #[unsafe(method(speakableGroupNames))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn speakableGroupNames(&self) -> Option<Retained<NSArray<INSpeakableString>>>;
128
129 #[cfg(feature = "INConditionalOperator")]
130 #[unsafe(method(speakableGroupNamesOperator))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn speakableGroupNamesOperator(&self) -> INConditionalOperator;
133
134 #[unsafe(method(conversationIdentifiers))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn conversationIdentifiers(&self) -> Option<Retained<NSArray<NSString>>>;
137
138 #[cfg(feature = "INConditionalOperator")]
139 #[unsafe(method(conversationIdentifiersOperator))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn conversationIdentifiersOperator(&self) -> INConditionalOperator;
142 );
143}
144
145#[cfg(feature = "INIntent")]
147impl INSearchForMessagesIntent {
148 extern_methods!(
149 #[unsafe(method(init))]
150 #[unsafe(method_family = init)]
151 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
152
153 #[unsafe(method(new))]
154 #[unsafe(method_family = new)]
155 pub unsafe fn new() -> Retained<Self>;
156 );
157}
158
159extern_protocol!(
160 pub unsafe trait INSearchForMessagesIntentHandling: NSObjectProtocol {
166 #[cfg(all(
167 feature = "INIntent",
168 feature = "INIntentResponse",
169 feature = "INSearchForMessagesIntentResponse",
170 feature = "block2"
171 ))]
172 #[unsafe(method(handleSearchForMessages:completion:))]
184 #[unsafe(method_family = none)]
185 unsafe fn handleSearchForMessages_completion(
186 &self,
187 intent: &INSearchForMessagesIntent,
188 completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForMessagesIntentResponse>)>,
189 );
190
191 #[cfg(all(
192 feature = "INIntent",
193 feature = "INIntentResponse",
194 feature = "INSearchForMessagesIntentResponse",
195 feature = "block2"
196 ))]
197 #[optional]
209 #[unsafe(method(confirmSearchForMessages:completion:))]
210 #[unsafe(method_family = none)]
211 unsafe fn confirmSearchForMessages_completion(
212 &self,
213 intent: &INSearchForMessagesIntent,
214 completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForMessagesIntentResponse>)>,
215 );
216
217 #[cfg(all(
218 feature = "INIntent",
219 feature = "INIntentResolutionResult",
220 feature = "INPersonResolutionResult",
221 feature = "block2"
222 ))]
223 #[optional]
235 #[unsafe(method(resolveRecipientsForSearchForMessages:withCompletion:))]
236 #[unsafe(method_family = none)]
237 unsafe fn resolveRecipientsForSearchForMessages_withCompletion(
238 &self,
239 intent: &INSearchForMessagesIntent,
240 completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INPersonResolutionResult>>)>,
241 );
242
243 #[cfg(all(
244 feature = "INIntent",
245 feature = "INIntentResolutionResult",
246 feature = "INPersonResolutionResult",
247 feature = "block2"
248 ))]
249 #[optional]
250 #[unsafe(method(resolveSendersForSearchForMessages:withCompletion:))]
251 #[unsafe(method_family = none)]
252 unsafe fn resolveSendersForSearchForMessages_withCompletion(
253 &self,
254 intent: &INSearchForMessagesIntent,
255 completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INPersonResolutionResult>>)>,
256 );
257
258 #[cfg(all(
259 feature = "INIntent",
260 feature = "INIntentResolutionResult",
261 feature = "INMessageAttributeOptionsResolutionResult",
262 feature = "block2"
263 ))]
264 #[optional]
265 #[unsafe(method(resolveAttributesForSearchForMessages:withCompletion:))]
266 #[unsafe(method_family = none)]
267 unsafe fn resolveAttributesForSearchForMessages_withCompletion(
268 &self,
269 intent: &INSearchForMessagesIntent,
270 completion: &block2::DynBlock<
271 dyn Fn(NonNull<INMessageAttributeOptionsResolutionResult>),
272 >,
273 );
274
275 #[cfg(all(
276 feature = "INDateComponentsRangeResolutionResult",
277 feature = "INIntent",
278 feature = "INIntentResolutionResult",
279 feature = "block2"
280 ))]
281 #[optional]
282 #[unsafe(method(resolveDateTimeRangeForSearchForMessages:withCompletion:))]
283 #[unsafe(method_family = none)]
284 unsafe fn resolveDateTimeRangeForSearchForMessages_withCompletion(
285 &self,
286 intent: &INSearchForMessagesIntent,
287 completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
288 );
289
290 #[cfg(all(
291 feature = "INIntent",
292 feature = "INIntentResolutionResult",
293 feature = "INStringResolutionResult",
294 feature = "block2"
295 ))]
296 #[deprecated = "resolveGroupNamesForSearchForMessages:withCompletion: is deprecated. Use resolveSpeakableGroupNamesForSearchForMessages:withCompletion: instead"]
297 #[optional]
298 #[unsafe(method(resolveGroupNamesForSearchForMessages:withCompletion:))]
299 #[unsafe(method_family = none)]
300 unsafe fn resolveGroupNamesForSearchForMessages_withCompletion(
301 &self,
302 intent: &INSearchForMessagesIntent,
303 completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INStringResolutionResult>>)>,
304 );
305
306 #[cfg(all(
307 feature = "INIntent",
308 feature = "INIntentResolutionResult",
309 feature = "INSpeakableStringResolutionResult",
310 feature = "block2"
311 ))]
312 #[optional]
313 #[unsafe(method(resolveSpeakableGroupNamesForSearchForMessages:withCompletion:))]
314 #[unsafe(method_family = none)]
315 unsafe fn resolveSpeakableGroupNamesForSearchForMessages_withCompletion(
316 &self,
317 intent: &INSearchForMessagesIntent,
318 completion: &block2::DynBlock<
319 dyn Fn(NonNull<NSArray<INSpeakableStringResolutionResult>>),
320 >,
321 );
322 }
323);