objc2_core_location/generated/
CLPlacemark.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-contacts")]
6#[cfg(not(target_os = "tvos"))]
7use objc2_contacts::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clplacemark?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
17    pub struct CLPlacemark;
18);
19
20unsafe impl Send for CLPlacemark {}
21
22unsafe impl Sync for CLPlacemark {}
23
24extern_conformance!(
25    unsafe impl NSCoding for CLPlacemark {}
26);
27
28extern_conformance!(
29    unsafe impl NSCopying for CLPlacemark {}
30);
31
32unsafe impl CopyingHelper for CLPlacemark {
33    type Result = Self;
34}
35
36extern_conformance!(
37    unsafe impl NSObjectProtocol for CLPlacemark {}
38);
39
40extern_conformance!(
41    unsafe impl NSSecureCoding for CLPlacemark {}
42);
43
44impl CLPlacemark {
45    extern_methods!(
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53
54        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
55        #[unsafe(method(initWithPlacemark:))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn initWithPlacemark(
58            this: Allocated<Self>,
59            placemark: &CLPlacemark,
60        ) -> Retained<Self>;
61
62        #[cfg(feature = "CLLocation")]
63        /// This property is not atomic.
64        ///
65        /// # Safety
66        ///
67        /// This might not be thread-safe.
68        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
69        #[unsafe(method(location))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
72
73        #[cfg(feature = "CLRegion")]
74        /// This property is not atomic.
75        ///
76        /// # Safety
77        ///
78        /// This might not be thread-safe.
79        #[unsafe(method(region))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
82
83        /// This property is not atomic.
84        ///
85        /// # Safety
86        ///
87        /// This might not be thread-safe.
88        #[unsafe(method(timeZone))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
91
92        /// This property is not atomic.
93        ///
94        /// # Safety
95        ///
96        /// This might not be thread-safe.
97        #[deprecated = "Use @properties"]
98        #[unsafe(method(addressDictionary))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn addressDictionary(&self) -> Option<Retained<NSDictionary>>;
101
102        /// This property is not atomic.
103        ///
104        /// # Safety
105        ///
106        /// This might not be thread-safe.
107        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
108        #[unsafe(method(name))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn name(&self) -> Option<Retained<NSString>>;
111
112        /// This property is not atomic.
113        ///
114        /// # Safety
115        ///
116        /// This might not be thread-safe.
117        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
118        #[unsafe(method(thoroughfare))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn thoroughfare(&self) -> Option<Retained<NSString>>;
121
122        /// This property is not atomic.
123        ///
124        /// # Safety
125        ///
126        /// This might not be thread-safe.
127        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
128        #[unsafe(method(subThoroughfare))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn subThoroughfare(&self) -> Option<Retained<NSString>>;
131
132        /// This property is not atomic.
133        ///
134        /// # Safety
135        ///
136        /// This might not be thread-safe.
137        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
138        #[unsafe(method(locality))]
139        #[unsafe(method_family = none)]
140        pub unsafe fn locality(&self) -> Option<Retained<NSString>>;
141
142        /// This property is not atomic.
143        ///
144        /// # Safety
145        ///
146        /// This might not be thread-safe.
147        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
148        #[unsafe(method(subLocality))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn subLocality(&self) -> Option<Retained<NSString>>;
151
152        /// This property is not atomic.
153        ///
154        /// # Safety
155        ///
156        /// This might not be thread-safe.
157        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
158        #[unsafe(method(administrativeArea))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn administrativeArea(&self) -> Option<Retained<NSString>>;
161
162        /// This property is not atomic.
163        ///
164        /// # Safety
165        ///
166        /// This might not be thread-safe.
167        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
168        #[unsafe(method(subAdministrativeArea))]
169        #[unsafe(method_family = none)]
170        pub unsafe fn subAdministrativeArea(&self) -> Option<Retained<NSString>>;
171
172        /// This property is not atomic.
173        ///
174        /// # Safety
175        ///
176        /// This might not be thread-safe.
177        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
178        #[unsafe(method(postalCode))]
179        #[unsafe(method_family = none)]
180        pub unsafe fn postalCode(&self) -> Option<Retained<NSString>>;
181
182        /// This property is not atomic.
183        ///
184        /// # Safety
185        ///
186        /// This might not be thread-safe.
187        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
188        #[unsafe(method(ISOcountryCode))]
189        #[unsafe(method_family = none)]
190        pub unsafe fn ISOcountryCode(&self) -> Option<Retained<NSString>>;
191
192        /// This property is not atomic.
193        ///
194        /// # Safety
195        ///
196        /// This might not be thread-safe.
197        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
198        #[unsafe(method(country))]
199        #[unsafe(method_family = none)]
200        pub unsafe fn country(&self) -> Option<Retained<NSString>>;
201
202        /// This property is not atomic.
203        ///
204        /// # Safety
205        ///
206        /// This might not be thread-safe.
207        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
208        #[unsafe(method(inlandWater))]
209        #[unsafe(method_family = none)]
210        pub unsafe fn inlandWater(&self) -> Option<Retained<NSString>>;
211
212        /// This property is not atomic.
213        ///
214        /// # Safety
215        ///
216        /// This might not be thread-safe.
217        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
218        #[unsafe(method(ocean))]
219        #[unsafe(method_family = none)]
220        pub unsafe fn ocean(&self) -> Option<Retained<NSString>>;
221
222        /// This property is not atomic.
223        ///
224        /// # Safety
225        ///
226        /// This might not be thread-safe.
227        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
228        #[unsafe(method(areasOfInterest))]
229        #[unsafe(method_family = none)]
230        pub unsafe fn areasOfInterest(&self) -> Option<Retained<NSArray<NSString>>>;
231    );
232}
233
234/// ContactsAdditions.
235#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
236impl CLPlacemark {
237    extern_methods!(
238        #[cfg(feature = "objc2-contacts")]
239        #[cfg(not(target_os = "tvos"))]
240        /// This property is not atomic.
241        ///
242        /// # Safety
243        ///
244        /// This might not be thread-safe.
245        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
246        #[unsafe(method(postalAddress))]
247        #[unsafe(method_family = none)]
248        pub unsafe fn postalAddress(&self) -> Option<Retained<CNPostalAddress>>;
249    );
250}