QBluetoothZero  2.0
QBtDeviceDiscoverer Class Reference

#include <QBtDeviceDiscoverer.h>

List of all members.

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::ListgetInquiredDevices () const
bool isBusy () const
Q_INVOKABLE void emitDummySignalTest ()

Friends

class QBtDeviceDiscovererPrivate

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
BluetoothNotSupported 
BluetoothInUse 
BluetoothAlreadyStopped 
BluetoothNotReady 
DiscoveryCancelled 
UnknownError 

Constructor & Destructor Documentation

QBtDeviceDiscoverer::QBtDeviceDiscoverer ( QObject *  parent = 0)
virtual QBtDeviceDiscoverer::~QBtDeviceDiscoverer ( ) [virtual]

Member Function Documentation

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.

Parameters:
errorerror 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

Parameters:
remoteDeviceThe remote device
void QBtDeviceDiscoverer::startDiscovery ( ) [slot]

startDiscovery()

Start a device discovery. The start and completion of device discovery are reported through discoveryStarted() and discoveryStopped() signals respectively.

void QBtDeviceDiscoverer::stopDiscovery ( ) [slot]

stopDiscovery()

Stops device discovery. Signal discoveryStopped() is emitted.


Friends And Related Function Documentation

friend class QBtDeviceDiscovererPrivate [friend]

The documentation for this class was generated from the following file: