objc2_call_kit/generated/CXCallController.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/cxcallcontroller?language=objc)
12 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct CXCallController;
15);
16
17unsafe impl NSObjectProtocol for CXCallController {}
18
19impl CXCallController {
20 extern_methods!(
21 /// Initialize call controller with a private, serial queue.
22 #[unsafe(method(init))]
23 #[unsafe(method_family = init)]
24 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
25
26 #[cfg(feature = "CXCallObserver")]
27 #[unsafe(method(callObserver))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn callObserver(&self) -> Retained<CXCallObserver>;
30
31 #[cfg(all(feature = "CXTransaction", feature = "block2"))]
32 /// Request a transaction to be performed by the in-app provider.
33 ///
34 /// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
35 /// A non-nil error indicates that the requested transaction could not be executed.
36 ///
37 /// Completion block is performed on the queue supplied to designated initializer.
38 #[unsafe(method(requestTransaction:completion:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn requestTransaction_completion(
41 &self,
42 transaction: &CXTransaction,
43 completion: &block2::Block<dyn Fn(*mut NSError)>,
44 );
45
46 #[cfg(all(feature = "CXAction", feature = "block2"))]
47 /// Request a transaction containing the specified actions to be performed by the in-app provider.
48 ///
49 /// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
50 /// A non-nil error indicates that the requested transaction could not be executed.
51 ///
52 /// Completion block is performed on the queue supplied to designated initializer.
53 #[unsafe(method(requestTransactionWithActions:completion:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn requestTransactionWithActions_completion(
56 &self,
57 actions: &NSArray<CXAction>,
58 completion: &block2::Block<dyn Fn(*mut NSError)>,
59 );
60
61 #[cfg(all(feature = "CXAction", feature = "block2"))]
62 /// Request a transaction containing the specified action to be performed by the in-app provider.
63 ///
64 /// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
65 /// A non-nil error indicates that the requested transaction could not be executed.
66 ///
67 /// Completion block is performed on the queue supplied to designated initializer.
68 #[unsafe(method(requestTransactionWithAction:completion:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn requestTransactionWithAction_completion(
71 &self,
72 action: &CXAction,
73 completion: &block2::Block<dyn Fn(*mut NSError)>,
74 );
75 );
76}
77
78/// Methods declared on superclass `NSObject`.
79impl CXCallController {
80 extern_methods!(
81 #[unsafe(method(new))]
82 #[unsafe(method_family = new)]
83 pub unsafe fn new() -> Retained<Self>;
84 );
85}