objc2_call_kit/generated/
CXTransaction.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/callkit/cxtransaction?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct CXTransaction;
15);
16
17extern_conformance!(
18    unsafe impl NSCoding for CXTransaction {}
19);
20
21extern_conformance!(
22    unsafe impl NSCopying for CXTransaction {}
23);
24
25unsafe impl CopyingHelper for CXTransaction {
26    type Result = Self;
27}
28
29extern_conformance!(
30    unsafe impl NSObjectProtocol for CXTransaction {}
31);
32
33extern_conformance!(
34    unsafe impl NSSecureCoding for CXTransaction {}
35);
36
37impl CXTransaction {
38    extern_methods!(
39        /// Unique ID
40        #[unsafe(method(UUID))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn UUID(&self) -> Retained<NSUUID>;
43
44        /// Whether all actions have been completed
45        #[unsafe(method(isComplete))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn isComplete(&self) -> bool;
48
49        #[cfg(feature = "CXAction")]
50        /// The list of actions contained by the receiver
51        #[unsafe(method(actions))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn actions(&self) -> Retained<NSArray<CXAction>>;
54
55        #[cfg(feature = "CXAction")]
56        #[unsafe(method(initWithActions:))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn initWithActions(
59            this: Allocated<Self>,
60            actions: &NSArray<CXAction>,
61        ) -> Retained<Self>;
62
63        #[cfg(feature = "CXAction")]
64        #[unsafe(method(initWithAction:))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn initWithAction(this: Allocated<Self>, action: &CXAction) -> Retained<Self>;
67
68        #[cfg(feature = "CXAction")]
69        /// Add the provided action to the receiver's list of actions
70        #[unsafe(method(addAction:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn addAction(&self, action: &CXAction);
73    );
74}
75
76/// Methods declared on superclass `NSObject`.
77impl CXTransaction {
78    extern_methods!(
79        #[unsafe(method(init))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86    );
87}