use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type CBL2CAPPSM = u16;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CBL2CAPChannel;
);
extern_conformance!(
unsafe impl NSObjectProtocol for CBL2CAPChannel {}
);
impl CBL2CAPChannel {
extern_methods!(
#[cfg(feature = "CBPeer")]
#[unsafe(method(peer))]
#[unsafe(method_family = none)]
pub unsafe fn peer(&self) -> Option<Retained<CBPeer>>;
#[unsafe(method(inputStream))]
#[unsafe(method_family = none)]
pub unsafe fn inputStream(&self) -> Option<Retained<NSInputStream>>;
#[unsafe(method(outputStream))]
#[unsafe(method_family = none)]
pub unsafe fn outputStream(&self) -> Option<Retained<NSOutputStream>>;
#[unsafe(method(PSM))]
#[unsafe(method_family = none)]
pub unsafe fn PSM(&self) -> CBL2CAPPSM;
);
}
impl CBL2CAPChannel {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}