![]() |
QBluetoothZero
2.0
|
#include <QBtDeviceDiscoverer.h>
Public Types | |
enum | DeviceDiscoveryErrors { BluetoothNotSupported, BluetoothInUse, BluetoothAlreadyStopped, BluetoothNotReady, DiscoveryCancelled, UnknownError } |
Public Slots | |
void | startDiscovery () |
void | stopDiscovery () |
Signals | |
void | newDeviceFound (QBtDevice remoteDevice) |
void | discoveryStopped () |
void | discoveryStarted () |
void | error (QBtDeviceDiscoverer::DeviceDiscoveryErrors error) |
Public Member Functions | |
QBtDeviceDiscoverer (QObject *parent=0) | |
virtual | ~QBtDeviceDiscoverer () |
Q_INVOKABLE const QBtDevice::List & | getInquiredDevices () const |
bool | isBusy () const |
Q_INVOKABLE void | emitDummySignalTest () |
Friends | |
class | QBtDeviceDiscovererPrivate |
Class that contains the mechanism of the device discovery. After instantiation, user can call startDiscovery() to begin the discovery. If calling startDiscovery() is successfull then discoveryStarted() signal is emitted. Any found device is reported through newDeviceFound(QBtDevice) signal or can be retrieved calling GetInquiredDevices() which returns a list of all the found devices till now. When discovery stops, discoveryStopped() signal is emitted.
Incase of any errors, the are reported through error(QBtDeviceDiscoverer::DeviceDiscoveryErrors) signal.
QBtDeviceDiscoverer::QBtDeviceDiscoverer | ( | QObject * | parent = 0 | ) |
virtual QBtDeviceDiscoverer::~QBtDeviceDiscoverer | ( | ) | [virtual] |
void QBtDeviceDiscoverer::discoveryStarted | ( | ) | [signal] |
Signal to report that discovery has started. Alternative is error.
void QBtDeviceDiscoverer::discoveryStopped | ( | ) | [signal] |
Signal to report that discovery has stopped (either canceled or no new devices to detect)
Q_INVOKABLE void QBtDeviceDiscoverer::emitDummySignalTest | ( | ) |
void QBtDeviceDiscoverer::error | ( | QBtDeviceDiscoverer::DeviceDiscoveryErrors | error | ) | [signal] |
error Signal to be emitted when error occurs.
error | error code. |
Q_INVOKABLE const QBtDevice::List& QBtDeviceDiscoverer::getInquiredDevices | ( | ) | const |
GetInquiredDevices()
returns a reference to the list of devices found (if any)
bool QBtDeviceDiscoverer::isBusy | ( | ) | const |
Returns true if the class if performing a device discovery.
void QBtDeviceDiscoverer::newDeviceFound | ( | QBtDevice | remoteDevice | ) | [signal] |
Signaled for every device detected
remoteDevice | The remote device |
void QBtDeviceDiscoverer::startDiscovery | ( | ) | [slot] |
Start a device discovery. The start and completion of device discovery are reported through discoveryStarted() and discoveryStopped() signals respectively.
void QBtDeviceDiscoverer::stopDiscovery | ( | ) | [slot] |
Stops device discovery. Signal discoveryStopped() is emitted.
friend class QBtDeviceDiscovererPrivate [friend] |