icrate/generated/Contacts/
CNContainer.rs1use crate::common::*;
4use crate::Contacts::*;
5use crate::Foundation::*;
6
7ns_enum!(
8 #[underlying(NSInteger)]
9 pub enum CNContainerType {
10 CNContainerTypeUnassigned = 0,
11 CNContainerTypeLocal = 1,
12 CNContainerTypeExchange = 2,
13 CNContainerTypeCardDAV = 3,
14 }
15);
16
17extern_class!(
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(feature = "Contacts_CNContainer")]
20 pub struct CNContainer;
21
22 #[cfg(feature = "Contacts_CNContainer")]
23 unsafe impl ClassType for CNContainer {
24 type Super = NSObject;
25 type Mutability = InteriorMutable;
26 }
27);
28
29#[cfg(feature = "Contacts_CNContainer")]
30unsafe impl NSCoding for CNContainer {}
31
32#[cfg(feature = "Contacts_CNContainer")]
33unsafe impl NSCopying for CNContainer {}
34
35#[cfg(feature = "Contacts_CNContainer")]
36unsafe impl NSObjectProtocol for CNContainer {}
37
38#[cfg(feature = "Contacts_CNContainer")]
39unsafe impl NSSecureCoding for CNContainer {}
40
41extern_methods!(
42 #[cfg(feature = "Contacts_CNContainer")]
43 unsafe impl CNContainer {
44 #[cfg(feature = "Foundation_NSString")]
45 #[method_id(@__retain_semantics Other identifier)]
46 pub unsafe fn identifier(&self) -> Id<NSString>;
47
48 #[cfg(feature = "Foundation_NSString")]
49 #[method_id(@__retain_semantics Other name)]
50 pub unsafe fn name(&self) -> Id<NSString>;
51
52 #[method(type)]
53 pub unsafe fn r#type(&self) -> CNContainerType;
54 }
55);
56
57extern_methods!(
58 #[cfg(feature = "Contacts_CNContainer")]
60 unsafe impl CNContainer {
61 #[method_id(@__retain_semantics Init init)]
62 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
63
64 #[method_id(@__retain_semantics New new)]
65 pub unsafe fn new() -> Id<Self>;
66 }
67);
68
69extern_static!(CNContainerIdentifierKey: &'static NSString);
70
71extern_static!(CNContainerNameKey: &'static NSString);
72
73extern_static!(CNContainerTypeKey: &'static NSString);