objc2_cloud_kit/generated/
CKRecordZone.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct CKRecordZoneCapabilities(pub NSUInteger);
14bitflags::bitflags! {
15 impl CKRecordZoneCapabilities: NSUInteger {
16#[doc(alias = "CKRecordZoneCapabilityFetchChanges")]
18 const FetchChanges = 1<<0;
19#[doc(alias = "CKRecordZoneCapabilityAtomic")]
21 const Atomic = 1<<1;
22#[doc(alias = "CKRecordZoneCapabilitySharing")]
24 const Sharing = 1<<2;
25#[doc(alias = "CKRecordZoneCapabilityZoneWideSharing")]
27 const ZoneWideSharing = 1<<3;
28 }
29}
30
31unsafe impl Encode for CKRecordZoneCapabilities {
32 const ENCODING: Encoding = NSUInteger::ENCODING;
33}
34
35unsafe impl RefEncode for CKRecordZoneCapabilities {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern "C" {
40 pub static CKRecordZoneDefaultName: &'static NSString;
42}
43
44extern_class!(
45 #[unsafe(super(NSObject))]
47 #[derive(Debug, PartialEq, Eq, Hash)]
48 pub struct CKRecordZone;
49);
50
51unsafe impl NSCoding for CKRecordZone {}
52
53unsafe impl NSCopying for CKRecordZone {}
54
55unsafe impl CopyingHelper for CKRecordZone {
56 type Result = Self;
57}
58
59unsafe impl NSObjectProtocol for CKRecordZone {}
60
61unsafe impl NSSecureCoding for CKRecordZone {}
62
63impl CKRecordZone {
64 extern_methods!(
65 #[unsafe(method(defaultRecordZone))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn defaultRecordZone() -> Retained<CKRecordZone>;
68
69 #[unsafe(method(init))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73 #[unsafe(method(new))]
74 #[unsafe(method_family = new)]
75 pub unsafe fn new() -> Retained<Self>;
76
77 #[unsafe(method(initWithZoneName:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithZoneName(
80 this: Allocated<Self>,
81 zone_name: &NSString,
82 ) -> Retained<Self>;
83
84 #[cfg(feature = "CKRecordZoneID")]
85 #[unsafe(method(initWithZoneID:))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn initWithZoneID(
88 this: Allocated<Self>,
89 zone_id: &CKRecordZoneID,
90 ) -> Retained<Self>;
91
92 #[cfg(feature = "CKRecordZoneID")]
93 #[unsafe(method(zoneID))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
96
97 #[unsafe(method(capabilities))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn capabilities(&self) -> CKRecordZoneCapabilities;
101
102 #[cfg(feature = "CKReference")]
103 #[unsafe(method(share))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn share(&self) -> Option<Retained<CKReference>>;
120 );
121}