objc2_cloud_kit/generated/
CKShareParticipant.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct CKShareParticipantAcceptanceStatus(pub NSInteger);
15impl CKShareParticipantAcceptanceStatus {
16 #[doc(alias = "CKShareParticipantAcceptanceStatusUnknown")]
17 pub const Unknown: Self = Self(0);
18 #[doc(alias = "CKShareParticipantAcceptanceStatusPending")]
19 pub const Pending: Self = Self(1);
20 #[doc(alias = "CKShareParticipantAcceptanceStatusAccepted")]
21 pub const Accepted: Self = Self(2);
22 #[doc(alias = "CKShareParticipantAcceptanceStatusRemoved")]
23 pub const Removed: Self = Self(3);
24}
25
26unsafe impl Encode for CKShareParticipantAcceptanceStatus {
27 const ENCODING: Encoding = NSInteger::ENCODING;
28}
29
30unsafe impl RefEncode for CKShareParticipantAcceptanceStatus {
31 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
32}
33
34#[repr(transparent)]
39#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
40pub struct CKShareParticipantPermission(pub NSInteger);
41impl CKShareParticipantPermission {
42 #[doc(alias = "CKShareParticipantPermissionUnknown")]
43 pub const Unknown: Self = Self(0);
44 #[doc(alias = "CKShareParticipantPermissionNone")]
45 pub const None: Self = Self(1);
46 #[doc(alias = "CKShareParticipantPermissionReadOnly")]
47 pub const ReadOnly: Self = Self(2);
48 #[doc(alias = "CKShareParticipantPermissionReadWrite")]
49 pub const ReadWrite: Self = Self(3);
50}
51
52unsafe impl Encode for CKShareParticipantPermission {
53 const ENCODING: Encoding = NSInteger::ENCODING;
54}
55
56unsafe impl RefEncode for CKShareParticipantPermission {
57 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
58}
59
60#[repr(transparent)]
70#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
71pub struct CKShareParticipantRole(pub NSInteger);
72impl CKShareParticipantRole {
73 #[doc(alias = "CKShareParticipantRoleUnknown")]
74 pub const Unknown: Self = Self(0);
75 #[doc(alias = "CKShareParticipantRoleOwner")]
76 pub const Owner: Self = Self(1);
77 #[doc(alias = "CKShareParticipantRolePrivateUser")]
78 pub const PrivateUser: Self = Self(3);
79 #[doc(alias = "CKShareParticipantRolePublicUser")]
80 pub const PublicUser: Self = Self(4);
81}
82
83unsafe impl Encode for CKShareParticipantRole {
84 const ENCODING: Encoding = NSInteger::ENCODING;
85}
86
87unsafe impl RefEncode for CKShareParticipantRole {
88 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
89}
90
91#[deprecated]
94#[repr(transparent)]
95#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
96pub struct CKShareParticipantType(pub NSInteger);
97impl CKShareParticipantType {
98 #[deprecated]
99 #[doc(alias = "CKShareParticipantTypeUnknown")]
100 pub const Unknown: Self = Self(0);
101 #[deprecated]
102 #[doc(alias = "CKShareParticipantTypeOwner")]
103 pub const Owner: Self = Self(1);
104 #[deprecated]
105 #[doc(alias = "CKShareParticipantTypePrivateUser")]
106 pub const PrivateUser: Self = Self(3);
107 #[deprecated]
108 #[doc(alias = "CKShareParticipantTypePublicUser")]
109 pub const PublicUser: Self = Self(4);
110}
111
112unsafe impl Encode for CKShareParticipantType {
113 const ENCODING: Encoding = NSInteger::ENCODING;
114}
115
116unsafe impl RefEncode for CKShareParticipantType {
117 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
118}
119
120extern_class!(
121 #[unsafe(super(NSObject))]
123 #[derive(Debug, PartialEq, Eq, Hash)]
124 pub struct CKShareParticipant;
125);
126
127unsafe impl NSCoding for CKShareParticipant {}
128
129unsafe impl NSCopying for CKShareParticipant {}
130
131unsafe impl CopyingHelper for CKShareParticipant {
132 type Result = Self;
133}
134
135unsafe impl NSObjectProtocol for CKShareParticipant {}
136
137unsafe impl NSSecureCoding for CKShareParticipant {}
138
139impl CKShareParticipant {
140 extern_methods!(
141 #[unsafe(method(init))]
145 #[unsafe(method_family = init)]
146 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
147
148 #[unsafe(method(new))]
149 #[unsafe(method_family = new)]
150 pub unsafe fn new() -> Retained<Self>;
151
152 #[cfg(feature = "CKUserIdentity")]
153 #[unsafe(method(userIdentity))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn userIdentity(&self) -> Retained<CKUserIdentity>;
156
157 #[unsafe(method(role))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn role(&self) -> CKShareParticipantRole;
162
163 #[unsafe(method(setRole:))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn setRole(&self, role: CKShareParticipantRole);
167
168 #[deprecated]
171 #[unsafe(method(type))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn r#type(&self) -> CKShareParticipantType;
174
175 #[deprecated]
177 #[unsafe(method(setType:))]
178 #[unsafe(method_family = none)]
179 pub unsafe fn setType(&self, r#type: CKShareParticipantType);
180
181 #[unsafe(method(acceptanceStatus))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn acceptanceStatus(&self) -> CKShareParticipantAcceptanceStatus;
184
185 #[unsafe(method(permission))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn permission(&self) -> CKShareParticipantPermission;
190
191 #[unsafe(method(setPermission:))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn setPermission(&self, permission: CKShareParticipantPermission);
195
196 #[unsafe(method(participantID))]
198 #[unsafe(method_family = none)]
199 pub unsafe fn participantID(&self) -> Retained<NSString>;
200 );
201}