objc2_core_bluetooth/generated/
CBL2CAPChannel.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9pub type CBL2CAPPSM = u16;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct CBL2CAPChannel;
19);
20
21extern_conformance!(
22 unsafe impl NSObjectProtocol for CBL2CAPChannel {}
23);
24
25impl CBL2CAPChannel {
26 extern_methods!(
27 #[cfg(feature = "CBPeer")]
28 #[unsafe(method(peer))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn peer(&self) -> Option<Retained<CBPeer>>;
32
33 #[unsafe(method(inputStream))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn inputStream(&self) -> Option<Retained<NSInputStream>>;
37
38 #[unsafe(method(outputStream))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn outputStream(&self) -> Option<Retained<NSOutputStream>>;
42
43 #[unsafe(method(PSM))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn PSM(&self) -> CBL2CAPPSM;
47 );
48}
49
50impl CBL2CAPChannel {
52 extern_methods!(
53 #[unsafe(method(init))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57 #[unsafe(method(new))]
58 #[unsafe(method_family = new)]
59 pub unsafe fn new() -> Retained<Self>;
60 );
61}