objc2-cloud-kit 0.3.2

Bindings to the CloudKit framework
Documentation
//! 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/ckshareblockedidentity?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CKShareBlockedIdentity;
);

unsafe impl Send for CKShareBlockedIdentity {}

unsafe impl Sync for CKShareBlockedIdentity {}

extern_conformance!(
    unsafe impl NSCoding for CKShareBlockedIdentity {}
);

extern_conformance!(
    unsafe impl NSCopying for CKShareBlockedIdentity {}
);

unsafe impl CopyingHelper for CKShareBlockedIdentity {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for CKShareBlockedIdentity {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for CKShareBlockedIdentity {}
);

impl CKShareBlockedIdentity {
    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 who has been blocked from requesting access to the share.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(userIdentity))]
        #[unsafe(method_family = none)]
        pub unsafe fn userIdentity(&self) -> Retained<CKUserIdentity>;

        #[cfg(feature = "objc2-contacts")]
        #[cfg(not(target_os = "tvos"))]
        /// A displayable `CNContact` representing the blocked user.
        ///
        /// If the blocked identity does not exist in the user's contacts or is not accessible, returns a newly created `CNContact`.
        /// This provides formatted blocked identity 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>;
    );
}