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")]
19unsafe impl NSObjectProtocol for CKDatabaseOperation {}
20
21#[cfg(feature = "CKOperation")]
22impl CKDatabaseOperation {
23    extern_methods!(
24        #[cfg(feature = "CKDatabase")]
25        /// The database on which to perform the operation.
26        ///
27        ///
28        /// If no database is set,
29        ///
30        /// ```text
31        ///  [self.container privateCloudDatabase]
32        /// ```
33        ///
34        /// is used.
35        /// This will also set the container property of the operation's configuration to match the container of the passed-in database.
36        #[unsafe(method(database))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn database(&self) -> Option<Retained<CKDatabase>>;
39
40        #[cfg(feature = "CKDatabase")]
41        /// Setter for [`database`][Self::database].
42        #[unsafe(method(setDatabase:))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn setDatabase(&self, database: Option<&CKDatabase>);
45    );
46}
47
48/// Methods declared on superclass `CKOperation`.
49#[cfg(feature = "CKOperation")]
50impl CKDatabaseOperation {
51    extern_methods!(
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55    );
56}
57
58/// Methods declared on superclass `NSObject`.
59#[cfg(feature = "CKOperation")]
60impl CKDatabaseOperation {
61    extern_methods!(
62        #[unsafe(method(new))]
63        #[unsafe(method_family = new)]
64        pub unsafe fn new() -> Retained<Self>;
65    );
66}