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))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
84
85 #[cfg(feature = "HMNumberRange")]
86 #[unsafe(method(thresholdRange))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
90 );
91}
92
93#[cfg(feature = "HMEvent")]
95impl HMCharacteristicThresholdRangeEvent {
96 extern_methods!(
97 #[deprecated = "HMEvent is abstract"]
98 #[unsafe(method(new))]
99 #[unsafe(method_family = new)]
100 pub unsafe fn new() -> Retained<Self>;
101 );
102}
103
104extern_class!(
105 #[unsafe(super(HMCharacteristicThresholdRangeEvent, HMEvent, NSObject))]
110 #[derive(Debug, PartialEq, Eq, Hash)]
111 #[cfg(feature = "HMEvent")]
112 pub struct HMMutableCharacteristicThresholdRangeEvent;
113);
114
115#[cfg(feature = "HMEvent")]
116unsafe impl Send for HMMutableCharacteristicThresholdRangeEvent {}
117
118#[cfg(feature = "HMEvent")]
119unsafe impl Sync for HMMutableCharacteristicThresholdRangeEvent {}
120
121#[cfg(feature = "HMEvent")]
122extern_conformance!(
123 unsafe impl NSCopying for HMMutableCharacteristicThresholdRangeEvent {}
124);
125
126#[cfg(feature = "HMEvent")]
127unsafe impl CopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
128 type Result = HMCharacteristicThresholdRangeEvent;
129}
130
131#[cfg(feature = "HMEvent")]
132extern_conformance!(
133 unsafe impl NSMutableCopying for HMMutableCharacteristicThresholdRangeEvent {}
134);
135
136#[cfg(feature = "HMEvent")]
137unsafe impl MutableCopyingHelper for HMMutableCharacteristicThresholdRangeEvent {
138 type Result = Self;
139}
140
141#[cfg(feature = "HMEvent")]
142extern_conformance!(
143 unsafe impl NSObjectProtocol for HMMutableCharacteristicThresholdRangeEvent {}
144);
145
146#[cfg(feature = "HMEvent")]
147impl HMMutableCharacteristicThresholdRangeEvent {
148 extern_methods!(
149 #[unsafe(method(init))]
150 #[unsafe(method_family = init)]
151 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
152
153 #[cfg(feature = "HMCharacteristic")]
154 #[unsafe(method(characteristic))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
158
159 #[cfg(feature = "HMCharacteristic")]
160 #[unsafe(method(setCharacteristic:))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn setCharacteristic(&self, characteristic: &HMCharacteristic);
164
165 #[cfg(feature = "HMNumberRange")]
166 #[unsafe(method(thresholdRange))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn thresholdRange(&self) -> Retained<HMNumberRange>;
170
171 #[cfg(feature = "HMNumberRange")]
172 #[unsafe(method(setThresholdRange:))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn setThresholdRange(&self, threshold_range: &HMNumberRange);
176 );
177}
178
179#[cfg(feature = "HMEvent")]
181impl HMMutableCharacteristicThresholdRangeEvent {
182 extern_methods!(
183 #[cfg(all(feature = "HMCharacteristic", feature = "HMNumberRange"))]
184 #[unsafe(method(initWithCharacteristic:thresholdRange:))]
196 #[unsafe(method_family = init)]
197 pub unsafe fn initWithCharacteristic_thresholdRange(
198 this: Allocated<Self>,
199 characteristic: &HMCharacteristic,
200 threshold_range: &HMNumberRange,
201 ) -> Retained<Self>;
202 );
203}
204
205#[cfg(feature = "HMEvent")]
207impl HMMutableCharacteristicThresholdRangeEvent {
208 extern_methods!(
209 #[deprecated = "HMEvent is abstract"]
210 #[unsafe(method(new))]
211 #[unsafe(method_family = new)]
212 pub unsafe fn new() -> Retained<Self>;
213 );
214}