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