use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "dispatch2")]
use dispatch2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLMonitorConfiguration;
);
unsafe impl Send for CLMonitorConfiguration {}
unsafe impl Sync for CLMonitorConfiguration {}
extern_conformance!(
unsafe impl NSObjectProtocol for CLMonitorConfiguration {}
);
impl CLMonitorConfiguration {
extern_methods!(
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[cfg(feature = "dispatch2")]
#[unsafe(method(queue))]
#[unsafe(method_family = none)]
pub unsafe fn queue(&self) -> Retained<DispatchQueue>;
#[cfg(all(
feature = "CLMonitor",
feature = "CLMonitoringEvent",
feature = "block2"
))]
#[unsafe(method(eventHandler))]
#[unsafe(method_family = none)]
pub unsafe fn eventHandler(
&self,
) -> NonNull<block2::DynBlock<dyn Fn(NonNull<CLMonitor>, NonNull<CLMonitoringEvent>)>>;
#[cfg(all(
feature = "CLMonitor",
feature = "CLMonitoringEvent",
feature = "block2",
feature = "dispatch2"
))]
#[unsafe(method(configWithMonitorName:queue:eventHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn configWithMonitorName_queue_eventHandler(
name: &NSString,
queue: &DispatchQueue,
event_handler: &block2::DynBlock<
dyn Fn(NonNull<CLMonitor>, NonNull<CLMonitoringEvent>),
>,
) -> Retained<CLMonitorConfiguration>;
);
}
impl CLMonitorConfiguration {
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>;
);
}