objc2_intents/generated/
INCreateTaskListIntent.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/intents/increatetasklistintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INCreateTaskListIntent is deprecated. There is no replacement."]
16    pub struct INCreateTaskListIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INCreateTaskListIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INCreateTaskListIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INCreateTaskListIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INCreateTaskListIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INCreateTaskListIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INCreateTaskListIntent {
46    extern_methods!(
47        #[cfg(feature = "INSpeakableString")]
48        #[deprecated = "INCreateTaskListIntent is deprecated. There is no replacement."]
49        #[unsafe(method(initWithTitle:taskTitles:groupName:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithTitle_taskTitles_groupName(
52            this: Allocated<Self>,
53            title: Option<&INSpeakableString>,
54            task_titles: Option<&NSArray<INSpeakableString>>,
55            group_name: Option<&INSpeakableString>,
56        ) -> Retained<Self>;
57
58        #[cfg(feature = "INSpeakableString")]
59        #[deprecated = "INCreateTaskListIntent is deprecated. There is no replacement."]
60        #[unsafe(method(title))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn title(&self) -> Option<Retained<INSpeakableString>>;
63
64        #[cfg(feature = "INSpeakableString")]
65        #[deprecated = "INCreateTaskListIntent is deprecated. There is no replacement."]
66        #[unsafe(method(taskTitles))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn taskTitles(&self) -> Option<Retained<NSArray<INSpeakableString>>>;
69
70        #[cfg(feature = "INSpeakableString")]
71        #[deprecated = "INCreateTaskListIntent is deprecated. There is no replacement."]
72        #[unsafe(method(groupName))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn groupName(&self) -> Option<Retained<INSpeakableString>>;
75    );
76}
77
78/// Methods declared on superclass `NSObject`.
79#[cfg(feature = "INIntent")]
80impl INCreateTaskListIntent {
81    extern_methods!(
82        #[unsafe(method(init))]
83        #[unsafe(method_family = init)]
84        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85
86        #[unsafe(method(new))]
87        #[unsafe(method_family = new)]
88        pub unsafe fn new() -> Retained<Self>;
89    );
90}
91
92extern_protocol!(
93    /// Protocol to declare support for handling an INCreateTaskListIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
94    ///
95    /// 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.
96    ///
97    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/increatetasklistintenthandling?language=objc)
98    #[deprecated = "INCreateTaskListIntentHandling is deprecated. There is no replacement."]
99    pub unsafe trait INCreateTaskListIntentHandling: NSObjectProtocol {
100        #[cfg(all(
101            feature = "INCreateTaskListIntentResponse",
102            feature = "INIntent",
103            feature = "INIntentResponse",
104            feature = "block2"
105        ))]
106        /// Handling method - Execute the task represented by the INCreateTaskListIntent that's passed in
107        ///
108        /// Called to actually execute the intent. The app must return a response for this intent.
109        ///
110        ///
111        /// Parameter `intent`: The input intent
112        ///
113        /// Parameter `completion`: The response handling block takes a INCreateTaskListIntentResponse containing the details of the result of having executed the intent
114        ///
115        ///
116        /// See: INCreateTaskListIntentResponse
117        #[deprecated = "INCreateTaskListIntentHandling is deprecated. There is no replacement."]
118        #[unsafe(method(handleCreateTaskList:completion:))]
119        #[unsafe(method_family = none)]
120        unsafe fn handleCreateTaskList_completion(
121            &self,
122            intent: &INCreateTaskListIntent,
123            completion: &block2::DynBlock<dyn Fn(NonNull<INCreateTaskListIntentResponse>)>,
124        );
125
126        #[cfg(all(
127            feature = "INCreateTaskListIntentResponse",
128            feature = "INIntent",
129            feature = "INIntentResponse",
130            feature = "block2"
131        ))]
132        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
133        ///
134        /// 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.
135        ///
136        ///
137        /// Parameter `intent`: The input intent
138        ///
139        /// Parameter `completion`: The response block contains an INCreateTaskListIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
140        ///
141        ///
142        /// See: INCreateTaskListIntentResponse
143        #[deprecated = "INCreateTaskListIntentHandling is deprecated. There is no replacement."]
144        #[optional]
145        #[unsafe(method(confirmCreateTaskList:completion:))]
146        #[unsafe(method_family = none)]
147        unsafe fn confirmCreateTaskList_completion(
148            &self,
149            intent: &INCreateTaskListIntent,
150            completion: &block2::DynBlock<dyn Fn(NonNull<INCreateTaskListIntentResponse>)>,
151        );
152
153        #[cfg(all(
154            feature = "INIntent",
155            feature = "INIntentResolutionResult",
156            feature = "INSpeakableStringResolutionResult",
157            feature = "block2"
158        ))]
159        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
160        ///
161        /// 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.
162        ///
163        ///
164        /// Parameter `intent`: The input intent
165        ///
166        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
167        ///
168        ///
169        /// See: INIntentResolutionResult
170        #[deprecated = "INCreateTaskListIntentHandling is deprecated. There is no replacement."]
171        #[optional]
172        #[unsafe(method(resolveTitleForCreateTaskList:withCompletion:))]
173        #[unsafe(method_family = none)]
174        unsafe fn resolveTitleForCreateTaskList_withCompletion(
175            &self,
176            intent: &INCreateTaskListIntent,
177            completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
178        );
179
180        #[cfg(all(
181            feature = "INIntent",
182            feature = "INIntentResolutionResult",
183            feature = "INSpeakableStringResolutionResult",
184            feature = "block2"
185        ))]
186        #[deprecated = "INCreateTaskListIntentHandling is deprecated. There is no replacement."]
187        #[optional]
188        #[unsafe(method(resolveTaskTitlesForCreateTaskList:withCompletion:))]
189        #[unsafe(method_family = none)]
190        unsafe fn resolveTaskTitlesForCreateTaskList_withCompletion(
191            &self,
192            intent: &INCreateTaskListIntent,
193            completion: &block2::DynBlock<
194                dyn Fn(NonNull<NSArray<INSpeakableStringResolutionResult>>),
195            >,
196        );
197
198        #[cfg(all(
199            feature = "INIntent",
200            feature = "INIntentResolutionResult",
201            feature = "INSpeakableStringResolutionResult",
202            feature = "block2"
203        ))]
204        #[deprecated = "INCreateTaskListIntentHandling is deprecated. There is no replacement."]
205        #[optional]
206        #[unsafe(method(resolveGroupNameForCreateTaskList:withCompletion:))]
207        #[unsafe(method_family = none)]
208        unsafe fn resolveGroupNameForCreateTaskList_withCompletion(
209            &self,
210            intent: &INCreateTaskListIntent,
211            completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
212        );
213    }
214);