Class

IOBluetoothDevicePair

An instance of IOBluetoothDevicePair represents a pairing attempt to a remote Bluetooth device.

Declaration

@interface IOBluetoothDevicePair : NSObject

Overview

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 can be stopped. This will set the delegate to nil and then attempt to disconnect from the device if already connected.

Topics

Initializers

+ pairWithDevice:

Creates an autorelease IOBluetoothDevicePair object with a device as the pairing target.

Instance Properties

Instance Methods

- device

Get the IOBluetoothDevice being used by the object.

- replyPINCode:PINCode:

This is the required reply to the devicePairingPINCodeRequest delegate message. Set the PIN code to use during pairing if required.

- replyUserConfirmation:

This is the required reply to the devicePairingUserConfirmationRequest delegate message.

- setDevice:

Set the device object to pair with. It is retained by the object.

- start

Kicks off the pairing with the device.

- stop

Stops the current pairing. Removes the delegate and disconnects if device was connected.

Relationships

Inherits From