1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "dispatch2")]
use dispatch2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/callkit/cxcallcontroller?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CXCallController;
);
extern_conformance!(
unsafe impl NSObjectProtocol for CXCallController {}
);
impl CXCallController {
extern_methods!(
/// Initialize call controller with a private, serial queue.
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "dispatch2")]
/// Initialize call controller with specified queue, which is used for calling completion blocks.
///
/// # Safety
///
/// `queue` possibly has additional threading requirements.
#[unsafe(method(initWithQueue:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithQueue(this: Allocated<Self>, queue: &DispatchQueue)
-> Retained<Self>;
#[cfg(feature = "CXCallObserver")]
#[unsafe(method(callObserver))]
#[unsafe(method_family = none)]
pub unsafe fn callObserver(&self) -> Retained<CXCallObserver>;
#[cfg(all(feature = "CXTransaction", feature = "block2"))]
/// Request a transaction to be performed by the in-app provider.
///
/// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
/// A non-nil error indicates that the requested transaction could not be executed.
///
/// Completion block is performed on the queue supplied to designated initializer.
#[unsafe(method(requestTransaction:completion:))]
#[unsafe(method_family = none)]
pub unsafe fn requestTransaction_completion(
&self,
transaction: &CXTransaction,
completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
#[cfg(all(feature = "CXAction", feature = "block2"))]
/// Request a transaction containing the specified actions to be performed by the in-app provider.
///
/// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
/// A non-nil error indicates that the requested transaction could not be executed.
///
/// Completion block is performed on the queue supplied to designated initializer.
#[unsafe(method(requestTransactionWithActions:completion:))]
#[unsafe(method_family = none)]
pub unsafe fn requestTransactionWithActions_completion(
&self,
actions: &NSArray<CXAction>,
completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
#[cfg(all(feature = "CXAction", feature = "block2"))]
/// Request a transaction containing the specified action to be performed by the in-app provider.
///
/// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
/// A non-nil error indicates that the requested transaction could not be executed.
///
/// Completion block is performed on the queue supplied to designated initializer.
#[unsafe(method(requestTransactionWithAction:completion:))]
#[unsafe(method_family = none)]
pub unsafe fn requestTransactionWithAction_completion(
&self,
action: &CXAction,
completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
);
}
/// Methods declared on superclass `NSObject`.
impl CXCallController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}