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