objc2_core_bluetooth/generated/
CBATTRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct CBATTRequest;
17);
18
19extern_conformance!(
20 unsafe impl NSObjectProtocol for CBATTRequest {}
21);
22
23impl CBATTRequest {
24 extern_methods!(
25 #[unsafe(method(init))]
26 #[unsafe(method_family = init)]
27 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
28
29 #[cfg(all(feature = "CBCentral", feature = "CBPeer"))]
30 #[unsafe(method(central))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn central(&self) -> Retained<CBCentral>;
34
35 #[cfg(all(feature = "CBAttribute", feature = "CBCharacteristic"))]
36 #[unsafe(method(characteristic))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn characteristic(&self) -> Retained<CBCharacteristic>;
40
41 #[unsafe(method(offset))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn offset(&self) -> NSUInteger;
45
46 #[unsafe(method(value))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn value(&self) -> Option<Retained<NSData>>;
66
67 #[unsafe(method(setValue:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setValue(&self, value: Option<&NSData>);
73 );
74}
75
76impl CBATTRequest {
78 extern_methods!(
79 #[unsafe(method(new))]
80 #[unsafe(method_family = new)]
81 pub unsafe fn new() -> Retained<Self>;
82 );
83}