objc2_intents/generated/
INDeleteTasksIntent.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/indeletetasksintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INDeleteTasksIntent is deprecated. There is no replacement."]
16    pub struct INDeleteTasksIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INDeleteTasksIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INDeleteTasksIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INDeleteTasksIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INDeleteTasksIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INDeleteTasksIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INDeleteTasksIntent {
46    extern_methods!(
47        #[cfg(all(feature = "INTask", feature = "INTaskList"))]
48        #[deprecated = "INDeleteTasksIntent is deprecated. There is no replacement."]
49        #[unsafe(method(initWithTaskList:tasks:all:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithTaskList_tasks_all(
52            this: Allocated<Self>,
53            task_list: Option<&INTaskList>,
54            tasks: Option<&NSArray<INTask>>,
55            all: Option<&NSNumber>,
56        ) -> Retained<Self>;
57
58        #[cfg(feature = "INTaskList")]
59        #[deprecated = "INDeleteTasksIntent is deprecated. There is no replacement."]
60        #[unsafe(method(taskList))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn taskList(&self) -> Option<Retained<INTaskList>>;
63
64        #[cfg(feature = "INTask")]
65        #[deprecated = "INDeleteTasksIntent is deprecated. There is no replacement."]
66        #[unsafe(method(tasks))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn tasks(&self) -> Option<Retained<NSArray<INTask>>>;
69
70        #[deprecated = "INDeleteTasksIntent is deprecated. There is no replacement."]
71        #[unsafe(method(all))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn all(&self) -> Option<Retained<NSNumber>>;
74    );
75}
76
77/// Methods declared on superclass `NSObject`.
78#[cfg(feature = "INIntent")]
79impl INDeleteTasksIntent {
80    extern_methods!(
81        #[unsafe(method(init))]
82        #[unsafe(method_family = init)]
83        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
84
85        #[unsafe(method(new))]
86        #[unsafe(method_family = new)]
87        pub unsafe fn new() -> Retained<Self>;
88    );
89}
90
91extern_protocol!(
92    /// Protocol to declare support for handling an INDeleteTasksIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
93    ///
94    /// 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.
95    ///
96    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/indeletetasksintenthandling?language=objc)
97    #[deprecated = "INDeleteTasksIntentHandling is deprecated. There is no replacement."]
98    pub unsafe trait INDeleteTasksIntentHandling: NSObjectProtocol {
99        #[cfg(all(
100            feature = "INDeleteTasksIntentResponse",
101            feature = "INIntent",
102            feature = "INIntentResponse",
103            feature = "block2"
104        ))]
105        /// Handling method - Execute the task represented by the INDeleteTasksIntent that's passed in
106        ///
107        /// Called to actually execute the intent. The app must return a response for this intent.
108        ///
109        ///
110        /// Parameter `intent`: The input intent
111        ///
112        /// Parameter `completion`: The response handling block takes a INDeleteTasksIntentResponse containing the details of the result of having executed the intent
113        ///
114        ///
115        /// See: INDeleteTasksIntentResponse
116        #[deprecated = "INDeleteTasksIntentHandling is deprecated. There is no replacement."]
117        #[unsafe(method(handleDeleteTasks:completion:))]
118        #[unsafe(method_family = none)]
119        unsafe fn handleDeleteTasks_completion(
120            &self,
121            intent: &INDeleteTasksIntent,
122            completion: &block2::DynBlock<dyn Fn(NonNull<INDeleteTasksIntentResponse>)>,
123        );
124
125        #[cfg(all(
126            feature = "INDeleteTasksIntentResponse",
127            feature = "INIntent",
128            feature = "INIntentResponse",
129            feature = "block2"
130        ))]
131        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
132        ///
133        /// 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.
134        ///
135        ///
136        /// Parameter `intent`: The input intent
137        ///
138        /// Parameter `completion`: The response block contains an INDeleteTasksIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
139        ///
140        ///
141        /// See: INDeleteTasksIntentResponse
142        #[deprecated = "INDeleteTasksIntentHandling is deprecated. There is no replacement."]
143        #[optional]
144        #[unsafe(method(confirmDeleteTasks:completion:))]
145        #[unsafe(method_family = none)]
146        unsafe fn confirmDeleteTasks_completion(
147            &self,
148            intent: &INDeleteTasksIntent,
149            completion: &block2::DynBlock<dyn Fn(NonNull<INDeleteTasksIntentResponse>)>,
150        );
151
152        #[cfg(all(
153            feature = "INDeleteTasksTaskListResolutionResult",
154            feature = "INIntent",
155            feature = "INIntentResolutionResult",
156            feature = "INTaskListResolutionResult",
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 = "INDeleteTasksIntentHandling is deprecated. There is no replacement."]
171        #[optional]
172        #[unsafe(method(resolveTaskListForDeleteTasks:withCompletion:))]
173        #[unsafe(method_family = none)]
174        unsafe fn resolveTaskListForDeleteTasks_withCompletion(
175            &self,
176            intent: &INDeleteTasksIntent,
177            completion: &block2::DynBlock<dyn Fn(NonNull<INDeleteTasksTaskListResolutionResult>)>,
178        );
179
180        #[cfg(all(
181            feature = "INDeleteTasksTaskResolutionResult",
182            feature = "INIntent",
183            feature = "INIntentResolutionResult",
184            feature = "INTaskResolutionResult",
185            feature = "block2"
186        ))]
187        #[deprecated = "INDeleteTasksIntentHandling is deprecated. There is no replacement."]
188        #[optional]
189        #[unsafe(method(resolveTasksForDeleteTasks:withCompletion:))]
190        #[unsafe(method_family = none)]
191        unsafe fn resolveTasksForDeleteTasks_withCompletion(
192            &self,
193            intent: &INDeleteTasksIntent,
194            completion: &block2::DynBlock<
195                dyn Fn(NonNull<NSArray<INDeleteTasksTaskResolutionResult>>),
196            >,
197        );
198    }
199);