The QBluetoothLocalDevice class provides access to local Bluetooth devices. More...
#include <QBluetoothLocalDevice>
Inherits QObject.
enum | HostMode { HostPoweredOff, HostConnectable, HostDiscoverable } |
enum | Pairing { Unpaired, Paired, AuthorizedPaired } |
QBluetoothLocalDevice ( QObject * parent = 0 ) | |
QBluetoothLocalDevice ( const QBluetoothAddress & address, QObject * parent = 0 ) | |
virtual | ~QBluetoothLocalDevice () |
QBluetoothAddress | address () const |
HostMode | hostMode () const |
bool | isValid () const |
QString | name () const |
Pairing | pairingStatus ( const QBluetoothAddress & address ) const |
void | powerOn () |
void | requestPairing ( const QBluetoothAddress & address, Pairing pairing ) |
void | setHostMode ( QBluetoothLocalDevice::HostMode mode ) |
void | hostModeStateChanged ( HostMode state ) |
void | pairingFinished ( const QBluetoothAddress & address, Pairing pairing ) |
QList<QBluetoothHostInfo> | allDevices () |
The QBluetoothLocalDevice class provides access to local Bluetooth devices.
QBluetoothLocalDevice provides functions for getting and setting the state of local Bluetooth devices.
This enum describes the most of the local Bluetooth device.
Constant | Value | Description |
---|---|---|
QBluetoothLocalDevice::HostPoweredOff | 0 | Powers the device down |
QBluetoothLocalDevice::HostConnectable | 1 | Remote Bluetooth devices can connect to the local Bluetooth device if they have previously been paired with it or otherwise know its address. |
QBluetoothLocalDevice::HostDiscoverable | 2 | Remote Bluetooth devices can discover the presense of the local Bluetooth device. |
This enum describes the pairing state between two Bluetooth devices.
Constant | Value | Description |
---|---|---|
QBluetoothLocalDevice::Unpaired | 0 | The Bluetooth devices are not paired. |
QBluetoothLocalDevice::Paired | 1 | The Bluetooth devices are paired. The system will prompt the user for authorization when the remote device initiates a connection to the local device. |
QBluetoothLocalDevice::AuthorizedPaired | 2 | The Bluetooth devices are paired. The system will not prompt the user for authorization when the remote device initiates a connection to the local device. |
Constructs a QBluetoothLocalDevice.
Destroys the QBluetoothLocalDevice.
Returns the address of this local Bluetooth device.
Returns a list of all available local Bluetooth devices.
Returns the current host mode of this local Bluetooth device.
See also setHostMode().
Returns true the QBluetoothLocalDevice represents an available local Bluetooth device; otherwise return false.
Returns the name of this local Bluetooth device.
Returns the current pairing between this local Bluetooth device and the remote Bluetooth device with address.
Sets pairing of this local Bluetooth device and the remote Bluetooth device with address to pairing.
Sets the host mode the this local Bluetooth device to mode.
See also hostMode().