objc2_core_location/generated/
CLBeaconRegion.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clbeaconregion?language=objc)
12    #[unsafe(super(CLRegion, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "CLRegion")]
15    #[deprecated]
16    pub struct CLBeaconRegion;
17);
18
19#[cfg(feature = "CLRegion")]
20extern_conformance!(
21    unsafe impl NSCoding for CLBeaconRegion {}
22);
23
24#[cfg(feature = "CLRegion")]
25extern_conformance!(
26    unsafe impl NSCopying for CLBeaconRegion {}
27);
28
29#[cfg(feature = "CLRegion")]
30unsafe impl CopyingHelper for CLBeaconRegion {
31    type Result = Self;
32}
33
34#[cfg(feature = "CLRegion")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for CLBeaconRegion {}
37);
38
39#[cfg(feature = "CLRegion")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for CLBeaconRegion {}
42);
43
44#[cfg(feature = "CLRegion")]
45impl CLBeaconRegion {
46    extern_methods!(
47        #[unsafe(method(initWithUUID:identifier:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithUUID_identifier(
50            this: Allocated<Self>,
51            uuid: &NSUUID,
52            identifier: &NSString,
53        ) -> Retained<Self>;
54
55        #[deprecated]
56        #[unsafe(method(initWithProximityUUID:identifier:))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn initWithProximityUUID_identifier(
59            this: Allocated<Self>,
60            proximity_uuid: &NSUUID,
61            identifier: &NSString,
62        ) -> Retained<Self>;
63
64        #[cfg(feature = "CLBeaconIdentityCondition")]
65        #[unsafe(method(initWithUUID:major:identifier:))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn initWithUUID_major_identifier(
68            this: Allocated<Self>,
69            uuid: &NSUUID,
70            major: CLBeaconMajorValue,
71            identifier: &NSString,
72        ) -> Retained<Self>;
73
74        #[cfg(feature = "CLBeaconIdentityCondition")]
75        #[deprecated]
76        #[unsafe(method(initWithProximityUUID:major:identifier:))]
77        #[unsafe(method_family = init)]
78        pub unsafe fn initWithProximityUUID_major_identifier(
79            this: Allocated<Self>,
80            proximity_uuid: &NSUUID,
81            major: CLBeaconMajorValue,
82            identifier: &NSString,
83        ) -> Retained<Self>;
84
85        #[cfg(feature = "CLBeaconIdentityCondition")]
86        #[unsafe(method(initWithUUID:major:minor:identifier:))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn initWithUUID_major_minor_identifier(
89            this: Allocated<Self>,
90            uuid: &NSUUID,
91            major: CLBeaconMajorValue,
92            minor: CLBeaconMinorValue,
93            identifier: &NSString,
94        ) -> Retained<Self>;
95
96        #[cfg(feature = "CLBeaconIdentityCondition")]
97        #[deprecated]
98        #[unsafe(method(initWithProximityUUID:major:minor:identifier:))]
99        #[unsafe(method_family = init)]
100        pub unsafe fn initWithProximityUUID_major_minor_identifier(
101            this: Allocated<Self>,
102            proximity_uuid: &NSUUID,
103            major: CLBeaconMajorValue,
104            minor: CLBeaconMinorValue,
105            identifier: &NSString,
106        ) -> Retained<Self>;
107
108        #[cfg(all(
109            feature = "CLBeaconIdentityCondition",
110            feature = "CLBeaconIdentityConstraint",
111            feature = "CLCondition"
112        ))]
113        #[unsafe(method(initWithBeaconIdentityConstraint:identifier:))]
114        #[unsafe(method_family = init)]
115        pub unsafe fn initWithBeaconIdentityConstraint_identifier(
116            this: Allocated<Self>,
117            beacon_identity_constraint: &CLBeaconIdentityConstraint,
118            identifier: &NSString,
119        ) -> Retained<Self>;
120
121        /// # Safety
122        ///
123        /// The returned generic should be of the correct type.
124        #[deprecated]
125        #[unsafe(method(peripheralDataWithMeasuredPower:))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn peripheralDataWithMeasuredPower(
128            &self,
129            measured_power: Option<&NSNumber>,
130        ) -> Retained<NSMutableDictionary<NSString, AnyObject>>;
131
132        #[cfg(all(
133            feature = "CLBeaconIdentityCondition",
134            feature = "CLBeaconIdentityConstraint",
135            feature = "CLCondition"
136        ))]
137        #[unsafe(method(beaconIdentityConstraint))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn beaconIdentityConstraint(&self) -> Retained<CLBeaconIdentityConstraint>;
140
141        #[unsafe(method(UUID))]
142        #[unsafe(method_family = none)]
143        pub unsafe fn UUID(&self) -> Retained<NSUUID>;
144
145        #[deprecated]
146        #[unsafe(method(proximityUUID))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn proximityUUID(&self) -> Retained<NSUUID>;
149
150        #[deprecated]
151        #[unsafe(method(major))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn major(&self) -> Option<Retained<NSNumber>>;
154
155        #[deprecated]
156        #[unsafe(method(minor))]
157        #[unsafe(method_family = none)]
158        pub unsafe fn minor(&self) -> Option<Retained<NSNumber>>;
159
160        #[deprecated]
161        #[unsafe(method(notifyEntryStateOnDisplay))]
162        #[unsafe(method_family = none)]
163        pub unsafe fn notifyEntryStateOnDisplay(&self) -> bool;
164
165        /// Setter for [`notifyEntryStateOnDisplay`][Self::notifyEntryStateOnDisplay].
166        #[deprecated]
167        #[unsafe(method(setNotifyEntryStateOnDisplay:))]
168        #[unsafe(method_family = none)]
169        pub unsafe fn setNotifyEntryStateOnDisplay(&self, notify_entry_state_on_display: bool);
170    );
171}
172
173/// Methods declared on superclass `CLRegion`.
174#[cfg(feature = "CLRegion")]
175impl CLBeaconRegion {
176    extern_methods!(
177        #[cfg(feature = "CLLocation")]
178        #[deprecated = "Please see CLCircularRegion"]
179        #[unsafe(method(initCircularRegionWithCenter:radius:identifier:))]
180        #[unsafe(method_family = init)]
181        pub unsafe fn initCircularRegionWithCenter_radius_identifier(
182            this: Allocated<Self>,
183            center: CLLocationCoordinate2D,
184            radius: CLLocationDistance,
185            identifier: &NSString,
186        ) -> Retained<Self>;
187    );
188}
189
190/// Methods declared on superclass `NSObject`.
191#[cfg(feature = "CLRegion")]
192impl CLBeaconRegion {
193    extern_methods!(
194        #[unsafe(method(init))]
195        #[unsafe(method_family = init)]
196        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
197
198        #[unsafe(method(new))]
199        #[unsafe(method_family = new)]
200        pub unsafe fn new() -> Retained<Self>;
201    );
202}
203
204extern_class!(
205    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clbeacon?language=objc)
206    #[unsafe(super(NSObject))]
207    #[derive(Debug, PartialEq, Eq, Hash)]
208    pub struct CLBeacon;
209);
210
211extern_conformance!(
212    unsafe impl NSCoding for CLBeacon {}
213);
214
215extern_conformance!(
216    unsafe impl NSCopying for CLBeacon {}
217);
218
219unsafe impl CopyingHelper for CLBeacon {
220    type Result = Self;
221}
222
223extern_conformance!(
224    unsafe impl NSObjectProtocol for CLBeacon {}
225);
226
227extern_conformance!(
228    unsafe impl NSSecureCoding for CLBeacon {}
229);
230
231impl CLBeacon {
232    extern_methods!(
233        #[unsafe(method(timestamp))]
234        #[unsafe(method_family = none)]
235        pub unsafe fn timestamp(&self) -> Retained<NSDate>;
236
237        #[unsafe(method(UUID))]
238        #[unsafe(method_family = none)]
239        pub unsafe fn UUID(&self) -> Retained<NSUUID>;
240
241        #[deprecated]
242        #[unsafe(method(proximityUUID))]
243        #[unsafe(method_family = none)]
244        pub unsafe fn proximityUUID(&self) -> Retained<NSUUID>;
245
246        #[unsafe(method(major))]
247        #[unsafe(method_family = none)]
248        pub unsafe fn major(&self) -> Retained<NSNumber>;
249
250        #[unsafe(method(minor))]
251        #[unsafe(method_family = none)]
252        pub unsafe fn minor(&self) -> Retained<NSNumber>;
253
254        #[cfg(feature = "CLRegion")]
255        #[unsafe(method(proximity))]
256        #[unsafe(method_family = none)]
257        pub unsafe fn proximity(&self) -> CLProximity;
258
259        #[cfg(feature = "CLLocation")]
260        #[unsafe(method(accuracy))]
261        #[unsafe(method_family = none)]
262        pub unsafe fn accuracy(&self) -> CLLocationAccuracy;
263
264        #[unsafe(method(rssi))]
265        #[unsafe(method_family = none)]
266        pub unsafe fn rssi(&self) -> NSInteger;
267    );
268}
269
270/// Methods declared on superclass `NSObject`.
271impl CLBeacon {
272    extern_methods!(
273        #[unsafe(method(init))]
274        #[unsafe(method_family = init)]
275        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
276
277        #[unsafe(method(new))]
278        #[unsafe(method_family = new)]
279        pub unsafe fn new() -> Retained<Self>;
280    );
281}