objc2-core-location 0.3.2

Bindings to the CoreLocation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-contacts")]
#[cfg(not(target_os = "tvos"))]
use objc2_contacts::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clplacemark?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
    pub struct CLPlacemark;
);

unsafe impl Send for CLPlacemark {}

unsafe impl Sync for CLPlacemark {}

extern_conformance!(
    unsafe impl NSCoding for CLPlacemark {}
);

extern_conformance!(
    unsafe impl NSCopying for CLPlacemark {}
);

unsafe impl CopyingHelper for CLPlacemark {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for CLPlacemark {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for CLPlacemark {}
);

impl CLPlacemark {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(initWithPlacemark:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPlacemark(
            this: Allocated<Self>,
            placemark: &CLPlacemark,
        ) -> Retained<Self>;

        #[cfg(feature = "CLLocation")]
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(location))]
        #[unsafe(method_family = none)]
        pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;

        #[cfg(feature = "CLRegion")]
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(region))]
        #[unsafe(method_family = none)]
        pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(timeZone))]
        #[unsafe(method_family = none)]
        pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use @properties"]
        #[unsafe(method(addressDictionary))]
        #[unsafe(method_family = none)]
        pub unsafe fn addressDictionary(&self) -> Option<Retained<NSDictionary>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(name))]
        #[unsafe(method_family = none)]
        pub unsafe fn name(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(thoroughfare))]
        #[unsafe(method_family = none)]
        pub unsafe fn thoroughfare(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(subThoroughfare))]
        #[unsafe(method_family = none)]
        pub unsafe fn subThoroughfare(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(locality))]
        #[unsafe(method_family = none)]
        pub unsafe fn locality(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(subLocality))]
        #[unsafe(method_family = none)]
        pub unsafe fn subLocality(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(administrativeArea))]
        #[unsafe(method_family = none)]
        pub unsafe fn administrativeArea(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(subAdministrativeArea))]
        #[unsafe(method_family = none)]
        pub unsafe fn subAdministrativeArea(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(postalCode))]
        #[unsafe(method_family = none)]
        pub unsafe fn postalCode(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(ISOcountryCode))]
        #[unsafe(method_family = none)]
        pub unsafe fn ISOcountryCode(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(country))]
        #[unsafe(method_family = none)]
        pub unsafe fn country(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(inlandWater))]
        #[unsafe(method_family = none)]
        pub unsafe fn inlandWater(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(ocean))]
        #[unsafe(method_family = none)]
        pub unsafe fn ocean(&self) -> Option<Retained<NSString>>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(areasOfInterest))]
        #[unsafe(method_family = none)]
        pub unsafe fn areasOfInterest(&self) -> Option<Retained<NSArray<NSString>>>;
    );
}

/// ContactsAdditions.
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
impl CLPlacemark {
    extern_methods!(
        #[cfg(feature = "objc2-contacts")]
        #[cfg(not(target_os = "tvos"))]
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
        #[unsafe(method(postalAddress))]
        #[unsafe(method_family = none)]
        pub unsafe fn postalAddress(&self) -> Option<Retained<CNPostalAddress>>;
    );
}