objc2_home_kit/generated/
HMCharacteristicThresholdRangeEvent.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(HMEvent, NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "HMEvent")]
18 pub struct HMCharacteristicThresholdRangeEvent;
19);
20
21#[cfg(feature = "HMEvent")]
22unsafe impl Send for HMCharacteristicThresholdRangeEvent {}
23
24#[cfg(feature = "HMEvent")]
25unsafe impl Sync for HMCharacteristicThresholdRangeEvent {}
26
27#[cfg(feature = "HMEvent")]
28unsafe impl NSCopying for HMCharacteristicThresholdRangeEvent {}
29
30#[cfg(feature = "HMEvent")]
31unsafe impl CopyingHelper for HMCharacteristicThresholdRangeEvent {
32 type Result = Self;
33}
34
35#[cfg(feature = "HMEvent")]
36unsafe impl NSMutableCopying for HMCharacteristicThresholdRangeEvent {}
37
38#[cfg(feature = "HMEvent")]
39unsafe impl MutableCopyingHelper for HMCharacteristicThresholdRangeEvent {
40 type Result = HMMutableCharacteristicThresholdRangeEvent;
41}
42
43#[cfg(feature = "HMEvent")]
44unsafe impl NSObjectProtocol for HMCharacteristicThresholdRangeEvent {}
45
46#[cfg(feature = "HMEvent")]
47impl HMCharacteristicThresholdRangeEvent {
48 extern_methods!(
49 #[unsafe(method(init))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53 #[cfg(all(feature = "HMCharacteristic", feature = "HMNumberRange"))]
54 #[unsafe(method(initWithCharacteristic:thresholdRange:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initWithCharacteristic_thresholdRange(
68 this: Allocated<Self>,
69 characteristic: &HMCharacteristic,
70 threshold_range: &HMNumberRange,
71 ) -> Retained<Self>;
72
73 #[cfg(feature = "HMCharacteristic")]
74 #[unsafe(method(characteristic))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
78
79 #[cfg(feature = "HMNumberRange")]
80 #[unsafe(method(thresholdRange))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
84 );
85}
86
87#[cfg(feature = "HMEvent")]
89impl HMCharacteristicThresholdRangeEvent {
90 extern_methods!(
91 #[deprecated = "HMEvent is abstract"]
92 #[unsafe(method(new))]
93 #[unsafe(method_family = new)]
94 pub unsafe fn new() -> Retained<Self>;
95 );
96}
97
98extern_class!(
99 #[unsafe(super(HMCharacteristicThresholdRangeEvent, HMEvent, NSObject))]
104 #[derive(Debug, PartialEq, Eq, Hash)]
105 #[cfg(feature = "HMEvent")]
106 pub struct HMMutableCharacteristicThresholdRangeEvent;
107);
108
109#[cfg(feature = "HMEvent")]
110unsafe impl Send for HMMutableCharacteristicThresholdRangeEvent {}
111
112#[cfg(feature = "HMEvent")]
113unsafe impl Sync for HMMutableCharacteristicThresholdRangeEvent {}
114
115#[cfg(feature = "HMEvent")]
116unsafe impl NSCopying for HMMutableCharacteristicThresholdRangeEvent {}
117
118#[cfg(feature = "HMEvent")]
119unsafe impl CopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
120 type Result = HMCharacteristicThresholdRangeEvent;
121}
122
123#[cfg(feature = "HMEvent")]
124unsafe impl NSMutableCopying for HMMutableCharacteristicThresholdRangeEvent {}
125
126#[cfg(feature = "HMEvent")]
127unsafe impl MutableCopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
128 type Result = Self;
129}
130
131#[cfg(feature = "HMEvent")]
132unsafe impl NSObjectProtocol for HMMutableCharacteristicThresholdRangeEvent {}
133
134#[cfg(feature = "HMEvent")]
135impl HMMutableCharacteristicThresholdRangeEvent {
136 extern_methods!(
137 #[unsafe(method(init))]
138 #[unsafe(method_family = init)]
139 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
140
141 #[cfg(feature = "HMCharacteristic")]
142 #[unsafe(method(characteristic))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
146
147 #[cfg(feature = "HMCharacteristic")]
148 #[unsafe(method(setCharacteristic:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn setCharacteristic(&self, characteristic: &HMCharacteristic);
152
153 #[cfg(feature = "HMNumberRange")]
154 #[unsafe(method(thresholdRange))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
158
159 #[cfg(feature = "HMNumberRange")]
160 #[unsafe(method(setThresholdRange:))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn setThresholdRange(&self, threshold_range: &HMNumberRange);
164 );
165}
166
167#[cfg(feature = "HMEvent")]
169impl HMMutableCharacteristicThresholdRangeEvent {
170 extern_methods!(
171 #[cfg(all(feature = "HMCharacteristic", feature = "HMNumberRange"))]
172 #[unsafe(method(initWithCharacteristic:thresholdRange:))]
184 #[unsafe(method_family = init)]
185 pub unsafe fn initWithCharacteristic_thresholdRange(
186 this: Allocated<Self>,
187 characteristic: &HMCharacteristic,
188 threshold_range: &HMNumberRange,
189 ) -> Retained<Self>;
190 );
191}
192
193#[cfg(feature = "HMEvent")]
195impl HMMutableCharacteristicThresholdRangeEvent {
196 extern_methods!(
197 #[deprecated = "HMEvent is abstract"]
198 #[unsafe(method(new))]
199 #[unsafe(method_family = new)]
200 pub unsafe fn new() -> Retained<Self>;
201 );
202}