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
51extern_conformance!(
52 unsafe impl NSCoding for CKRecordZone {}
53);
54
55extern_conformance!(
56 unsafe impl NSCopying for CKRecordZone {}
57);
58
59unsafe impl CopyingHelper for CKRecordZone {
60 type Result = Self;
61}
62
63extern_conformance!(
64 unsafe impl NSObjectProtocol for CKRecordZone {}
65);
66
67extern_conformance!(
68 unsafe impl NSSecureCoding for CKRecordZone {}
69);
70
71impl CKRecordZone {
72 extern_methods!(
73 #[unsafe(method(defaultRecordZone))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn defaultRecordZone() -> Retained<CKRecordZone>;
76
77 #[unsafe(method(init))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81 #[unsafe(method(new))]
82 #[unsafe(method_family = new)]
83 pub unsafe fn new() -> Retained<Self>;
84
85 #[unsafe(method(initWithZoneName:))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn initWithZoneName(
88 this: Allocated<Self>,
89 zone_name: &NSString,
90 ) -> Retained<Self>;
91
92 #[cfg(feature = "CKRecordZoneID")]
93 #[unsafe(method(initWithZoneID:))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn initWithZoneID(
96 this: Allocated<Self>,
97 zone_id: &CKRecordZoneID,
98 ) -> Retained<Self>;
99
100 #[cfg(feature = "CKRecordZoneID")]
101 #[unsafe(method(zoneID))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
104
105 #[unsafe(method(capabilities))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn capabilities(&self) -> CKRecordZoneCapabilities;
109
110 #[cfg(feature = "CKReference")]
111 #[unsafe(method(share))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn share(&self) -> Option<Retained<CKReference>>;
128 );
129}