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 { ... }
}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§
Sourceunsafe fn deviceInquiryStarted(&self, sender: Option<&IOBluetoothDeviceInquiry>)
unsafe fn deviceInquiryStarted(&self, sender: Option<&IOBluetoothDeviceInquiry>)
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.
Sourceunsafe fn deviceInquiryDeviceFound_device(
&self,
sender: Option<&IOBluetoothDeviceInquiry>,
device: Option<&IOBluetoothDevice>,
)
Available on crate features IOBluetoothDevice and IOBluetoothObject only.
unsafe fn deviceInquiryDeviceFound_device( &self, sender: Option<&IOBluetoothDeviceInquiry>, device: Option<&IOBluetoothDevice>, )
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.
Sourceunsafe fn deviceInquiryUpdatingDeviceNamesStarted_devicesRemaining(
&self,
sender: Option<&IOBluetoothDeviceInquiry>,
devices_remaining: u32,
)
unsafe fn deviceInquiryUpdatingDeviceNamesStarted_devicesRemaining( &self, sender: Option<&IOBluetoothDeviceInquiry>, devices_remaining: u32, )
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.
Sourceunsafe fn deviceInquiryDeviceNameUpdated_device_devicesRemaining(
&self,
sender: Option<&IOBluetoothDeviceInquiry>,
device: Option<&IOBluetoothDevice>,
devices_remaining: u32,
)
Available on crate features IOBluetoothDevice and IOBluetoothObject only.
unsafe fn deviceInquiryDeviceNameUpdated_device_devicesRemaining( &self, sender: Option<&IOBluetoothDeviceInquiry>, device: Option<&IOBluetoothDevice>, devices_remaining: u32, )
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.
Sourceunsafe fn deviceInquiryComplete_error_aborted(
&self,
sender: Option<&IOBluetoothDeviceInquiry>,
error: c_int,
aborted: bool,
)
unsafe fn deviceInquiryComplete_error_aborted( &self, sender: Option<&IOBluetoothDeviceInquiry>, error: c_int, aborted: bool, )
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.