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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
    pub struct UILocalNotification;

    unsafe impl ClassType for UILocalNotification {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCoding for UILocalNotification {}

unsafe impl NSCopying for UILocalNotification {}

unsafe impl NSObjectProtocol for UILocalNotification {}

extern_methods!(
    unsafe impl UILocalNotification {
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other fireDate)]
        pub unsafe fn fireDate(&self) -> Option<Retained<NSDate>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setFireDate:)]
        pub unsafe fn setFireDate(&self, fire_date: Option<&NSDate>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other timeZone)]
        pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setTimeZone:)]
        pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(repeatInterval)]
        pub unsafe fn repeatInterval(&self) -> NSCalendarUnit;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setRepeatInterval:)]
        pub unsafe fn setRepeatInterval(&self, repeat_interval: NSCalendarUnit);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other repeatCalendar)]
        pub unsafe fn repeatCalendar(&self) -> Option<Retained<NSCalendar>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setRepeatCalendar:)]
        pub unsafe fn setRepeatCalendar(&self, repeat_calendar: Option<&NSCalendar>);

        #[cfg(feature = "objc2-core-location")]
        #[method_id(@__retain_semantics Other region)]
        pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;

        #[cfg(feature = "objc2-core-location")]
        #[method(setRegion:)]
        pub unsafe fn setRegion(&self, region: Option<&CLRegion>);

        #[method(regionTriggersOnce)]
        pub unsafe fn regionTriggersOnce(&self) -> bool;

        #[method(setRegionTriggersOnce:)]
        pub unsafe fn setRegionTriggersOnce(&self, region_triggers_once: bool);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other alertBody)]
        pub unsafe fn alertBody(&self) -> Option<Retained<NSString>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setAlertBody:)]
        pub unsafe fn setAlertBody(&self, alert_body: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(hasAction)]
        pub unsafe fn hasAction(&self) -> bool;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setHasAction:)]
        pub unsafe fn setHasAction(&self, has_action: bool);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other alertAction)]
        pub unsafe fn alertAction(&self) -> Option<Retained<NSString>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setAlertAction:)]
        pub unsafe fn setAlertAction(&self, alert_action: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other alertLaunchImage)]
        pub unsafe fn alertLaunchImage(&self) -> Option<Retained<NSString>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setAlertLaunchImage:)]
        pub unsafe fn setAlertLaunchImage(&self, alert_launch_image: Option<&NSString>);

        #[method_id(@__retain_semantics Other alertTitle)]
        pub unsafe fn alertTitle(&self) -> Option<Retained<NSString>>;

        #[method(setAlertTitle:)]
        pub unsafe fn setAlertTitle(&self, alert_title: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other soundName)]
        pub unsafe fn soundName(&self) -> Option<Retained<NSString>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setSoundName:)]
        pub unsafe fn setSoundName(&self, sound_name: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(applicationIconBadgeNumber)]
        pub unsafe fn applicationIconBadgeNumber(&self) -> NSInteger;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setApplicationIconBadgeNumber:)]
        pub unsafe fn setApplicationIconBadgeNumber(
            &self,
            application_icon_badge_number: NSInteger,
        );

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method_id(@__retain_semantics Other userInfo)]
        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[method(setUserInfo:)]
        pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);

        #[method_id(@__retain_semantics Other category)]
        pub unsafe fn category(&self) -> Option<Retained<NSString>>;

        #[method(setCategory:)]
        pub unsafe fn setCategory(&self, category: Option<&NSString>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UILocalNotification {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

extern "C" {
    pub static UILocalNotificationDefaultSoundName: &'static NSString;
}