![]() |
QBluetoothZero
2.0
|
#include <QBtServiceDiscovererForAll.h>
Public Slots | |
void | startDiscovery () |
void | startObexDiscovery () |
void | startRfcommDiscovery () |
void | startDiscovery (const QBtUuid &uuid) |
void | startDiscovery (const QList< QBtUuid > &uuids) |
void | stopDiscovery () |
Signals | |
void | discoveryStarted () |
void | discoveryEnded () |
void | newDeviceFound (const QBtDevice &device) |
void | serviceDiscoveyError (const QBtDevice &device, QBtServiceDiscoverer::ServiceDiscoveryError error) |
void | deviceDiscoveryError (QBtDeviceDiscoverer::DeviceDiscoveryErrors error) |
Public Member Functions | |
QBtServiceDiscovererForAll (QObject *parent=0) | |
virtual | ~QBtServiceDiscovererForAll () |
const QBtDevice::List & | getDeviceList () const |
bool | isBusy () const |
int | getNumberOfFoundDevices () const |
bool | foundDevices () const |
This class provides the mechanism to inquire services available on all devices in the vicinity.
when startDiscovery() is called (or its variations), it searches for all devices according to the query criteria (the service uuids).
When the discovery starts, the discoveryStarted() signal is emitted. Likewise, the signal discoveryEnded() is emitted when the discovery ends. This happens when the inquiry ends normally or through interruption (by calling stopDiscovery() ).
After each device is filled with all services, the signal newDeviceFound (const QBtDevice &) is emitted.
After the discovery ends, the found device list is accessible through getDeviceList(). If no devices were found, this list is empty.
QBtServiceDiscovererForAll::QBtServiceDiscovererForAll | ( | QObject * | parent = 0 | ) |
virtual QBtServiceDiscovererForAll::~QBtServiceDiscovererForAll | ( | ) | [virtual] |
void QBtServiceDiscovererForAll::deviceDiscoveryError | ( | QBtDeviceDiscoverer::DeviceDiscoveryErrors | error | ) | [signal] |
Signal emitted when device discovery error occurs.
void QBtServiceDiscovererForAll::discoveryEnded | ( | ) | [signal] |
Signal to report that discovery has ended (either cancelled or no new devices to detect)
void QBtServiceDiscovererForAll::discoveryStarted | ( | ) | [signal] |
Signal to report that discovery has started.
bool QBtServiceDiscovererForAll::foundDevices | ( | ) | const |
Returns true if any device was found.
const QBtDevice::List& QBtServiceDiscovererForAll::getDeviceList | ( | ) | const |
Returns the list of found devices. The list is empty if no devices were found.
int QBtServiceDiscovererForAll::getNumberOfFoundDevices | ( | ) | const |
Returns the number of total devices found.
bool QBtServiceDiscovererForAll::isBusy | ( | ) | const |
Returns true if a discovery operation is in progress.
void QBtServiceDiscovererForAll::newDeviceFound | ( | const QBtDevice & | device | ) | [signal] |
Signal to report that the class finished searching for services in the specified device.
void QBtServiceDiscovererForAll::serviceDiscoveyError | ( | const QBtDevice & | device, |
QBtServiceDiscoverer::ServiceDiscoveryError | error | ||
) | [signal] |
Signal emitted when service discovery error occurs when searching for services in the specified device.
void QBtServiceDiscovererForAll::startDiscovery | ( | ) | [slot] |
Starts service discovery for OBEX and RFCOMM services. New devices with their services are reported through signal "newDeviceFound".
void QBtServiceDiscovererForAll::startDiscovery | ( | const QBtUuid & | uuid | ) | [slot] |
Starts service discovery for the service (or protocol) identified by the uuid parameter. New devices with their services are reported through signal "newDeviceFound".
void QBtServiceDiscovererForAll::startDiscovery | ( | const QList< QBtUuid > & | uuids | ) | [slot] |
Starts service discovery for UUIDs provided in the list. New devices with their services are reported through signal "newDeviceFound".
void QBtServiceDiscovererForAll::startObexDiscovery | ( | ) | [slot] |
Starts service discovery for OBEX services only. New devices with their services are reported through signal "newDeviceFound".
void QBtServiceDiscovererForAll::startRfcommDiscovery | ( | ) | [slot] |
Starts service discovery for RFCOMM services only. New devices with their services are reported through signal "newDeviceFound".
void QBtServiceDiscovererForAll::stopDiscovery | ( | ) | [slot] |
Stops service discovery. Services found so far can be acquired using "getInquiredServices" function.