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

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

    #[cfg(feature = "Contacts_CNMutableContact")]
    unsafe impl ClassType for CNMutableContact {
        #[inherits(NSObject)]
        type Super = CNContact;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Contacts_CNMutableContact")]
unsafe impl NSCoding for CNMutableContact {}

#[cfg(feature = "Contacts_CNMutableContact")]
unsafe impl NSCopying for CNMutableContact {}

#[cfg(feature = "Contacts_CNMutableContact")]
unsafe impl NSMutableCopying for CNMutableContact {}

#[cfg(feature = "Contacts_CNMutableContact")]
unsafe impl NSObjectProtocol for CNMutableContact {}

#[cfg(feature = "Contacts_CNMutableContact")]
unsafe impl NSSecureCoding for CNMutableContact {}

extern_methods!(
    #[cfg(feature = "Contacts_CNMutableContact")]
    unsafe impl CNMutableContact {
        #[method(contactType)]
        pub unsafe fn contactType(&self) -> CNContactType;

        #[method(setContactType:)]
        pub unsafe fn setContactType(&self, contact_type: CNContactType);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setNamePrefix:)]
        pub unsafe fn setNamePrefix(&self, name_prefix: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setGivenName:)]
        pub unsafe fn setGivenName(&self, given_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setMiddleName:)]
        pub unsafe fn setMiddleName(&self, middle_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setFamilyName:)]
        pub unsafe fn setFamilyName(&self, family_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setPreviousFamilyName:)]
        pub unsafe fn setPreviousFamilyName(&self, previous_family_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setNameSuffix:)]
        pub unsafe fn setNameSuffix(&self, name_suffix: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setNickname:)]
        pub unsafe fn setNickname(&self, nickname: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setOrganizationName:)]
        pub unsafe fn setOrganizationName(&self, organization_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setDepartmentName:)]
        pub unsafe fn setDepartmentName(&self, department_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setJobTitle:)]
        pub unsafe fn setJobTitle(&self, job_title: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setPhoneticGivenName:)]
        pub unsafe fn setPhoneticGivenName(&self, phonetic_given_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setPhoneticMiddleName:)]
        pub unsafe fn setPhoneticMiddleName(&self, phonetic_middle_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setPhoneticFamilyName:)]
        pub unsafe fn setPhoneticFamilyName(&self, phonetic_family_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setPhoneticOrganizationName:)]
        pub unsafe fn setPhoneticOrganizationName(&self, phonetic_organization_name: &NSString);

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

        #[cfg(feature = "Foundation_NSString")]
        #[method(setNote:)]
        pub unsafe fn setNote(&self, note: &NSString);

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

        #[cfg(feature = "Foundation_NSData")]
        #[method(setImageData:)]
        pub unsafe fn setImageData(&self, image_data: Option<&NSData>);

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Contacts_CNPhoneNumber",
            feature = "Foundation_NSArray"
        ))]
        #[method_id(@__retain_semantics Other phoneNumbers)]
        pub unsafe fn phoneNumbers(&self) -> Id<NSArray<CNLabeledValue<CNPhoneNumber>>>;

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Contacts_CNPhoneNumber",
            feature = "Foundation_NSArray"
        ))]
        #[method(setPhoneNumbers:)]
        pub unsafe fn setPhoneNumbers(
            &self,
            phone_numbers: &NSArray<CNLabeledValue<CNPhoneNumber>>,
        );

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString"
        ))]
        #[method_id(@__retain_semantics Other emailAddresses)]
        pub unsafe fn emailAddresses(&self) -> Id<NSArray<CNLabeledValue<NSString>>>;

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString"
        ))]
        #[method(setEmailAddresses:)]
        pub unsafe fn setEmailAddresses(&self, email_addresses: &NSArray<CNLabeledValue<NSString>>);

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Contacts_CNPostalAddress",
            feature = "Foundation_NSArray"
        ))]
        #[method_id(@__retain_semantics Other postalAddresses)]
        pub unsafe fn postalAddresses(&self) -> Id<NSArray<CNLabeledValue<CNPostalAddress>>>;

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Contacts_CNPostalAddress",
            feature = "Foundation_NSArray"
        ))]
        #[method(setPostalAddresses:)]
        pub unsafe fn setPostalAddresses(
            &self,
            postal_addresses: &NSArray<CNLabeledValue<CNPostalAddress>>,
        );

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString"
        ))]
        #[method_id(@__retain_semantics Other urlAddresses)]
        pub unsafe fn urlAddresses(&self) -> Id<NSArray<CNLabeledValue<NSString>>>;

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString"
        ))]
        #[method(setUrlAddresses:)]
        pub unsafe fn setUrlAddresses(&self, url_addresses: &NSArray<CNLabeledValue<NSString>>);

        #[cfg(all(
            feature = "Contacts_CNContactRelation",
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray"
        ))]
        #[method_id(@__retain_semantics Other contactRelations)]
        pub unsafe fn contactRelations(&self) -> Id<NSArray<CNLabeledValue<CNContactRelation>>>;

        #[cfg(all(
            feature = "Contacts_CNContactRelation",
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray"
        ))]
        #[method(setContactRelations:)]
        pub unsafe fn setContactRelations(
            &self,
            contact_relations: &NSArray<CNLabeledValue<CNContactRelation>>,
        );

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Contacts_CNSocialProfile",
            feature = "Foundation_NSArray"
        ))]
        #[method_id(@__retain_semantics Other socialProfiles)]
        pub unsafe fn socialProfiles(&self) -> Id<NSArray<CNLabeledValue<CNSocialProfile>>>;

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Contacts_CNSocialProfile",
            feature = "Foundation_NSArray"
        ))]
        #[method(setSocialProfiles:)]
        pub unsafe fn setSocialProfiles(
            &self,
            social_profiles: &NSArray<CNLabeledValue<CNSocialProfile>>,
        );

        #[cfg(all(
            feature = "Contacts_CNInstantMessageAddress",
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray"
        ))]
        #[method_id(@__retain_semantics Other instantMessageAddresses)]
        pub unsafe fn instantMessageAddresses(
            &self,
        ) -> Id<NSArray<CNLabeledValue<CNInstantMessageAddress>>>;

        #[cfg(all(
            feature = "Contacts_CNInstantMessageAddress",
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray"
        ))]
        #[method(setInstantMessageAddresses:)]
        pub unsafe fn setInstantMessageAddresses(
            &self,
            instant_message_addresses: &NSArray<CNLabeledValue<CNInstantMessageAddress>>,
        );

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

        #[cfg(feature = "Foundation_NSDateComponents")]
        #[method(setBirthday:)]
        pub unsafe fn setBirthday(&self, birthday: Option<&NSDateComponents>);

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

        #[cfg(feature = "Foundation_NSDateComponents")]
        #[method(setNonGregorianBirthday:)]
        pub unsafe fn setNonGregorianBirthday(
            &self,
            non_gregorian_birthday: Option<&NSDateComponents>,
        );

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray",
            feature = "Foundation_NSDateComponents"
        ))]
        #[method_id(@__retain_semantics Other dates)]
        pub unsafe fn dates(&self) -> Id<NSArray<CNLabeledValue<NSDateComponents>>>;

        #[cfg(all(
            feature = "Contacts_CNLabeledValue",
            feature = "Foundation_NSArray",
            feature = "Foundation_NSDateComponents"
        ))]
        #[method(setDates:)]
        pub unsafe fn setDates(&self, dates: &NSArray<CNLabeledValue<NSDateComponents>>);
    }
);

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