objc2_call_kit/generated/
CXCallObserver.rs1use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "dispatch2")]
6use dispatch2::*;
7use objc2::__framework_prelude::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_protocol!(
13 pub unsafe trait CXCallObserverDelegate: NSObjectProtocol {
15 #[cfg(feature = "CXCall")]
16 #[unsafe(method(callObserver:callChanged:))]
17 #[unsafe(method_family = none)]
18 unsafe fn callObserver_callChanged(&self, call_observer: &CXCallObserver, call: &CXCall);
19 }
20);
21
22extern_class!(
23 #[unsafe(super(NSObject))]
25 #[derive(Debug, PartialEq, Eq, Hash)]
26 pub struct CXCallObserver;
27);
28
29extern_conformance!(
30 unsafe impl NSObjectProtocol for CXCallObserver {}
31);
32
33impl CXCallObserver {
34 extern_methods!(
35 #[cfg(feature = "CXCall")]
36 #[unsafe(method(calls))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn calls(&self) -> Retained<NSArray<CXCall>>;
40
41 #[cfg(feature = "dispatch2")]
42 #[unsafe(method(setDelegate:queue:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn setDelegate_queue(
51 &self,
52 delegate: Option<&ProtocolObject<dyn CXCallObserverDelegate>>,
53 queue: Option<&DispatchQueue>,
54 );
55 );
56}
57
58impl CXCallObserver {
60 extern_methods!(
61 #[unsafe(method(init))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
64
65 #[unsafe(method(new))]
66 #[unsafe(method_family = new)]
67 pub unsafe fn new() -> Retained<Self>;
68 );
69}