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!(
#[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")]
#[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")]
#[unsafe(method(region))]
#[unsafe(method_family = none)]
pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
#[unsafe(method(timeZone))]
#[unsafe(method_family = none)]
pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
#[deprecated = "Use @properties"]
#[unsafe(method(addressDictionary))]
#[unsafe(method_family = none)]
pub unsafe fn addressDictionary(&self) -> Option<Retained<NSDictionary>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(thoroughfare))]
#[unsafe(method_family = none)]
pub unsafe fn thoroughfare(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(subThoroughfare))]
#[unsafe(method_family = none)]
pub unsafe fn subThoroughfare(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(locality))]
#[unsafe(method_family = none)]
pub unsafe fn locality(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(subLocality))]
#[unsafe(method_family = none)]
pub unsafe fn subLocality(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(administrativeArea))]
#[unsafe(method_family = none)]
pub unsafe fn administrativeArea(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(subAdministrativeArea))]
#[unsafe(method_family = none)]
pub unsafe fn subAdministrativeArea(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(postalCode))]
#[unsafe(method_family = none)]
pub unsafe fn postalCode(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(ISOcountryCode))]
#[unsafe(method_family = none)]
pub unsafe fn ISOcountryCode(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(country))]
#[unsafe(method_family = none)]
pub unsafe fn country(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(inlandWater))]
#[unsafe(method_family = none)]
pub unsafe fn inlandWater(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(ocean))]
#[unsafe(method_family = none)]
pub unsafe fn ocean(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(areasOfInterest))]
#[unsafe(method_family = none)]
pub unsafe fn areasOfInterest(&self) -> Option<Retained<NSArray<NSString>>>;
);
}
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
impl CLPlacemark {
extern_methods!(
#[cfg(feature = "objc2-contacts")]
#[cfg(not(target_os = "tvos"))]
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(postalAddress))]
#[unsafe(method_family = none)]
pub unsafe fn postalAddress(&self) -> Option<Retained<CNPostalAddress>>;
);
}