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")]
28extern_conformance!(
29 unsafe impl NSCopying for HMCharacteristicThresholdRangeEvent {}
30);
31
32#[cfg(feature = "HMEvent")]
33unsafe impl CopyingHelper for HMCharacteristicThresholdRangeEvent {
34 type Result = Self;
35}
36
37#[cfg(feature = "HMEvent")]
38extern_conformance!(
39 unsafe impl NSMutableCopying for HMCharacteristicThresholdRangeEvent {}
40);
41
42#[cfg(feature = "HMEvent")]
43unsafe impl MutableCopyingHelper for HMCharacteristicThresholdRangeEvent {
44 type Result = HMMutableCharacteristicThresholdRangeEvent;
45}
46
47#[cfg(feature = "HMEvent")]
48extern_conformance!(
49 unsafe impl NSObjectProtocol for HMCharacteristicThresholdRangeEvent {}
50);
51
52#[cfg(feature = "HMEvent")]
53impl HMCharacteristicThresholdRangeEvent {
54 extern_methods!(
55 #[unsafe(method(init))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59 #[cfg(all(feature = "HMCharacteristic", feature = "HMNumberRange"))]
60 #[unsafe(method(initWithCharacteristic:thresholdRange:))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn initWithCharacteristic_thresholdRange(
74 this: Allocated<Self>,
75 characteristic: &HMCharacteristic,
76 threshold_range: &HMNumberRange,
77 ) -> Retained<Self>;
78
79 #[cfg(feature = "HMCharacteristic")]
80 #[unsafe(method(characteristic))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
90
91 #[cfg(feature = "HMNumberRange")]
92 #[unsafe(method(thresholdRange))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
102 );
103}
104
105#[cfg(feature = "HMEvent")]
107impl HMCharacteristicThresholdRangeEvent {
108 extern_methods!(
109 #[deprecated = "HMEvent is abstract"]
110 #[unsafe(method(new))]
111 #[unsafe(method_family = new)]
112 pub unsafe fn new() -> Retained<Self>;
113 );
114}
115
116extern_class!(
117 #[unsafe(super(HMCharacteristicThresholdRangeEvent, HMEvent, NSObject))]
122 #[derive(Debug, PartialEq, Eq, Hash)]
123 #[cfg(feature = "HMEvent")]
124 pub struct HMMutableCharacteristicThresholdRangeEvent;
125);
126
127#[cfg(feature = "HMEvent")]
128unsafe impl Send for HMMutableCharacteristicThresholdRangeEvent {}
129
130#[cfg(feature = "HMEvent")]
131unsafe impl Sync for HMMutableCharacteristicThresholdRangeEvent {}
132
133#[cfg(feature = "HMEvent")]
134extern_conformance!(
135 unsafe impl NSCopying for HMMutableCharacteristicThresholdRangeEvent {}
136);
137
138#[cfg(feature = "HMEvent")]
139unsafe impl CopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
140 type Result = HMCharacteristicThresholdRangeEvent;
141}
142
143#[cfg(feature = "HMEvent")]
144extern_conformance!(
145 unsafe impl NSMutableCopying for HMMutableCharacteristicThresholdRangeEvent {}
146);
147
148#[cfg(feature = "HMEvent")]
149unsafe impl MutableCopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
150 type Result = Self;
151}
152
153#[cfg(feature = "HMEvent")]
154extern_conformance!(
155 unsafe impl NSObjectProtocol for HMMutableCharacteristicThresholdRangeEvent {}
156);
157
158#[cfg(feature = "HMEvent")]
159impl HMMutableCharacteristicThresholdRangeEvent {
160 extern_methods!(
161 #[unsafe(method(init))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164
165 #[cfg(feature = "HMCharacteristic")]
166 #[unsafe(method(characteristic))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
176
177 #[cfg(feature = "HMCharacteristic")]
178 #[unsafe(method(setCharacteristic:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn setCharacteristic(&self, characteristic: &HMCharacteristic);
186
187 #[cfg(feature = "HMNumberRange")]
188 #[unsafe(method(thresholdRange))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
198
199 #[cfg(feature = "HMNumberRange")]
200 #[unsafe(method(setThresholdRange:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn setThresholdRange(&self, threshold_range: &HMNumberRange);
210 );
211}
212
213#[cfg(feature = "HMEvent")]
215impl HMMutableCharacteristicThresholdRangeEvent {
216 extern_methods!(
217 #[cfg(all(feature = "HMCharacteristic", feature = "HMNumberRange"))]
218 #[unsafe(method(initWithCharacteristic:thresholdRange:))]
230 #[unsafe(method_family = init)]
231 pub unsafe fn initWithCharacteristic_thresholdRange(
232 this: Allocated<Self>,
233 characteristic: &HMCharacteristic,
234 threshold_range: &HMNumberRange,
235 ) -> Retained<Self>;
236 );
237}
238
239#[cfg(feature = "HMEvent")]
241impl HMMutableCharacteristicThresholdRangeEvent {
242 extern_methods!(
243 #[deprecated = "HMEvent is abstract"]
244 #[unsafe(method(new))]
245 #[unsafe(method_family = new)]
246 pub unsafe fn new() -> Retained<Self>;
247 );
248}