objc2_user_notifications/generated/
UNNotificationTrigger.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct UNNotificationTrigger;
16);
17
18extern_conformance!(
19 unsafe impl NSCoding for UNNotificationTrigger {}
20);
21
22extern_conformance!(
23 unsafe impl NSCopying for UNNotificationTrigger {}
24);
25
26unsafe impl CopyingHelper for UNNotificationTrigger {
27 type Result = Self;
28}
29
30extern_conformance!(
31 unsafe impl NSObjectProtocol for UNNotificationTrigger {}
32);
33
34extern_conformance!(
35 unsafe impl NSSecureCoding for UNNotificationTrigger {}
36);
37
38impl UNNotificationTrigger {
39 extern_methods!(
40 #[unsafe(method(repeats))]
41 #[unsafe(method_family = none)]
42 pub fn repeats(&self) -> bool;
43
44 #[unsafe(method(init))]
45 #[unsafe(method_family = init)]
46 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47 );
48}
49
50impl UNNotificationTrigger {
52 extern_methods!(
53 #[unsafe(method(new))]
54 #[unsafe(method_family = new)]
55 pub unsafe fn new() -> Retained<Self>;
56 );
57}
58
59extern_class!(
60 #[unsafe(super(UNNotificationTrigger, NSObject))]
62 #[derive(Debug, PartialEq, Eq, Hash)]
63 pub struct UNPushNotificationTrigger;
64);
65
66extern_conformance!(
67 unsafe impl NSCoding for UNPushNotificationTrigger {}
68);
69
70extern_conformance!(
71 unsafe impl NSCopying for UNPushNotificationTrigger {}
72);
73
74unsafe impl CopyingHelper for UNPushNotificationTrigger {
75 type Result = Self;
76}
77
78extern_conformance!(
79 unsafe impl NSObjectProtocol for UNPushNotificationTrigger {}
80);
81
82extern_conformance!(
83 unsafe impl NSSecureCoding for UNPushNotificationTrigger {}
84);
85
86impl UNPushNotificationTrigger {
87 extern_methods!();
88}
89
90impl UNPushNotificationTrigger {
92 extern_methods!(
93 #[unsafe(method(init))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
96 );
97}
98
99impl UNPushNotificationTrigger {
101 extern_methods!(
102 #[unsafe(method(new))]
103 #[unsafe(method_family = new)]
104 pub unsafe fn new() -> Retained<Self>;
105 );
106}
107
108extern_class!(
109 #[unsafe(super(UNNotificationTrigger, NSObject))]
111 #[derive(Debug, PartialEq, Eq, Hash)]
112 pub struct UNTimeIntervalNotificationTrigger;
113);
114
115extern_conformance!(
116 unsafe impl NSCoding for UNTimeIntervalNotificationTrigger {}
117);
118
119extern_conformance!(
120 unsafe impl NSCopying for UNTimeIntervalNotificationTrigger {}
121);
122
123unsafe impl CopyingHelper for UNTimeIntervalNotificationTrigger {
124 type Result = Self;
125}
126
127extern_conformance!(
128 unsafe impl NSObjectProtocol for UNTimeIntervalNotificationTrigger {}
129);
130
131extern_conformance!(
132 unsafe impl NSSecureCoding for UNTimeIntervalNotificationTrigger {}
133);
134
135impl UNTimeIntervalNotificationTrigger {
136 extern_methods!(
137 #[unsafe(method(timeInterval))]
138 #[unsafe(method_family = none)]
139 pub fn timeInterval(&self) -> NSTimeInterval;
140
141 #[unsafe(method(triggerWithTimeInterval:repeats:))]
142 #[unsafe(method_family = none)]
143 pub fn triggerWithTimeInterval_repeats(
144 time_interval: NSTimeInterval,
145 repeats: bool,
146 ) -> Retained<Self>;
147
148 #[unsafe(method(nextTriggerDate))]
149 #[unsafe(method_family = none)]
150 pub fn nextTriggerDate(&self) -> Option<Retained<NSDate>>;
151 );
152}
153
154impl UNTimeIntervalNotificationTrigger {
156 extern_methods!(
157 #[unsafe(method(init))]
158 #[unsafe(method_family = init)]
159 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
160 );
161}
162
163impl UNTimeIntervalNotificationTrigger {
165 extern_methods!(
166 #[unsafe(method(new))]
167 #[unsafe(method_family = new)]
168 pub unsafe fn new() -> Retained<Self>;
169 );
170}
171
172extern_class!(
173 #[unsafe(super(UNNotificationTrigger, NSObject))]
175 #[derive(Debug, PartialEq, Eq, Hash)]
176 pub struct UNCalendarNotificationTrigger;
177);
178
179extern_conformance!(
180 unsafe impl NSCoding for UNCalendarNotificationTrigger {}
181);
182
183extern_conformance!(
184 unsafe impl NSCopying for UNCalendarNotificationTrigger {}
185);
186
187unsafe impl CopyingHelper for UNCalendarNotificationTrigger {
188 type Result = Self;
189}
190
191extern_conformance!(
192 unsafe impl NSObjectProtocol for UNCalendarNotificationTrigger {}
193);
194
195extern_conformance!(
196 unsafe impl NSSecureCoding for UNCalendarNotificationTrigger {}
197);
198
199impl UNCalendarNotificationTrigger {
200 extern_methods!(
201 #[unsafe(method(dateComponents))]
202 #[unsafe(method_family = none)]
203 pub fn dateComponents(&self) -> Retained<NSDateComponents>;
204
205 #[unsafe(method(triggerWithDateMatchingComponents:repeats:))]
206 #[unsafe(method_family = none)]
207 pub fn triggerWithDateMatchingComponents_repeats(
208 date_components: &NSDateComponents,
209 repeats: bool,
210 ) -> Retained<Self>;
211
212 #[unsafe(method(nextTriggerDate))]
213 #[unsafe(method_family = none)]
214 pub fn nextTriggerDate(&self) -> Option<Retained<NSDate>>;
215 );
216}
217
218impl UNCalendarNotificationTrigger {
220 extern_methods!(
221 #[unsafe(method(init))]
222 #[unsafe(method_family = init)]
223 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
224 );
225}
226
227impl UNCalendarNotificationTrigger {
229 extern_methods!(
230 #[unsafe(method(new))]
231 #[unsafe(method_family = new)]
232 pub unsafe fn new() -> Retained<Self>;
233 );
234}
235
236extern_class!(
237 #[unsafe(super(UNNotificationTrigger, NSObject))]
239 #[derive(Debug, PartialEq, Eq, Hash)]
240 pub struct UNLocationNotificationTrigger;
241);
242
243extern_conformance!(
244 unsafe impl NSCoding for UNLocationNotificationTrigger {}
245);
246
247extern_conformance!(
248 unsafe impl NSCopying for UNLocationNotificationTrigger {}
249);
250
251unsafe impl CopyingHelper for UNLocationNotificationTrigger {
252 type Result = Self;
253}
254
255extern_conformance!(
256 unsafe impl NSObjectProtocol for UNLocationNotificationTrigger {}
257);
258
259extern_conformance!(
260 unsafe impl NSSecureCoding for UNLocationNotificationTrigger {}
261);
262
263impl UNLocationNotificationTrigger {
264 extern_methods!(
265 #[cfg(feature = "objc2-core-location")]
266 #[unsafe(method(region))]
267 #[unsafe(method_family = none)]
268 pub fn region(&self) -> Retained<CLRegion>;
269
270 #[cfg(feature = "objc2-core-location")]
271 #[unsafe(method(triggerWithRegion:repeats:))]
272 #[unsafe(method_family = none)]
273 pub fn triggerWithRegion_repeats(region: &CLRegion, repeats: bool) -> Retained<Self>;
274 );
275}
276
277impl UNLocationNotificationTrigger {
279 extern_methods!(
280 #[unsafe(method(init))]
281 #[unsafe(method_family = init)]
282 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
283 );
284}
285
286impl UNLocationNotificationTrigger {
288 extern_methods!(
289 #[unsafe(method(new))]
290 #[unsafe(method_family = new)]
291 pub unsafe fn new() -> Retained<Self>;
292 );
293}