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 list of the types of services that the device might provide.

Constant

Value

Description

QBluetoothDeviceInfo::NoService

0x0000

The device does not provide any services.

QBluetoothDeviceInfo::PositioningService

0x0001

The device provides positioning services.

QBluetoothDeviceInfo::NetworkingService

0x0002

The device provides networking services.

QBluetoothDeviceInfo::RenderingService

0x0004

The device provides rendering services.

QBluetoothDeviceInfo::CapturingService

0x0008

The device provides capturing services.

QBluetoothDeviceInfo::ObjectTransferService

0x0010

The device provides object transfer services.

QBluetoothDeviceInfo::AudioService

0x0020

The device provides audio services.

QBluetoothDeviceInfo::TelephonyService

0x0040

The device provides telephony services.

QBluetoothDeviceInfo::InformationService

0x0080

The device provides information services.

QBluetoothDeviceInfo::AllServices

0x07ff

The device provides services of all types.

The ServiceClasses type is a typedef for QFlags<ServiceClass>. It stores an OR combination of ServiceClass values.

Constructs a QBluetoothDeviceInfo object with unique uuid, device name name and the encoded class of device classOfDevice.

This constructor is required for Low Energy devices on macOS and iOS. CoreBluetooth API hides addresses and provides unique UUIDs to identify a device. This UUID is not the same thing as a service UUID and is required to work later with CoreBluetooth API and discovered devices.

QBluetoothDeviceInfo::~QBluetoothDeviceInfo()

Note: On iOS and macOS this address is invalid. Instead deviceUuid() should be used. Those two platforms do not expose Bluetooth addresses for found Bluetooth devices and utilize unique device identifiers.

Returns a unique identifier for a Bluetooth device without an address.

In general, this uuid is invalid on every platform but macOS and iOS. It is used as a workaround for those two platforms as they do not provide Bluetooth addresses for found Bluetooth Low Energy devices. Every other platform uses address() instead.

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

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

Returns the completeness of the service UUID list. If DataComplete is returned, serviceUuids() returns the complete list of service UUIDs supported by the device, otherwise only the partial or empty list of service UUIDs. To get a list of all services supported by the device, a full service discovery needs to be performed.

void QBluetoothDeviceInfo::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 an active device.

Sets the unique identifier uuid for Bluetooth devices, that do not have addresses. This happens on macOS and iOS, where the CoreBluetooth API hides addresses, but provides UUIDs to identify devices/peripherals.