objc2_cloud_kit/generated/
CKDatabaseOperation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckdatabaseoperation?language=objc)
12    #[unsafe(super(CKOperation, NSOperation, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "CKOperation")]
15    pub struct CKDatabaseOperation;
16);
17
18#[cfg(feature = "CKOperation")]
19extern_conformance!(
20    unsafe impl NSObjectProtocol for CKDatabaseOperation {}
21);
22
23#[cfg(feature = "CKOperation")]
24impl CKDatabaseOperation {
25    extern_methods!(
26        #[cfg(feature = "CKDatabase")]
27        /// The database on which to perform the operation.
28        ///
29        ///
30        /// If no database is set,
31        ///
32        /// ```text
33        ///  [self.container privateCloudDatabase]
34        /// ```
35        ///
36        /// is used.
37        /// This will also set the container property of the operation's configuration to match the container of the passed-in database.
38        ///
39        /// This property is not atomic.
40        ///
41        /// # Safety
42        ///
43        /// This might not be thread-safe.
44        #[unsafe(method(database))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn database(&self) -> Option<Retained<CKDatabase>>;
47
48        #[cfg(feature = "CKDatabase")]
49        /// Setter for [`database`][Self::database].
50        ///
51        /// # Safety
52        ///
53        /// This might not be thread-safe.
54        #[unsafe(method(setDatabase:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setDatabase(&self, database: Option<&CKDatabase>);
57    );
58}
59
60/// Methods declared on superclass `CKOperation`.
61#[cfg(feature = "CKOperation")]
62impl CKDatabaseOperation {
63    extern_methods!(
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67    );
68}
69
70/// Methods declared on superclass `NSObject`.
71#[cfg(feature = "CKOperation")]
72impl CKDatabaseOperation {
73    extern_methods!(
74        #[unsafe(method(new))]
75        #[unsafe(method_family = new)]
76        pub unsafe fn new() -> Retained<Self>;
77    );
78}