objc2_cloud_kit/generated/
CKFetchShareParticipantsOperation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckfetchshareparticipantsoperation?language=objc)
12    #[unsafe(super(CKOperation, NSOperation, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "CKOperation")]
15    pub struct CKFetchShareParticipantsOperation;
16);
17
18#[cfg(feature = "CKOperation")]
19extern_conformance!(
20    unsafe impl NSObjectProtocol for CKFetchShareParticipantsOperation {}
21);
22
23#[cfg(feature = "CKOperation")]
24impl CKFetchShareParticipantsOperation {
25    extern_methods!(
26        #[unsafe(method(init))]
27        #[unsafe(method_family = init)]
28        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
29
30        #[cfg(feature = "CKUserIdentityLookupInfo")]
31        #[unsafe(method(initWithUserIdentityLookupInfos:))]
32        #[unsafe(method_family = init)]
33        pub unsafe fn initWithUserIdentityLookupInfos(
34            this: Allocated<Self>,
35            user_identity_lookup_infos: &NSArray<CKUserIdentityLookupInfo>,
36        ) -> Retained<Self>;
37
38        #[cfg(feature = "CKUserIdentityLookupInfo")]
39        #[unsafe(method(userIdentityLookupInfos))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn userIdentityLookupInfos(
42            &self,
43        ) -> Option<Retained<NSArray<CKUserIdentityLookupInfo>>>;
44
45        #[cfg(feature = "CKUserIdentityLookupInfo")]
46        /// Setter for [`userIdentityLookupInfos`][Self::userIdentityLookupInfos].
47        #[unsafe(method(setUserIdentityLookupInfos:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn setUserIdentityLookupInfos(
50            &self,
51            user_identity_lookup_infos: Option<&NSArray<CKUserIdentityLookupInfo>>,
52        );
53
54        #[cfg(all(feature = "CKShareParticipant", feature = "block2"))]
55        /// Called once for each share participant created from a submitted user identity lookup info.
56        ///
57        ///
58        /// If the replacement callback
59        /// `perShareParticipantCompletionBlock`is set, this callback block is ignored.
60        /// Each
61        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
62        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
63        /// should not be concurrently used outside of blocks assigned to this operation.
64        #[deprecated = "Use perShareParticipantCompletionBlock instead, which surfaces per-share-participant errors"]
65        #[unsafe(method(shareParticipantFetchedBlock))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn shareParticipantFetchedBlock(
68            &self,
69        ) -> *mut block2::DynBlock<dyn Fn(NonNull<CKShareParticipant>)>;
70
71        #[cfg(all(feature = "CKShareParticipant", feature = "block2"))]
72        /// Setter for [`shareParticipantFetchedBlock`][Self::shareParticipantFetchedBlock].
73        #[deprecated = "Use perShareParticipantCompletionBlock instead, which surfaces per-share-participant errors"]
74        #[unsafe(method(setShareParticipantFetchedBlock:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn setShareParticipantFetchedBlock(
77            &self,
78            share_participant_fetched_block: Option<
79                &block2::DynBlock<dyn Fn(NonNull<CKShareParticipant>)>,
80            >,
81        );
82
83        #[cfg(all(
84            feature = "CKShareParticipant",
85            feature = "CKUserIdentityLookupInfo",
86            feature = "block2"
87        ))]
88        /// Called once for each lookup info.
89        ///
90        ///
91        /// Each
92        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
93        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
94        /// should not be concurrently used outside of blocks assigned to this operation.
95        #[unsafe(method(perShareParticipantCompletionBlock))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn perShareParticipantCompletionBlock(
98            &self,
99        ) -> *mut block2::DynBlock<
100            dyn Fn(NonNull<CKUserIdentityLookupInfo>, *mut CKShareParticipant, *mut NSError),
101        >;
102
103        #[cfg(all(
104            feature = "CKShareParticipant",
105            feature = "CKUserIdentityLookupInfo",
106            feature = "block2"
107        ))]
108        /// Setter for [`perShareParticipantCompletionBlock`][Self::perShareParticipantCompletionBlock].
109        #[unsafe(method(setPerShareParticipantCompletionBlock:))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn setPerShareParticipantCompletionBlock(
112            &self,
113            per_share_participant_completion_block: Option<
114                &block2::DynBlock<
115                    dyn Fn(
116                        NonNull<CKUserIdentityLookupInfo>,
117                        *mut CKShareParticipant,
118                        *mut NSError,
119                    ),
120                >,
121            >,
122        );
123
124        #[cfg(feature = "block2")]
125        /// This block is called when the operation completes.
126        ///
127        ///
128        /// The
129        ///
130        /// ```text
131        ///  -[NSOperation completionBlock]
132        /// ```
133        ///
134        /// will also be called if both are set.
135        /// If the error is
136        /// `CKErrorPartialFailure,`the error's userInfo dictionary contains a dictionary of lookup infos to errors keyed off of
137        /// `CKPartialErrorsByItemIDKey.`These errors are repeats of those sent back in previous
138        /// `perShareParticipantCompletionBlock`invocations
139        /// Each
140        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
141        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
142        /// should not be concurrently used outside of blocks assigned to this operation.
143        #[unsafe(method(fetchShareParticipantsCompletionBlock))]
144        #[unsafe(method_family = none)]
145        pub unsafe fn fetchShareParticipantsCompletionBlock(
146            &self,
147        ) -> *mut block2::DynBlock<dyn Fn(*mut NSError)>;
148
149        #[cfg(feature = "block2")]
150        /// Setter for [`fetchShareParticipantsCompletionBlock`][Self::fetchShareParticipantsCompletionBlock].
151        #[unsafe(method(setFetchShareParticipantsCompletionBlock:))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn setFetchShareParticipantsCompletionBlock(
154            &self,
155            fetch_share_participants_completion_block: Option<
156                &block2::DynBlock<dyn Fn(*mut NSError)>,
157            >,
158        );
159    );
160}
161
162/// Methods declared on superclass `NSObject`.
163#[cfg(feature = "CKOperation")]
164impl CKFetchShareParticipantsOperation {
165    extern_methods!(
166        #[unsafe(method(new))]
167        #[unsafe(method_family = new)]
168        pub unsafe fn new() -> Retained<Self>;
169    );
170}