objc2_core_telephony/generated/
CTCallCenter.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct CTCallCenter;
15);
16
17extern_conformance!(
18 unsafe impl NSObjectProtocol for CTCallCenter {}
19);
20
21impl CTCallCenter {
22 extern_methods!(
23 #[cfg(feature = "CTCall")]
24 #[unsafe(method(currentCalls))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn currentCalls(&self) -> Option<Retained<NSSet<CTCall>>>;
27
28 #[cfg(all(feature = "CTCall", feature = "block2"))]
29 #[unsafe(method(callEventHandler))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn callEventHandler(&self) -> *mut block2::DynBlock<dyn Fn(NonNull<CTCall>)>;
35
36 #[cfg(all(feature = "CTCall", feature = "block2"))]
37 #[unsafe(method(setCallEventHandler:))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn setCallEventHandler(
43 &self,
44 call_event_handler: Option<&block2::DynBlock<dyn Fn(NonNull<CTCall>)>>,
45 );
46 );
47}
48
49impl CTCallCenter {
51 extern_methods!(
52 #[unsafe(method(init))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55
56 #[unsafe(method(new))]
57 #[unsafe(method_family = new)]
58 pub unsafe fn new() -> Retained<Self>;
59 );
60}