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
71unsafe impl NSCoding for CKAllowedSharingOptions {}
72
73unsafe impl NSCopying for CKAllowedSharingOptions {}
74
75unsafe impl CopyingHelper for CKAllowedSharingOptions {
76 type Result = Self;
77}
78
79unsafe impl NSObjectProtocol for CKAllowedSharingOptions {}
80
81unsafe impl NSSecureCoding for CKAllowedSharingOptions {}
82
83impl CKAllowedSharingOptions {
84 extern_methods!(
85 #[unsafe(method(initWithAllowedParticipantPermissionOptions:allowedParticipantAccessOptions:))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn initWithAllowedParticipantPermissionOptions_allowedParticipantAccessOptions(
88 this: Allocated<Self>,
89 allowed_participant_permission_options: CKSharingParticipantPermissionOption,
90 allowed_participant_access_options: CKSharingParticipantAccessOption,
91 ) -> Retained<Self>;
92
93 #[unsafe(method(allowedParticipantPermissionOptions))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn allowedParticipantPermissionOptions(
96 &self,
97 ) -> CKSharingParticipantPermissionOption;
98
99 #[unsafe(method(setAllowedParticipantPermissionOptions:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setAllowedParticipantPermissionOptions(
103 &self,
104 allowed_participant_permission_options: CKSharingParticipantPermissionOption,
105 );
106
107 #[unsafe(method(allowedParticipantAccessOptions))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn allowedParticipantAccessOptions(&self) -> CKSharingParticipantAccessOption;
110
111 #[unsafe(method(setAllowedParticipantAccessOptions:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn setAllowedParticipantAccessOptions(
115 &self,
116 allowed_participant_access_options: CKSharingParticipantAccessOption,
117 );
118
119 #[unsafe(method(standardOptions))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn standardOptions() -> Retained<CKAllowedSharingOptions>;
127 );
128}
129
130impl CKAllowedSharingOptions {
132 extern_methods!(
133 #[unsafe(method(init))]
134 #[unsafe(method_family = init)]
135 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
136
137 #[unsafe(method(new))]
138 #[unsafe(method_family = new)]
139 pub unsafe fn new() -> Retained<Self>;
140 );
141}