objc2_cloud_kit/generated/
CKShareAccessRequester.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-contacts")]
6#[cfg(not(target_os = "tvos"))]
7use objc2_contacts::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckshareaccessrequester?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct CKShareAccessRequester;
17);
18
19unsafe impl Send for CKShareAccessRequester {}
20
21unsafe impl Sync for CKShareAccessRequester {}
22
23extern_conformance!(
24    unsafe impl NSCoding for CKShareAccessRequester {}
25);
26
27extern_conformance!(
28    unsafe impl NSCopying for CKShareAccessRequester {}
29);
30
31unsafe impl CopyingHelper for CKShareAccessRequester {
32    type Result = Self;
33}
34
35extern_conformance!(
36    unsafe impl NSObjectProtocol for CKShareAccessRequester {}
37);
38
39extern_conformance!(
40    unsafe impl NSSecureCoding for CKShareAccessRequester {}
41);
42
43impl CKShareAccessRequester {
44    extern_methods!(
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new() -> Retained<Self>;
48
49        #[unsafe(method(init))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53        #[cfg(feature = "CKUserIdentity")]
54        /// The identity of the user requesting access to the share.
55        #[unsafe(method(userIdentity))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn userIdentity(&self) -> Retained<CKUserIdentity>;
58
59        #[cfg(feature = "CKUserIdentityLookupInfo")]
60        /// Lookup information for the requester.
61        ///
62        /// Use this lookup info with ``CKFetchShareParticipantsOperation`` to fetch the corresponding participant.
63        /// Once fetched, add the participant to the share to approve the requester.
64        ///
65        /// This property is not atomic.
66        ///
67        /// # Safety
68        ///
69        /// This might not be thread-safe.
70        #[unsafe(method(participantLookupInfo))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn participantLookupInfo(&self) -> Retained<CKUserIdentityLookupInfo>;
73
74        #[cfg(feature = "objc2-contacts")]
75        #[cfg(not(target_os = "tvos"))]
76        /// A displayable `CNContact` representing the requester.
77        ///
78        /// If the requester doesn't exist in the user's contacts or is not accessible, returns a newly created `CNContact`.
79        /// This provides formatted requester information suitable for display in the application's UI.
80        ///
81        /// This property is not atomic.
82        ///
83        /// # Safety
84        ///
85        /// This might not be thread-safe.
86        #[unsafe(method(contact))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn contact(&self) -> Retained<CNContact>;
89    );
90}