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::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clbeaconmajorvalue?language=objc)
pub type CLBeaconMajorValue = u16;

/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clbeaconminorvalue?language=objc)
pub type CLBeaconMinorValue = u16;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clbeaconidentitycondition?language=objc)
    #[unsafe(super(CLCondition, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CLCondition")]
    pub struct CLBeaconIdentityCondition;
);

#[cfg(feature = "CLCondition")]
extern_conformance!(
    unsafe impl NSCoding for CLBeaconIdentityCondition {}
);

#[cfg(feature = "CLCondition")]
extern_conformance!(
    unsafe impl NSCopying for CLBeaconIdentityCondition {}
);

#[cfg(feature = "CLCondition")]
unsafe impl CopyingHelper for CLBeaconIdentityCondition {
    type Result = Self;
}

#[cfg(feature = "CLCondition")]
extern_conformance!(
    unsafe impl NSObjectProtocol for CLBeaconIdentityCondition {}
);

#[cfg(feature = "CLCondition")]
extern_conformance!(
    unsafe impl NSSecureCoding for CLBeaconIdentityCondition {}
);

#[cfg(feature = "CLCondition")]
impl CLBeaconIdentityCondition {
    extern_methods!(
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(UUID))]
        #[unsafe(method_family = none)]
        pub unsafe fn UUID(&self) -> Retained<NSUUID>;

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

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

        #[unsafe(method(initWithUUID:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithUUID(this: Allocated<Self>, uuid: &NSUUID) -> Retained<Self>;

        #[unsafe(method(initWithUUID:major:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithUUID_major(
            this: Allocated<Self>,
            uuid: &NSUUID,
            major: CLBeaconMajorValue,
        ) -> Retained<Self>;

        #[unsafe(method(initWithUUID:major:minor:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithUUID_major_minor(
            this: Allocated<Self>,
            uuid: &NSUUID,
            major: CLBeaconMajorValue,
            minor: CLBeaconMinorValue,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `CLCondition`.
#[cfg(feature = "CLCondition")]
impl CLBeaconIdentityCondition {
    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>;
    );
}