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