objc2_cloud_kit/generated/
CKAllowedSharingOptions.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 CKSharingParticipantAccessOption(pub NSUInteger);
15bitflags::bitflags! {
16 impl CKSharingParticipantAccessOption: NSUInteger {
17#[doc(alias = "CKSharingParticipantAccessOptionAnyoneWithLink")]
19 const AnyoneWithLink = 1<<0;
20#[doc(alias = "CKSharingParticipantAccessOptionSpecifiedRecipientsOnly")]
22 const SpecifiedRecipientsOnly = 1<<1;
23#[doc(alias = "CKSharingParticipantAccessOptionAny")]
25 const Any = CKSharingParticipantAccessOption::AnyoneWithLink.0|CKSharingParticipantAccessOption::SpecifiedRecipientsOnly.0;
26 }
27}
28
29unsafe impl Encode for CKSharingParticipantAccessOption {
30 const ENCODING: Encoding = NSUInteger::ENCODING;
31}
32
33unsafe impl RefEncode for CKSharingParticipantAccessOption {
34 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37#[repr(transparent)]
40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
41pub struct CKSharingParticipantPermissionOption(pub NSUInteger);
42bitflags::bitflags! {
43 impl CKSharingParticipantPermissionOption: NSUInteger {
44#[doc(alias = "CKSharingParticipantPermissionOptionReadOnly")]
46 const ReadOnly = 1<<0;
47#[doc(alias = "CKSharingParticipantPermissionOptionReadWrite")]
49 const ReadWrite = 1<<1;
50#[doc(alias = "CKSharingParticipantPermissionOptionAny")]
52 const Any = CKSharingParticipantPermissionOption::ReadOnly.0|CKSharingParticipantPermissionOption::ReadWrite.0;
53 }
54}
55
56unsafe impl Encode for CKSharingParticipantPermissionOption {
57 const ENCODING: Encoding = NSUInteger::ENCODING;
58}
59
60unsafe impl RefEncode for CKSharingParticipantPermissionOption {
61 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
62}
63
64extern_class!(
65 #[unsafe(super(NSObject))]
67 #[derive(Debug, PartialEq, Eq, Hash)]
68 pub struct CKAllowedSharingOptions;
69);
70
71extern_conformance!(
72 unsafe impl NSCoding for CKAllowedSharingOptions {}
73);
74
75extern_conformance!(
76 unsafe impl NSCopying for CKAllowedSharingOptions {}
77);
78
79unsafe impl CopyingHelper for CKAllowedSharingOptions {
80 type Result = Self;
81}
82
83extern_conformance!(
84 unsafe impl NSObjectProtocol for CKAllowedSharingOptions {}
85);
86
87extern_conformance!(
88 unsafe impl NSSecureCoding for CKAllowedSharingOptions {}
89);
90
91impl CKAllowedSharingOptions {
92 extern_methods!(
93 #[unsafe(method(initWithAllowedParticipantPermissionOptions:allowedParticipantAccessOptions:))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn initWithAllowedParticipantPermissionOptions_allowedParticipantAccessOptions(
96 this: Allocated<Self>,
97 allowed_participant_permission_options: CKSharingParticipantPermissionOption,
98 allowed_participant_access_options: CKSharingParticipantAccessOption,
99 ) -> Retained<Self>;
100
101 #[unsafe(method(allowedParticipantPermissionOptions))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn allowedParticipantPermissionOptions(
104 &self,
105 ) -> CKSharingParticipantPermissionOption;
106
107 #[unsafe(method(setAllowedParticipantPermissionOptions:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn setAllowedParticipantPermissionOptions(
111 &self,
112 allowed_participant_permission_options: CKSharingParticipantPermissionOption,
113 );
114
115 #[unsafe(method(allowedParticipantAccessOptions))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn allowedParticipantAccessOptions(&self) -> CKSharingParticipantAccessOption;
118
119 #[unsafe(method(setAllowedParticipantAccessOptions:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn setAllowedParticipantAccessOptions(
123 &self,
124 allowed_participant_access_options: CKSharingParticipantAccessOption,
125 );
126
127 #[unsafe(method(allowsParticipantsToInviteOthers))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn allowsParticipantsToInviteOthers(&self) -> bool;
133
134 #[unsafe(method(setAllowsParticipantsToInviteOthers:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn setAllowsParticipantsToInviteOthers(
138 &self,
139 allows_participants_to_invite_others: bool,
140 );
141
142 #[unsafe(method(standardOptions))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn standardOptions() -> Retained<CKAllowedSharingOptions>;
150
151 #[unsafe(method(allowsAccessRequests))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn allowsAccessRequests(&self) -> bool;
155
156 #[unsafe(method(setAllowsAccessRequests:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn setAllowsAccessRequests(&self, allows_access_requests: bool);
160 );
161}
162
163impl CKAllowedSharingOptions {
165 extern_methods!(
166 #[unsafe(method(init))]
167 #[unsafe(method_family = init)]
168 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
169
170 #[unsafe(method(new))]
171 #[unsafe(method_family = new)]
172 pub unsafe fn new() -> Retained<Self>;
173 );
174}