use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "dispatch2")]
use dispatch2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait CXCallObserverDelegate: NSObjectProtocol {
#[cfg(feature = "CXCall")]
#[unsafe(method(callObserver:callChanged:))]
#[unsafe(method_family = none)]
unsafe fn callObserver_callChanged(&self, call_observer: &CXCallObserver, call: &CXCall);
}
);
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CXCallObserver;
);
extern_conformance!(
unsafe impl NSObjectProtocol for CXCallObserver {}
);
impl CXCallObserver {
extern_methods!(
#[cfg(feature = "CXCall")]
#[unsafe(method(calls))]
#[unsafe(method_family = none)]
pub unsafe fn calls(&self) -> Retained<NSArray<CXCall>>;
#[cfg(feature = "dispatch2")]
#[unsafe(method(setDelegate:queue:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate_queue(
&self,
delegate: Option<&ProtocolObject<dyn CXCallObserverDelegate>>,
queue: Option<&DispatchQueue>,
);
);
}
impl CXCallObserver {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}