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
18unsafe impl NSCoding for UNNotificationTrigger {}
19
20unsafe impl NSCopying for UNNotificationTrigger {}
21
22unsafe impl CopyingHelper for UNNotificationTrigger {
23 type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for UNNotificationTrigger {}
27
28unsafe impl NSSecureCoding for UNNotificationTrigger {}
29
30impl UNNotificationTrigger {
31 extern_methods!(
32 #[unsafe(method(repeats))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn repeats(&self) -> bool;
35
36 #[unsafe(method(init))]
37 #[unsafe(method_family = init)]
38 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
39 );
40}
41
42impl UNNotificationTrigger {
44 extern_methods!(
45 #[unsafe(method(new))]
46 #[unsafe(method_family = new)]
47 pub unsafe fn new() -> Retained<Self>;
48 );
49}
50
51extern_class!(
52 #[unsafe(super(UNNotificationTrigger, NSObject))]
54 #[derive(Debug, PartialEq, Eq, Hash)]
55 pub struct UNPushNotificationTrigger;
56);
57
58unsafe impl NSCoding for UNPushNotificationTrigger {}
59
60unsafe impl NSCopying for UNPushNotificationTrigger {}
61
62unsafe impl CopyingHelper for UNPushNotificationTrigger {
63 type Result = Self;
64}
65
66unsafe impl NSObjectProtocol for UNPushNotificationTrigger {}
67
68unsafe impl NSSecureCoding for UNPushNotificationTrigger {}
69
70impl UNPushNotificationTrigger {
71 extern_methods!();
72}
73
74impl UNPushNotificationTrigger {
76 extern_methods!(
77 #[unsafe(method(init))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80 );
81}
82
83impl UNPushNotificationTrigger {
85 extern_methods!(
86 #[unsafe(method(new))]
87 #[unsafe(method_family = new)]
88 pub unsafe fn new() -> Retained<Self>;
89 );
90}
91
92extern_class!(
93 #[unsafe(super(UNNotificationTrigger, NSObject))]
95 #[derive(Debug, PartialEq, Eq, Hash)]
96 pub struct UNTimeIntervalNotificationTrigger;
97);
98
99unsafe impl NSCoding for UNTimeIntervalNotificationTrigger {}
100
101unsafe impl NSCopying for UNTimeIntervalNotificationTrigger {}
102
103unsafe impl CopyingHelper for UNTimeIntervalNotificationTrigger {
104 type Result = Self;
105}
106
107unsafe impl NSObjectProtocol for UNTimeIntervalNotificationTrigger {}
108
109unsafe impl NSSecureCoding for UNTimeIntervalNotificationTrigger {}
110
111impl UNTimeIntervalNotificationTrigger {
112 extern_methods!(
113 #[unsafe(method(timeInterval))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn timeInterval(&self) -> NSTimeInterval;
116
117 #[unsafe(method(triggerWithTimeInterval:repeats:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn triggerWithTimeInterval_repeats(
120 time_interval: NSTimeInterval,
121 repeats: bool,
122 ) -> Retained<Self>;
123
124 #[unsafe(method(nextTriggerDate))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn nextTriggerDate(&self) -> Option<Retained<NSDate>>;
127 );
128}
129
130impl UNTimeIntervalNotificationTrigger {
132 extern_methods!(
133 #[unsafe(method(init))]
134 #[unsafe(method_family = init)]
135 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
136 );
137}
138
139impl UNTimeIntervalNotificationTrigger {
141 extern_methods!(
142 #[unsafe(method(new))]
143 #[unsafe(method_family = new)]
144 pub unsafe fn new() -> Retained<Self>;
145 );
146}
147
148extern_class!(
149 #[unsafe(super(UNNotificationTrigger, NSObject))]
151 #[derive(Debug, PartialEq, Eq, Hash)]
152 pub struct UNCalendarNotificationTrigger;
153);
154
155unsafe impl NSCoding for UNCalendarNotificationTrigger {}
156
157unsafe impl NSCopying for UNCalendarNotificationTrigger {}
158
159unsafe impl CopyingHelper for UNCalendarNotificationTrigger {
160 type Result = Self;
161}
162
163unsafe impl NSObjectProtocol for UNCalendarNotificationTrigger {}
164
165unsafe impl NSSecureCoding for UNCalendarNotificationTrigger {}
166
167impl UNCalendarNotificationTrigger {
168 extern_methods!(
169 #[unsafe(method(dateComponents))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn dateComponents(&self) -> Retained<NSDateComponents>;
172
173 #[unsafe(method(triggerWithDateMatchingComponents:repeats:))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn triggerWithDateMatchingComponents_repeats(
176 date_components: &NSDateComponents,
177 repeats: bool,
178 ) -> Retained<Self>;
179
180 #[unsafe(method(nextTriggerDate))]
181 #[unsafe(method_family = none)]
182 pub unsafe fn nextTriggerDate(&self) -> Option<Retained<NSDate>>;
183 );
184}
185
186impl UNCalendarNotificationTrigger {
188 extern_methods!(
189 #[unsafe(method(init))]
190 #[unsafe(method_family = init)]
191 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
192 );
193}
194
195impl UNCalendarNotificationTrigger {
197 extern_methods!(
198 #[unsafe(method(new))]
199 #[unsafe(method_family = new)]
200 pub unsafe fn new() -> Retained<Self>;
201 );
202}
203
204extern_class!(
205 #[unsafe(super(UNNotificationTrigger, NSObject))]
207 #[derive(Debug, PartialEq, Eq, Hash)]
208 pub struct UNLocationNotificationTrigger;
209);
210
211unsafe impl NSCoding for UNLocationNotificationTrigger {}
212
213unsafe impl NSCopying for UNLocationNotificationTrigger {}
214
215unsafe impl CopyingHelper for UNLocationNotificationTrigger {
216 type Result = Self;
217}
218
219unsafe impl NSObjectProtocol for UNLocationNotificationTrigger {}
220
221unsafe impl NSSecureCoding for UNLocationNotificationTrigger {}
222
223impl UNLocationNotificationTrigger {
224 extern_methods!(
225 #[cfg(feature = "objc2-core-location")]
226 #[unsafe(method(region))]
227 #[unsafe(method_family = none)]
228 pub unsafe fn region(&self) -> Retained<CLRegion>;
229
230 #[cfg(feature = "objc2-core-location")]
231 #[unsafe(method(triggerWithRegion:repeats:))]
232 #[unsafe(method_family = none)]
233 pub unsafe fn triggerWithRegion_repeats(region: &CLRegion, repeats: bool)
234 -> Retained<Self>;
235 );
236}
237
238impl UNLocationNotificationTrigger {
240 extern_methods!(
241 #[unsafe(method(init))]
242 #[unsafe(method_family = init)]
243 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
244 );
245}
246
247impl UNLocationNotificationTrigger {
249 extern_methods!(
250 #[unsafe(method(new))]
251 #[unsafe(method_family = new)]
252 pub unsafe fn new() -> Retained<Self>;
253 );
254}