objc2_cloud_kit/generated/
CKShareMetadata.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/cksharemetadata?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct CKShareMetadata;
14);
15
16unsafe impl NSCoding for CKShareMetadata {}
17
18unsafe impl NSCopying for CKShareMetadata {}
19
20unsafe impl CopyingHelper for CKShareMetadata {
21    type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for CKShareMetadata {}
25
26unsafe impl NSSecureCoding for CKShareMetadata {}
27
28impl CKShareMetadata {
29    extern_methods!(
30        #[unsafe(method(init))]
31        #[unsafe(method_family = init)]
32        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
33
34        #[unsafe(method(new))]
35        #[unsafe(method_family = new)]
36        pub unsafe fn new() -> Retained<Self>;
37
38        #[unsafe(method(containerIdentifier))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn containerIdentifier(&self) -> Retained<NSString>;
41
42        #[cfg(all(feature = "CKRecord", feature = "CKShare"))]
43        #[unsafe(method(share))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn share(&self) -> Retained<CKShare>;
46
47        #[cfg(feature = "CKRecordID")]
48        #[unsafe(method(hierarchicalRootRecordID))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn hierarchicalRootRecordID(&self) -> Option<Retained<CKRecordID>>;
51
52        #[cfg(feature = "CKShareParticipant")]
53        /// These properties reflect the participant properties of the user invoking CKFetchShareMetadataOperation
54        #[unsafe(method(participantRole))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn participantRole(&self) -> CKShareParticipantRole;
57
58        #[cfg(feature = "CKShareParticipant")]
59        #[unsafe(method(participantStatus))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn participantStatus(&self) -> CKShareParticipantAcceptanceStatus;
62
63        #[cfg(feature = "CKShareParticipant")]
64        #[unsafe(method(participantPermission))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn participantPermission(&self) -> CKShareParticipantPermission;
67
68        #[cfg(feature = "CKUserIdentity")]
69        #[unsafe(method(ownerIdentity))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn ownerIdentity(&self) -> Retained<CKUserIdentity>;
72
73        #[cfg(feature = "CKRecord")]
74        /// This is only present if the share metadata was returned from a CKFetchShareMetadataOperation with shouldFetchRootRecord set to YES
75        #[unsafe(method(rootRecord))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn rootRecord(&self) -> Option<Retained<CKRecord>>;
78
79        #[cfg(feature = "CKShareParticipant")]
80        #[deprecated]
81        #[unsafe(method(participantType))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn participantType(&self) -> CKShareParticipantType;
84
85        #[cfg(feature = "CKRecordID")]
86        #[deprecated]
87        #[unsafe(method(rootRecordID))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn rootRecordID(&self) -> Retained<CKRecordID>;
90    );
91}