IOBluetoothDeviceInquiryDelegate

Trait IOBluetoothDeviceInquiryDelegate 

Source
pub unsafe trait IOBluetoothDeviceInquiryDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn deviceInquiryStarted(
        &self,
        sender: Option<&IOBluetoothDeviceInquiry>,
    )
       where Self: Sized + Message { ... }
    unsafe fn deviceInquiryDeviceFound_device(
        &self,
        sender: Option<&IOBluetoothDeviceInquiry>,
        device: Option<&IOBluetoothDevice>,
    )
       where Self: Sized + Message { ... }
    unsafe fn deviceInquiryUpdatingDeviceNamesStarted_devicesRemaining(
        &self,
        sender: Option<&IOBluetoothDeviceInquiry>,
        devices_remaining: u32,
    )
       where Self: Sized + Message { ... }
    unsafe fn deviceInquiryDeviceNameUpdated_device_devicesRemaining(
        &self,
        sender: Option<&IOBluetoothDeviceInquiry>,
        device: Option<&IOBluetoothDevice>,
        devices_remaining: u32,
    )
       where Self: Sized + Message { ... }
    unsafe fn deviceInquiryComplete_error_aborted(
        &self,
        sender: Option<&IOBluetoothDeviceInquiry>,
        error: c_int,
        aborted: bool,
    )
       where Self: Sized + Message { ... }
}
Available on crate features IOBluetoothDeviceInquiry and objc2 only.
Expand description

This category on NSObject describes the delegate methods for the IOBluetoothDeviceInquiry object. All methods are optional, but it is highly recommended you implement them all. Do NOT invoke remote name requests on found IOBluetoothDevice objects unless the inquiry object has been stopped. Doing so may deadlock your process.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn deviceInquiryStarted(&self, sender: Option<&IOBluetoothDeviceInquiry>)
where Self: Sized + Message,

This message will be delivered when the inquiry actually starts. Since the inquiry could be throttled, this message may not be received immediately after called -start.

Parameter sender: Inquiry object that sent this delegate message.

Source

unsafe fn deviceInquiryDeviceFound_device( &self, sender: Option<&IOBluetoothDeviceInquiry>, device: Option<&IOBluetoothDevice>, )
where Self: Sized + Message,

Available on crate features IOBluetoothDevice and IOBluetoothObject only.

A new device has been found. You do not need to retain the device - it will be held in the internal storage of the inquiry, and can be accessed later using -foundDevices.

Parameter sender: Inquiry object that sent this delegate message.

Parameter device: IOBluetoothDevice that was found.

Source

unsafe fn deviceInquiryUpdatingDeviceNamesStarted_devicesRemaining( &self, sender: Option<&IOBluetoothDeviceInquiry>, devices_remaining: u32, )
where Self: Sized + Message,

The inquiry has begun updating device names that were found during the search.

Parameter sender: Inquiry object that sent this delegate message.

Parameter devicesRemaining: Number of devices remaining to update.

Source

unsafe fn deviceInquiryDeviceNameUpdated_device_devicesRemaining( &self, sender: Option<&IOBluetoothDeviceInquiry>, device: Option<&IOBluetoothDevice>, devices_remaining: u32, )
where Self: Sized + Message,

Available on crate features IOBluetoothDevice and IOBluetoothObject only.

A device name has been retrieved. Also indicates how many devices are left to be updated.

Parameter sender: Inquiry object that sent this delegate message.

Parameter device: IOBluetoothDevice that was updated.

Parameter devicesRemaining: Number of devices remaining to update.

Source

unsafe fn deviceInquiryComplete_error_aborted( &self, sender: Option<&IOBluetoothDeviceInquiry>, error: c_int, aborted: bool, )
where Self: Sized + Message,

When the inquiry is completely stopped, this delegate method will be invoked. It will supply an error code value, kIOReturnSuccess if the inquiry stopped without problem, otherwise a non-kIOReturnSuccess error code will be supplied.

Parameter sender: Inquiry object that sent this delegate message.

Parameter error: Error code. kIOReturnSuccess if the inquiry completed without incident.

Parameter aborted: TRUE if user called -stop on the inquiry.

Trait Implementations§

Source§

impl ProtocolType for dyn IOBluetoothDeviceInquiryDelegate

Source§

const NAME: &'static str = "IOBluetoothDeviceInquiryDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn IOBluetoothDeviceInquiryDelegate

Implementations on Foreign Types§

Source§

impl<T> IOBluetoothDeviceInquiryDelegate for ProtocolObject<T>

Implementors§