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)]
72#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
73pub struct CKShareParticipantRole(pub NSInteger);
74impl CKShareParticipantRole {
75 #[doc(alias = "CKShareParticipantRoleUnknown")]
76 pub const Unknown: Self = Self(0);
77 #[doc(alias = "CKShareParticipantRoleOwner")]
78 pub const Owner: Self = Self(1);
79 #[doc(alias = "CKShareParticipantRolePrivateUser")]
80 pub const PrivateUser: Self = Self(3);
81 #[doc(alias = "CKShareParticipantRolePublicUser")]
82 pub const PublicUser: Self = Self(4);
83 #[doc(alias = "CKShareParticipantRoleAdministrator")]
84 pub const Administrator: Self = Self(2);
85}
86
87unsafe impl Encode for CKShareParticipantRole {
88 const ENCODING: Encoding = NSInteger::ENCODING;
89}
90
91unsafe impl RefEncode for CKShareParticipantRole {
92 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
93}
94
95#[deprecated]
98#[repr(transparent)]
99#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
100pub struct CKShareParticipantType(pub NSInteger);
101impl CKShareParticipantType {
102 #[doc(alias = "CKShareParticipantTypeUnknown")]
103 #[deprecated]
104 pub const Unknown: Self = Self(0);
105 #[doc(alias = "CKShareParticipantTypeOwner")]
106 #[deprecated]
107 pub const Owner: Self = Self(1);
108 #[doc(alias = "CKShareParticipantTypePrivateUser")]
109 #[deprecated]
110 pub const PrivateUser: Self = Self(3);
111 #[doc(alias = "CKShareParticipantTypePublicUser")]
112 #[deprecated]
113 pub const PublicUser: Self = Self(4);
114}
115
116unsafe impl Encode for CKShareParticipantType {
117 const ENCODING: Encoding = NSInteger::ENCODING;
118}
119
120unsafe impl RefEncode for CKShareParticipantType {
121 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
122}
123
124extern_class!(
125 #[unsafe(super(NSObject))]
127 #[derive(Debug, PartialEq, Eq, Hash)]
128 pub struct CKShareParticipant;
129);
130
131extern_conformance!(
132 unsafe impl NSCoding for CKShareParticipant {}
133);
134
135extern_conformance!(
136 unsafe impl NSCopying for CKShareParticipant {}
137);
138
139unsafe impl CopyingHelper for CKShareParticipant {
140 type Result = Self;
141}
142
143extern_conformance!(
144 unsafe impl NSObjectProtocol for CKShareParticipant {}
145);
146
147extern_conformance!(
148 unsafe impl NSSecureCoding for CKShareParticipant {}
149);
150
151impl CKShareParticipant {
152 extern_methods!(
153 #[unsafe(method(init))]
157 #[unsafe(method_family = init)]
158 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
159
160 #[unsafe(method(new))]
161 #[unsafe(method_family = new)]
162 pub unsafe fn new() -> Retained<Self>;
163
164 #[cfg(feature = "CKUserIdentity")]
165 #[unsafe(method(userIdentity))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn userIdentity(&self) -> Retained<CKUserIdentity>;
168
169 #[unsafe(method(role))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn role(&self) -> CKShareParticipantRole;
174
175 #[unsafe(method(setRole:))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn setRole(&self, role: CKShareParticipantRole);
179
180 #[deprecated]
182 #[unsafe(method(type))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn r#type(&self) -> CKShareParticipantType;
185
186 #[deprecated]
188 #[unsafe(method(setType:))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn setType(&self, r#type: CKShareParticipantType);
191
192 #[unsafe(method(acceptanceStatus))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn acceptanceStatus(&self) -> CKShareParticipantAcceptanceStatus;
195
196 #[unsafe(method(permission))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn permission(&self) -> CKShareParticipantPermission;
201
202 #[unsafe(method(setPermission:))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn setPermission(&self, permission: CKShareParticipantPermission);
206
207 #[unsafe(method(participantID))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn participantID(&self) -> Retained<NSString>;
211
212 #[unsafe(method(isApprovedRequester))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn isApprovedRequester(&self) -> bool;
216
217 #[unsafe(method(dateAddedToShare))]
221 #[unsafe(method_family = none)]
222 pub unsafe fn dateAddedToShare(&self) -> Option<Retained<NSDate>>;
223
224 #[unsafe(method(oneTimeURLParticipant))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn oneTimeURLParticipant() -> Retained<Self>;
235 );
236}