icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::Contacts::*;
use crate::CoreLocation::*;
use crate::Foundation::*;

ns_enum!(
    #[underlying(NSUInteger)]
    pub enum CLMonitoringState {
        CLMonitoringStateUnknown = 0,
        CLMonitoringStateSatisfied = 1,
        CLMonitoringStateUnsatisfied = 2,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreLocation_CLMonitoringEvent")]
    pub struct CLMonitoringEvent;

    #[cfg(feature = "CoreLocation_CLMonitoringEvent")]
    unsafe impl ClassType for CLMonitoringEvent {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreLocation_CLMonitoringEvent")]
unsafe impl NSCoding for CLMonitoringEvent {}

#[cfg(feature = "CoreLocation_CLMonitoringEvent")]
unsafe impl NSObjectProtocol for CLMonitoringEvent {}

#[cfg(feature = "CoreLocation_CLMonitoringEvent")]
unsafe impl NSSecureCoding for CLMonitoringEvent {}

extern_methods!(
    #[cfg(feature = "CoreLocation_CLMonitoringEvent")]
    unsafe impl CLMonitoringEvent {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other identifier)]
        pub unsafe fn identifier(&self) -> Id<NSString>;

        #[cfg(feature = "CoreLocation_CLCondition")]
        #[method_id(@__retain_semantics Other refinement)]
        pub unsafe fn refinement(&self) -> Option<Id<CLCondition>>;

        #[method(state)]
        pub unsafe fn state(&self) -> CLMonitoringState;

        #[cfg(feature = "Foundation_NSDate")]
        #[method_id(@__retain_semantics Other date)]
        pub unsafe fn date(&self) -> Id<NSDate>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);