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))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn callEventHandler(&self) -> *mut block2::DynBlock<dyn Fn(NonNull<CTCall>)>;
32
33 #[cfg(all(feature = "CTCall", feature = "block2"))]
34 #[unsafe(method(setCallEventHandler:))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn setCallEventHandler(
38 &self,
39 call_event_handler: Option<&block2::DynBlock<dyn Fn(NonNull<CTCall>)>>,
40 );
41 );
42}
43
44impl CTCallCenter {
46 extern_methods!(
47 #[unsafe(method(init))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51 #[unsafe(method(new))]
52 #[unsafe(method_family = new)]
53 pub unsafe fn new() -> Retained<Self>;
54 );
55}