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
19unsafe impl NSObjectProtocol for CBATTRequest {}
20
21impl CBATTRequest {
22 extern_methods!(
23 #[unsafe(method(init))]
24 #[unsafe(method_family = init)]
25 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
26
27 #[cfg(all(feature = "CBCentral", feature = "CBPeer"))]
28 #[unsafe(method(central))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn central(&self) -> Retained<CBCentral>;
32
33 #[cfg(all(feature = "CBAttribute", feature = "CBCharacteristic"))]
34 #[unsafe(method(characteristic))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn characteristic(&self) -> Retained<CBCharacteristic>;
38
39 #[unsafe(method(offset))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn offset(&self) -> NSUInteger;
43
44 #[unsafe(method(value))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn value(&self) -> Option<Retained<NSData>>;
64
65 #[unsafe(method(setValue:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn setValue(&self, value: Option<&NSData>);
69 );
70}
71
72impl CBATTRequest {
74 extern_methods!(
75 #[unsafe(method(new))]
76 #[unsafe(method_family = new)]
77 pub unsafe fn new() -> Retained<Self>;
78 );
79}