QBluetoothDeviceInfo

Since: 1.2

#include <QtConnectivity/QBluetoothDeviceInfo>

The QBluetoothDeviceInfo class provides information about Bluetooth devices.

QBluetoothDeviceInfo provides information about a Bluetooth device's name, address and class of device.


Overview

Public Types Index

enum DataCompleteness

DataComplete, DataIncomplete, DataUnavailable

enum MajorDeviceClass

MiscellaneousDevice = 0, ComputerDevice = 1, PhoneDevice = 2, LANAccessDevice = 3, AudioVideoDevice = 4, PeripheralDevice = 5, ImagingDevice = 6, WearableDevice = 7, ToyDevice = 8, HealthDevice = 9, UncategorizedDevice = 31

enum MinorAudioVideoClass

UncategorizedAudioVideoDevice = 0, WearableHeadsetDevice = 1, HandsFreeDevice = 2, Microphone = 4, Loudspeaker = 5, Headphones = 6, PortableAudioDevice = 7, CarAudio = 8, SetTopBox = 9, HiFiAudioDevice = 10, Vcr = 11, VideoCamera = 12, Camcorder = 13, VideoMonitor = 14, VideoDisplayAndLoudspeaker = 15, VideoConferencing = 16, GamingDevice = 18

enum MinorComputerClass

UncategorizedComputer = 0, DesktopComputer = 1, ServerComputer = 2, LaptopComputer = 3, HandheldClamShellComputer = 4, HandheldComputer = 5, WearableComputer = 6

enum MinorHealthClass

UncategorizedHealthDevice = 0, HealthBloodPressureMonitor = 0x1, HealthThermometer = 0x2, HealthWeightScale = 0x3, HealthGlucoseMeter = 0x4, HealthPulseOximeter = 0x5, HealthDataDisplay = 0x7, HealthStepCounter = 0x8

enum MinorImagingClass

UncategorizedImagingDevice = 0, ImageDisplay = 0x04, ImageCamera = 0x08, ImageScanner = 0x10, ImagePrinter = 0x20

enum MinorMiscellaneousClass

UncategorizedMiscellaneous = 0

enum MinorNetworkClass

NetworkFullService = 0x00, NetworkLoadFactorOne = 0x08, NetworkLoadFactorTwo = 0x10, NetworkLoadFactorThree = 0x18, NetworkLoadFactorFour = 0x20, NetworkLoadFactorFive = 0x28, NetworkLoadFactorSix = 0x30, NetworkNoService = 0x38

enum MinorPeripheralClass

UncategorizedPeripheral = 0, KeyboardPeripheral = 0x10, PointingDevicePeripheral = 0x20, KeyboardWithPointingDevicePeripheral = 0x30, JoystickPeripheral = 0x01, GamepadPeripheral = 0x02, RemoteControlPeripheral = 0x03, SensingDevicePeripheral = 0x04, DigitizerTabletPeripheral = 0x05, CardReaderPeripheral = 0x06

enum MinorPhoneClass

UncategorizedPhone = 0, CellularPhone = 1, CordlessPhone = 2, SmartPhone = 3, WiredModemOrVoiceGatewayPhone = 4, CommonIsdnAccessPhone = 5

enum MinorToyClass

UncategorizedToy = 0, ToyRobot = 1, ToyVehicle = 2, ToyDoll = 3, ToyController = 4, ToyGame = 5

enum MinorWearableClass

UncategorizedWearableDevice = 0, WearableWristWatch = 1, WearablePager = 2, WearableJacket = 3, WearableHelmet = 4, WearableGlasses = 5

enum ServiceClass

NoService = 0x0000, PositioningService = 0x0001, NetworkingService = 0x0002, RenderingService = 0x0004, CapturingService = 0x0008, ObjectTransferService = 0x0010, AudioService = 0x0020, TelephonyService = 0x0040, InformationService = 0x0080, AllServices = 0x07ff

Protected Attributes Index

QBluetoothDeviceInfoPrivate *d_ptr

Public Functions Index

QBluetoothDeviceInfo ()
QBluetoothDeviceInfo (const QBluetoothAddress &address, const QString &name, quint32 classOfDevice)
QBluetoothDeviceInfo (const QBluetoothDeviceInfo &other)
~QBluetoothDeviceInfo ()
QBluetoothAddressaddress () const
boolisCached () const
boolisValid () const
MajorDeviceClassmajorDeviceClass () const
QByteArraymanufacturerSpecificData (bool *available=0) const
quint8minorDeviceClass () const
QStringname () const
QBluetoothDeviceInfo &operator= (const QBluetoothDeviceInfo &other)
booloperator== (const QBluetoothDeviceInfo &other) const
qint16rssi () const
ServiceClassesserviceClasses () const
QList< QBluetoothUuid >serviceUuids (DataCompleteness *completeness=0) const
DataCompletenessserviceUuidsCompleteness () const
voidsetCached (bool cached)
voidsetManufacturerSpecificData (const QByteArray &data)
voidsetRssi (qint16 signal)
voidsetServiceUuids (const QList< QBluetoothUuid > &uuids, DataCompleteness completeness)

Public Types

DataCompleteness

This enum describes the completeness of the received data.

DataComplete The data is complete. DataIncomplete The data is incomplete. Addition datum is available via other interfaces. DataUnavailable No data is available.

DataComplete
DataIncomplete
DataUnavailable

MajorDeviceClass

This enum describes a Bluetooth device's major device class.

MiscellaneousDevice A miscellaneous device. ComputerDevice A computer device or PDA. PhoneDevice A telephone device. LANAccessDevice A device that provides access to a local area network. AudioVideoDevice A device capable of playback or capture of audio and/or video. PeripheralDevice A peripheral device such as a keyboard, mouse, etc. ImagingDevice An imaging device such as a display, printer, scanner or camera. WearableDevice A wearable device such as a watch or pager. ToyDevice A toy. HealthDevice A health reated device such as heart rate, or temperature. UncategorizedDevice A device that does not fit into any of the other device classes.

MiscellaneousDevice = 0
ComputerDevice = 1
PhoneDevice = 2
LANAccessDevice = 3
AudioVideoDevice = 4
PeripheralDevice = 5
ImagingDevice = 6
WearableDevice = 7
ToyDevice = 8
HealthDevice = 9
UncategorizedDevice = 31

MinorAudioVideoClass

This enum describes the minor device classes for audio/video devices.

UncategorizedAudioVideoDevice An uncategorized audio/video device. WearableHeadsetDevice A wearable headset device. HandsFreeDevice A hands free device. Microphone A microphone. Loudspeaker A loudspeaker. Headphones Headphones. PortableAudioDevice A portable audio device. CarAudio A car audio device. SetTopBox A set top box. HiFiAudioDevice A HiFi audio device. Vcr A video cassette recorder. VideoCamera A video camera. Camcorder A video camera. VideoMonitor A video monitor. VideoDisplayAndLoudspeaker A video display with built-in loudspeaker. VideoConferencing A video conferencing device. GamingDevice A gaming device.

UncategorizedAudioVideoDevice = 0
WearableHeadsetDevice = 1
HandsFreeDevice = 2
Microphone = 4
Loudspeaker = 5
Headphones = 6
PortableAudioDevice = 7
CarAudio = 8
SetTopBox = 9
HiFiAudioDevice = 10
Vcr = 11
VideoCamera = 12
Camcorder = 13
VideoMonitor = 14
VideoDisplayAndLoudspeaker = 15
VideoConferencing = 16
GamingDevice = 18

MinorComputerClass

This enum describes the minor device classes for computer devices.

UncategorizedComputer An uncategorized computer device. DesktopComputer A desktop computer. ServerComputer A server computer. LaptopComputer A laptop computer. HandheldClamShellComputer A clamshell handheld computer or PDA. HandheldComputer A handheld computer or PDA. WearableComputer A wearable computer.

UncategorizedComputer = 0
DesktopComputer = 1
ServerComputer = 2
LaptopComputer = 3
HandheldClamShellComputer = 4
HandheldComputer = 5
WearableComputer = 6

MinorHealthClass

This enum describes the minor device classes for health devices.

UncategorizedHealthDevice An uncategorized health device. HealthBloodPressureMonitor A blood pressure monitor. HealthThermometer A Thermometer. HealthWeightScale A scale. HealthGlucoseMeter A glucose meter. HealthPulseOximeter A blood oxygen saturation meter. HealthDataDisplay A data display. HealthStepCounter A pedometer.

UncategorizedHealthDevice = 0
HealthBloodPressureMonitor = 0x1
HealthThermometer = 0x2
HealthWeightScale = 0x3
HealthGlucoseMeter = 0x4
HealthPulseOximeter = 0x5
HealthDataDisplay = 0x7
HealthStepCounter = 0x8

MinorImagingClass

This enum describes the minor device classes for imaging devices.

UncategorizedImagingDevice An uncategorized imaging device. ImageDisplay A device capable of displaying images. ImageCamera A camera. ImageScanner An image scanner. ImagePrinter A printer.

UncategorizedImagingDevice = 0
ImageDisplay = 0x04
ImageCamera = 0x08
ImageScanner = 0x10
ImagePrinter = 0x20

MinorMiscellaneousClass

This enum describes the minor device classes for miscellaneous Bluetooth devices.

UncategorizedMiscellaneous An uncategorized miscellaneous device.

UncategorizedMiscellaneous = 0

MinorNetworkClass

This enum describes the minor device classes for local area network access devices.

Local area network access devices use the minor device class to specify the current network utilization.

NetworkFullService 100% of the total bandwidth is available. NetworkLoadFactorOne 0 - 17% of the total bandwidth is currently being used. NetworkLoadFactorTwo 17 - 33% of the total bandwidth is currently being used. NetworkLoadFactorThree 33 - 50% of the total bandwidth is currently being used. NetworkLoadFactorFour 50 - 67% of the total bandwidth is currently being used. NetworkLoadFactorFive 67 - 83% of the total bandwidth is currently being used. NetworkLoadFactorSix 83 - 99% of the total bandwidth is currently being used. NetworkNoService No network service available.

NetworkFullService = 0x00
NetworkLoadFactorOne = 0x08
NetworkLoadFactorTwo = 0x10
NetworkLoadFactorThree = 0x18
NetworkLoadFactorFour = 0x20
NetworkLoadFactorFive = 0x28
NetworkLoadFactorSix = 0x30
NetworkNoService = 0x38

MinorPeripheralClass

This enum describes the minor device classes for peripheral devices.

UncategorizedPeripheral An uncategorized peripheral device. KeyboardPeripheral A keyboard. PointingDevicePeripheral A pointing device, for example a mouse. KeyboardWithPointingDevicePeripheral A keyboard with built-in pointing device. JoystickPeripheral A joystick. GamepadPeripheral A game pad. RemoteControlPeripheral A remote control. SensingDevicePeripheral A sensing device. DigitizerTabletPeripheral A digitizer tablet peripheral. CardReaderPeripheral A card reader peripheral.

UncategorizedPeripheral = 0
KeyboardPeripheral = 0x10
PointingDevicePeripheral = 0x20
KeyboardWithPointingDevicePeripheral = 0x30
JoystickPeripheral = 0x01
GamepadPeripheral = 0x02
RemoteControlPeripheral = 0x03
SensingDevicePeripheral = 0x04
DigitizerTabletPeripheral = 0x05
CardReaderPeripheral = 0x06

MinorPhoneClass

This enum describes the minor device classes for phone devices.

UncategorizedPhone An uncategorized phone device. CellularPhone A cellular phone. CordlessPhone A cordless phone. SmartPhone A smart phone. WiredModemOrVoiceGatewayPhone A wired modem or voice gateway. CommonIsdnAccessPhone A device that provides ISDN access.

UncategorizedPhone = 0
CellularPhone = 1
CordlessPhone = 2
SmartPhone = 3
WiredModemOrVoiceGatewayPhone = 4
CommonIsdnAccessPhone = 5

MinorToyClass

This enum describes the minor device classes for toy devices.

UncategorizedToy An uncategorized toy. ToyRobot A toy robot. ToyVehicle A toy vehicle. ToyDoll A toy doll or action figure. ToyController A controller. ToyGame A game.

UncategorizedToy = 0
ToyRobot = 1
ToyVehicle = 2
ToyDoll = 3
ToyController = 4
ToyGame = 5

MinorWearableClass

This enum describes the minor device classes for wearable devices.

UncategorizedWearableDevice An uncategorized wearable device. WearableWristWatch A wristwatch. WearablePager A pager. WearableJacket A jacket. WearableHelmet A helmet. WearableGlasses A pair of glasses.

UncategorizedWearableDevice = 0
WearableWristWatch = 1
WearablePager = 2
WearableJacket = 3
WearableHelmet = 4
WearableGlasses = 5

ServiceClass

This enum describes the service class of the Bluetooth device.

The service class is used as a rudimentary form of service discovery. It is meant to provide a rudimentary list of the types of services that the device might provide.

NoService The device does not provide any services. PositioningService The device provides positioning services. NetworkingService The device provides networking services. RenderingService The device provides rendering services. CapturingService The device provides capturing services. ObjectTransferService The device provides object transfer services. AudioService The device provides audio services. TelephonyService The device provides telephony services. InformationService The device provides information services. AllServices The device provides services of all types.

NoService = 0x0000
PositioningService = 0x0001
NetworkingService = 0x0002
RenderingService = 0x0004
CapturingService = 0x0008
ObjectTransferService = 0x0010
AudioService = 0x0020
TelephonyService = 0x0040
InformationService = 0x0080
AllServices = 0x07ff

Protected Attributes

QBluetoothDeviceInfoPrivate * d_ptr ()

Public Functions

QBluetoothDeviceInfo ()

Constructs an invalid QBluetoothDeviceInfo object.

QBluetoothDeviceInfo (

Constructs a QBluetoothDeviceInfo object with Bluetooth address address, device name name and the encoded class of device classOfDevice.

The classOfDevice parameter is encoded in the following format

Bits Size Description 0 - 1 2 Unused, set to 0. 2 - 7 6 Minor device class. 8 - 12 5 Major device class. 13 - 23 11 Service class.

QBluetoothDeviceInfo (

Constructs a QBluetoothDeviceInfo that is a copy of other.

~QBluetoothDeviceInfo ()

Destructor.

QBluetoothAddress address ()

Returns the address of the device.

bool isCached ()

Returns true if the QBluetoothDeviceInfo object is created from cached data.

bool isValid ()

Returns true if the QBluetoothDeviceInfo object is valid, otherwise returns false.

MajorDeviceClass majorDeviceClass ()

Returns the major device class of the device.

QByteArray manufacturerSpecificData (
  • bool *available)

Returns the manufacturer specific data.

If available is not 0 it is set to true if manufacturer specific data is available; otherwise it is set to false.

Unsupported on all platforms at this time. Always return QByteArry();

quint8 minorDeviceClass ()

Returns the minor device class of the device.

QString name ()

Returns the name assigned to the device.

QBluetoothDeviceInfo & operator= (

Makes a copy of the other and assigns it to this QBluetoothDeviceInfo object.

bool operator== (

Returns true if the other QBluetoothDeviceInfo object and this are identical.

qint16 rssi ()

Returns the signal strength when the device was last scanned.

ServiceClasses serviceClasses ()

Returns the service class of the device.

QList< QBluetoothUuid > serviceUuids (

Returns the list of service UUIDS supported by the device.

If completeness is not 0 it will be set to DataComplete if the returned list is the complete list of UUIDs supported by the device. DataIncomplete if additional service UUIDs are supported by the device and DataUnavailable if no service UUID information is available.

This function requires both Bluetooth devices to support the 2.1 specification.

DataCompleteness serviceUuidsCompleteness ()

Returns the completeness of the service UUID list.

If DataComplete is returned then serviceUuids() will return a complete list of service UUIDs supported by the device. Otherwise serviceUuids() will only return a partial or empty list of service UUIDs. To get a full list of services supported by the device a full service discovery needs to be performed.

void setCached (
  • boolcached)

Used by the system to set the cached flag if the QBluetoothDeviceInfo is created from cached data.

Cached information may not be as accurate as data read from a live device.

void setManufacturerSpecificData (

Sets the manufacturer specific data returned by Extended Inquiry Responses to data.

Unsupported on all platforms at this time.

void setRssi (
  • qint16signal)

Set the signal strength value, used internally.

void setServiceUuids (

Sets the list of service UUIDs to uuids and the completeness of the data to completeness.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus