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
21unsafe impl NSObjectProtocol for CBL2CAPChannel {}
22
23impl CBL2CAPChannel {
24 extern_methods!(
25 #[cfg(feature = "CBPeer")]
26 #[unsafe(method(peer))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn peer(&self) -> Option<Retained<CBPeer>>;
30
31 #[unsafe(method(inputStream))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn inputStream(&self) -> Option<Retained<NSInputStream>>;
35
36 #[unsafe(method(outputStream))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn outputStream(&self) -> Option<Retained<NSOutputStream>>;
40
41 #[unsafe(method(PSM))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn PSM(&self) -> CBL2CAPPSM;
45 );
46}
47
48impl CBL2CAPChannel {
50 extern_methods!(
51 #[unsafe(method(init))]
52 #[unsafe(method_family = init)]
53 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55 #[unsafe(method(new))]
56 #[unsafe(method_family = new)]
57 pub unsafe fn new() -> Retained<Self>;
58 );
59}