objc2_event_kit/generated/
EKTypes.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// This enumerated type is used to indicate the currently granted authorization status for a specific
8/// entity type.
9///
10/// may access the service.
11///
12/// The user cannot change this application’s status, possibly due to
13/// active restrictions such as parental controls being in place.
14///
15/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekauthorizationstatus?language=objc)
16// NS_ENUM
17#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct EKAuthorizationStatus(pub NSInteger);
20impl EKAuthorizationStatus {
21    #[doc(alias = "EKAuthorizationStatusNotDetermined")]
22    pub const NotDetermined: Self = Self(0);
23    #[doc(alias = "EKAuthorizationStatusRestricted")]
24    pub const Restricted: Self = Self(1);
25    #[doc(alias = "EKAuthorizationStatusDenied")]
26    pub const Denied: Self = Self(2);
27    #[doc(alias = "EKAuthorizationStatusFullAccess")]
28    pub const FullAccess: Self = Self(3);
29    #[doc(alias = "EKAuthorizationStatusWriteOnly")]
30    pub const WriteOnly: Self = Self(4);
31    #[doc(alias = "EKAuthorizationStatusAuthorized")]
32    #[deprecated = "Check for full access or write only access"]
33    pub const Authorized: Self = Self(EKAuthorizationStatus::FullAccess.0);
34}
35
36unsafe impl Encode for EKAuthorizationStatus {
37    const ENCODING: Encoding = NSInteger::ENCODING;
38}
39
40unsafe impl RefEncode for EKAuthorizationStatus {
41    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
42}
43
44/// [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekweekday?language=objc)
45#[repr(transparent)]
46#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
47pub struct EKWeekday(pub NSInteger);
48impl EKWeekday {
49    #[doc(alias = "EKWeekdaySunday")]
50    pub const Sunday: Self = Self(1);
51    #[doc(alias = "EKWeekdayMonday")]
52    pub const Monday: Self = Self(2);
53    #[doc(alias = "EKWeekdayTuesday")]
54    pub const Tuesday: Self = Self(3);
55    #[doc(alias = "EKWeekdayWednesday")]
56    pub const Wednesday: Self = Self(4);
57    #[doc(alias = "EKWeekdayThursday")]
58    pub const Thursday: Self = Self(5);
59    #[doc(alias = "EKWeekdayFriday")]
60    pub const Friday: Self = Self(6);
61    #[doc(alias = "EKWeekdaySaturday")]
62    pub const Saturday: Self = Self(7);
63    #[deprecated = "Use EKWeekdaySunday instead"]
64    pub const EKSunday: Self = Self(EKWeekday::Sunday.0);
65    #[deprecated = "Use EKWeekdayMonday instead"]
66    pub const EKMonday: Self = Self(EKWeekday::Monday.0);
67    #[deprecated = "Use EKWeekdayTuesday instead"]
68    pub const EKTuesday: Self = Self(EKWeekday::Tuesday.0);
69    #[deprecated = "Use EKWeekdayWednesday instead"]
70    pub const EKWednesday: Self = Self(EKWeekday::Wednesday.0);
71    #[deprecated = "Use EKWeekdayThursday instead"]
72    pub const EKThursday: Self = Self(EKWeekday::Thursday.0);
73    #[deprecated = "Use EKWeekdayFriday instead"]
74    pub const EKFriday: Self = Self(EKWeekday::Friday.0);
75    #[deprecated = "Use EKWeekdaySaturday instead"]
76    pub const EKSaturday: Self = Self(EKWeekday::Saturday.0);
77}
78
79unsafe impl Encode for EKWeekday {
80    const ENCODING: Encoding = NSInteger::ENCODING;
81}
82
83unsafe impl RefEncode for EKWeekday {
84    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
85}
86
87/// The frequency of a recurrence
88///
89/// EKRecurrenceFrequency designates the unit of time used to describe the recurrence.
90/// It has four possible values, which correspond to recurrence rules that are defined
91/// in terms of days, weeks, months, and years.
92///
93/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekrecurrencefrequency?language=objc)
94// NS_ENUM
95#[repr(transparent)]
96#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
97pub struct EKRecurrenceFrequency(pub NSInteger);
98impl EKRecurrenceFrequency {
99    #[doc(alias = "EKRecurrenceFrequencyDaily")]
100    pub const Daily: Self = Self(0);
101    #[doc(alias = "EKRecurrenceFrequencyWeekly")]
102    pub const Weekly: Self = Self(1);
103    #[doc(alias = "EKRecurrenceFrequencyMonthly")]
104    pub const Monthly: Self = Self(2);
105    #[doc(alias = "EKRecurrenceFrequencyYearly")]
106    pub const Yearly: Self = Self(3);
107}
108
109unsafe impl Encode for EKRecurrenceFrequency {
110    const ENCODING: Encoding = NSInteger::ENCODING;
111}
112
113unsafe impl RefEncode for EKRecurrenceFrequency {
114    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
115}
116
117/// Value representing the type of attendee.
118///
119/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekparticipanttype?language=objc)
120// NS_ENUM
121#[repr(transparent)]
122#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
123pub struct EKParticipantType(pub NSInteger);
124impl EKParticipantType {
125    #[doc(alias = "EKParticipantTypeUnknown")]
126    pub const Unknown: Self = Self(0);
127    #[doc(alias = "EKParticipantTypePerson")]
128    pub const Person: Self = Self(1);
129    #[doc(alias = "EKParticipantTypeRoom")]
130    pub const Room: Self = Self(2);
131    #[doc(alias = "EKParticipantTypeResource")]
132    pub const Resource: Self = Self(3);
133    #[doc(alias = "EKParticipantTypeGroup")]
134    pub const Group: Self = Self(4);
135}
136
137unsafe impl Encode for EKParticipantType {
138    const ENCODING: Encoding = NSInteger::ENCODING;
139}
140
141unsafe impl RefEncode for EKParticipantType {
142    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
143}
144
145/// Value representing the role of a meeting participant.
146///
147/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekparticipantrole?language=objc)
148// NS_ENUM
149#[repr(transparent)]
150#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
151pub struct EKParticipantRole(pub NSInteger);
152impl EKParticipantRole {
153    #[doc(alias = "EKParticipantRoleUnknown")]
154    pub const Unknown: Self = Self(0);
155    #[doc(alias = "EKParticipantRoleRequired")]
156    pub const Required: Self = Self(1);
157    #[doc(alias = "EKParticipantRoleOptional")]
158    pub const Optional: Self = Self(2);
159    #[doc(alias = "EKParticipantRoleChair")]
160    pub const Chair: Self = Self(3);
161    #[doc(alias = "EKParticipantRoleNonParticipant")]
162    pub const NonParticipant: Self = Self(4);
163}
164
165unsafe impl Encode for EKParticipantRole {
166    const ENCODING: Encoding = NSInteger::ENCODING;
167}
168
169unsafe impl RefEncode for EKParticipantRole {
170    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
171}
172
173/// Value representing the status of a meeting invite.
174///
175///
176/// invitation has been sent yet.
177///
178/// sent.
179///
180/// no way of determing if it was successfully
181/// delivered.
182///
183/// successfully delivered.
184///
185/// source doesn't recognize the recipient.
186///
187/// insufficient privileges.
188///
189/// likely due to a temporary failure.
190///
191/// we're unsure how to deliver it. This is a
192/// permanent failure.
193///
194/// scheduling with the participant isn't
195/// allowed. This is a permanent failure.
196///
197/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekparticipantschedulestatus?language=objc)
198// NS_ENUM
199#[repr(transparent)]
200#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
201pub struct EKParticipantScheduleStatus(pub NSInteger);
202impl EKParticipantScheduleStatus {
203    #[doc(alias = "EKParticipantScheduleStatusNone")]
204    pub const None: Self = Self(0);
205    #[doc(alias = "EKParticipantScheduleStatusPending")]
206    pub const Pending: Self = Self(1);
207    #[doc(alias = "EKParticipantScheduleStatusSent")]
208    pub const Sent: Self = Self(2);
209    #[doc(alias = "EKParticipantScheduleStatusDelivered")]
210    pub const Delivered: Self = Self(3);
211    #[doc(alias = "EKParticipantScheduleStatusRecipientNotRecognized")]
212    pub const RecipientNotRecognized: Self = Self(4);
213    #[doc(alias = "EKParticipantScheduleStatusNoPrivileges")]
214    pub const NoPrivileges: Self = Self(5);
215    #[doc(alias = "EKParticipantScheduleStatusDeliveryFailed")]
216    pub const DeliveryFailed: Self = Self(6);
217    #[doc(alias = "EKParticipantScheduleStatusCannotDeliver")]
218    pub const CannotDeliver: Self = Self(7);
219    #[doc(alias = "EKParticipantScheduleStatusRecipientNotAllowed")]
220    pub const RecipientNotAllowed: Self = Self(8);
221}
222
223unsafe impl Encode for EKParticipantScheduleStatus {
224    const ENCODING: Encoding = NSInteger::ENCODING;
225}
226
227unsafe impl RefEncode for EKParticipantScheduleStatus {
228    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
229}
230
231/// Value representing the status of a meeting participant.
232///
233/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekparticipantstatus?language=objc)
234// NS_ENUM
235#[repr(transparent)]
236#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
237pub struct EKParticipantStatus(pub NSInteger);
238impl EKParticipantStatus {
239    #[doc(alias = "EKParticipantStatusUnknown")]
240    pub const Unknown: Self = Self(0);
241    #[doc(alias = "EKParticipantStatusPending")]
242    pub const Pending: Self = Self(1);
243    #[doc(alias = "EKParticipantStatusAccepted")]
244    pub const Accepted: Self = Self(2);
245    #[doc(alias = "EKParticipantStatusDeclined")]
246    pub const Declined: Self = Self(3);
247    #[doc(alias = "EKParticipantStatusTentative")]
248    pub const Tentative: Self = Self(4);
249    #[doc(alias = "EKParticipantStatusDelegated")]
250    pub const Delegated: Self = Self(5);
251    #[doc(alias = "EKParticipantStatusCompleted")]
252    pub const Completed: Self = Self(6);
253    #[doc(alias = "EKParticipantStatusInProcess")]
254    pub const InProcess: Self = Self(7);
255}
256
257unsafe impl Encode for EKParticipantStatus {
258    const ENCODING: Encoding = NSInteger::ENCODING;
259}
260
261unsafe impl RefEncode for EKParticipantStatus {
262    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
263}
264
265/// An enum representing the type of a calendar.
266///
267/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekcalendartype?language=objc)
268// NS_ENUM
269#[repr(transparent)]
270#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
271pub struct EKCalendarType(pub NSInteger);
272impl EKCalendarType {
273    #[doc(alias = "EKCalendarTypeLocal")]
274    pub const Local: Self = Self(0);
275    #[doc(alias = "EKCalendarTypeCalDAV")]
276    pub const CalDAV: Self = Self(1);
277    #[doc(alias = "EKCalendarTypeExchange")]
278    pub const Exchange: Self = Self(2);
279    #[doc(alias = "EKCalendarTypeSubscription")]
280    pub const Subscription: Self = Self(3);
281    #[doc(alias = "EKCalendarTypeBirthday")]
282    pub const Birthday: Self = Self(4);
283}
284
285unsafe impl Encode for EKCalendarType {
286    const ENCODING: Encoding = NSInteger::ENCODING;
287}
288
289unsafe impl RefEncode for EKCalendarType {
290    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
291}
292
293/// [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekcalendareventavailabilitymask?language=objc)
294// NS_OPTIONS
295#[repr(transparent)]
296#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
297pub struct EKCalendarEventAvailabilityMask(pub NSUInteger);
298bitflags::bitflags! {
299    impl EKCalendarEventAvailabilityMask: NSUInteger {
300        #[doc(alias = "EKCalendarEventAvailabilityNone")]
301        const None = 0;
302        #[doc(alias = "EKCalendarEventAvailabilityBusy")]
303        const Busy = 1<<0;
304        #[doc(alias = "EKCalendarEventAvailabilityFree")]
305        const Free = 1<<1;
306        #[doc(alias = "EKCalendarEventAvailabilityTentative")]
307        const Tentative = 1<<2;
308        #[doc(alias = "EKCalendarEventAvailabilityUnavailable")]
309        const Unavailable = 1<<3;
310    }
311}
312
313unsafe impl Encode for EKCalendarEventAvailabilityMask {
314    const ENCODING: Encoding = NSUInteger::ENCODING;
315}
316
317unsafe impl RefEncode for EKCalendarEventAvailabilityMask {
318    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
319}
320
321/// [Apple's documentation](https://developer.apple.com/documentation/eventkit/eksourcetype?language=objc)
322// NS_ENUM
323#[repr(transparent)]
324#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
325pub struct EKSourceType(pub NSInteger);
326impl EKSourceType {
327    #[doc(alias = "EKSourceTypeLocal")]
328    pub const Local: Self = Self(0);
329    #[doc(alias = "EKSourceTypeExchange")]
330    pub const Exchange: Self = Self(1);
331    #[doc(alias = "EKSourceTypeCalDAV")]
332    pub const CalDAV: Self = Self(2);
333    #[doc(alias = "EKSourceTypeMobileMe")]
334    pub const MobileMe: Self = Self(3);
335    #[doc(alias = "EKSourceTypeSubscribed")]
336    pub const Subscribed: Self = Self(4);
337    #[doc(alias = "EKSourceTypeBirthdays")]
338    pub const Birthdays: Self = Self(5);
339}
340
341unsafe impl Encode for EKSourceType {
342    const ENCODING: Encoding = NSInteger::ENCODING;
343}
344
345unsafe impl RefEncode for EKSourceType {
346    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
347}
348
349/// A value which specifies an entity type of event or reminder.
350///
351/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekentitytype?language=objc)
352// NS_ENUM
353#[repr(transparent)]
354#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
355pub struct EKEntityType(pub NSUInteger);
356impl EKEntityType {
357    #[doc(alias = "EKEntityTypeEvent")]
358    pub const Event: Self = Self(0);
359    #[doc(alias = "EKEntityTypeReminder")]
360    pub const Reminder: Self = Self(1);
361}
362
363unsafe impl Encode for EKEntityType {
364    const ENCODING: Encoding = NSUInteger::ENCODING;
365}
366
367unsafe impl RefEncode for EKEntityType {
368    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
369}
370
371/// A bitmask based on EKEntityType that can be used to specify multiple entities at once.
372///
373/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekentitymask?language=objc)
374// NS_OPTIONS
375#[repr(transparent)]
376#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
377pub struct EKEntityMask(pub NSUInteger);
378bitflags::bitflags! {
379    impl EKEntityMask: NSUInteger {
380        #[doc(alias = "EKEntityMaskEvent")]
381        const Event = 1<<EKEntityType::Event.0;
382        #[doc(alias = "EKEntityMaskReminder")]
383        const Reminder = 1<<EKEntityType::Reminder.0;
384    }
385}
386
387unsafe impl Encode for EKEntityMask {
388    const ENCODING: Encoding = NSUInteger::ENCODING;
389}
390
391unsafe impl RefEncode for EKEntityMask {
392    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
393}
394
395/// A value indicating whether an alarm is triggered by entering or exiting a geofence.
396///
397/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekalarmproximity?language=objc)
398// NS_ENUM
399#[repr(transparent)]
400#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
401pub struct EKAlarmProximity(pub NSInteger);
402impl EKAlarmProximity {
403    #[doc(alias = "EKAlarmProximityNone")]
404    pub const None: Self = Self(0);
405    #[doc(alias = "EKAlarmProximityEnter")]
406    pub const Enter: Self = Self(1);
407    #[doc(alias = "EKAlarmProximityLeave")]
408    pub const Leave: Self = Self(2);
409}
410
411unsafe impl Encode for EKAlarmProximity {
412    const ENCODING: Encoding = NSInteger::ENCODING;
413}
414
415unsafe impl RefEncode for EKAlarmProximity {
416    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
417}
418
419/// A value which specifies the action that occurs when the alarm is triggered.
420///
421/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekalarmtype?language=objc)
422// NS_ENUM
423#[repr(transparent)]
424#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
425pub struct EKAlarmType(pub NSInteger);
426impl EKAlarmType {
427    #[doc(alias = "EKAlarmTypeDisplay")]
428    pub const Display: Self = Self(0);
429    #[doc(alias = "EKAlarmTypeAudio")]
430    pub const Audio: Self = Self(1);
431    #[doc(alias = "EKAlarmTypeProcedure")]
432    pub const Procedure: Self = Self(2);
433    #[doc(alias = "EKAlarmTypeEmail")]
434    pub const Email: Self = Self(3);
435}
436
437unsafe impl Encode for EKAlarmType {
438    const ENCODING: Encoding = NSInteger::ENCODING;
439}
440
441unsafe impl RefEncode for EKAlarmType {
442    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
443}
444
445/// A priority for a reminder.
446///
447/// RFC 5545 allows priority to be specified with an integer in the range of 0-9,
448/// with 0 representing an undefined priority, 1 the highest priority, and 9 the lowest priority.
449/// Clients are encouraged to use these values when setting a reminders's priority,
450/// but is is possible to specify any integer value from 0 to 9.
451///
452/// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekreminderpriority?language=objc)
453// NS_ENUM
454#[repr(transparent)]
455#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
456pub struct EKReminderPriority(pub NSUInteger);
457impl EKReminderPriority {
458    #[doc(alias = "EKReminderPriorityNone")]
459    pub const None: Self = Self(0);
460    #[doc(alias = "EKReminderPriorityHigh")]
461    pub const High: Self = Self(1);
462    #[doc(alias = "EKReminderPriorityMedium")]
463    pub const Medium: Self = Self(5);
464    #[doc(alias = "EKReminderPriorityLow")]
465    pub const Low: Self = Self(9);
466}
467
468unsafe impl Encode for EKReminderPriority {
469    const ENCODING: Encoding = NSUInteger::ENCODING;
470}
471
472unsafe impl RefEncode for EKReminderPriority {
473    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
474}