objc2_intents/generated/
INSnoozeTasksIntent.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 INSnoozeTasksIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INSnoozeTasksIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INSnoozeTasksIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INSnoozeTasksIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INSnoozeTasksIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INSnoozeTasksIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INSnoozeTasksIntent {
45 extern_methods!(
46 #[cfg(all(feature = "INDateComponentsRange", feature = "INTask"))]
47 #[unsafe(method(initWithTasks:nextTriggerTime:all:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithTasks_nextTriggerTime_all(
50 this: Allocated<Self>,
51 tasks: Option<&NSArray<INTask>>,
52 next_trigger_time: Option<&INDateComponentsRange>,
53 all: Option<&NSNumber>,
54 ) -> Retained<Self>;
55
56 #[cfg(feature = "INTask")]
57 #[unsafe(method(tasks))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn tasks(&self) -> Option<Retained<NSArray<INTask>>>;
60
61 #[cfg(feature = "INDateComponentsRange")]
62 #[unsafe(method(nextTriggerTime))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn nextTriggerTime(&self) -> Option<Retained<INDateComponentsRange>>;
65
66 #[unsafe(method(all))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn all(&self) -> Option<Retained<NSNumber>>;
69 );
70}
71
72#[cfg(feature = "INIntent")]
74impl INSnoozeTasksIntent {
75 extern_methods!(
76 #[unsafe(method(init))]
77 #[unsafe(method_family = init)]
78 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
79
80 #[unsafe(method(new))]
81 #[unsafe(method_family = new)]
82 pub unsafe fn new() -> Retained<Self>;
83 );
84}
85
86extern_protocol!(
87 pub unsafe trait INSnoozeTasksIntentHandling: NSObjectProtocol {
93 #[cfg(all(
94 feature = "INIntent",
95 feature = "INIntentResponse",
96 feature = "INSnoozeTasksIntentResponse",
97 feature = "block2"
98 ))]
99 #[unsafe(method(handleSnoozeTasks:completion:))]
111 #[unsafe(method_family = none)]
112 unsafe fn handleSnoozeTasks_completion(
113 &self,
114 intent: &INSnoozeTasksIntent,
115 completion: &block2::DynBlock<dyn Fn(NonNull<INSnoozeTasksIntentResponse>)>,
116 );
117
118 #[cfg(all(
119 feature = "INIntent",
120 feature = "INIntentResponse",
121 feature = "INSnoozeTasksIntentResponse",
122 feature = "block2"
123 ))]
124 #[optional]
136 #[unsafe(method(confirmSnoozeTasks:completion:))]
137 #[unsafe(method_family = none)]
138 unsafe fn confirmSnoozeTasks_completion(
139 &self,
140 intent: &INSnoozeTasksIntent,
141 completion: &block2::DynBlock<dyn Fn(NonNull<INSnoozeTasksIntentResponse>)>,
142 );
143
144 #[cfg(all(
145 feature = "INIntent",
146 feature = "INIntentResolutionResult",
147 feature = "INSnoozeTasksTaskResolutionResult",
148 feature = "INTaskResolutionResult",
149 feature = "block2"
150 ))]
151 #[optional]
163 #[unsafe(method(resolveTasksForSnoozeTasks:withCompletion:))]
164 #[unsafe(method_family = none)]
165 unsafe fn resolveTasksForSnoozeTasks_withCompletion(
166 &self,
167 intent: &INSnoozeTasksIntent,
168 completion: &block2::DynBlock<
169 dyn Fn(NonNull<NSArray<INSnoozeTasksTaskResolutionResult>>),
170 >,
171 );
172
173 #[cfg(all(
174 feature = "INDateComponentsRangeResolutionResult",
175 feature = "INIntent",
176 feature = "INIntentResolutionResult",
177 feature = "block2"
178 ))]
179 #[optional]
180 #[unsafe(method(resolveNextTriggerTimeForSnoozeTasks:withCompletion:))]
181 #[unsafe(method_family = none)]
182 unsafe fn resolveNextTriggerTimeForSnoozeTasks_withCompletion(
183 &self,
184 intent: &INSnoozeTasksIntent,
185 completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
186 );
187 }
188);