#[repr(C)]pub struct IOBluetoothL2CAPChannelRef { /* private fields */ }IOBluetoothUserLib only.Expand description
Implementations§
Source§impl IOBluetoothL2CAPChannelRef
impl IOBluetoothL2CAPChannelRef
Sourcepub unsafe fn register_for_channel_close_notification(
self: &IOBluetoothL2CAPChannelRef,
callback: IOBluetoothUserNotificationCallback,
in_ref_con: *mut c_void,
) -> Option<CFRetained<IOBluetoothUserNotificationRef>>
Available on crate feature objc2-core-foundation only.
pub unsafe fn register_for_channel_close_notification( self: &IOBluetoothL2CAPChannelRef, callback: IOBluetoothUserNotificationCallback, in_ref_con: *mut c_void, ) -> Option<CFRetained<IOBluetoothUserNotificationRef>>
objc2-core-foundation only.Allows a client to register for a channel close notification.
The given callback will be called when the L2CAP channel is closed.
Parameter channel: The target L2CAP channel
Parameter callback: Callback to be called when the L2CAP channel is closed.
Parameter inRefCon: Client-supplied refCon to be passed to the callback.
Returns: Returns an IOBluetoothUserNotificationRef representing the outstanding L2CAP channel close notification. To unregister the notification, call IOBluetoothUserNotificationUnregister(void) with the returned IOBluetoothUserNotificationRef. If an error is encountered creating the notification, NULL is returned. The returned IOBluetoothUserNotificationRef will be valid for as long as the notification is registered. It is not necessary to retain the result. Once the notification is unregistered, it will no longer be valid.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for IOBluetoothL2CAPChannelRef
impl AsRef<AnyObject> for IOBluetoothL2CAPChannelRef
Source§impl AsRef<CFType> for IOBluetoothL2CAPChannelRef
impl AsRef<CFType> for IOBluetoothL2CAPChannelRef
Source§impl Borrow<AnyObject> for IOBluetoothL2CAPChannelRef
impl Borrow<AnyObject> for IOBluetoothL2CAPChannelRef
Source§impl Borrow<CFType> for IOBluetoothL2CAPChannelRef
impl Borrow<CFType> for IOBluetoothL2CAPChannelRef
Source§impl Debug for IOBluetoothL2CAPChannelRef
impl Debug for IOBluetoothL2CAPChannelRef
Source§impl Deref for IOBluetoothL2CAPChannelRef
impl Deref for IOBluetoothL2CAPChannelRef
Source§impl Hash for IOBluetoothL2CAPChannelRef
impl Hash for IOBluetoothL2CAPChannelRef
Source§impl Message for IOBluetoothL2CAPChannelRef
impl Message for IOBluetoothL2CAPChannelRef
Source§impl RefEncode for IOBluetoothL2CAPChannelRef
impl RefEncode for IOBluetoothL2CAPChannelRef
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for IOBluetoothL2CAPChannelRef
impl Type for IOBluetoothL2CAPChannelRef
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read more