QBluetoothZero  2.0
QBtDevice Class Reference

#include <QBtDevice.h>

List of all members.

Public Types

enum  DeviceMajor {
  Uncategorized, Computer, Phone, LANAccess,
  AudioVideo, Peripheral, Imaging, Wearable,
  Toy, Miscellaneous
typedef QList< QBtDeviceList


void nameChanged (QString newName)

Public Member Functions

 QBtDevice (QObject *parent=0)
 QBtDevice (const QBtDevice &dev, QObject *parent=0)
 QBtDevice (const QString &devName, const QBtAddress &devAddress, DeviceMajor devType, QObject *parent=0)
 ~QBtDevice ()
void addNewService (const QBtService &newService)
void setName (const QString &newName)
void setAddress (const QBtAddress &newAddress)
void setType (DeviceMajor newType)
void setSupportedServices (const QBtService::List &newSupportedServices)
bool serviceListUpdated () const
Q_INVOKABLE QString name () const
Q_INVOKABLE QString getName () const
const QBtAddressgetAddress () const
DeviceMajor getType () const
QString getTypeAsString () const
const QBtService::ListgetSupportedServices () const
QBtDeviceoperator= (const QBtDevice &dev)


QString name
QBtAddress address
DeviceMajor type

Detailed Description

The class that contains all the information needed about any bluetooth device. Its main fields are 4.

a) QBtAddress address: It is the device's bluetooth address. Any communication between remote devices is made using this field so it is an essential information. No communication can be done without this.

b) QString name: The name of the device. By default this field is equal to QBtAddress.toString(). The actual name is retrieved from the device discovery and is set by the remote device as an identification string ID.

c) DeviceMajor type: an enumeration field characterizing the device type.

d) QBtService::List supportedServices: this field is updated after calling QBtServiceDiscoverer::startDiscovery(QBtDevice*) (if any services are found through SDP)

Member Typedef Documentation

typedef QList<QBtDevice> QBtDevice::List

Member Enumeration Documentation


Constructor & Destructor Documentation

QBtDevice::QBtDevice ( QObject *  parent = 0)
QBtDevice::QBtDevice ( const QBtDevice dev,
QObject *  parent = 0 

Copy constructor is needed by the QMetaType to register this custom class

QBtDevice::QBtDevice ( const QString &  devName,
const QBtAddress devAddress,
DeviceMajor  devType,
QObject *  parent = 0 
QBtDevice::~QBtDevice ( )

Member Function Documentation

void QBtDevice::addNewService ( const QBtService newService)
const QBtAddress& QBtDevice::getAddress ( ) const
Q_INVOKABLE QString QBtDevice::getName ( ) const
const QBtService::List& QBtDevice::getSupportedServices ( ) const
DeviceMajor QBtDevice::getType ( ) const
QString QBtDevice::getTypeAsString ( ) const
Q_INVOKABLE QString QBtDevice::name ( ) const
void QBtDevice::nameChanged ( QString  newName) [signal]
QBtDevice& QBtDevice::operator= ( const QBtDevice dev)
bool QBtDevice::serviceListUpdated ( ) const
void QBtDevice::setAddress ( const QBtAddress newAddress)
void QBtDevice::setName ( const QString &  newName)
void QBtDevice::setSupportedServices ( const QBtService::List newSupportedServices)
void QBtDevice::setType ( DeviceMajor  newType)

Property Documentation

QBtAddress QBtDevice::address [read, write]
QString QBtDevice::name [read, write]
DeviceMajor QBtDevice::type [read, write]

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