use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(HMEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HMEvent")]
pub struct HMCharacteristicThresholdRangeEvent;
);
#[cfg(feature = "HMEvent")]
unsafe impl Send for HMCharacteristicThresholdRangeEvent {}
#[cfg(feature = "HMEvent")]
unsafe impl Sync for HMCharacteristicThresholdRangeEvent {}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSCopying for HMCharacteristicThresholdRangeEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl CopyingHelper for HMCharacteristicThresholdRangeEvent {
type Result = Self;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSMutableCopying for HMCharacteristicThresholdRangeEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl MutableCopyingHelper for HMCharacteristicThresholdRangeEvent {
type Result = HMMutableCharacteristicThresholdRangeEvent;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSObjectProtocol for HMCharacteristicThresholdRangeEvent {}
);
#[cfg(feature = "HMEvent")]
impl HMCharacteristicThresholdRangeEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(feature = "HMCharacteristic", feature = "HMNumberRange"))]
#[unsafe(method(initWithCharacteristic:thresholdRange:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCharacteristic_thresholdRange(
this: Allocated<Self>,
characteristic: &HMCharacteristic,
threshold_range: &HMNumberRange,
) -> Retained<Self>;
#[cfg(feature = "HMCharacteristic")]
#[unsafe(method(characteristic))]
#[unsafe(method_family = none)]
pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
#[cfg(feature = "HMNumberRange")]
#[unsafe(method(thresholdRange))]
#[unsafe(method_family = none)]
pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
);
}
#[cfg(feature = "HMEvent")]
impl HMCharacteristicThresholdRangeEvent {
extern_methods!(
#[deprecated = "HMEvent is abstract"]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(HMCharacteristicThresholdRangeEvent, HMEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HMEvent")]
pub struct HMMutableCharacteristicThresholdRangeEvent;
);
#[cfg(feature = "HMEvent")]
unsafe impl Send for HMMutableCharacteristicThresholdRangeEvent {}
#[cfg(feature = "HMEvent")]
unsafe impl Sync for HMMutableCharacteristicThresholdRangeEvent {}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSCopying for HMMutableCharacteristicThresholdRangeEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl CopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
type Result = HMCharacteristicThresholdRangeEvent;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSMutableCopying for HMMutableCharacteristicThresholdRangeEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl MutableCopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
type Result = Self;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSObjectProtocol for HMMutableCharacteristicThresholdRangeEvent {}
);
#[cfg(feature = "HMEvent")]
impl HMMutableCharacteristicThresholdRangeEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "HMCharacteristic")]
#[unsafe(method(characteristic))]
#[unsafe(method_family = none)]
pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
#[cfg(feature = "HMCharacteristic")]
#[unsafe(method(setCharacteristic:))]
#[unsafe(method_family = none)]
pub unsafe fn setCharacteristic(&self, characteristic: &HMCharacteristic);
#[cfg(feature = "HMNumberRange")]
#[unsafe(method(thresholdRange))]
#[unsafe(method_family = none)]
pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
#[cfg(feature = "HMNumberRange")]
#[unsafe(method(setThresholdRange:))]
#[unsafe(method_family = none)]
pub unsafe fn setThresholdRange(&self, threshold_range: &HMNumberRange);
);
}
#[cfg(feature = "HMEvent")]
impl HMMutableCharacteristicThresholdRangeEvent {
extern_methods!(
#[cfg(all(feature = "HMCharacteristic", feature = "HMNumberRange"))]
#[unsafe(method(initWithCharacteristic:thresholdRange:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCharacteristic_thresholdRange(
this: Allocated<Self>,
characteristic: &HMCharacteristic,
threshold_range: &HMNumberRange,
) -> Retained<Self>;
);
}
#[cfg(feature = "HMEvent")]
impl HMMutableCharacteristicThresholdRangeEvent {
extern_methods!(
#[deprecated = "HMEvent is abstract"]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}