objc2_cloud_kit/generated/
CKDiscoverUserIdentitiesOperation.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/ckdiscoveruseridentitiesoperation?language=objc)
12    #[unsafe(super(CKOperation, NSOperation, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "CKOperation")]
15    #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
16    pub struct CKDiscoverUserIdentitiesOperation;
17);
18
19#[cfg(feature = "CKOperation")]
20extern_conformance!(
21    unsafe impl NSObjectProtocol for CKDiscoverUserIdentitiesOperation {}
22);
23
24#[cfg(feature = "CKOperation")]
25impl CKDiscoverUserIdentitiesOperation {
26    extern_methods!(
27        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
28        #[unsafe(method(init))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32        #[cfg(feature = "CKUserIdentityLookupInfo")]
33        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
34        #[unsafe(method(initWithUserIdentityLookupInfos:))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn initWithUserIdentityLookupInfos(
37            this: Allocated<Self>,
38            user_identity_lookup_infos: &NSArray<CKUserIdentityLookupInfo>,
39        ) -> Retained<Self>;
40
41        #[cfg(feature = "CKUserIdentityLookupInfo")]
42        /// This property is not atomic.
43        ///
44        /// # Safety
45        ///
46        /// This might not be thread-safe.
47        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
48        #[unsafe(method(userIdentityLookupInfos))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn userIdentityLookupInfos(&self)
51            -> Retained<NSArray<CKUserIdentityLookupInfo>>;
52
53        #[cfg(feature = "CKUserIdentityLookupInfo")]
54        /// Setter for [`userIdentityLookupInfos`][Self::userIdentityLookupInfos].
55        ///
56        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
57        ///
58        /// # Safety
59        ///
60        /// This might not be thread-safe.
61        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
62        #[unsafe(method(setUserIdentityLookupInfos:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn setUserIdentityLookupInfos(
65            &self,
66            user_identity_lookup_infos: &NSArray<CKUserIdentityLookupInfo>,
67        );
68
69        #[cfg(all(
70            feature = "CKUserIdentity",
71            feature = "CKUserIdentityLookupInfo",
72            feature = "block2"
73        ))]
74        /// Called once for each user identity lookup info that was successfully discovered on the server
75        ///
76        ///
77        /// Each
78        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
79        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
80        /// should not be concurrently used outside of blocks assigned to this operation.
81        ///
82        /// This property is not atomic.
83        ///
84        /// # Safety
85        ///
86        /// - The returned block's argument 1 must be a valid pointer.
87        /// - The returned block's argument 2 must be a valid pointer.
88        /// - This might not be thread-safe.
89        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
90        #[unsafe(method(userIdentityDiscoveredBlock))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn userIdentityDiscoveredBlock(
93            &self,
94        ) -> *mut block2::DynBlock<dyn Fn(NonNull<CKUserIdentity>, NonNull<CKUserIdentityLookupInfo>)>;
95
96        #[cfg(all(
97            feature = "CKUserIdentity",
98            feature = "CKUserIdentityLookupInfo",
99            feature = "block2"
100        ))]
101        /// Setter for [`userIdentityDiscoveredBlock`][Self::userIdentityDiscoveredBlock].
102        ///
103        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
104        ///
105        /// # Safety
106        ///
107        /// This might not be thread-safe.
108        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
109        #[unsafe(method(setUserIdentityDiscoveredBlock:))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn setUserIdentityDiscoveredBlock(
112            &self,
113            user_identity_discovered_block: Option<
114                &block2::DynBlock<
115                    dyn Fn(NonNull<CKUserIdentity>, NonNull<CKUserIdentityLookupInfo>),
116                >,
117            >,
118        );
119
120        #[cfg(feature = "block2")]
121        /// This block is called when the operation completes.
122        ///
123        ///
124        /// The
125        ///
126        /// ```text
127        ///  -[NSOperation completionBlock]
128        /// ```
129        ///
130        /// will also be called if both are set.
131        /// Each
132        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
133        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
134        /// should not be concurrently used outside of blocks assigned to this operation.
135        ///
136        /// This property is not atomic.
137        ///
138        /// # Safety
139        ///
140        /// - The returned block's argument must be a valid pointer or null.
141        /// - This might not be thread-safe.
142        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
143        #[unsafe(method(discoverUserIdentitiesCompletionBlock))]
144        #[unsafe(method_family = none)]
145        pub unsafe fn discoverUserIdentitiesCompletionBlock(
146            &self,
147        ) -> *mut block2::DynBlock<dyn Fn(*mut NSError)>;
148
149        #[cfg(feature = "block2")]
150        /// Setter for [`discoverUserIdentitiesCompletionBlock`][Self::discoverUserIdentitiesCompletionBlock].
151        ///
152        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
153        ///
154        /// # Safety
155        ///
156        /// This might not be thread-safe.
157        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
158        #[unsafe(method(setDiscoverUserIdentitiesCompletionBlock:))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn setDiscoverUserIdentitiesCompletionBlock(
161            &self,
162            discover_user_identities_completion_block: Option<
163                &block2::DynBlock<dyn Fn(*mut NSError)>,
164            >,
165        );
166    );
167}
168
169/// Methods declared on superclass `NSObject`.
170#[cfg(feature = "CKOperation")]
171impl CKDiscoverUserIdentitiesOperation {
172    extern_methods!(
173        #[unsafe(method(new))]
174        #[unsafe(method_family = new)]
175        pub unsafe fn new() -> Retained<Self>;
176    );
177}