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