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        #[unsafe(method(database))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn database(&self) -> Option<Retained<CKDatabase>>;
41
42        #[cfg(feature = "CKDatabase")]
43        /// Setter for [`database`][Self::database].
44        #[unsafe(method(setDatabase:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setDatabase(&self, database: Option<&CKDatabase>);
47    );
48}
49
50/// Methods declared on superclass `CKOperation`.
51#[cfg(feature = "CKOperation")]
52impl CKDatabaseOperation {
53    extern_methods!(
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61#[cfg(feature = "CKOperation")]
62impl CKDatabaseOperation {
63    extern_methods!(
64        #[unsafe(method(new))]
65        #[unsafe(method_family = new)]
66        pub unsafe fn new() -> Retained<Self>;
67    );
68}