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        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
43        #[unsafe(method(userIdentityLookupInfos))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn userIdentityLookupInfos(&self)
46            -> Retained<NSArray<CKUserIdentityLookupInfo>>;
47
48        #[cfg(feature = "CKUserIdentityLookupInfo")]
49        /// Setter for [`userIdentityLookupInfos`][Self::userIdentityLookupInfos].
50        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
51        #[unsafe(method(setUserIdentityLookupInfos:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setUserIdentityLookupInfos(
54            &self,
55            user_identity_lookup_infos: &NSArray<CKUserIdentityLookupInfo>,
56        );
57
58        #[cfg(all(
59            feature = "CKUserIdentity",
60            feature = "CKUserIdentityLookupInfo",
61            feature = "block2"
62        ))]
63        /// Called once for each user identity lookup info that was successfully discovered on the server
64        ///
65        ///
66        /// Each
67        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
68        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
69        /// should not be concurrently used outside of blocks assigned to this operation.
70        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
71        #[unsafe(method(userIdentityDiscoveredBlock))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn userIdentityDiscoveredBlock(
74            &self,
75        ) -> *mut block2::DynBlock<dyn Fn(NonNull<CKUserIdentity>, NonNull<CKUserIdentityLookupInfo>)>;
76
77        #[cfg(all(
78            feature = "CKUserIdentity",
79            feature = "CKUserIdentityLookupInfo",
80            feature = "block2"
81        ))]
82        /// Setter for [`userIdentityDiscoveredBlock`][Self::userIdentityDiscoveredBlock].
83        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
84        #[unsafe(method(setUserIdentityDiscoveredBlock:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn setUserIdentityDiscoveredBlock(
87            &self,
88            user_identity_discovered_block: Option<
89                &block2::DynBlock<
90                    dyn Fn(NonNull<CKUserIdentity>, NonNull<CKUserIdentityLookupInfo>),
91                >,
92            >,
93        );
94
95        #[cfg(feature = "block2")]
96        /// This block is called when the operation completes.
97        ///
98        ///
99        /// The
100        ///
101        /// ```text
102        ///  -[NSOperation completionBlock]
103        /// ```
104        ///
105        /// will also be called if both are set.
106        /// Each
107        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
108        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
109        /// should not be concurrently used outside of blocks assigned to this operation.
110        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
111        #[unsafe(method(discoverUserIdentitiesCompletionBlock))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn discoverUserIdentitiesCompletionBlock(
114            &self,
115        ) -> *mut block2::DynBlock<dyn Fn(*mut NSError)>;
116
117        #[cfg(feature = "block2")]
118        /// Setter for [`discoverUserIdentitiesCompletionBlock`][Self::discoverUserIdentitiesCompletionBlock].
119        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
120        #[unsafe(method(setDiscoverUserIdentitiesCompletionBlock:))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn setDiscoverUserIdentitiesCompletionBlock(
123            &self,
124            discover_user_identities_completion_block: Option<
125                &block2::DynBlock<dyn Fn(*mut NSError)>,
126            >,
127        );
128    );
129}
130
131/// Methods declared on superclass `NSObject`.
132#[cfg(feature = "CKOperation")]
133impl CKDiscoverUserIdentitiesOperation {
134    extern_methods!(
135        #[unsafe(method(new))]
136        #[unsafe(method_family = new)]
137        pub unsafe fn new() -> Retained<Self>;
138    );
139}