objc2_home_kit/generated/
HMCharacteristicWriteAction.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(HMAction, NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "HMAction")]
18 pub struct HMCharacteristicWriteAction<TargetValueType: ?Sized = AnyObject>;
19);
20
21#[cfg(feature = "HMAction")]
22unsafe impl<TargetValueType: ?Sized> NSObjectProtocol
23 for HMCharacteristicWriteAction<TargetValueType>
24{
25}
26
27#[cfg(feature = "HMAction")]
28impl<TargetValueType: Message> HMCharacteristicWriteAction<TargetValueType> {
29 extern_methods!(
30 #[unsafe(method(init))]
31 #[unsafe(method_family = init)]
32 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
33
34 #[unsafe(method(new))]
35 #[unsafe(method_family = new)]
36 pub unsafe fn new() -> Retained<Self>;
37
38 #[cfg(feature = "HMCharacteristic")]
39 #[unsafe(method(initWithCharacteristic:targetValue:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initWithCharacteristic_targetValue(
52 this: Allocated<Self>,
53 characteristic: &HMCharacteristic,
54 target_value: &TargetValueType,
55 ) -> Retained<Self>;
56
57 #[cfg(feature = "HMCharacteristic")]
58 #[unsafe(method(characteristic))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
62
63 #[unsafe(method(targetValue))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn targetValue(&self) -> Retained<TargetValueType>;
67
68 #[cfg(feature = "block2")]
69 #[unsafe(method(updateTargetValue:completionHandler:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn updateTargetValue_completionHandler(
81 &self,
82 target_value: &TargetValueType,
83 completion: &block2::Block<dyn Fn(*mut NSError)>,
84 );
85 );
86}