1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    pub static EKErrorDomain: Option<&'static NSString>;
}

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct EKErrorCode(pub NSInteger);
impl EKErrorCode {
    pub const EKErrorEventNotMutable: Self = Self(0);
    pub const EKErrorNoCalendar: Self = Self(1);
    pub const EKErrorNoStartDate: Self = Self(2);
    pub const EKErrorNoEndDate: Self = Self(3);
    pub const EKErrorDatesInverted: Self = Self(4);
    pub const EKErrorInternalFailure: Self = Self(5);
    pub const EKErrorCalendarReadOnly: Self = Self(6);
    pub const EKErrorDurationGreaterThanRecurrence: Self = Self(7);
    pub const EKErrorAlarmGreaterThanRecurrence: Self = Self(8);
    pub const EKErrorStartDateTooFarInFuture: Self = Self(9);
    pub const EKErrorStartDateCollidesWithOtherOccurrence: Self = Self(10);
    pub const EKErrorObjectBelongsToDifferentStore: Self = Self(11);
    pub const EKErrorInvitesCannotBeMoved: Self = Self(12);
    pub const EKErrorInvalidSpan: Self = Self(13);
    pub const EKErrorCalendarHasNoSource: Self = Self(14);
    pub const EKErrorCalendarSourceCannotBeModified: Self = Self(15);
    pub const EKErrorCalendarIsImmutable: Self = Self(16);
    pub const EKErrorSourceDoesNotAllowCalendarAddDelete: Self = Self(17);
    pub const EKErrorRecurringReminderRequiresDueDate: Self = Self(18);
    pub const EKErrorStructuredLocationsNotSupported: Self = Self(19);
    pub const EKErrorReminderLocationsNotSupported: Self = Self(20);
    pub const EKErrorAlarmProximityNotSupported: Self = Self(21);
    pub const EKErrorCalendarDoesNotAllowEvents: Self = Self(22);
    pub const EKErrorCalendarDoesNotAllowReminders: Self = Self(23);
    pub const EKErrorSourceDoesNotAllowReminders: Self = Self(24);
    pub const EKErrorSourceDoesNotAllowEvents: Self = Self(25);
    pub const EKErrorPriorityIsInvalid: Self = Self(26);
    pub const EKErrorInvalidEntityType: Self = Self(27);
    pub const EKErrorProcedureAlarmsNotMutable: Self = Self(28);
    pub const EKErrorEventStoreNotAuthorized: Self = Self(29);
    pub const EKErrorOSNotSupported: Self = Self(30);
    pub const EKErrorInvalidInviteReplyCalendar: Self = Self(31);
    pub const EKErrorNotificationsCollectionFlagNotSet: Self = Self(32);
    pub const EKErrorSourceMismatch: Self = Self(33);
    pub const EKErrorNotificationCollectionMismatch: Self = Self(34);
    pub const EKErrorNotificationSavedWithoutCollection: Self = Self(35);
    pub const EKErrorReminderAlarmContainsEmailOrUrl: Self = Self(36);
    pub const EKErrorLast: Self = Self(37);
}

unsafe impl Encode for EKErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for EKErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}