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
//! 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 {}
);