objc2_call_kit/generated/
CXCallObserver.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_protocol!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/callkit/cxcallobserverdelegate?language=objc)
12    pub unsafe trait CXCallObserverDelegate: NSObjectProtocol {
13        #[cfg(feature = "CXCall")]
14        #[unsafe(method(callObserver:callChanged:))]
15        #[unsafe(method_family = none)]
16        unsafe fn callObserver_callChanged(&self, call_observer: &CXCallObserver, call: &CXCall);
17    }
18);
19
20extern_class!(
21    /// [Apple's documentation](https://developer.apple.com/documentation/callkit/cxcallobserver?language=objc)
22    #[unsafe(super(NSObject))]
23    #[derive(Debug, PartialEq, Eq, Hash)]
24    pub struct CXCallObserver;
25);
26
27unsafe impl NSObjectProtocol for CXCallObserver {}
28
29impl CXCallObserver {
30    extern_methods!(
31        #[cfg(feature = "CXCall")]
32        /// Retrieve the current call list, blocking on initial state retrieval if necessary
33        #[unsafe(method(calls))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn calls(&self) -> Retained<NSArray<CXCall>>;
36    );
37}
38
39/// Methods declared on superclass `NSObject`.
40impl CXCallObserver {
41    extern_methods!(
42        #[unsafe(method(init))]
43        #[unsafe(method_family = init)]
44        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
45
46        #[unsafe(method(new))]
47        #[unsafe(method_family = new)]
48        pub unsafe fn new() -> Retained<Self>;
49    );
50}