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