objc2_intents/generated/
INSearchForNotebookItemsIntent.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/intents/insearchfornotebookitemsintent?language=objc)
14    #[unsafe(super(INIntent, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "INIntent")]
17    pub struct INSearchForNotebookItemsIntent;
18);
19
20#[cfg(feature = "INIntent")]
21extern_conformance!(
22    unsafe impl NSCoding for INSearchForNotebookItemsIntent {}
23);
24
25#[cfg(feature = "INIntent")]
26extern_conformance!(
27    unsafe impl NSCopying for INSearchForNotebookItemsIntent {}
28);
29
30#[cfg(feature = "INIntent")]
31unsafe impl CopyingHelper for INSearchForNotebookItemsIntent {
32    type Result = Self;
33}
34
35#[cfg(feature = "INIntent")]
36extern_conformance!(
37    unsafe impl NSObjectProtocol for INSearchForNotebookItemsIntent {}
38);
39
40#[cfg(feature = "INIntent")]
41extern_conformance!(
42    unsafe impl NSSecureCoding for INSearchForNotebookItemsIntent {}
43);
44
45#[cfg(feature = "INIntent")]
46impl INSearchForNotebookItemsIntent {
47    extern_methods!(
48        #[cfg(all(
49            feature = "INDateComponentsRange",
50            feature = "INDateSearchType",
51            feature = "INLocationSearchType",
52            feature = "INNotebookItemType",
53            feature = "INSpeakableString",
54            feature = "INTaskPriority",
55            feature = "INTaskStatus",
56            feature = "INTemporalEventTriggerTypeOptions",
57            feature = "objc2-core-location"
58        ))]
59        #[unsafe(method(initWithTitle:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:temporalEventTriggerTypes:taskPriority:notebookItemIdentifier:))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn initWithTitle_content_itemType_status_location_locationSearchType_dateTime_dateSearchType_temporalEventTriggerTypes_taskPriority_notebookItemIdentifier(
62            this: Allocated<Self>,
63            title: Option<&INSpeakableString>,
64            content: Option<&NSString>,
65            item_type: INNotebookItemType,
66            status: INTaskStatus,
67            location: Option<&CLPlacemark>,
68            location_search_type: INLocationSearchType,
69            date_time: Option<&INDateComponentsRange>,
70            date_search_type: INDateSearchType,
71            temporal_event_trigger_types: INTemporalEventTriggerTypeOptions,
72            task_priority: INTaskPriority,
73            notebook_item_identifier: Option<&NSString>,
74        ) -> Retained<Self>;
75
76        #[cfg(feature = "INSpeakableString")]
77        #[unsafe(method(title))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn title(&self) -> Option<Retained<INSpeakableString>>;
80
81        #[unsafe(method(content))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn content(&self) -> Option<Retained<NSString>>;
84
85        #[cfg(feature = "INNotebookItemType")]
86        #[unsafe(method(itemType))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn itemType(&self) -> INNotebookItemType;
89
90        #[cfg(feature = "INTaskStatus")]
91        #[unsafe(method(status))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn status(&self) -> INTaskStatus;
94
95        #[cfg(feature = "objc2-core-location")]
96        #[unsafe(method(location))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn location(&self) -> Option<Retained<CLPlacemark>>;
99
100        #[cfg(feature = "INLocationSearchType")]
101        #[unsafe(method(locationSearchType))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn locationSearchType(&self) -> INLocationSearchType;
104
105        #[cfg(feature = "INDateComponentsRange")]
106        #[unsafe(method(dateTime))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn dateTime(&self) -> Option<Retained<INDateComponentsRange>>;
109
110        #[cfg(feature = "INDateSearchType")]
111        #[unsafe(method(dateSearchType))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn dateSearchType(&self) -> INDateSearchType;
114
115        #[cfg(feature = "INTemporalEventTriggerTypeOptions")]
116        #[unsafe(method(temporalEventTriggerTypes))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn temporalEventTriggerTypes(&self) -> INTemporalEventTriggerTypeOptions;
119
120        #[cfg(feature = "INTaskPriority")]
121        #[unsafe(method(taskPriority))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn taskPriority(&self) -> INTaskPriority;
124
125        #[unsafe(method(notebookItemIdentifier))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn notebookItemIdentifier(&self) -> Option<Retained<NSString>>;
128    );
129}
130
131/// Methods declared on superclass `NSObject`.
132#[cfg(feature = "INIntent")]
133impl INSearchForNotebookItemsIntent {
134    extern_methods!(
135        #[unsafe(method(init))]
136        #[unsafe(method_family = init)]
137        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
138
139        #[unsafe(method(new))]
140        #[unsafe(method_family = new)]
141        pub unsafe fn new() -> Retained<Self>;
142    );
143}
144
145extern_protocol!(
146    /// Protocol to declare support for handling an INSearchForNotebookItemsIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
147    ///
148    /// The minimum requirement for an implementing class is that it should be able to handle the intent. The resolution and confirmation methods are optional. The handling method is always called last, after resolving and confirming the intent.
149    ///
150    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insearchfornotebookitemsintenthandling?language=objc)
151    pub unsafe trait INSearchForNotebookItemsIntentHandling: NSObjectProtocol {
152        #[cfg(all(
153            feature = "INIntent",
154            feature = "INIntentResponse",
155            feature = "INSearchForNotebookItemsIntentResponse",
156            feature = "block2"
157        ))]
158        /// Handling method - Execute the task represented by the INSearchForNotebookItemsIntent that's passed in
159        ///
160        /// Called to actually execute the intent. The app must return a response for this intent.
161        ///
162        ///
163        /// Parameter `intent`: The input intent
164        ///
165        /// Parameter `completion`: The response handling block takes a INSearchForNotebookItemsIntentResponse containing the details of the result of having executed the intent
166        ///
167        ///
168        /// See: INSearchForNotebookItemsIntentResponse
169        #[unsafe(method(handleSearchForNotebookItems:completion:))]
170        #[unsafe(method_family = none)]
171        unsafe fn handleSearchForNotebookItems_completion(
172            &self,
173            intent: &INSearchForNotebookItemsIntent,
174            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForNotebookItemsIntentResponse>)>,
175        );
176
177        #[cfg(all(
178            feature = "INIntent",
179            feature = "INIntentResponse",
180            feature = "INSearchForNotebookItemsIntentResponse",
181            feature = "block2"
182        ))]
183        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
184        ///
185        /// Called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid following resolution, and will assume there is no additional information relevant to this intent.
186        ///
187        ///
188        /// Parameter `intent`: The input intent
189        ///
190        /// Parameter `completion`: The response block contains an INSearchForNotebookItemsIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
191        ///
192        ///
193        /// See: INSearchForNotebookItemsIntentResponse
194        #[optional]
195        #[unsafe(method(confirmSearchForNotebookItems:completion:))]
196        #[unsafe(method_family = none)]
197        unsafe fn confirmSearchForNotebookItems_completion(
198            &self,
199            intent: &INSearchForNotebookItemsIntent,
200            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForNotebookItemsIntentResponse>)>,
201        );
202
203        #[cfg(all(
204            feature = "INIntent",
205            feature = "INIntentResolutionResult",
206            feature = "INSpeakableStringResolutionResult",
207            feature = "block2"
208        ))]
209        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
210        ///
211        /// Called to make sure the app extension is capable of handling this intent in its current form. This method is for validating if the intent needs any further fleshing out.
212        ///
213        ///
214        /// Parameter `intent`: The input intent
215        ///
216        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
217        ///
218        ///
219        /// See: INIntentResolutionResult
220        #[optional]
221        #[unsafe(method(resolveTitleForSearchForNotebookItems:withCompletion:))]
222        #[unsafe(method_family = none)]
223        unsafe fn resolveTitleForSearchForNotebookItems_withCompletion(
224            &self,
225            intent: &INSearchForNotebookItemsIntent,
226            completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
227        );
228
229        #[cfg(all(
230            feature = "INIntent",
231            feature = "INIntentResolutionResult",
232            feature = "INStringResolutionResult",
233            feature = "block2"
234        ))]
235        #[optional]
236        #[unsafe(method(resolveContentForSearchForNotebookItems:withCompletion:))]
237        #[unsafe(method_family = none)]
238        unsafe fn resolveContentForSearchForNotebookItems_withCompletion(
239            &self,
240            intent: &INSearchForNotebookItemsIntent,
241            completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
242        );
243
244        #[cfg(all(
245            feature = "INIntent",
246            feature = "INIntentResolutionResult",
247            feature = "INNotebookItemTypeResolutionResult",
248            feature = "block2"
249        ))]
250        #[optional]
251        #[unsafe(method(resolveItemTypeForSearchForNotebookItems:withCompletion:))]
252        #[unsafe(method_family = none)]
253        unsafe fn resolveItemTypeForSearchForNotebookItems_withCompletion(
254            &self,
255            intent: &INSearchForNotebookItemsIntent,
256            completion: &block2::DynBlock<dyn Fn(NonNull<INNotebookItemTypeResolutionResult>)>,
257        );
258
259        #[cfg(all(
260            feature = "INIntent",
261            feature = "INIntentResolutionResult",
262            feature = "INTaskStatusResolutionResult",
263            feature = "block2"
264        ))]
265        #[optional]
266        #[unsafe(method(resolveStatusForSearchForNotebookItems:withCompletion:))]
267        #[unsafe(method_family = none)]
268        unsafe fn resolveStatusForSearchForNotebookItems_withCompletion(
269            &self,
270            intent: &INSearchForNotebookItemsIntent,
271            completion: &block2::DynBlock<dyn Fn(NonNull<INTaskStatusResolutionResult>)>,
272        );
273
274        #[cfg(all(
275            feature = "INIntent",
276            feature = "INIntentResolutionResult",
277            feature = "INPlacemarkResolutionResult",
278            feature = "block2"
279        ))]
280        #[optional]
281        #[unsafe(method(resolveLocationForSearchForNotebookItems:withCompletion:))]
282        #[unsafe(method_family = none)]
283        unsafe fn resolveLocationForSearchForNotebookItems_withCompletion(
284            &self,
285            intent: &INSearchForNotebookItemsIntent,
286            completion: &block2::DynBlock<dyn Fn(NonNull<INPlacemarkResolutionResult>)>,
287        );
288
289        #[cfg(all(
290            feature = "INIntent",
291            feature = "INIntentResolutionResult",
292            feature = "INLocationSearchTypeResolutionResult",
293            feature = "block2"
294        ))]
295        #[optional]
296        #[unsafe(method(resolveLocationSearchTypeForSearchForNotebookItems:withCompletion:))]
297        #[unsafe(method_family = none)]
298        unsafe fn resolveLocationSearchTypeForSearchForNotebookItems_withCompletion(
299            &self,
300            intent: &INSearchForNotebookItemsIntent,
301            completion: &block2::DynBlock<dyn Fn(NonNull<INLocationSearchTypeResolutionResult>)>,
302        );
303
304        #[cfg(all(
305            feature = "INDateComponentsRangeResolutionResult",
306            feature = "INIntent",
307            feature = "INIntentResolutionResult",
308            feature = "block2"
309        ))]
310        #[optional]
311        #[unsafe(method(resolveDateTimeForSearchForNotebookItems:withCompletion:))]
312        #[unsafe(method_family = none)]
313        unsafe fn resolveDateTimeForSearchForNotebookItems_withCompletion(
314            &self,
315            intent: &INSearchForNotebookItemsIntent,
316            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
317        );
318
319        #[cfg(all(
320            feature = "INDateSearchTypeResolutionResult",
321            feature = "INIntent",
322            feature = "INIntentResolutionResult",
323            feature = "block2"
324        ))]
325        #[optional]
326        #[unsafe(method(resolveDateSearchTypeForSearchForNotebookItems:withCompletion:))]
327        #[unsafe(method_family = none)]
328        unsafe fn resolveDateSearchTypeForSearchForNotebookItems_withCompletion(
329            &self,
330            intent: &INSearchForNotebookItemsIntent,
331            completion: &block2::DynBlock<dyn Fn(NonNull<INDateSearchTypeResolutionResult>)>,
332        );
333
334        #[cfg(all(
335            feature = "INIntent",
336            feature = "INIntentResolutionResult",
337            feature = "INTemporalEventTriggerTypeOptionsResolutionResult",
338            feature = "block2"
339        ))]
340        #[optional]
341        #[unsafe(method(resolveTemporalEventTriggerTypesForSearchForNotebookItems:withCompletion:))]
342        #[unsafe(method_family = none)]
343        unsafe fn resolveTemporalEventTriggerTypesForSearchForNotebookItems_withCompletion(
344            &self,
345            intent: &INSearchForNotebookItemsIntent,
346            completion: &block2::DynBlock<
347                dyn Fn(NonNull<INTemporalEventTriggerTypeOptionsResolutionResult>),
348            >,
349        );
350
351        #[cfg(all(
352            feature = "INIntent",
353            feature = "INIntentResolutionResult",
354            feature = "INTaskPriorityResolutionResult",
355            feature = "block2"
356        ))]
357        #[optional]
358        #[unsafe(method(resolveTaskPriorityForSearchForNotebookItems:withCompletion:))]
359        #[unsafe(method_family = none)]
360        unsafe fn resolveTaskPriorityForSearchForNotebookItems_withCompletion(
361            &self,
362            intent: &INSearchForNotebookItemsIntent,
363            completion: &block2::DynBlock<dyn Fn(NonNull<INTaskPriorityResolutionResult>)>,
364        );
365    }
366);