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")]
25unsafe impl NSObjectProtocol for CKDiscoverAllUserIdentitiesOperation {}
26
27#[cfg(feature = "CKOperation")]
28impl CKDiscoverAllUserIdentitiesOperation {
29    extern_methods!(
30        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
31        #[unsafe(method(init))]
32        #[unsafe(method_family = init)]
33        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
34
35        #[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
36        /// Called once for each successfully-discovered user identity from the device's address book.
37        ///
38        ///
39        /// Each
40        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
41        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
42        /// should not be concurrently used outside of blocks assigned to this operation.
43        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
44        #[unsafe(method(userIdentityDiscoveredBlock))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn userIdentityDiscoveredBlock(
47            &self,
48        ) -> *mut block2::Block<dyn Fn(NonNull<CKUserIdentity>)>;
49
50        #[cfg(all(feature = "CKUserIdentity", feature = "block2"))]
51        /// Setter for [`userIdentityDiscoveredBlock`][Self::userIdentityDiscoveredBlock].
52        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
53        #[unsafe(method(setUserIdentityDiscoveredBlock:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setUserIdentityDiscoveredBlock(
56            &self,
57            user_identity_discovered_block: Option<&block2::Block<dyn Fn(NonNull<CKUserIdentity>)>>,
58        );
59
60        #[cfg(feature = "block2")]
61        /// This block is called when the operation completes.
62        ///
63        ///
64        /// The
65        ///
66        /// ```text
67        ///  -[NSOperation completionBlock]
68        /// ```
69        ///
70        /// will also be called if both are set.
71        /// Each
72        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
73        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
74        /// should not be concurrently used outside of blocks assigned to this operation.
75        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
76        #[unsafe(method(discoverAllUserIdentitiesCompletionBlock))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn discoverAllUserIdentitiesCompletionBlock(
79            &self,
80        ) -> *mut block2::Block<dyn Fn(*mut NSError)>;
81
82        #[cfg(feature = "block2")]
83        /// Setter for [`discoverAllUserIdentitiesCompletionBlock`][Self::discoverAllUserIdentitiesCompletionBlock].
84        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
85        #[unsafe(method(setDiscoverAllUserIdentitiesCompletionBlock:))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn setDiscoverAllUserIdentitiesCompletionBlock(
88            &self,
89            discover_all_user_identities_completion_block: Option<
90                &block2::Block<dyn Fn(*mut NSError)>,
91            >,
92        );
93    );
94}
95
96/// Methods declared on superclass `NSObject`.
97#[cfg(feature = "CKOperation")]
98impl CKDiscoverAllUserIdentitiesOperation {
99    extern_methods!(
100        #[unsafe(method(new))]
101        #[unsafe(method_family = new)]
102        pub unsafe fn new() -> Retained<Self>;
103    );
104}