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::Foundation::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum CNContainerType {
        CNContainerTypeUnassigned = 0,
        CNContainerTypeLocal = 1,
        CNContainerTypeExchange = 2,
        CNContainerTypeCardDAV = 3,
    }
);

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

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

#[cfg(feature = "Contacts_CNContainer")]
unsafe impl NSCoding for CNContainer {}

#[cfg(feature = "Contacts_CNContainer")]
unsafe impl NSCopying for CNContainer {}

#[cfg(feature = "Contacts_CNContainer")]
unsafe impl NSObjectProtocol for CNContainer {}

#[cfg(feature = "Contacts_CNContainer")]
unsafe impl NSSecureCoding for CNContainer {}

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

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other name)]
        pub unsafe fn name(&self) -> Id<NSString>;

        #[method(type)]
        pub unsafe fn r#type(&self) -> CNContainerType;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Contacts_CNContainer")]
    unsafe impl CNContainer {
        #[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>;
    }
);

extern_static!(CNContainerIdentifierKey: &'static NSString);

extern_static!(CNContainerNameKey: &'static NSString);

extern_static!(CNContainerTypeKey: &'static NSString);