objc2-cloud-kit 0.2.2

Bindings to the CloudKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

#[cfg(all(feature = "CKRecord", feature = "CKShare", feature = "block2"))]
pub type CKSharePreparationCompletionHandler =
    *mut block2::Block<dyn Fn(*mut CKShare, *mut NSError)>;

#[cfg(all(feature = "CKRecord", feature = "CKShare", feature = "block2"))]
pub type CKSharePreparationHandler =
    *mut block2::Block<dyn Fn(CKSharePreparationCompletionHandler)>;

extern_category!(
    /// Category "CKSharingSupport" on [`NSItemProvider`].
    #[doc(alias = "CKSharingSupport")]
    pub unsafe trait NSItemProviderCKSharingSupport {
        #[cfg(all(
            feature = "CKAllowedSharingOptions",
            feature = "CKContainer",
            feature = "CKRecord",
            feature = "CKShare",
            feature = "block2"
        ))]
        #[method(registerCKShareWithContainer:allowedSharingOptions:preparationHandler:)]
        unsafe fn registerCKShareWithContainer_allowedSharingOptions_preparationHandler(
            &self,
            container: &CKContainer,
            allowed_options: &CKAllowedSharingOptions,
            preparation_handler: CKSharePreparationHandler,
        );

        #[cfg(all(
            feature = "CKAllowedSharingOptions",
            feature = "CKContainer",
            feature = "CKRecord",
            feature = "CKShare"
        ))]
        #[method(registerCKShare:container:allowedSharingOptions:)]
        unsafe fn registerCKShare_container_allowedSharingOptions(
            &self,
            share: &CKShare,
            container: &CKContainer,
            allowed_options: &CKAllowedSharingOptions,
        );
    }

    unsafe impl NSItemProviderCKSharingSupport for NSItemProvider {}
);