objc2_cloud_kit/generated/
CKDiscoverAllUserIdentitiesOperation.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    /// Finds all discoverable users in the device's contacts database. No Contacts access dialog will be displayed.
12    ///
13    ///
14    /// This operation scales linearly with the number of email addresses and phone numbers in the device's address book.  It may take some time to complete.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckdiscoveralluseridentitiesoperation?language=objc)
17    #[unsafe(super(CKOperation, NSOperation, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(feature = "CKOperation")]
20    #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
21    pub struct CKDiscoverAllUserIdentitiesOperation;
22);
23
24#[cfg(feature = "CKOperation")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for CKDiscoverAllUserIdentitiesOperation {}
27);
28
29#[cfg(feature = "CKOperation")]
30impl CKDiscoverAllUserIdentitiesOperation {
31    extern_methods!(
32        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
33        #[unsafe(method(init))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37        #[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
38        /// Called once for each successfully-discovered user identity from the device's address book.
39        ///
40        ///
41        /// Each
42        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
43        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
44        /// should not be concurrently used outside of blocks assigned to this operation.
45        ///
46        /// This property is not atomic.
47        ///
48        /// # Safety
49        ///
50        /// - The returned block's argument must be a valid pointer.
51        /// - This might not be thread-safe.
52        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
53        #[unsafe(method(userIdentityDiscoveredBlock))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn userIdentityDiscoveredBlock(
56            &self,
57        ) -> *mut block2::DynBlock<dyn Fn(NonNull<CKUserIdentity>)>;
58
59        #[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
60        /// Setter for [`userIdentityDiscoveredBlock`][Self::userIdentityDiscoveredBlock].
61        ///
62        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
63        ///
64        /// # Safety
65        ///
66        /// This might not be thread-safe.
67        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
68        #[unsafe(method(setUserIdentityDiscoveredBlock:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setUserIdentityDiscoveredBlock(
71            &self,
72            user_identity_discovered_block: Option<
73                &block2::DynBlock<dyn Fn(NonNull<CKUserIdentity>)>,
74            >,
75        );
76
77        #[cfg(feature = "block2")]
78        /// This block is called when the operation completes.
79        ///
80        ///
81        /// The
82        ///
83        /// ```text
84        ///  -[NSOperation completionBlock]
85        /// ```
86        ///
87        /// will also be called if both are set.
88        /// Each
89        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
90        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
91        /// should not be concurrently used outside of blocks assigned to this operation.
92        ///
93        /// This property is not atomic.
94        ///
95        /// # Safety
96        ///
97        /// - The returned block's argument must be a valid pointer or null.
98        /// - This might not be thread-safe.
99        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
100        #[unsafe(method(discoverAllUserIdentitiesCompletionBlock))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn discoverAllUserIdentitiesCompletionBlock(
103            &self,
104        ) -> *mut block2::DynBlock<dyn Fn(*mut NSError)>;
105
106        #[cfg(feature = "block2")]
107        /// Setter for [`discoverAllUserIdentitiesCompletionBlock`][Self::discoverAllUserIdentitiesCompletionBlock].
108        ///
109        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
110        ///
111        /// # Safety
112        ///
113        /// This might not be thread-safe.
114        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
115        #[unsafe(method(setDiscoverAllUserIdentitiesCompletionBlock:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn setDiscoverAllUserIdentitiesCompletionBlock(
118            &self,
119            discover_all_user_identities_completion_block: Option<
120                &block2::DynBlock<dyn Fn(*mut NSError)>,
121            >,
122        );
123    );
124}
125
126/// Methods declared on superclass `NSObject`.
127#[cfg(feature = "CKOperation")]
128impl CKDiscoverAllUserIdentitiesOperation {
129    extern_methods!(
130        #[unsafe(method(new))]
131        #[unsafe(method_family = new)]
132        pub unsafe fn new() -> Retained<Self>;
133    );
134}