Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QBluetoothRemoteDevice Class Reference
[QtBluetoothModule]

The QBluetoothRemoteDevice class represents a remote bluetooth device. More...

    #include <QBluetoothRemoteDevice>

Public Functions


Detailed Description

The QBluetoothRemoteDevice class represents a remote bluetooth device.

This class holds various device attributes of the remote device. These attributes are device address, device class, manufacturer, etc. The most common source of all remote device information is the discovery process. This process must be initiated by using the QBluetoothLocalDevice::discoverDevices() method and hooking onto the appropriate signals.

Please note that depending on the source that provided the QBluetoothRemoteDevice instance, some or all of the information might not be available. In general, address, device major, device minor and service class attributes should always be available. Other attributes might require a connection be established to the remote device, and thus might not be available. In this case, default constructed values will be returned.

See also QBluetoothAddress and QBluetoothLocalDevice.


Member Function Documentation

QBluetoothRemoteDevice::QBluetoothRemoteDevice ( const QBluetoothAddress & address )

Constructs a new QBluetoothRemoteDevice object. The attributes are given default values. The address parameter defines the address of the remote device.

QBluetoothRemoteDevice::QBluetoothRemoteDevice ( const QBluetoothAddress & address, const QString & name, const QString & version, const QString & revision, const QString & manufacturer, const QString & company, int rssi, QBluetooth::DeviceMajor devMajor, quint8 devMinor, QBluetooth::ServiceClasses serviceClasses )

Constructs a new QBluetoothRemoteDevice object.

QBluetoothRemoteDevice::QBluetoothRemoteDevice ( const QBluetoothRemoteDevice & other )

Constructs a new QBluetoothRemoteDevice object from other.

QBluetoothRemoteDevice::~QBluetoothRemoteDevice ()

Deconstructs a QBluetoothRemoteDevice object.

QBluetoothAddress QBluetoothRemoteDevice::address () const

Returns the Bluetooth Address of the remote device.

QString QBluetoothRemoteDevice::company () const

Returns the company of the remote bluetooth device. This is generally the brand name of the company under which the device is sold. If the company attribute is unknown, returns a null string.

Note that the underlying HCI daemon requires the IEEE standard oui.txt file in order to read the company information correctly. This file can be downloaded from the IEEE site. The HCI daemon expects the file to be placed at /usr/share/misc/oui.txt.

See also setCompany().

QBluetooth::DeviceMajor QBluetoothRemoteDevice::deviceMajor () const

Returns the major device number of the remote device.

See also deviceMajorAsString() and setDeviceMajor().

QString QBluetoothRemoteDevice::deviceMajorAsString () const

Returns the major device number interpreted as a translated string.

See also deviceMajor() and setDeviceMajor().

quint8 QBluetoothRemoteDevice::deviceMinor () const

Returns the minor device number of the remote device.

See also deviceMinorAsString() and setDeviceMinor().

QString QBluetoothRemoteDevice::deviceMinorAsString () const

Returns the minor device number of the remote device as a human readable string.

See also deviceMinor() and setDeviceMinor().

QString QBluetoothRemoteDevice::manufacturer () const

Returns the manufacturer of the remote bluetooth device. If the manufacturer is unknown, returns a null string.

See also setManufacturer().

QString QBluetoothRemoteDevice::name () const

Returns the human readable name of the remote device. If the name is unknown, an empty string is returned. For display purposes, it is best to display the address of the device in this case.

Each local Bluetooth adapter might have an alias associated with the remote device.

See also setName() and QBluetoothLocalDevice::remoteAlias().

QString QBluetoothRemoteDevice::revision () const

Returns the revision of the remote bluetooth device. This is generally manufacturer specific information. If the revision is unknown, a null string is returned.

See also setRevision().

int QBluetoothRemoteDevice::rssi () const

Returns the RSSI (Receiver Signal Strength Indicator) of the remote device at the time of the last device discovery.

See also setRssi().

QBluetooth::ServiceClasses QBluetoothRemoteDevice::serviceClasses () const

Returns the service classes for the remote device.

See also serviceClassesAsString() and setServiceClasses().

QStringList QBluetoothRemoteDevice::serviceClassesAsString () const

Returns the service classes for the remote device as a list of translated strings.

See also serviceClasses() and setServiceClasses().

void QBluetoothRemoteDevice::setCompany ( const QString & company )

Sets the company attribute of the remote device to company.

In general, you should not need to use this function.

See also company().

void QBluetoothRemoteDevice::setDeviceMajor ( QBluetooth::DeviceMajor deviceMajor )

Sets the major device attribute of the remote device to deviceMajor.

In general, you should not need to use this function.

See also deviceMajor() and deviceMajorAsString().

void QBluetoothRemoteDevice::setDeviceMinor ( quint8 deviceMinor )

Sets the minor device attribute of the remote device to deviceMinor.

See also deviceMinor() and deviceMinorAsString().

void QBluetoothRemoteDevice::setManufacturer ( const QString & manufacturer )

Sets the manufacturer attribute of the remote device to manufacturer.

In general, you should not need to use this function.

See also manufacturer().

void QBluetoothRemoteDevice::setName ( const QString & name )

Sets the name attribute of the remote device to name.

In general, you should not need to use this function.

See also name().

void QBluetoothRemoteDevice::setRevision ( const QString & revision )

Sets the revision attribute of the remote device to revision. Clients should not need to use this function.

See also revision().

void QBluetoothRemoteDevice::setRssi ( int rssi )

Sets the RSSI (Receiver Signal Strength Indicator) of the remote device rssi. This should be the RSSI of the device at the time of the last discovery.

See also rssi().

void QBluetoothRemoteDevice::setServiceClasses ( QBluetooth::ServiceClasses serviceClasses )

Sets the service classes attribute of the remote device to serviceClasses.

In general, you should not need to use this function.

See also serviceClasses() and serviceClassesAsString().

void QBluetoothRemoteDevice::setVersion ( const QString & version )

Sets the version attribute of the remote device to version.

In general, you should not need to use this function.

See also version().

QString QBluetoothRemoteDevice::version () const

Returns the Bluetooth protocol version the remote device supports. This can be for instance, 1.0, 1.1, 1.2, etc.

See also setVersion().

bool QBluetoothRemoteDevice::operator!= ( const QBluetoothRemoteDevice & other ) const

Compares this remote device against the remote device given by other. Two remote devices are considered not equal if the addresses are not equal.

Returns false if the devices are equal, and true otherwise.

QBluetoothRemoteDevice & QBluetoothRemoteDevice::operator= ( const QBluetoothRemoteDevice & other )

Assigns the contents of other to the current object.

bool QBluetoothRemoteDevice::operator== ( const QBluetoothRemoteDevice & other ) const

Compares this remote device against the remote device given by other. Two remote devices are considered to be the same if they have the same Bluetooth address.

Returns true if the devices are the same.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3