|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access Bluetooth Framework Reference
|
IOBluetoothDevicePair |
| Inherits from: | |
| Declared In: |
An instance of IOBluetoothDevicePair represents a pairing attempt to a remote Bluetooth device.
Use the IOBluetoothDevicePair object to attempt to pair with any Bluetooth device. Once -start is invoked on it, progress is returned to the delegate via the messages defined below. This object enables you to pair with devices within your application without having to use the standard panels provided by the IOBluetoothUI framework, allowing you to write custom UI to select devices, and still handle the ability to perform device pairings.
Of note is that this object MAY attempt to perform two low-level pairings, depending on the type of device you are attempting to pair. This is inconsequential to your code, however, as it occurs automatically and does not change the messaging.
Once started, the pairing cannot be stopped or cancelled. You can set the delegate to nil to stop receiving messages, but the process will continue behind the scenes until success or failure occurs. This is due to the complex interaction between the all the Bluetooth software components and your code.
Get the IOBluetoothDevice being used by the object.
Creates an autorelease IOBluetoothDevicePair object with a device as the pairing target.
This is the required reply to the devicePairingPINCodeRequest delegate message. Set the PIN code to use during pairing if required.
This is the required reply to the devicePairingPINCodeRequest delegate message. Set the PIN code to use during pairing if required.
This is the required reply to the devicePairingUserConfirmationRequest delegate message.
Set the delegate object. It is not retained.
Set the device object to pair with. It is retained by the object.
Kicks off the pairing with the device.
device |
Get the IOBluetoothDevice being used by the object.
- (IOBluetoothDevice*)device;
device The IOBluetoothDevice object that the IOBluetoothDevicePair object is pairing with, as specified in -setDevice: or pairWithDevice:
pairWithDevice: |
Creates an autorelease IOBluetoothDevicePair object with a device as the pairing target.
+ (IOBluetoothDevicePair *)pairWithDevice:(IOBluetoothDevice*)device;
deviceAn IOBluetoothDevice to attept to pair with. The device is retained.
Returns an IOReturn or Bluetooth error code, if the pairing could not be started.
replyPINCode: |
This is the required reply to the devicePairingPINCodeRequest delegate message. Set the PIN code to use during pairing if required.
See Also:PINCodeSizeThe PIN code length in octets (8 bits).
PINcodePIN code for the device. Can be up to a maximum of 128 bits.
replyPINCode:PINCode: |
This is the required reply to the devicePairingPINCodeRequest delegate message. Set the PIN code to use during pairing if required.
See Also:PINCodeSizeThe PIN code length in octets (8 bits).
PINcodePIN code for the device. Can be up to a maximum of 128 bits.
replyUserConfirmation: |
This is the required reply to the devicePairingUserConfirmationRequest delegate message.
replyA yes/no answer provide by the user to the numeric comparison presented.
setDelegate: |
Set the delegate object. It is not retained.
deviceThe IOBluetoothDevice object that the IOBluetoothDevicePair object with which to perform a pairing.
setDevice: |
Set the device object to pair with. It is retained by the object.
- (void)setDevice:(IOBluetoothDevice*)inDevice;
deviceThe IOBluetoothDevice object that the IOBluetoothDevicePair object with which to perform a pairing.
start |
Kicks off the pairing with the device.
- (IOReturn)start;
Returns an IOReturn or Bluetooth error code, if the pairing could not be started.
Last Updated: 2009-10-09