objc2_contacts/generated/
CNContactsUserDefaults.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// The user defaults for contacts.
11    ///
12    ///
13    /// Note: This class is not thread safe.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/contacts/cncontactsuserdefaults?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct CNContactsUserDefaults;
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for CNContactsUserDefaults {}
23);
24
25impl CNContactsUserDefaults {
26    extern_methods!(
27        #[unsafe(method(sharedDefaults))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn sharedDefaults() -> Retained<Self>;
30
31        #[cfg(feature = "CNContact")]
32        #[unsafe(method(sortOrder))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn sortOrder(&self) -> CNContactSortOrder;
35
36        #[unsafe(method(countryCode))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn countryCode(&self) -> Retained<NSString>;
39    );
40}
41
42/// Methods declared on superclass `NSObject`.
43impl CNContactsUserDefaults {
44    extern_methods!(
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new() -> Retained<Self>;
52    );
53}