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")]
22extern_conformance!(
23 unsafe impl<TargetValueType: ?Sized> NSObjectProtocol
24 for HMCharacteristicWriteAction<TargetValueType>
25 {
26 }
27);
28
29#[cfg(feature = "HMAction")]
30impl<TargetValueType: Message> HMCharacteristicWriteAction<TargetValueType> {
31 extern_methods!(
32 #[unsafe(method(init))]
33 #[unsafe(method_family = init)]
34 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36 #[unsafe(method(new))]
37 #[unsafe(method_family = new)]
38 pub unsafe fn new() -> Retained<Self>;
39
40 #[cfg(feature = "HMCharacteristic")]
41 #[unsafe(method(initWithCharacteristic:targetValue:))]
52 #[unsafe(method_family = init)]
53 pub unsafe fn initWithCharacteristic_targetValue(
54 this: Allocated<Self>,
55 characteristic: &HMCharacteristic,
56 target_value: &TargetValueType,
57 ) -> Retained<Self>;
58
59 #[cfg(feature = "HMCharacteristic")]
60 #[unsafe(method(characteristic))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn characteristic(&self) -> Retained<HMCharacteristic>;
64
65 #[unsafe(method(targetValue))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn targetValue(&self) -> Retained<TargetValueType>;
69
70 #[cfg(feature = "block2")]
71 #[unsafe(method(updateTargetValue:completionHandler:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn updateTargetValue_completionHandler(
83 &self,
84 target_value: &TargetValueType,
85 completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
86 );
87 );
88}