summaryrefslogtreecommitdiffstats
path: root/src/bluetooth
diff options
context:
space:
mode:
authorAndreas Buhr <andreas@andreasbuhr.de>2021-02-26 14:54:33 +0100
committerAndreas Buhr <andreas@andreasbuhr.de>2021-03-11 13:01:51 +0100
commit66bb9839dbccea311cbb85168da86fb6d4a2d136 (patch)
treec9b535e4de503c0a2e0f998203bb6f94fcddf3ce /src/bluetooth
parent61e2bab1d06f3f460f382f911bfd23edaef124e7 (diff)
Use scoped enum for constants in QBluetoothUuid
QBluetoothUuid contains enums for ProtocolUuid, ServiceClassUuid, CharacteristicType and DescriptorType. So far, they all put their constants directly into the QBluetoothUuid namespace, making it easy to mix them up. This patch changes those to scoped enums. That way, each enum has its items in its own namespace. Change-Id: I86ea08ff31009dc8073d84cfe678e27920d693f7 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth')
-rw-r--r--src/bluetooth/ApiChangesQt6.txt6
-rw-r--r--src/bluetooth/darwin/btcentralmanager.mm8
-rw-r--r--src/bluetooth/darwin/btperipheralmanager.mm6
-rw-r--r--src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp10
-rw-r--r--src/bluetooth/doc/src/bluetooth-le-overview.qdoc6
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp3
-rw-r--r--src/bluetooth/qbluetoothserver.cpp10
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent.cpp2
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_android.cpp15
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp8
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_winrt.cpp4
-rw-r--r--src/bluetooth/qbluetoothserviceinfo.cpp8
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_android.cpp2
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_macos.mm8
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_winrt.cpp2
-rw-r--r--src/bluetooth/qbluetoothsocket_bluez.cpp2
-rw-r--r--src/bluetooth/qbluetoothsocket_bluezdbus.cpp4
-rw-r--r--src/bluetooth/qbluetoothsocket_win.cpp2
-rw-r--r--src/bluetooth/qbluetoothsocket_winrt.cpp2
-rw-r--r--src/bluetooth/qbluetoothuuid.cpp528
-rw-r--r--src/bluetooth/qbluetoothuuid.h17
-rw-r--r--src/bluetooth/qlowenergycontroller_bluez.cpp30
-rw-r--r--src/bluetooth/qlowenergycontroller_bluezdbus.cpp26
-rw-r--r--src/bluetooth/qlowenergycontroller_darwin.mm2
-rw-r--r--src/bluetooth/qlowenergycontroller_win.cpp14
-rw-r--r--src/bluetooth/qlowenergycontroller_winrt.cpp12
-rw-r--r--src/bluetooth/qlowenergycontroller_winrt_new.cpp12
-rw-r--r--src/bluetooth/qlowenergydescriptor.cpp24
-rw-r--r--src/bluetooth/qlowenergyservice.cpp6
29 files changed, 392 insertions, 387 deletions
diff --git a/src/bluetooth/ApiChangesQt6.txt b/src/bluetooth/ApiChangesQt6.txt
index e6b22da8..8d220bae 100644
--- a/src/bluetooth/ApiChangesQt6.txt
+++ b/src/bluetooth/ApiChangesQt6.txt
@@ -37,6 +37,12 @@ QLowEnergyService
- Renamed DiscoveringServices enum value to DiscoveringService. This properly relfects the fact that
only one service is being discovered at a given time.
+QBluetoothUuid
+--------------
+
+ - enums ProtocolUuid, ServiceClassUuid, CharacteristicType, and DescriptorType are now scoped enums.
+ Usage of enum items has to be adapted in user code.
+
QLowEnergyController
--------------------
diff --git a/src/bluetooth/darwin/btcentralmanager.mm b/src/bluetooth/darwin/btcentralmanager.mm
index d373bc80..2a3deb3c 100644
--- a/src/bluetooth/darwin/btcentralmanager.mm
+++ b/src/bluetooth/darwin/btcentralmanager.mm
@@ -683,7 +683,7 @@ QT_USE_NAMESPACE
newDesc.value = qt_bytearray(static_cast<NSObject *>(d.value));
descList[lastValidHandle] = newDesc;
// Check, if it's client characteristic configuration descriptor:
- if (newDesc.uuid == QBluetoothUuid::ClientCharacteristicConfiguration) {
+ if (newDesc.uuid == QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration) {
if (newDesc.value.size() && (newDesc.value[0] & 3))
[peripheral setNotifyValue:YES forCharacteristic:c];
}
@@ -807,7 +807,7 @@ QT_USE_NAMESPACE
CBCharacteristic *const characteristic = charMap[request.handle];
if (request.type == LERequest::ClientConfiguration) {
- const QBluetoothUuid qtUuid(QBluetoothUuid::ClientCharacteristicConfiguration);
+ const QBluetoothUuid qtUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
CBDescriptor *const descriptor = [self descriptor:qtUuid forCharacteristic:characteristic];
Q_ASSERT_X(descriptor, Q_FUNC_INFO, "no client characteristic "
"configuration descriptor found");
@@ -868,7 +868,7 @@ QT_USE_NAMESPACE
// At the moment we call setNotifyValue _only_ from 'writeDescriptor';
// from Qt's API POV it's a descriptor write operation and we must report
// it back, so check _now_ that we really have this descriptor.
- const QBluetoothUuid qtUuid(QBluetoothUuid::ClientCharacteristicConfiguration);
+ const QBluetoothUuid qtUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
if (![self descriptor:qtUuid forCharacteristic:charMap[charHandle]]) {
qCWarning(QT_BT_DARWIN) << "no client characteristic configuration found";
if (notifier) {
@@ -1809,7 +1809,7 @@ QT_USE_NAMESPACE
requestPending = false;
- const QBluetoothUuid qtUuid(QBluetoothUuid::ClientCharacteristicConfiguration);
+ const QBluetoothUuid qtUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
CBDescriptor *const descriptor = [self descriptor:qtUuid forCharacteristic:characteristic];
const QByteArray valueToReport(valuesToWrite.value(descriptor, QByteArray()));
const int nRemoved = valuesToWrite.remove(descriptor);
diff --git a/src/bluetooth/darwin/btperipheralmanager.mm b/src/bluetooth/darwin/btperipheralmanager.mm
index 39d4b4ac..af435c61 100644
--- a/src/bluetooth/darwin/btperipheralmanager.mm
+++ b/src/bluetooth/darwin/btperipheralmanager.mm
@@ -105,8 +105,8 @@ ObjCStrongReference<CBMutableDescriptor> create_descriptor(const QLowEnergyDescr
CBUUIDCharacteristicUserDescriptionString and CBUUIDCharacteristicFormatString"
*/
- if (data.uuid() != QBluetoothUuid::CharacteristicUserDescription &&
- data.uuid() != QBluetoothUuid::CharacteristicPresentationFormat) {
+ if (data.uuid() != QBluetoothUuid::DescriptorType::CharacteristicUserDescription &&
+ data.uuid() != QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat) {
qCWarning(QT_BT_DARWIN) << "unsupported descriptor" << data.uuid();
return {};
}
@@ -116,7 +116,7 @@ ObjCStrongReference<CBMutableDescriptor> create_descriptor(const QLowEnergyDescr
// Descriptors are immutable with CoreBluetooth, that's why we
// have to provide a value here and not able to change it later.
ObjCStrongReference<NSObject> value;
- if (data.uuid() == QBluetoothUuid::CharacteristicUserDescription) {
+ if (data.uuid() == QBluetoothUuid::DescriptorType::CharacteristicUserDescription) {
const QString asQString(QString::fromUtf8(data.value()));
value.reset(asQString.toNSString(), RetainPolicy::doInitialRetain); // toNSString is auto-released, we have to retain.
} else {
diff --git a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
index 870f7cdf..a571de32 100644
--- a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
+++ b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
@@ -170,8 +170,8 @@ void MyClass::btleSharedData()
// waiting for connection
- first = control.createServiceObject(QBluetoothUuid::BatteryService);
- second = control.createServiceObject(QBluetoothUuid::BatteryService);
+ first = control.createServiceObject(QBluetoothUuid::ServiceClassUuid::BatteryService);
+ second = control.createServiceObject(QBluetoothUuid::ServiceClassUuid::BatteryService);
Q_ASSERT(first->state() == QLowEnergyService::DiscoveryRequired);
Q_ASSERT(first->state() == second->state());
@@ -190,7 +190,7 @@ void MyClass::enableCharNotifications()
control->connectToDevice();
- service = control->createServiceObject(QBluetoothUuid::BatteryService, this);
+ service = control->createServiceObject(QBluetoothUuid::ServiceClassUuid::BatteryService, this);
if (!service)
return;
@@ -201,12 +201,12 @@ void MyClass::enableCharNotifications()
//! [enable_btle_notifications]
//PreCondition: service details already discovered
QLowEnergyCharacteristic batteryLevel = service->characteristic(
- QBluetoothUuid::BatteryLevel);
+ QBluetoothUuid::CharacteristicType::BatteryLevel);
if (!batteryLevel.isValid())
return;
QLowEnergyDescriptor notification = batteryLevel.descriptor(
- QBluetoothUuid::ClientCharacteristicConfiguration);
+ QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
if (!notification.isValid())
return;
diff --git a/src/bluetooth/doc/src/bluetooth-le-overview.qdoc b/src/bluetooth/doc/src/bluetooth-le-overview.qdoc
index aa89745a..7b83316d 100644
--- a/src/bluetooth/doc/src/bluetooth-le-overview.qdoc
+++ b/src/bluetooth/doc/src/bluetooth-le-overview.qdoc
@@ -203,7 +203,7 @@ Low Energy devices.
The \c serviceDiscovered() slot below is triggered as a result of the
\l {QLowEnergyController::serviceDiscovered()} signal and provides an intermittent progress report.
Since we are talking about the heart listener app which monitors HeartRate devices in the vicinity
- we ignore any service that is not of type \l QBluetoothUuid::HeartRate.
+ we ignore any service that is not of type \l QBluetoothUuid::ServiceClassUuid::HeartRate.
\snippet heartrate-game/devicehandler.cpp Filter HeartRate service 1
@@ -225,12 +225,12 @@ Low Energy devices.
\section2 Interaction with the Peripheral Device
In the code example above, the desired characteristic is of type
- \l {QBluetoothUuid::HeartRateMeasurement}{HeartRateMeasurement}. Since the application measures
+ \l {QBluetoothUuid::CharacteristicType::HeartRateMeasurement}{HeartRateMeasurement}. Since the application measures
the heart rate changes, it must enable change notifications for the characteristic.
Note that not all characteristics provide change notifications. Since the HeartRate characteristic
has been standardized it is possible to assume that notifications can be received. Ultimately
\l QLowEnergyCharacteristic::properties() must have the \l {QLowEnergyCharacteristic::Notify} flag
- set and a descriptor of type \l {QBluetoothUuid::ClientCharacteristicConfiguration} must exist to confirm
+ set and a descriptor of type \l {QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration} must exist to confirm
the availability of an appropriate notification.
Finally, we process the value of the HeartRate characteristic, as per Bluetooth Low Energy standard:
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
index d650a49a..ea13dca3 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
@@ -439,7 +439,8 @@ static QBluetoothDeviceInfo createDeviceInfoFromBluez5Device(const QVariantMap&
//once we found one BTLE service we are done
bool ok = false;
quint16 shortId = id.toUInt16(&ok);
- if (ok && ((shortId & QBluetoothUuid::GenericAccess) == QBluetoothUuid::GenericAccess))
+ quint16 genericAccessInt = static_cast<quint16>(QBluetoothUuid::ServiceClassUuid::GenericAccess);
+ if (ok && ((shortId & genericAccessInt) == genericAccessInt))
foundLikelyLowEnergyUuid = true;
}
uuids.append(id);
diff --git a/src/bluetooth/qbluetoothserver.cpp b/src/bluetooth/qbluetoothserver.cpp
index daed5dc2..a9ffabbd 100644
--- a/src/bluetooth/qbluetoothserver.cpp
+++ b/src/bluetooth/qbluetoothserver.cpp
@@ -212,13 +212,13 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const
QBluetoothServiceInfo serviceInfo;
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceName, serviceName);
QBluetoothServiceInfo::Sequence browseSequence;
- browseSequence << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ browseSequence << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ServiceClassUuid::PublicBrowseGroup));
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList,
browseSequence);
QBluetoothServiceInfo::Sequence profileSequence;
QBluetoothServiceInfo::Sequence classId;
- classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ServiceClassUuid::SerialPort));
classId << QVariant::fromValue(quint16(0x100));
profileSequence.append(QVariant::fromValue(classId));
serviceInfo.setAttribute(QBluetoothServiceInfo::BluetoothProfileDescriptorList,
@@ -227,13 +227,13 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const
classId.clear();
//Android requires custom uuid to be set as service class
classId << QVariant::fromValue(uuid);
- classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ServiceClassUuid::SerialPort));
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId);
serviceInfo.setServiceUuid(uuid);
QBluetoothServiceInfo::Sequence protocolDescriptorList;
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::L2cap));
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::L2cap));
if (d->serverType == QBluetoothServiceInfo::L2capProtocol)
protocol << QVariant::fromValue(serverPort());
protocolDescriptorList.append(QVariant::fromValue(protocol));
@@ -241,7 +241,7 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const
//! [listen]
if (d->serverType == QBluetoothServiceInfo::RfcommProtocol) {
//! [listen2]
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Rfcomm))
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::Rfcomm))
<< QVariant::fromValue(quint8(serverPort()));
protocolDescriptorList.append(QVariant::fromValue(protocol));
//! [listen2]
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent.cpp b/src/bluetooth/qbluetoothservicediscoveryagent.cpp
index f50aa45b..3b89b4f6 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent.cpp
@@ -231,7 +231,7 @@ QList<QBluetoothServiceInfo> QBluetoothServiceDiscoveryAgent::discoveredServices
\l {QBluetoothServiceInfo::ServiceId}{ServiceId} and \l {QBluetoothServiceInfo::ServiceClassIds} {ServiceClassIds}
attributes.
- An empty UUID list is equivalent to a list containing only QBluetoothUuid::PublicBrowseGroup.
+ An empty UUID list is equivalent to a list containing only QBluetoothUuid::ServiceClassUuid::PublicBrowseGroup.
\sa uuidFilter()
*/
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
index 4244e1e4..57daa6b6 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
@@ -365,8 +365,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
//check for SPP protocol
bool ok = false;
- auto uuid16 = uuid.toUInt16(&ok);
- haveSppClass |= ok && uuid16 == QBluetoothUuid::SerialPort;
+ haveSppClass |= ok && uuid == QBluetoothUuid::ServiceClassUuid::SerialPort;
//check for custom uuid
if (uuid.minimumSize() == 16)
@@ -375,7 +374,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
auto rfcommProtocolDescriptorList = []() -> QBluetoothServiceInfo::Sequence {
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Rfcomm))
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::Rfcomm))
<< QVariant::fromValue(0);
return protocol;
};
@@ -383,7 +382,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
auto sppProfileDescriptorList = []() -> QBluetoothServiceInfo::Sequence {
QBluetoothServiceInfo::Sequence profileSequence;
QBluetoothServiceInfo::Sequence classId;
- classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ServiceClassUuid::SerialPort));
classId << QVariant::fromValue(quint16(0x100));
profileSequence.append(QVariant::fromValue(classId));
return profileSequence;
@@ -400,7 +399,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
QBluetoothServiceInfo::Sequence protocolDescriptorList;
{
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::L2cap));
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::L2cap));
protocolDescriptorList.append(QVariant::fromValue(protocol));
}
@@ -417,12 +416,12 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
QBluetoothServiceInfo::Sequence classId;
//set SPP service class uuid
classId << QVariant::fromValue(uuid);
- classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ServiceClassUuid::SerialPort));
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId);
serviceInfo.setServiceName(QBluetoothServiceDiscoveryAgent::tr("Serial Port Profile"));
serviceInfo.setServiceUuid(uuid);
- } else if (uuid == QBluetoothUuid{QBluetoothUuid::SerialPort}) {
+ } else if (uuid == QBluetoothUuid{QBluetoothUuid::ServiceClassUuid::SerialPort}) {
//set rfcomm protocol
protocolDescriptorList.append(QVariant::fromValue(rfcommProtocolDescriptorList()));
@@ -440,7 +439,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
serviceInfo.setAttribute(QBluetoothServiceInfo::ProtocolDescriptorList, protocolDescriptorList);
QBluetoothServiceInfo::Sequence publicBrowse;
- publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ServiceClassUuid::PublicBrowseGroup));
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, publicBrowse);
if (!customUuids.contains(i)) {
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
index f0cade13..8f591288 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
@@ -515,12 +515,12 @@ void QBluetoothServiceDiscoveryAgentPrivate::discoverServices(const QString &dev
QBluetoothServiceInfo::Sequence protocolDescriptorList;
{
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::L2cap));
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::L2cap));
protocolDescriptorList.append(QVariant::fromValue(protocol));
}
{
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Att));
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::Att));
protocolDescriptorList.append(QVariant::fromValue(protocol));
}
service.setAttribute(QBluetoothServiceInfo::ProtocolDescriptorList, protocolDescriptorList);
@@ -743,12 +743,12 @@ void QBluetoothServiceDiscoveryAgentPrivate::performMinimalServiceDiscovery(cons
QBluetoothServiceInfo::Sequence protocolDescriptorList;
{
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::L2cap));
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::L2cap));
protocolDescriptorList.append(QVariant::fromValue(protocol));
}
{
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Att));
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::Att));
protocolDescriptorList.append(QVariant::fromValue(protocol));
}
serviceInfo.setAttribute(QBluetoothServiceInfo::ProtocolDescriptorList, protocolDescriptorList);
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_winrt.cpp
index a51bbe03..a62058cd 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_winrt.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_winrt.cpp
@@ -331,10 +331,10 @@ void QWinRTBluetoothServiceDiscoveryWorker::processServiceSearchResult(quint64 a
// Windows is only able to discover Rfcomm services but the according protocolDescriptor is
// not always set in the raw attribute map. If we encounter a service like that we should
// fill the protocol descriptor ourselves.
- if (info.protocolDescriptor(QBluetoothUuid::Rfcomm).isEmpty()) {
+ if (info.protocolDescriptor(QBluetoothUuid::ProtocolUuid::Rfcomm).isEmpty()) {
QBluetoothServiceInfo::Sequence protocolDescriptorList;
QBluetoothServiceInfo::Sequence protocol;
- protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Rfcomm))
+ protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::ProtocolUuid::Rfcomm))
<< QVariant::fromValue(0);
protocolDescriptorList.append(QVariant::fromValue(protocol));
info.setAttribute(QBluetoothServiceInfo::ProtocolDescriptorList, protocolDescriptorList);
diff --git a/src/bluetooth/qbluetoothserviceinfo.cpp b/src/bluetooth/qbluetoothserviceinfo.cpp
index be2c010d..44c75d8f 100644
--- a/src/bluetooth/qbluetoothserviceinfo.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo.cpp
@@ -469,11 +469,11 @@ void QBluetoothServiceInfo::removeAttribute(quint16 attributeId)
*/
QBluetoothServiceInfo::Protocol QBluetoothServiceInfo::socketProtocol() const
{
- QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::Rfcomm);
+ QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::ProtocolUuid::Rfcomm);
if (!parameters.isEmpty())
return RfcommProtocol;
- parameters = protocolDescriptor(QBluetoothUuid::L2cap);
+ parameters = protocolDescriptor(QBluetoothUuid::ProtocolUuid::L2cap);
if (!parameters.isEmpty())
return L2capProtocol;
@@ -490,7 +490,7 @@ QBluetoothServiceInfo::Protocol QBluetoothServiceInfo::socketProtocol() const
*/
int QBluetoothServiceInfo::protocolServiceMultiplexer() const
{
- QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::L2cap);
+ QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::ProtocolUuid::L2cap);
if (parameters.isEmpty())
return -1;
@@ -670,7 +670,7 @@ QBluetoothServiceInfo::Sequence QBluetoothServiceInfoPrivate::protocolDescriptor
int QBluetoothServiceInfoPrivate::serverChannel() const
{
- QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::Rfcomm);
+ QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::ProtocolUuid::Rfcomm);
if (parameters.isEmpty())
return -1;
diff --git a/src/bluetooth/qbluetoothserviceinfo_android.cpp b/src/bluetooth/qbluetoothserviceinfo_android.cpp
index b0193f73..36a6f82f 100644
--- a/src/bluetooth/qbluetoothserviceinfo_android.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_android.cpp
@@ -112,7 +112,7 @@ bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress& loca
if (registered)
return false;
- if (protocolDescriptor(QBluetoothUuid::Rfcomm).isEmpty()) {
+ if (protocolDescriptor(QBluetoothUuid::ProtocolUuid::Rfcomm).isEmpty()) {
qCWarning(QT_BT_ANDROID) << Q_FUNC_INFO << "Only RFCOMM services can be registered on Android";
return false;
}
diff --git a/src/bluetooth/qbluetoothserviceinfo_macos.mm b/src/bluetooth/qbluetoothserviceinfo_macos.mm
index b73ae55f..522b5187 100644
--- a/src/bluetooth/qbluetoothserviceinfo_macos.mm
+++ b/src/bluetooth/qbluetoothserviceinfo_macos.mm
@@ -66,11 +66,11 @@ using ServiceInfo = QBluetoothServiceInfo;
// I need these getters duplicated here:
ServiceInfo::Protocol socket_protocol(const QBluetoothServiceInfoPrivate &privateInfo)
{
- ServiceInfo::Sequence parameters = privateInfo.protocolDescriptor(QBluetoothUuid::Rfcomm);
+ ServiceInfo::Sequence parameters = privateInfo.protocolDescriptor(QBluetoothUuid::ProtocolUuid::Rfcomm);
if (!parameters.isEmpty())
return ServiceInfo::RfcommProtocol;
- parameters = privateInfo.protocolDescriptor(QBluetoothUuid::L2cap);
+ parameters = privateInfo.protocolDescriptor(QBluetoothUuid::ProtocolUuid::L2cap);
if (!parameters.isEmpty())
return ServiceInfo::L2capProtocol;
@@ -196,9 +196,9 @@ bool QBluetoothServiceInfoPrivate::unregisterService()
const QMutexLocker lock(&QBluetoothServerPrivate::channelMapMutex());
if (type == ServiceInfo::RfcommProtocol)
- server = QBluetoothServerPrivate::registeredServer(channel_or_psm(*this, QBluetoothUuid::Rfcomm), type);
+ server = QBluetoothServerPrivate::registeredServer(channel_or_psm(*this, QBluetoothUuid::ProtocolUuid::Rfcomm), type);
else if (type == ServiceInfo::L2capProtocol)
- server = QBluetoothServerPrivate::registeredServer(channel_or_psm(*this, QBluetoothUuid::L2cap), type);
+ server = QBluetoothServerPrivate::registeredServer(channel_or_psm(*this, QBluetoothUuid::ProtocolUuid::L2cap), type);
if (server)
server->stopListener();
diff --git a/src/bluetooth/qbluetoothserviceinfo_winrt.cpp b/src/bluetooth/qbluetoothserviceinfo_winrt.cpp
index f232e29e..43000456 100644
--- a/src/bluetooth/qbluetoothserviceinfo_winrt.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_winrt.cpp
@@ -439,7 +439,7 @@ bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress &loca
if (registered)
return false;
- if (protocolDescriptor(QBluetoothUuid::Rfcomm).isEmpty()) {
+ if (protocolDescriptor(QBluetoothUuid::ProtocolUuid::Rfcomm).isEmpty()) {
qCWarning(QT_BT_WINRT) << Q_FUNC_INFO << "Only RFCOMM services can be registered on WinRT";
return false;
}
diff --git a/src/bluetooth/qbluetoothsocket_bluez.cpp b/src/bluetooth/qbluetoothsocket_bluez.cpp
index 0eb19511..92cf1399 100644
--- a/src/bluetooth/qbluetoothsocket_bluez.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluez.cpp
@@ -252,7 +252,7 @@ void QBluetoothSocketPrivateBluez::connectToService(
} else {
// try doing service discovery to see if we can find the socket
if (service.serviceUuid().isNull()
- && !service.serviceClassUuids().contains(QBluetoothUuid::SerialPort)) {
+ && !service.serviceClassUuids().contains(QBluetoothUuid::ServiceClassUuid::SerialPort)) {
qCWarning(QT_BT_BLUEZ) << "No port, no PSM, and no UUID provided. Unable to connect";
return;
}
diff --git a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
index 32c8d595..c4a39650 100644
--- a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
@@ -272,8 +272,8 @@ void QBluetoothSocketPrivateBluezDBus::connectToService(
targetService = service.serviceUuid();
if (targetService.isNull()) {
// Do we have serialport service class?
- if (service.serviceClassUuids().contains(QBluetoothUuid::SerialPort))
- targetService = QBluetoothUuid::SerialPort;
+ if (service.serviceClassUuids().contains(QBluetoothUuid::ServiceClassUuid::SerialPort))
+ targetService = QBluetoothUuid::ServiceClassUuid::SerialPort;
}
if (targetService.isNull()) {
diff --git a/src/bluetooth/qbluetoothsocket_win.cpp b/src/bluetooth/qbluetoothsocket_win.cpp
index 83855323..1d4ec3fb 100644
--- a/src/bluetooth/qbluetoothsocket_win.cpp
+++ b/src/bluetooth/qbluetoothsocket_win.cpp
@@ -173,7 +173,7 @@ void QBluetoothSocketPrivateWin::connectToService(
} else {
// try doing service discovery to see if we can find the socket
if (service.serviceUuid().isNull()
- && !service.serviceClassUuids().contains(QBluetoothUuid::SerialPort)) {
+ && !service.serviceClassUuids().contains(QBluetoothUuid::ServiceClassUuid::SerialPort)) {
qCWarning(QT_BT_WINDOWS) << "No port, no PSM, and no UUID provided. Unable to connect";
return;
}
diff --git a/src/bluetooth/qbluetoothsocket_winrt.cpp b/src/bluetooth/qbluetoothsocket_winrt.cpp
index b1878261..d6806916 100644
--- a/src/bluetooth/qbluetoothsocket_winrt.cpp
+++ b/src/bluetooth/qbluetoothsocket_winrt.cpp
@@ -466,7 +466,7 @@ void QBluetoothSocketPrivateWinRT::connectToService(
} else {
// try doing service discovery to see if we can find the socket
if (service.serviceUuid().isNull()
- && !service.serviceClassUuids().contains(QBluetoothUuid::SerialPort)) {
+ && !service.serviceClassUuids().contains(QBluetoothUuid::ServiceClassUuid::SerialPort)) {
qCWarning(QT_BT_WINRT) << "No port, no PSM, and no UUID provided. Unable to connect";
return;
}
diff --git a/src/bluetooth/qbluetoothuuid.cpp b/src/bluetooth/qbluetoothuuid.cpp
index 6134f7a9..29e316ba 100644
--- a/src/bluetooth/qbluetoothuuid.cpp
+++ b/src/bluetooth/qbluetoothuuid.cpp
@@ -707,98 +707,98 @@ quint128 QBluetoothUuid::toUInt128() const
QString QBluetoothUuid::serviceClassToString(QBluetoothUuid::ServiceClassUuid uuid)
{
switch (uuid) {
- case QBluetoothUuid::ServiceDiscoveryServer: return QBluetoothServiceDiscoveryAgent::tr("Service Discovery");
- case QBluetoothUuid::BrowseGroupDescriptor: return QBluetoothServiceDiscoveryAgent::tr("Browse Group Descriptor");
- case QBluetoothUuid::PublicBrowseGroup: return QBluetoothServiceDiscoveryAgent::tr("Public Browse Group");
- case QBluetoothUuid::SerialPort: return QBluetoothServiceDiscoveryAgent::tr("Serial Port Profile");
- case QBluetoothUuid::LANAccessUsingPPP: return QBluetoothServiceDiscoveryAgent::tr("LAN Access Profile");
- case QBluetoothUuid::DialupNetworking: return QBluetoothServiceDiscoveryAgent::tr("Dial-Up Networking");
- case QBluetoothUuid::IrMCSync: return QBluetoothServiceDiscoveryAgent::tr("Synchronization");
- case QBluetoothUuid::ObexObjectPush: return QBluetoothServiceDiscoveryAgent::tr("Object Push");
- case QBluetoothUuid::OBEXFileTransfer: return QBluetoothServiceDiscoveryAgent::tr("File Transfer");
- case QBluetoothUuid::IrMCSyncCommand: return QBluetoothServiceDiscoveryAgent::tr("Synchronization Command");
- case QBluetoothUuid::Headset: return QBluetoothServiceDiscoveryAgent::tr("Headset");
- case QBluetoothUuid::AudioSource: return QBluetoothServiceDiscoveryAgent::tr("Audio Source");
- case QBluetoothUuid::AudioSink: return QBluetoothServiceDiscoveryAgent::tr("Audio Sink");
- case QBluetoothUuid::AV_RemoteControlTarget: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Remote Control Target");
- case QBluetoothUuid::AdvancedAudioDistribution: return QBluetoothServiceDiscoveryAgent::tr("Advanced Audio Distribution");
- case QBluetoothUuid::AV_RemoteControl: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Remote Control");
- case QBluetoothUuid::AV_RemoteControlController: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Remote Control Controller");
- case QBluetoothUuid::HeadsetAG: return QBluetoothServiceDiscoveryAgent::tr("Headset AG");
- case QBluetoothUuid::PANU: return QBluetoothServiceDiscoveryAgent::tr("Personal Area Networking (PANU)");
- case QBluetoothUuid::NAP: return QBluetoothServiceDiscoveryAgent::tr("Personal Area Networking (NAP)");
- case QBluetoothUuid::GN: return QBluetoothServiceDiscoveryAgent::tr("Personal Area Networking (GN)");
- case QBluetoothUuid::DirectPrinting: return QBluetoothServiceDiscoveryAgent::tr("Basic Direct Printing (BPP)");
- case QBluetoothUuid::ReferencePrinting: return QBluetoothServiceDiscoveryAgent::tr("Basic Reference Printing (BPP)");
- case QBluetoothUuid::BasicImage: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Profile");
- case QBluetoothUuid::ImagingResponder: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Responder");
- case QBluetoothUuid::ImagingAutomaticArchive: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Archive");
- case QBluetoothUuid::ImagingReferenceObjects: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Ref Objects");
- case QBluetoothUuid::Handsfree: return QBluetoothServiceDiscoveryAgent::tr("Hands-Free");
- case QBluetoothUuid::HandsfreeAudioGateway: return QBluetoothServiceDiscoveryAgent::tr("Hands-Free AG");
- case QBluetoothUuid::DirectPrintingReferenceObjectsService: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing RefObject Service");
- case QBluetoothUuid::ReflectedUI: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing Reflected UI");
- case QBluetoothUuid::BasicPrinting: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing");
- case QBluetoothUuid::PrintingStatus: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing Status");
- case QBluetoothUuid::HumanInterfaceDeviceService: return QBluetoothServiceDiscoveryAgent::tr("Human Interface Device");
- case QBluetoothUuid::HardcopyCableReplacement: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Cable Replacement");
- case QBluetoothUuid::HCRPrint: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Cable Replacement Print");
- case QBluetoothUuid::HCRScan: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Cable Replacement Scan");
- case QBluetoothUuid::SIMAccess: return QBluetoothServiceDiscoveryAgent::tr("SIM Access Server");
- case QBluetoothUuid::PhonebookAccessPCE: return QBluetoothServiceDiscoveryAgent::tr("Phonebook Access PCE");
- case QBluetoothUuid::PhonebookAccessPSE: return QBluetoothServiceDiscoveryAgent::tr("Phonebook Access PSE");
- case QBluetoothUuid::PhonebookAccess: return QBluetoothServiceDiscoveryAgent::tr("Phonebook Access");
- case QBluetoothUuid::HeadsetHS: return QBluetoothServiceDiscoveryAgent::tr("Headset HS");
- case QBluetoothUuid::MessageAccessServer: return QBluetoothServiceDiscoveryAgent::tr("Message Access Server");
- case QBluetoothUuid::MessageNotificationServer: return QBluetoothServiceDiscoveryAgent::tr("Message Notification Server");
- case QBluetoothUuid::MessageAccessProfile: return QBluetoothServiceDiscoveryAgent::tr("Message Access");
- case QBluetoothUuid::GNSS: return QBluetoothServiceDiscoveryAgent::tr("Global Navigation Satellite System");
- case QBluetoothUuid::GNSSServer: return QBluetoothServiceDiscoveryAgent::tr("Global Navigation Satellite System Server");
- case QBluetoothUuid::Display3D: return QBluetoothServiceDiscoveryAgent::tr("3D Synchronization Display");
- case QBluetoothUuid::Glasses3D: return QBluetoothServiceDiscoveryAgent::tr("3D Synchronization Glasses");
- case QBluetoothUuid::Synchronization3D: return QBluetoothServiceDiscoveryAgent::tr("3D Synchronization");
- case QBluetoothUuid::MPSProfile: return QBluetoothServiceDiscoveryAgent::tr("Multi-Profile Specification (Profile)");
- case QBluetoothUuid::MPSService: return QBluetoothServiceDiscoveryAgent::tr("Multi-Profile Specification");
- case QBluetoothUuid::PnPInformation: return QBluetoothServiceDiscoveryAgent::tr("Device Identification");
- case QBluetoothUuid::GenericNetworking: return QBluetoothServiceDiscoveryAgent::tr("Generic Networking");
- case QBluetoothUuid::GenericFileTransfer: return QBluetoothServiceDiscoveryAgent::tr("Generic File Transfer");
- case QBluetoothUuid::GenericAudio: return QBluetoothServiceDiscoveryAgent::tr("Generic Audio");
- case QBluetoothUuid::GenericTelephony: return QBluetoothServiceDiscoveryAgent::tr("Generic Telephony");
- case QBluetoothUuid::VideoSource: return QBluetoothServiceDiscoveryAgent::tr("Video Source");
- case QBluetoothUuid::VideoSink: return QBluetoothServiceDiscoveryAgent::tr("Video Sink");
- case QBluetoothUuid::VideoDistribution: return QBluetoothServiceDiscoveryAgent::tr("Video Distribution");
- case QBluetoothUuid::HDP: return QBluetoothServiceDiscoveryAgent::tr("Health Device");
- case QBluetoothUuid::HDPSource: return QBluetoothServiceDiscoveryAgent::tr("Health Device Source");
- case QBluetoothUuid::HDPSink: return QBluetoothServiceDiscoveryAgent::tr("Health Device Sink");
- case QBluetoothUuid::GenericAccess: return QBluetoothServiceDiscoveryAgent::tr("Generic Access");
- case QBluetoothUuid::GenericAttribute: return QBluetoothServiceDiscoveryAgent::tr("Generic Attribute");
- case QBluetoothUuid::ImmediateAlert: return QBluetoothServiceDiscoveryAgent::tr("Immediate Alert");
- case QBluetoothUuid::LinkLoss: return QBluetoothServiceDiscoveryAgent::tr("Link Loss");
- case QBluetoothUuid::TxPower: return QBluetoothServiceDiscoveryAgent::tr("Tx Power");
- case QBluetoothUuid::CurrentTimeService: return QBluetoothServiceDiscoveryAgent::tr("Current Time Service");
- case QBluetoothUuid::ReferenceTimeUpdateService: return QBluetoothServiceDiscoveryAgent::tr("Reference Time Update Service");
- case QBluetoothUuid::NextDSTChangeService: return QBluetoothServiceDiscoveryAgent::tr("Next DST Change Service");
- case QBluetoothUuid::Glucose: return QBluetoothServiceDiscoveryAgent::tr("Glucose");
- case QBluetoothUuid::HealthThermometer: return QBluetoothServiceDiscoveryAgent::tr("Health Thermometer");
- case QBluetoothUuid::DeviceInformation: return QBluetoothServiceDiscoveryAgent::tr("Device Information");
- case QBluetoothUuid::HeartRate: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate");
- case QBluetoothUuid::PhoneAlertStatusService: return QBluetoothServiceDiscoveryAgent::tr("Phone Alert Status Service");
- case QBluetoothUuid::BatteryService: return QBluetoothServiceDiscoveryAgent::tr("Battery Service");
- case QBluetoothUuid::BloodPressure: return QBluetoothServiceDiscoveryAgent::tr("Blood Pressure");
- case QBluetoothUuid::AlertNotificationService: return QBluetoothServiceDiscoveryAgent::tr("Alert Notification Service");
- case QBluetoothUuid::HumanInterfaceDevice: return QBluetoothServiceDiscoveryAgent::tr("Human Interface Device");
- case QBluetoothUuid::ScanParameters: return QBluetoothServiceDiscoveryAgent::tr("Scan Parameters");
- case QBluetoothUuid::RunningSpeedAndCadence: return QBluetoothServiceDiscoveryAgent::tr("Running Speed and Cadence");
- case QBluetoothUuid::CyclingSpeedAndCadence: return QBluetoothServiceDiscoveryAgent::tr("Cycling Speed and Cadence");
- case QBluetoothUuid::CyclingPower: return QBluetoothServiceDiscoveryAgent::tr("Cycling Power");
- case QBluetoothUuid::LocationAndNavigation: return QBluetoothServiceDiscoveryAgent::tr("Location and Navigation");
- case QBluetoothUuid::EnvironmentalSensing: return QBluetoothServiceDiscoveryAgent::tr("Environmental Sensing");
- case QBluetoothUuid::BodyComposition: return QBluetoothServiceDiscoveryAgent::tr("Body Composition");
- case QBluetoothUuid::UserData: return QBluetoothServiceDiscoveryAgent::tr("User Data");
- case QBluetoothUuid::WeightScale: return QBluetoothServiceDiscoveryAgent::tr("Weight Scale");
+ case QBluetoothUuid::ServiceClassUuid::ServiceDiscoveryServer: return QBluetoothServiceDiscoveryAgent::tr("Service Discovery");
+ case QBluetoothUuid::ServiceClassUuid::BrowseGroupDescriptor: return QBluetoothServiceDiscoveryAgent::tr("Browse Group Descriptor");
+ case QBluetoothUuid::ServiceClassUuid::PublicBrowseGroup: return QBluetoothServiceDiscoveryAgent::tr("Public Browse Group");
+ case QBluetoothUuid::ServiceClassUuid::SerialPort: return QBluetoothServiceDiscoveryAgent::tr("Serial Port Profile");
+ case QBluetoothUuid::ServiceClassUuid::LANAccessUsingPPP: return QBluetoothServiceDiscoveryAgent::tr("LAN Access Profile");
+ case QBluetoothUuid::ServiceClassUuid::DialupNetworking: return QBluetoothServiceDiscoveryAgent::tr("Dial-Up Networking");
+ case QBluetoothUuid::ServiceClassUuid::IrMCSync: return QBluetoothServiceDiscoveryAgent::tr("Synchronization");
+ case QBluetoothUuid::ServiceClassUuid::ObexObjectPush: return QBluetoothServiceDiscoveryAgent::tr("Object Push");
+ case QBluetoothUuid::ServiceClassUuid::OBEXFileTransfer: return QBluetoothServiceDiscoveryAgent::tr("File Transfer");
+ case QBluetoothUuid::ServiceClassUuid::IrMCSyncCommand: return QBluetoothServiceDiscoveryAgent::tr("Synchronization Command");
+ case QBluetoothUuid::ServiceClassUuid::Headset: return QBluetoothServiceDiscoveryAgent::tr("Headset");
+ case QBluetoothUuid::ServiceClassUuid::AudioSource: return QBluetoothServiceDiscoveryAgent::tr("Audio Source");
+ case QBluetoothUuid::ServiceClassUuid::AudioSink: return QBluetoothServiceDiscoveryAgent::tr("Audio Sink");
+ case QBluetoothUuid::ServiceClassUuid::AV_RemoteControlTarget: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Remote Control Target");
+ case QBluetoothUuid::ServiceClassUuid::AdvancedAudioDistribution: return QBluetoothServiceDiscoveryAgent::tr("Advanced Audio Distribution");
+ case QBluetoothUuid::ServiceClassUuid::AV_RemoteControl: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Remote Control");
+ case QBluetoothUuid::ServiceClassUuid::AV_RemoteControlController: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Remote Control Controller");
+ case QBluetoothUuid::ServiceClassUuid::HeadsetAG: return QBluetoothServiceDiscoveryAgent::tr("Headset AG");
+ case QBluetoothUuid::ServiceClassUuid::PANU: return QBluetoothServiceDiscoveryAgent::tr("Personal Area Networking (PANU)");
+ case QBluetoothUuid::ServiceClassUuid::NAP: return QBluetoothServiceDiscoveryAgent::tr("Personal Area Networking (NAP)");
+ case QBluetoothUuid::ServiceClassUuid::GN: return QBluetoothServiceDiscoveryAgent::tr("Personal Area Networking (GN)");
+ case QBluetoothUuid::ServiceClassUuid::DirectPrinting: return QBluetoothServiceDiscoveryAgent::tr("Basic Direct Printing (BPP)");
+ case QBluetoothUuid::ServiceClassUuid::ReferencePrinting: return QBluetoothServiceDiscoveryAgent::tr("Basic Reference Printing (BPP)");
+ case QBluetoothUuid::ServiceClassUuid::BasicImage: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Profile");
+ case QBluetoothUuid::ServiceClassUuid::ImagingResponder: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Responder");
+ case QBluetoothUuid::ServiceClassUuid::ImagingAutomaticArchive: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Archive");
+ case QBluetoothUuid::ServiceClassUuid::ImagingReferenceObjects: return QBluetoothServiceDiscoveryAgent::tr("Basic Imaging Ref Objects");
+ case QBluetoothUuid::ServiceClassUuid::Handsfree: return QBluetoothServiceDiscoveryAgent::tr("Hands-Free");
+ case QBluetoothUuid::ServiceClassUuid::HandsfreeAudioGateway: return QBluetoothServiceDiscoveryAgent::tr("Hands-Free AG");
+ case QBluetoothUuid::ServiceClassUuid::DirectPrintingReferenceObjectsService: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing RefObject Service");
+ case QBluetoothUuid::ServiceClassUuid::ReflectedUI: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing Reflected UI");
+ case QBluetoothUuid::ServiceClassUuid::BasicPrinting: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing");
+ case QBluetoothUuid::ServiceClassUuid::PrintingStatus: return QBluetoothServiceDiscoveryAgent::tr("Basic Printing Status");
+ case QBluetoothUuid::ServiceClassUuid::HumanInterfaceDeviceService: return QBluetoothServiceDiscoveryAgent::tr("Human Interface Device");
+ case QBluetoothUuid::ServiceClassUuid::HardcopyCableReplacement: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Cable Replacement");
+ case QBluetoothUuid::ServiceClassUuid::HCRPrint: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Cable Replacement Print");
+ case QBluetoothUuid::ServiceClassUuid::HCRScan: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Cable Replacement Scan");
+ case QBluetoothUuid::ServiceClassUuid::SIMAccess: return QBluetoothServiceDiscoveryAgent::tr("SIM Access Server");
+ case QBluetoothUuid::ServiceClassUuid::PhonebookAccessPCE: return QBluetoothServiceDiscoveryAgent::tr("Phonebook Access PCE");
+ case QBluetoothUuid::ServiceClassUuid::PhonebookAccessPSE: return QBluetoothServiceDiscoveryAgent::tr("Phonebook Access PSE");
+ case QBluetoothUuid::ServiceClassUuid::PhonebookAccess: return QBluetoothServiceDiscoveryAgent::tr("Phonebook Access");
+ case QBluetoothUuid::ServiceClassUuid::HeadsetHS: return QBluetoothServiceDiscoveryAgent::tr("Headset HS");
+ case QBluetoothUuid::ServiceClassUuid::MessageAccessServer: return QBluetoothServiceDiscoveryAgent::tr("Message Access Server");
+ case QBluetoothUuid::ServiceClassUuid::MessageNotificationServer: return QBluetoothServiceDiscoveryAgent::tr("Message Notification Server");
+ case QBluetoothUuid::ServiceClassUuid::MessageAccessProfile: return QBluetoothServiceDiscoveryAgent::tr("Message Access");
+ case QBluetoothUuid::ServiceClassUuid::GNSS: return QBluetoothServiceDiscoveryAgent::tr("Global Navigation Satellite System");
+ case QBluetoothUuid::ServiceClassUuid::GNSSServer: return QBluetoothServiceDiscoveryAgent::tr("Global Navigation Satellite System Server");
+ case QBluetoothUuid::ServiceClassUuid::Display3D: return QBluetoothServiceDiscoveryAgent::tr("3D Synchronization Display");
+ case QBluetoothUuid::ServiceClassUuid::Glasses3D: return QBluetoothServiceDiscoveryAgent::tr("3D Synchronization Glasses");
+ case QBluetoothUuid::ServiceClassUuid::Synchronization3D: return QBluetoothServiceDiscoveryAgent::tr("3D Synchronization");
+ case QBluetoothUuid::ServiceClassUuid::MPSProfile: return QBluetoothServiceDiscoveryAgent::tr("Multi-Profile Specification (Profile)");
+ case QBluetoothUuid::ServiceClassUuid::MPSService: return QBluetoothServiceDiscoveryAgent::tr("Multi-Profile Specification");
+ case QBluetoothUuid::ServiceClassUuid::PnPInformation: return QBluetoothServiceDiscoveryAgent::tr("Device Identification");
+ case QBluetoothUuid::ServiceClassUuid::GenericNetworking: return QBluetoothServiceDiscoveryAgent::tr("Generic Networking");
+ case QBluetoothUuid::ServiceClassUuid::GenericFileTransfer: return QBluetoothServiceDiscoveryAgent::tr("Generic File Transfer");
+ case QBluetoothUuid::ServiceClassUuid::GenericAudio: return QBluetoothServiceDiscoveryAgent::tr("Generic Audio");
+ case QBluetoothUuid::ServiceClassUuid::GenericTelephony: return QBluetoothServiceDiscoveryAgent::tr("Generic Telephony");
+ case QBluetoothUuid::ServiceClassUuid::VideoSource: return QBluetoothServiceDiscoveryAgent::tr("Video Source");
+ case QBluetoothUuid::ServiceClassUuid::VideoSink: return QBluetoothServiceDiscoveryAgent::tr("Video Sink");
+ case QBluetoothUuid::ServiceClassUuid::VideoDistribution: return QBluetoothServiceDiscoveryAgent::tr("Video Distribution");
+ case QBluetoothUuid::ServiceClassUuid::HDP: return QBluetoothServiceDiscoveryAgent::tr("Health Device");
+ case QBluetoothUuid::ServiceClassUuid::HDPSource: return QBluetoothServiceDiscoveryAgent::tr("Health Device Source");
+ case QBluetoothUuid::ServiceClassUuid::HDPSink: return QBluetoothServiceDiscoveryAgent::tr("Health Device Sink");
+ case QBluetoothUuid::ServiceClassUuid::GenericAccess: return QBluetoothServiceDiscoveryAgent::tr("Generic Access");
+ case QBluetoothUuid::ServiceClassUuid::GenericAttribute: return QBluetoothServiceDiscoveryAgent::tr("Generic Attribute");
+ case QBluetoothUuid::ServiceClassUuid::ImmediateAlert: return QBluetoothServiceDiscoveryAgent::tr("Immediate Alert");
+ case QBluetoothUuid::ServiceClassUuid::LinkLoss: return QBluetoothServiceDiscoveryAgent::tr("Link Loss");
+ case QBluetoothUuid::ServiceClassUuid::TxPower: return QBluetoothServiceDiscoveryAgent::tr("Tx Power");
+ case QBluetoothUuid::ServiceClassUuid::CurrentTimeService: return QBluetoothServiceDiscoveryAgent::tr("Current Time Service");
+ case QBluetoothUuid::ServiceClassUuid::ReferenceTimeUpdateService: return QBluetoothServiceDiscoveryAgent::tr("Reference Time Update Service");
+ case QBluetoothUuid::ServiceClassUuid::NextDSTChangeService: return QBluetoothServiceDiscoveryAgent::tr("Next DST Change Service");
+ case QBluetoothUuid::ServiceClassUuid::Glucose: return QBluetoothServiceDiscoveryAgent::tr("Glucose");
+ case QBluetoothUuid::ServiceClassUuid::HealthThermometer: return QBluetoothServiceDiscoveryAgent::tr("Health Thermometer");
+ case QBluetoothUuid::ServiceClassUuid::DeviceInformation: return QBluetoothServiceDiscoveryAgent::tr("Device Information");
+ case QBluetoothUuid::ServiceClassUuid::HeartRate: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate");
+ case QBluetoothUuid::ServiceClassUuid::PhoneAlertStatusService: return QBluetoothServiceDiscoveryAgent::tr("Phone Alert Status Service");
+ case QBluetoothUuid::ServiceClassUuid::BatteryService: return QBluetoothServiceDiscoveryAgent::tr("Battery Service");
+ case QBluetoothUuid::ServiceClassUuid::BloodPressure: return QBluetoothServiceDiscoveryAgent::tr("Blood Pressure");
+ case QBluetoothUuid::ServiceClassUuid::AlertNotificationService: return QBluetoothServiceDiscoveryAgent::tr("Alert Notification Service");
+ case QBluetoothUuid::ServiceClassUuid::HumanInterfaceDevice: return QBluetoothServiceDiscoveryAgent::tr("Human Interface Device");
+ case QBluetoothUuid::ServiceClassUuid::ScanParameters: return QBluetoothServiceDiscoveryAgent::tr("Scan Parameters");
+ case QBluetoothUuid::ServiceClassUuid::RunningSpeedAndCadence: return QBluetoothServiceDiscoveryAgent::tr("Running Speed and Cadence");
+ case QBluetoothUuid::ServiceClassUuid::CyclingSpeedAndCadence: return QBluetoothServiceDiscoveryAgent::tr("Cycling Speed and Cadence");
+ case QBluetoothUuid::ServiceClassUuid::CyclingPower: return QBluetoothServiceDiscoveryAgent::tr("Cycling Power");
+ case QBluetoothUuid::ServiceClassUuid::LocationAndNavigation: return QBluetoothServiceDiscoveryAgent::tr("Location and Navigation");
+ case QBluetoothUuid::ServiceClassUuid::EnvironmentalSensing: return QBluetoothServiceDiscoveryAgent::tr("Environmental Sensing");
+ case QBluetoothUuid::ServiceClassUuid::BodyComposition: return QBluetoothServiceDiscoveryAgent::tr("Body Composition");
+ case QBluetoothUuid::ServiceClassUuid::UserData: return QBluetoothServiceDiscoveryAgent::tr("User Data");
+ case QBluetoothUuid::ServiceClassUuid::WeightScale: return QBluetoothServiceDiscoveryAgent::tr("Weight Scale");
//: Connection management (Bluetooth)
- case QBluetoothUuid::BondManagement: return QBluetoothServiceDiscoveryAgent::tr("Bond Management");
- case QBluetoothUuid::ContinuousGlucoseMonitoring: return QBluetoothServiceDiscoveryAgent::tr("Continuous Glucose Monitoring");
+ case QBluetoothUuid::ServiceClassUuid::BondManagement: return QBluetoothServiceDiscoveryAgent::tr("Bond Management");
+ case QBluetoothUuid::ServiceClassUuid::ContinuousGlucoseMonitoring: return QBluetoothServiceDiscoveryAgent::tr("Continuous Glucose Monitoring");
default:
break;
}
@@ -818,31 +818,31 @@ QString QBluetoothUuid::serviceClassToString(QBluetoothUuid::ServiceClassUuid uu
QString QBluetoothUuid::protocolToString(QBluetoothUuid::ProtocolUuid uuid)
{
switch (uuid) {
- case QBluetoothUuid::Sdp: return QBluetoothServiceDiscoveryAgent::tr("Service Discovery Protocol");
- case QBluetoothUuid::Udp: return QBluetoothServiceDiscoveryAgent::tr("User Datagram Protocol");
- case QBluetoothUuid::Rfcomm: return QBluetoothServiceDiscoveryAgent::tr("Radio Frequency Communication");
- case QBluetoothUuid::Tcp: return QBluetoothServiceDiscoveryAgent::tr("Transmission Control Protocol");
- case QBluetoothUuid::TcsBin: return QBluetoothServiceDiscoveryAgent::tr("Telephony Control Specification - Binary");
- case QBluetoothUuid::TcsAt: return QBluetoothServiceDiscoveryAgent::tr("Telephony Control Specification - AT");
- case QBluetoothUuid::Att: return QBluetoothServiceDiscoveryAgent::tr("Attribute Protocol");
- case QBluetoothUuid::Obex: return QBluetoothServiceDiscoveryAgent::tr("Object Exchange Protocol");
- case QBluetoothUuid::Ip: return QBluetoothServiceDiscoveryAgent::tr("Internet Protocol");
- case QBluetoothUuid::Ftp: return QBluetoothServiceDiscoveryAgent::tr("File Transfer Protocol");
- case QBluetoothUuid::Http: return QBluetoothServiceDiscoveryAgent::tr("Hypertext Transfer Protocol");
- case QBluetoothUuid::Wsp: return QBluetoothServiceDiscoveryAgent::tr("Wireless Short Packet Protocol");
- case QBluetoothUuid::Bnep: return QBluetoothServiceDiscoveryAgent::tr("Bluetooth Network Encapsulation Protocol");
- case QBluetoothUuid::Upnp: return QBluetoothServiceDiscoveryAgent::tr("Extended Service Discovery Protocol");
- case QBluetoothUuid::Hidp: return QBluetoothServiceDiscoveryAgent::tr("Human Interface Device Protocol");
- case QBluetoothUuid::HardcopyControlChannel: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Control Channel");
- case QBluetoothUuid::HardcopyDataChannel: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Data Channel");
- case QBluetoothUuid::HardcopyNotification: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Notification");
- case QBluetoothUuid::Avctp: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Control Transport Protocol");
- case QBluetoothUuid::Avdtp: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Distribution Transport Protocol");
- case QBluetoothUuid::Cmtp: return QBluetoothServiceDiscoveryAgent::tr("Common ISDN Access Protocol");
- case QBluetoothUuid::UdiCPlain: return QBluetoothServiceDiscoveryAgent::tr("UdiCPlain");
- case QBluetoothUuid::McapControlChannel: return QBluetoothServiceDiscoveryAgent::tr("Multi-Channel Adaptation Protocol - Control");
- case QBluetoothUuid::McapDataChannel: return QBluetoothServiceDiscoveryAgent::tr("Multi-Channel Adaptation Protocol - Data");
- case QBluetoothUuid::L2cap: return QBluetoothServiceDiscoveryAgent::tr("Layer 2 Control Protocol");
+ case QBluetoothUuid::ProtocolUuid::Sdp: return QBluetoothServiceDiscoveryAgent::tr("Service Discovery Protocol");
+ case QBluetoothUuid::ProtocolUuid::Udp: return QBluetoothServiceDiscoveryAgent::tr("User Datagram Protocol");
+ case QBluetoothUuid::ProtocolUuid::Rfcomm: return QBluetoothServiceDiscoveryAgent::tr("Radio Frequency Communication");
+ case QBluetoothUuid::ProtocolUuid::Tcp: return QBluetoothServiceDiscoveryAgent::tr("Transmission Control Protocol");
+ case QBluetoothUuid::ProtocolUuid::TcsBin: return QBluetoothServiceDiscoveryAgent::tr("Telephony Control Specification - Binary");
+ case QBluetoothUuid::ProtocolUuid::TcsAt: return QBluetoothServiceDiscoveryAgent::tr("Telephony Control Specification - AT");
+ case QBluetoothUuid::ProtocolUuid::Att: return QBluetoothServiceDiscoveryAgent::tr("Attribute Protocol");
+ case QBluetoothUuid::ProtocolUuid::Obex: return QBluetoothServiceDiscoveryAgent::tr("Object Exchange Protocol");
+ case QBluetoothUuid::ProtocolUuid::Ip: return QBluetoothServiceDiscoveryAgent::tr("Internet Protocol");
+ case QBluetoothUuid::ProtocolUuid::Ftp: return QBluetoothServiceDiscoveryAgent::tr("File Transfer Protocol");
+ case QBluetoothUuid::ProtocolUuid::Http: return QBluetoothServiceDiscoveryAgent::tr("Hypertext Transfer Protocol");
+ case QBluetoothUuid::ProtocolUuid::Wsp: return QBluetoothServiceDiscoveryAgent::tr("Wireless Short Packet Protocol");
+ case QBluetoothUuid::ProtocolUuid::Bnep: return QBluetoothServiceDiscoveryAgent::tr("Bluetooth Network Encapsulation Protocol");
+ case QBluetoothUuid::ProtocolUuid::Upnp: return QBluetoothServiceDiscoveryAgent::tr("Extended Service Discovery Protocol");
+ case QBluetoothUuid::ProtocolUuid::Hidp: return QBluetoothServiceDiscoveryAgent::tr("Human Interface Device Protocol");
+ case QBluetoothUuid::ProtocolUuid::HardcopyControlChannel: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Control Channel");
+ case QBluetoothUuid::ProtocolUuid::HardcopyDataChannel: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Data Channel");
+ case QBluetoothUuid::ProtocolUuid::HardcopyNotification: return QBluetoothServiceDiscoveryAgent::tr("Hardcopy Notification");
+ case QBluetoothUuid::ProtocolUuid::Avctp: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Control Transport Protocol");
+ case QBluetoothUuid::ProtocolUuid::Avdtp: return QBluetoothServiceDiscoveryAgent::tr("Audio/Video Distribution Transport Protocol");
+ case QBluetoothUuid::ProtocolUuid::Cmtp: return QBluetoothServiceDiscoveryAgent::tr("Common ISDN Access Protocol");
+ case QBluetoothUuid::ProtocolUuid::UdiCPlain: return QBluetoothServiceDiscoveryAgent::tr("UdiCPlain");
+ case QBluetoothUuid::ProtocolUuid::McapControlChannel: return QBluetoothServiceDiscoveryAgent::tr("Multi-Channel Adaptation Protocol - Control");
+ case QBluetoothUuid::ProtocolUuid::McapDataChannel: return QBluetoothServiceDiscoveryAgent::tr("Multi-Channel Adaptation Protocol - Data");
+ case QBluetoothUuid::ProtocolUuid::L2cap: return QBluetoothServiceDiscoveryAgent::tr("Layer 2 Control Protocol");
default:
break;
}
@@ -862,195 +862,195 @@ QString QBluetoothUuid::characteristicToString(CharacteristicType uuid)
{
switch (uuid) {
//: GAP: Generic Access Profile (Bluetooth)
- case QBluetoothUuid::DeviceName: return QBluetoothServiceDiscoveryAgent::tr("GAP Device Name");
+ case QBluetoothUuid::CharacteristicType::DeviceName: return QBluetoothServiceDiscoveryAgent::tr("GAP Device Name");
//: GAP: Generic Access Profile (Bluetooth)
- case QBluetoothUuid::Appearance: return QBluetoothServiceDiscoveryAgent::tr("GAP Appearance");
- case QBluetoothUuid::PeripheralPrivacyFlag:
+ case QBluetoothUuid::CharacteristicType::Appearance: return QBluetoothServiceDiscoveryAgent::tr("GAP Appearance");
+ case QBluetoothUuid::CharacteristicType::PeripheralPrivacyFlag:
//: GAP: Generic Access Profile (Bluetooth)
return QBluetoothServiceDiscoveryAgent::tr("GAP Peripheral Privacy Flag");
- case QBluetoothUuid::ReconnectionAddress:
+ case QBluetoothUuid::CharacteristicType::ReconnectionAddress:
//: GAP: Generic Access Profile (Bluetooth)
return QBluetoothServiceDiscoveryAgent::tr("GAP Reconnection Address");
- case QBluetoothUuid::PeripheralPreferredConnectionParameters:
+ case QBluetoothUuid::CharacteristicType::PeripheralPreferredConnectionParameters:
return QBluetoothServiceDiscoveryAgent::tr("GAP Peripheral Preferred Connection Parameters");
//: GATT: _G_eneric _Att_ribute Profile (Bluetooth)
- case QBluetoothUuid::ServiceChanged: return QBluetoothServiceDiscoveryAgent::tr("GATT Service Changed");
- case QBluetoothUuid::AlertLevel: return QBluetoothServiceDiscoveryAgent::tr("Alert Level");
- case QBluetoothUuid::TxPowerLevel: return QBluetoothServiceDiscoveryAgent::tr("TX Power");
- case QBluetoothUuid::DateTime: return QBluetoothServiceDiscoveryAgent::tr("Date Time");
- case QBluetoothUuid::DayOfWeek: return QBluetoothServiceDiscoveryAgent::tr("Day Of Week");
- case QBluetoothUuid::DayDateTime: return QBluetoothServiceDiscoveryAgent::tr("Day Date Time");
- case QBluetoothUuid::ExactTime256: return QBluetoothServiceDiscoveryAgent::tr("Exact Time 256");
- case QBluetoothUuid::DSTOffset: return QBluetoothServiceDiscoveryAgent::tr("DST Offset");
- case QBluetoothUuid::TimeZone: return QBluetoothServiceDiscoveryAgent::tr("Time Zone");
- case QBluetoothUuid::LocalTimeInformation:
+ case QBluetoothUuid::CharacteristicType::ServiceChanged: return QBluetoothServiceDiscoveryAgent::tr("GATT Service Changed");
+ case QBluetoothUuid::CharacteristicType::AlertLevel: return QBluetoothServiceDiscoveryAgent::tr("Alert Level");
+ case QBluetoothUuid::CharacteristicType::TxPowerLevel: return QBluetoothServiceDiscoveryAgent::tr("TX Power");
+ case QBluetoothUuid::CharacteristicType::DateTime: return QBluetoothServiceDiscoveryAgent::tr("Date Time");
+ case QBluetoothUuid::CharacteristicType::DayOfWeek: return QBluetoothServiceDiscoveryAgent::tr("Day Of Week");
+ case QBluetoothUuid::CharacteristicType::DayDateTime: return QBluetoothServiceDiscoveryAgent::tr("Day Date Time");
+ case QBluetoothUuid::CharacteristicType::ExactTime256: return QBluetoothServiceDiscoveryAgent::tr("Exact Time 256");
+ case QBluetoothUuid::CharacteristicType::DSTOffset: return QBluetoothServiceDiscoveryAgent::tr("DST Offset");
+ case QBluetoothUuid::CharacteristicType::TimeZone: return QBluetoothServiceDiscoveryAgent::tr("Time Zone");
+ case QBluetoothUuid::CharacteristicType::LocalTimeInformation:
return QBluetoothServiceDiscoveryAgent::tr("Local Time Information");
- case QBluetoothUuid::TimeWithDST: return QBluetoothServiceDiscoveryAgent::tr("Time With DST");
- case QBluetoothUuid::TimeAccuracy: return QBluetoothServiceDiscoveryAgent::tr("Time Accuracy");
- case QBluetoothUuid::TimeSource: return QBluetoothServiceDiscoveryAgent::tr("Time Source");
- case QBluetoothUuid::ReferenceTimeInformation:
+ case QBluetoothUuid::CharacteristicType::TimeWithDST: return QBluetoothServiceDiscoveryAgent::tr("Time With DST");
+ case QBluetoothUuid::CharacteristicType::TimeAccuracy: return QBluetoothServiceDiscoveryAgent::tr("Time Accuracy");
+ case QBluetoothUuid::CharacteristicType::TimeSource: return QBluetoothServiceDiscoveryAgent::tr("Time Source");
+ case QBluetoothUuid::CharacteristicType::ReferenceTimeInformation:
return QBluetoothServiceDiscoveryAgent::tr("Reference Time Information");
- case QBluetoothUuid::TimeUpdateControlPoint:
+ case QBluetoothUuid::CharacteristicType::TimeUpdateControlPoint:
return QBluetoothServiceDiscoveryAgent::tr("Time Update Control Point");
- case QBluetoothUuid::TimeUpdateState: return QBluetoothServiceDiscoveryAgent::tr("Time Update State");
- case QBluetoothUuid::GlucoseMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Glucose Measurement");
- case QBluetoothUuid::BatteryLevel: return QBluetoothServiceDiscoveryAgent::tr("Battery Level");
- case QBluetoothUuid::TemperatureMeasurement:
+ case QBluetoothUuid::CharacteristicType::TimeUpdateState: return QBluetoothServiceDiscoveryAgent::tr("Time Update State");
+ case QBluetoothUuid::CharacteristicType::GlucoseMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Glucose Measurement");
+ case QBluetoothUuid::CharacteristicType::BatteryLevel: return QBluetoothServiceDiscoveryAgent::tr("Battery Level");
+ case QBluetoothUuid::CharacteristicType::TemperatureMeasurement:
return QBluetoothServiceDiscoveryAgent::tr("Temperature Measurement");
- case QBluetoothUuid::TemperatureType: return QBluetoothServiceDiscoveryAgent::tr("Temperature Type");
- case QBluetoothUuid::IntermediateTemperature:
+ case QBluetoothUuid::CharacteristicType::TemperatureType: return QBluetoothServiceDiscoveryAgent::tr("Temperature Type");
+ case QBluetoothUuid::CharacteristicType::IntermediateTemperature:
return QBluetoothServiceDiscoveryAgent::tr("Intermediate Temperature");
- case QBluetoothUuid::MeasurementInterval: return QBluetoothServiceDiscoveryAgent::tr("Measurement Interval");
- case QBluetoothUuid::BootKeyboardInputReport: return QBluetoothServiceDiscoveryAgent::tr("Boot Keyboard Input Report");
- case QBluetoothUuid::SystemID: return QBluetoothServiceDiscoveryAgent::tr("System ID");
- case QBluetoothUuid::ModelNumberString: return QBluetoothServiceDiscoveryAgent::tr("Model Number String");
- case QBluetoothUuid::SerialNumberString: return QBluetoothServiceDiscoveryAgent::tr("Serial Number String");
- case QBluetoothUuid::FirmwareRevisionString: return QBluetoothServiceDiscoveryAgent::tr("Firmware Revision String");
- case QBluetoothUuid::HardwareRevisionString: return QBluetoothServiceDiscoveryAgent::tr("Hardware Revision String");
- case QBluetoothUuid::SoftwareRevisionString: return QBluetoothServiceDiscoveryAgent::tr("Software Revision String");
- case QBluetoothUuid::ManufacturerNameString: return QBluetoothServiceDiscoveryAgent::tr("Manufacturer Name String");
- case QBluetoothUuid::IEEE1107320601RegulatoryCertificationDataList:
+ case QBluetoothUuid::CharacteristicType::MeasurementInterval: return QBluetoothServiceDiscoveryAgent::tr("Measurement Interval");
+ case QBluetoothUuid::CharacteristicType::BootKeyboardInputReport: return QBluetoothServiceDiscoveryAgent::tr("Boot Keyboard Input Report");
+ case QBluetoothUuid::CharacteristicType::SystemID: return QBluetoothServiceDiscoveryAgent::tr("System ID");
+ case QBluetoothUuid::CharacteristicType::ModelNumberString: return QBluetoothServiceDiscoveryAgent::tr("Model Number String");
+ case QBluetoothUuid::CharacteristicType::SerialNumberString: return QBluetoothServiceDiscoveryAgent::tr("Serial Number String");
+ case QBluetoothUuid::CharacteristicType::FirmwareRevisionString: return QBluetoothServiceDiscoveryAgent::tr("Firmware Revision String");
+ case QBluetoothUuid::CharacteristicType::HardwareRevisionString: return QBluetoothServiceDiscoveryAgent::tr("Hardware Revision String");
+ case QBluetoothUuid::CharacteristicType::SoftwareRevisionString: return QBluetoothServiceDiscoveryAgent::tr("Software Revision String");
+ case QBluetoothUuid::CharacteristicType::ManufacturerNameString: return QBluetoothServiceDiscoveryAgent::tr("Manufacturer Name String");
+ case QBluetoothUuid::CharacteristicType::IEEE1107320601RegulatoryCertificationDataList:
return QBluetoothServiceDiscoveryAgent::tr("IEEE 11073 20601 Regulatory Certification Data List");
- case QBluetoothUuid::CurrentTime: return QBluetoothServiceDiscoveryAgent::tr("Current Time");
- case QBluetoothUuid::ScanRefresh: return QBluetoothServiceDiscoveryAgent::tr("Scan Refresh");
- case QBluetoothUuid::BootKeyboardOutputReport:
+ case QBluetoothUuid::CharacteristicType::CurrentTime: return QBluetoothServiceDiscoveryAgent::tr("Current Time");
+ case QBluetoothUuid::CharacteristicType::ScanRefresh: return QBluetoothServiceDiscoveryAgent::tr("Scan Refresh");
+ case QBluetoothUuid::CharacteristicType::BootKeyboardOutputReport:
return QBluetoothServiceDiscoveryAgent::tr("Boot Keyboard Output Report");
- case QBluetoothUuid::BootMouseInputReport: return QBluetoothServiceDiscoveryAgent::tr("Boot Mouse Input Report");
- case QBluetoothUuid::GlucoseMeasurementContext:
+ case QBluetoothUuid::CharacteristicType::BootMouseInputReport: return QBluetoothServiceDiscoveryAgent::tr("Boot Mouse Input Report");
+ case QBluetoothUuid::CharacteristicType::GlucoseMeasurementContext:
return QBluetoothServiceDiscoveryAgent::tr("Glucose Measurement Context");
- case QBluetoothUuid::BloodPressureMeasurement:
+ case QBluetoothUuid::CharacteristicType::BloodPressureMeasurement:
return QBluetoothServiceDiscoveryAgent::tr("Blood Pressure Measurement");
- case QBluetoothUuid::IntermediateCuffPressure:
+ case QBluetoothUuid::CharacteristicType::IntermediateCuffPressure:
return QBluetoothServiceDiscoveryAgent::tr("Intermediate Cuff Pressure");
- case QBluetoothUuid::HeartRateMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate Measurement");
- case QBluetoothUuid::BodySensorLocation: return QBluetoothServiceDiscoveryAgent::tr("Body Sensor Location");
- case QBluetoothUuid::HeartRateControlPoint: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate Control Point");
- case QBluetoothUuid::AlertStatus: return QBluetoothServiceDiscoveryAgent::tr("Alert Status");
- case QBluetoothUuid::RingerControlPoint: return QBluetoothServiceDiscoveryAgent::tr("Ringer Control Point");
- case QBluetoothUuid::RingerSetting: return QBluetoothServiceDiscoveryAgent::tr("Ringer Setting");
- case QBluetoothUuid::AlertCategoryIDBitMask:
+ case QBluetoothUuid::CharacteristicType::HeartRateMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate Measurement");
+ case QBluetoothUuid::CharacteristicType::BodySensorLocation: return QBluetoothServiceDiscoveryAgent::tr("Body Sensor Location");
+ case QBluetoothUuid::CharacteristicType::HeartRateControlPoint: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate Control Point");
+ case QBluetoothUuid::CharacteristicType::AlertStatus: return QBluetoothServiceDiscoveryAgent::tr("Alert Status");
+ case QBluetoothUuid::CharacteristicType::RingerControlPoint: return QBluetoothServiceDiscoveryAgent::tr("Ringer Control Point");
+ case QBluetoothUuid::CharacteristicType::RingerSetting: return QBluetoothServiceDiscoveryAgent::tr("Ringer Setting");
+ case QBluetoothUuid::CharacteristicType::AlertCategoryIDBitMask:
return QBluetoothServiceDiscoveryAgent::tr("Alert Category ID Bit Mask");
- case QBluetoothUuid::AlertCategoryID: return QBluetoothServiceDiscoveryAgent::tr("Alert Category ID");
- case QBluetoothUuid::AlertNotificationControlPoint:
+ case QBluetoothUuid::CharacteristicType::AlertCategoryID: return QBluetoothServiceDiscoveryAgent::tr("Alert Category ID");
+ case QBluetoothUuid::CharacteristicType::AlertNotificationControlPoint:
return QBluetoothServiceDiscoveryAgent::tr("Alert Notification Control Point");
- case QBluetoothUuid::UnreadAlertStatus: return QBluetoothServiceDiscoveryAgent::tr("Unread Alert Status");
- case QBluetoothUuid::NewAlert: return QBluetoothServiceDiscoveryAgent::tr("New Alert");
- case QBluetoothUuid::SupportedNewAlertCategory:
+ case QBluetoothUuid::CharacteristicType::UnreadAlertStatus: return QBluetoothServiceDiscoveryAgent::tr("Unread Alert Status");
+ case QBluetoothUuid::CharacteristicType::NewAlert: return QBluetoothServiceDiscoveryAgent::tr("New Alert");
+ case QBluetoothUuid::CharacteristicType::SupportedNewAlertCategory:
return QBluetoothServiceDiscoveryAgent::tr("Supported New Alert Category");
- case QBluetoothUuid::SupportedUnreadAlertCategory:
+ case QBluetoothUuid::CharacteristicType::SupportedUnreadAlertCategory:
return QBluetoothServiceDiscoveryAgent::tr("Supported Unread Alert Category");
- case QBluetoothUuid::BloodPressureFeature: return QBluetoothServiceDiscoveryAgent::tr("Blood Pressure Feature");
+ case QBluetoothUuid::CharacteristicType::BloodPressureFeature: return QBluetoothServiceDiscoveryAgent::tr("Blood Pressure Feature");
//: HID: Human Interface Device Profile (Bluetooth)
- case QBluetoothUuid::HIDInformation: return QBluetoothServiceDiscoveryAgent::tr("HID Information");
- case QBluetoothUuid::ReportMap: return QBluetoothServiceDiscoveryAgent::tr("Report Map");
+ case QBluetoothUuid::CharacteristicType::HIDInformation: return QBluetoothServiceDiscoveryAgent::tr("HID Information");
+ case QBluetoothUuid::CharacteristicType::ReportMap: return QBluetoothServiceDiscoveryAgent::tr("Report Map");
//: HID: Human Interface Device Profile (Bluetooth)
- case QBluetoothUuid::HIDControlPoint: return QBluetoothServiceDiscoveryAgent::tr("HID Control Point");
- case QBluetoothUuid::Report: return QBluetoothServiceDiscoveryAgent::tr("Report");
- case QBluetoothUuid::ProtocolMode: return QBluetoothServiceDiscoveryAgent::tr("Protocol Mode");
- case QBluetoothUuid::ScanIntervalWindow: return QBluetoothServiceDiscoveryAgent::tr("Scan Interval Window");
- case QBluetoothUuid::PnPID: return QBluetoothServiceDiscoveryAgent::tr("PnP ID");
- case QBluetoothUuid::GlucoseFeature: return QBluetoothServiceDiscoveryAgent::tr("Glucose Feature");
- case QBluetoothUuid::RecordAccessControlPoint:
+ case QBluetoothUuid::CharacteristicType::HIDControlPoint: return QBluetoothServiceDiscoveryAgent::tr("HID Control Point");
+ case QBluetoothUuid::CharacteristicType::Report: return QBluetoothServiceDiscoveryAgent::tr("Report");
+ case QBluetoothUuid::CharacteristicType::ProtocolMode: return QBluetoothServiceDiscoveryAgent::tr("Protocol Mode");
+ case QBluetoothUuid::CharacteristicType::ScanIntervalWindow: return QBluetoothServiceDiscoveryAgent::tr("Scan Interval Window");
+ case QBluetoothUuid::CharacteristicType::PnPID: return QBluetoothServiceDiscoveryAgent::tr("PnP ID");
+ case QBluetoothUuid::CharacteristicType::GlucoseFeature: return QBluetoothServiceDiscoveryAgent::tr("Glucose Feature");
+ case QBluetoothUuid::CharacteristicType::RecordAccessControlPoint:
//: Glucose Sensor patient record database.
return QBluetoothServiceDiscoveryAgent::tr("Record Access Control Point");
//: RSC: Running Speed and Cadence
- case QBluetoothUuid::RSCMeasurement: return QBluetoothServiceDiscoveryAgent::tr("RSC Measurement");
+ case QBluetoothUuid::CharacteristicType::RSCMeasurement: return QBluetoothServiceDiscoveryAgent::tr("RSC Measurement");
//: RSC: Running Speed and Cadence
- case QBluetoothUuid::RSCFeature: return QBluetoothServiceDiscoveryAgent::tr("RSC Feature");
- case QBluetoothUuid::SCControlPoint: return QBluetoothServiceDiscoveryAgent::tr("SC Control Point");
+ case QBluetoothUuid::CharacteristicType::RSCFeature: return QBluetoothServiceDiscoveryAgent::tr("RSC Feature");
+ case QBluetoothUuid::CharacteristicType::SCControlPoint: return QBluetoothServiceDiscoveryAgent::tr("SC Control Point");
//: CSC: Cycling Speed and Cadence
- case QBluetoothUuid::CSCMeasurement: return QBluetoothServiceDiscoveryAgent::tr("CSC Measurement");
+ case QBluetoothUuid::CharacteristicType::CSCMeasurement: return QBluetoothServiceDiscoveryAgent::tr("CSC Measurement");
//: CSC: Cycling Speed and Cadence
- case QBluetoothUuid::CSCFeature: return QBluetoothServiceDiscoveryAgent::tr("CSC Feature");
- case QBluetoothUuid::SensorLocation: return QBluetoothServiceDiscoveryAgent::tr("Sensor Location");
- case QBluetoothUuid::CyclingPowerMeasurement:
+ case QBluetoothUuid::CharacteristicType::CSCFeature: return QBluetoothServiceDiscoveryAgent::tr("CSC Feature");
+ case QBluetoothUuid::CharacteristicType::SensorLocation: return QBluetoothServiceDiscoveryAgent::tr("Sensor Location");
+ case QBluetoothUuid::CharacteristicType::CyclingPowerMeasurement:
return QBluetoothServiceDiscoveryAgent::tr("Cycling Power Measurement");
- case QBluetoothUuid::CyclingPowerVector: return QBluetoothServiceDiscoveryAgent::tr("Cycling Power Vector");
- case QBluetoothUuid::CyclingPowerFeature: return QBluetoothServiceDiscoveryAgent::tr("Cycling Power Feature");
- case QBluetoothUuid::CyclingPowerControlPoint:
+ case QBluetoothUuid::CharacteristicType::CyclingPowerVector: return QBluetoothServiceDiscoveryAgent::tr("Cycling Power Vector");
+ case QBluetoothUuid::CharacteristicType::CyclingPowerFeature: return QBluetoothServiceDiscoveryAgent::tr("Cycling Power Feature");
+ case QBluetoothUuid::CharacteristicType::CyclingPowerControlPoint:
return QBluetoothServiceDiscoveryAgent::tr("Cycling Power Control Point");
- case QBluetoothUuid::LocationAndSpeed: return QBluetoothServiceDiscoveryAgent::tr("Location And Speed");
- case QBluetoothUuid::Navigation: return QBluetoothServiceDiscoveryAgent::tr("Navigation");
- case QBluetoothUuid::PositionQuality: return QBluetoothServiceDiscoveryAgent::tr("Position Quality");
- case QBluetoothUuid::LNFeature: return QBluetoothServiceDiscoveryAgent::tr("LN Feature");
- case QBluetoothUuid::LNControlPoint: return QBluetoothServiceDiscoveryAgent::tr("LN Control Point");
- case QBluetoothUuid::MagneticDeclination:
+ case QBluetoothUuid::CharacteristicType::LocationAndSpeed: return QBluetoothServiceDiscoveryAgent::tr("Location And Speed");
+ case QBluetoothUuid::CharacteristicType::Navigation: return QBluetoothServiceDiscoveryAgent::tr("Navigation");
+ case QBluetoothUuid::CharacteristicType::PositionQuality: return QBluetoothServiceDiscoveryAgent::tr("Position Quality");
+ case QBluetoothUuid::CharacteristicType::LNFeature: return QBluetoothServiceDiscoveryAgent::tr("LN Feature");
+ case QBluetoothUuid::CharacteristicType::LNControlPoint: return QBluetoothServiceDiscoveryAgent::tr("LN Control Point");
+ case QBluetoothUuid::CharacteristicType::MagneticDeclination:
//: Angle between geographic and magnetic north
return QBluetoothServiceDiscoveryAgent::tr("Magnetic Declination");
//: Above/below sea level
- case QBluetoothUuid::Elevation: return QBluetoothServiceDiscoveryAgent::tr("Elevation");
- case QBluetoothUuid::Pressure: return QBluetoothServiceDiscoveryAgent::tr("Pressure");
- case QBluetoothUuid::Temperature: return QBluetoothServiceDiscoveryAgent::tr("Temperature");
- case QBluetoothUuid::Humidity: return QBluetoothServiceDiscoveryAgent::tr("Humidity");
+ case QBluetoothUuid::CharacteristicType::Elevation: return QBluetoothServiceDiscoveryAgent::tr("Elevation");
+ case QBluetoothUuid::CharacteristicType::Pressure: return QBluetoothServiceDiscoveryAgent::tr("Pressure");
+ case QBluetoothUuid::CharacteristicType::Temperature: return QBluetoothServiceDiscoveryAgent::tr("Temperature");
+ case QBluetoothUuid::CharacteristicType::Humidity: return QBluetoothServiceDiscoveryAgent::tr("Humidity");
//: Wind speed while standing
- case QBluetoothUuid::TrueWindSpeed: return QBluetoothServiceDiscoveryAgent::tr("True Wind Speed");
- case QBluetoothUuid::TrueWindDirection : return QBluetoothServiceDiscoveryAgent::tr("True Wind Direction");
- case QBluetoothUuid::ApparentWindSpeed:
+ case QBluetoothUuid::CharacteristicType::TrueWindSpeed: return QBluetoothServiceDiscoveryAgent::tr("True Wind Speed");
+ case QBluetoothUuid::CharacteristicType::TrueWindDirection : return QBluetoothServiceDiscoveryAgent::tr("True Wind Direction");
+ case QBluetoothUuid::CharacteristicType::ApparentWindSpeed:
//: Wind speed while observer is moving
return QBluetoothServiceDiscoveryAgent::tr("Apparent Wind Speed");
- case QBluetoothUuid::ApparentWindDirection: return QBluetoothServiceDiscoveryAgent::tr("Apparent Wind Direction");
- case QBluetoothUuid::GustFactor:
+ case QBluetoothUuid::CharacteristicType::ApparentWindDirection: return QBluetoothServiceDiscoveryAgent::tr("Apparent Wind Direction");
+ case QBluetoothUuid::CharacteristicType::GustFactor:
//: Factor by which wind gust is stronger than average wind
return QBluetoothServiceDiscoveryAgent::tr("Gust Factor");
- case QBluetoothUuid::PollenConcentration: return QBluetoothServiceDiscoveryAgent::tr("Pollen Concentration");
- case QBluetoothUuid::UVIndex: return QBluetoothServiceDiscoveryAgent::tr("UV Index");
- case QBluetoothUuid::Irradiance: return QBluetoothServiceDiscoveryAgent::tr("Irradiance");
- case QBluetoothUuid::Rainfall: return QBluetoothServiceDiscoveryAgent::tr("Rainfall");
- case QBluetoothUuid::WindChill: return QBluetoothServiceDiscoveryAgent::tr("Wind Chill");
- case QBluetoothUuid::HeatIndex: return QBluetoothServiceDiscoveryAgent::tr("Heat Index");
- case QBluetoothUuid::DewPoint: return QBluetoothServiceDiscoveryAgent::tr("Dew Point");
- case QBluetoothUuid::DescriptorValueChanged:
+ case QBluetoothUuid::CharacteristicType::PollenConcentration: return QBluetoothServiceDiscoveryAgent::tr("Pollen Concentration");
+ case QBluetoothUuid::CharacteristicType::UVIndex: return QBluetoothServiceDiscoveryAgent::tr("UV Index");
+ case QBluetoothUuid::CharacteristicType::Irradiance: return QBluetoothServiceDiscoveryAgent::tr("Irradiance");
+ case QBluetoothUuid::CharacteristicType::Rainfall: return QBluetoothServiceDiscoveryAgent::tr("Rainfall");
+ case QBluetoothUuid::CharacteristicType::WindChill: return QBluetoothServiceDiscoveryAgent::tr("Wind Chill");
+ case QBluetoothUuid::CharacteristicType::HeatIndex: return QBluetoothServiceDiscoveryAgent::tr("Heat Index");
+ case QBluetoothUuid::CharacteristicType::DewPoint: return QBluetoothServiceDiscoveryAgent::tr("Dew Point");
+ case QBluetoothUuid::CharacteristicType::DescriptorValueChanged:
//: Environmental sensing related
return QBluetoothServiceDiscoveryAgent::tr("Descriptor Value Changed");
- case QBluetoothUuid::AerobicHeartRateLowerLimit:
+ case QBluetoothUuid::CharacteristicType::AerobicHeartRateLowerLimit:
return QBluetoothServiceDiscoveryAgent::tr("Aerobic Heart Rate Lower Limit");
- case QBluetoothUuid::AerobicHeartRateUpperLimit:
+ case QBluetoothUuid::CharacteristicType::AerobicHeartRateUpperLimit:
return QBluetoothServiceDiscoveryAgent::tr("Aerobic Heart Rate Upper Limit");
- case QBluetoothUuid::AerobicThreshold: return QBluetoothServiceDiscoveryAgent::tr("Aerobic Threshold");
+ case QBluetoothUuid::CharacteristicType::AerobicThreshold: return QBluetoothServiceDiscoveryAgent::tr("Aerobic Threshold");
//: Age of person
- case QBluetoothUuid::Age: return QBluetoothServiceDiscoveryAgent::tr("Age");
- case QBluetoothUuid::AnaerobicHeartRateLowerLimit:
+ case QBluetoothUuid::CharacteristicType::Age: return QBluetoothServiceDiscoveryAgent::tr("Age");
+ case QBluetoothUuid::CharacteristicType::AnaerobicHeartRateLowerLimit:
return QBluetoothServiceDiscoveryAgent::tr("Anaerobic Heart Rate Lower Limit");
- case QBluetoothUuid::AnaerobicHeartRateUpperLimit:
+ case QBluetoothUuid::CharacteristicType::AnaerobicHeartRateUpperLimit:
return QBluetoothServiceDiscoveryAgent::tr("Anaerobic Heart Rate Upper Limit");
- case QBluetoothUuid::AnaerobicThreshold: return QBluetoothServiceDiscoveryAgent::tr("Anaerobic Threshold");
- case QBluetoothUuid::DateOfBirth: return QBluetoothServiceDiscoveryAgent::tr("Date Of Birth");
- case QBluetoothUuid::DateOfThresholdAssessment: return QBluetoothServiceDiscoveryAgent::tr("Date Of Threshold Assessment");
- case QBluetoothUuid::EmailAddress: return QBluetoothServiceDiscoveryAgent::tr("Email Address");
- case QBluetoothUuid::FatBurnHeartRateLowerLimit:
+ case QBluetoothUuid::CharacteristicType::AnaerobicThreshold: return QBluetoothServiceDiscoveryAgent::tr("Anaerobic Threshold");
+ case QBluetoothUuid::CharacteristicType::DateOfBirth: return QBluetoothServiceDiscoveryAgent::tr("Date Of Birth");
+ case QBluetoothUuid::CharacteristicType::DateOfThresholdAssessment: return QBluetoothServiceDiscoveryAgent::tr("Date Of Threshold Assessment");
+ case QBluetoothUuid::CharacteristicType::EmailAddress: return QBluetoothServiceDiscoveryAgent::tr("Email Address");
+ case QBluetoothUuid::CharacteristicType::FatBurnHeartRateLowerLimit:
return QBluetoothServiceDiscoveryAgent::tr("Fat Burn Heart Rate Lower Limit");
- case QBluetoothUuid::FatBurnHeartRateUpperLimit:
+ case QBluetoothUuid::CharacteristicType::FatBurnHeartRateUpperLimit:
return QBluetoothServiceDiscoveryAgent::tr("Fat Burn Heart Rate Upper Limit");
- case QBluetoothUuid::FirstName: return QBluetoothServiceDiscoveryAgent::tr("First Name");
- case QBluetoothUuid::FiveZoneHeartRateLimits: return QBluetoothServiceDiscoveryAgent::tr("5-Zone Heart Rate Limits");
- case QBluetoothUuid::Gender: return QBluetoothServiceDiscoveryAgent::tr("Gender");
- case QBluetoothUuid::HeartRateMax: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate Maximum");
+ case QBluetoothUuid::CharacteristicType::FirstName: return QBluetoothServiceDiscoveryAgent::tr("First Name");
+ case QBluetoothUuid::CharacteristicType::FiveZoneHeartRateLimits: return QBluetoothServiceDiscoveryAgent::tr("5-Zone Heart Rate Limits");
+ case QBluetoothUuid::CharacteristicType::Gender: return QBluetoothServiceDiscoveryAgent::tr("Gender");
+ case QBluetoothUuid::CharacteristicType::HeartRateMax: return QBluetoothServiceDiscoveryAgent::tr("Heart Rate Maximum");
//: Height of a person
- case QBluetoothUuid::Height: return QBluetoothServiceDiscoveryAgent::tr("Height");
- case QBluetoothUuid::HipCircumference: return QBluetoothServiceDiscoveryAgent::tr("Hip Circumference");
- case QBluetoothUuid::LastName: return QBluetoothServiceDiscoveryAgent::tr("Last Name");
- case QBluetoothUuid::MaximumRecommendedHeartRate:
+ case QBluetoothUuid::CharacteristicType::Height: return QBluetoothServiceDiscoveryAgent::tr("Height");
+ case QBluetoothUuid::CharacteristicType::HipCircumference: return QBluetoothServiceDiscoveryAgent::tr("Hip Circumference");
+ case QBluetoothUuid::CharacteristicType::LastName: return QBluetoothServiceDiscoveryAgent::tr("Last Name");
+ case QBluetoothUuid::CharacteristicType::MaximumRecommendedHeartRate:
return QBluetoothServiceDiscoveryAgent::tr("Maximum Recommended Heart Rate");
- case QBluetoothUuid::RestingHeartRate: return QBluetoothServiceDiscoveryAgent::tr("Resting Heart Rate");
- case QBluetoothUuid::SportTypeForAerobicAnaerobicThresholds:
+ case QBluetoothUuid::CharacteristicType::RestingHeartRate: return QBluetoothServiceDiscoveryAgent::tr("Resting Heart Rate");
+ case QBluetoothUuid::CharacteristicType::SportTypeForAerobicAnaerobicThresholds:
return QBluetoothServiceDiscoveryAgent::tr("Sport Type For Aerobic/Anaerobic Thresholds");
- case QBluetoothUuid::ThreeZoneHeartRateLimits: return QBluetoothServiceDiscoveryAgent::tr("3-Zone Heart Rate Limits");
- case QBluetoothUuid::TwoZoneHeartRateLimits: return QBluetoothServiceDiscoveryAgent::tr("2-Zone Heart Rate Limits");
- case QBluetoothUuid::VO2Max: return QBluetoothServiceDiscoveryAgent::tr("Oxygen Uptake");
- case QBluetoothUuid::WaistCircumference: return QBluetoothServiceDiscoveryAgent::tr("Waist Circumference");
- case QBluetoothUuid::Weight: return QBluetoothServiceDiscoveryAgent::tr("Weight");
- case QBluetoothUuid::DatabaseChangeIncrement:
+ case QBluetoothUuid::CharacteristicType::ThreeZoneHeartRateLimits: return QBluetoothServiceDiscoveryAgent::tr("3-Zone Heart Rate Limits");
+ case QBluetoothUuid::CharacteristicType::TwoZoneHeartRateLimits: return QBluetoothServiceDiscoveryAgent::tr("2-Zone Heart Rate Limits");
+ case QBluetoothUuid::CharacteristicType::VO2Max: return QBluetoothServiceDiscoveryAgent::tr("Oxygen Uptake");
+ case QBluetoothUuid::CharacteristicType::WaistCircumference: return QBluetoothServiceDiscoveryAgent::tr("Waist Circumference");
+ case QBluetoothUuid::CharacteristicType::Weight: return QBluetoothServiceDiscoveryAgent::tr("Weight");
+ case QBluetoothUuid::CharacteristicType::DatabaseChangeIncrement:
//: Environmental sensing related
return QBluetoothServiceDiscoveryAgent::tr("Database Change Increment");
- case QBluetoothUuid::UserIndex: return QBluetoothServiceDiscoveryAgent::tr("User Index");
- case QBluetoothUuid::BodyCompositionFeature: return QBluetoothServiceDiscoveryAgent::tr("Body Composition Feature");
- case QBluetoothUuid::BodyCompositionMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Body Composition Measurement");
- case QBluetoothUuid::WeightMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Weight Measurement");
- case QBluetoothUuid::UserControlPoint: return QBluetoothServiceDiscoveryAgent::tr("User Control Point");
- case QBluetoothUuid::MagneticFluxDensity2D: return QBluetoothServiceDiscoveryAgent::tr("Magnetic Flux Density 2D");
- case QBluetoothUuid::MagneticFluxDensity3D: return QBluetoothServiceDiscoveryAgent::tr("Magnetic Flux Density 3D");
- case QBluetoothUuid::Language: return QBluetoothServiceDiscoveryAgent::tr("Language");
- case QBluetoothUuid::BarometricPressureTrend: return QBluetoothServiceDiscoveryAgent::tr("Barometric Pressure Trend");
+ case QBluetoothUuid::CharacteristicType::UserIndex: return QBluetoothServiceDiscoveryAgent::tr("User Index");
+ case QBluetoothUuid::CharacteristicType::BodyCompositionFeature: return QBluetoothServiceDiscoveryAgent::tr("Body Composition Feature");
+ case QBluetoothUuid::CharacteristicType::BodyCompositionMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Body Composition Measurement");
+ case QBluetoothUuid::CharacteristicType::WeightMeasurement: return QBluetoothServiceDiscoveryAgent::tr("Weight Measurement");
+ case QBluetoothUuid::CharacteristicType::UserControlPoint: return QBluetoothServiceDiscoveryAgent::tr("User Control Point");
+ case QBluetoothUuid::CharacteristicType::MagneticFluxDensity2D: return QBluetoothServiceDiscoveryAgent::tr("Magnetic Flux Density 2D");
+ case QBluetoothUuid::CharacteristicType::MagneticFluxDensity3D: return QBluetoothServiceDiscoveryAgent::tr("Magnetic Flux Density 3D");
+ case QBluetoothUuid::CharacteristicType::Language: return QBluetoothServiceDiscoveryAgent::tr("Language");
+ case QBluetoothUuid::CharacteristicType::BarometricPressureTrend: return QBluetoothServiceDiscoveryAgent::tr("Barometric Pressure Trend");
default:
break;
}
@@ -1069,29 +1069,29 @@ QString QBluetoothUuid::characteristicToString(CharacteristicType uuid)
QString QBluetoothUuid::descriptorToString(QBluetoothUuid::DescriptorType uuid)
{
switch (uuid) {
- case QBluetoothUuid::CharacteristicExtendedProperties:
+ case QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties:
return QBluetoothServiceDiscoveryAgent::tr("Characteristic Extended Properties");
- case QBluetoothUuid::CharacteristicUserDescription:
+ case QBluetoothUuid::DescriptorType::CharacteristicUserDescription:
return QBluetoothServiceDiscoveryAgent::tr("Characteristic User Description");
- case QBluetoothUuid::ClientCharacteristicConfiguration:
+ case QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration:
return QBluetoothServiceDiscoveryAgent::tr("Client Characteristic Configuration");
- case QBluetoothUuid::ServerCharacteristicConfiguration:
+ case QBluetoothUuid::DescriptorType::ServerCharacteristicConfiguration:
return QBluetoothServiceDiscoveryAgent::tr("Server Characteristic Configuration");
- case QBluetoothUuid::CharacteristicPresentationFormat:
+ case QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat:
return QBluetoothServiceDiscoveryAgent::tr("Characteristic Presentation Format");
- case QBluetoothUuid::CharacteristicAggregateFormat:
+ case QBluetoothUuid::DescriptorType::CharacteristicAggregateFormat:
return QBluetoothServiceDiscoveryAgent::tr("Characteristic Aggregate Format");
- case QBluetoothUuid::ValidRange:
+ case QBluetoothUuid::DescriptorType::ValidRange:
return QBluetoothServiceDiscoveryAgent::tr("Valid Range");
- case QBluetoothUuid::ExternalReportReference:
+ case QBluetoothUuid::DescriptorType::ExternalReportReference:
return QBluetoothServiceDiscoveryAgent::tr("External Report Reference");
- case QBluetoothUuid::ReportReference:
+ case QBluetoothUuid::DescriptorType::ReportReference:
return QBluetoothServiceDiscoveryAgent::tr("Report Reference");
- case QBluetoothUuid::EnvironmentalSensingConfiguration:
+ case QBluetoothUuid::DescriptorType::EnvironmentalSensingConfiguration:
return QBluetoothServiceDiscoveryAgent::tr("Environmental Sensing Configuration");
- case QBluetoothUuid::EnvironmentalSensingMeasurement:
+ case QBluetoothUuid::DescriptorType::EnvironmentalSensingMeasurement:
return QBluetoothServiceDiscoveryAgent::tr("Environmental Sensing Measurement");
- case QBluetoothUuid::EnvironmentalSensingTriggerSetting:
+ case QBluetoothUuid::DescriptorType::EnvironmentalSensingTriggerSetting:
return QBluetoothServiceDiscoveryAgent::tr("Environmental Sensing Trigger Setting");
default:
break;
diff --git a/src/bluetooth/qbluetoothuuid.h b/src/bluetooth/qbluetoothuuid.h
index af3e2116..ffb7f31e 100644
--- a/src/bluetooth/qbluetoothuuid.h
+++ b/src/bluetooth/qbluetoothuuid.h
@@ -58,8 +58,7 @@ struct quint128
class Q_BLUETOOTH_EXPORT QBluetoothUuid : public QUuid
{
public:
- //TODO Qt 6: Convert enums to scoped enums (see QTBUG-65831)
- enum ProtocolUuid {
+ enum class ProtocolUuid {
Sdp = 0x0001,
Udp = 0x0002,
Rfcomm = 0x0003,
@@ -87,7 +86,7 @@ public:
L2cap = 0x0100
};
- enum ServiceClassUuid {
+ enum class ServiceClassUuid {
ServiceDiscoveryServer = 0x1000,
BrowseGroupDescriptor = 0x1001,
PublicBrowseGroup = 0x1002,
@@ -181,7 +180,7 @@ public:
ContinuousGlucoseMonitoring = 0x181f
};
- enum CharacteristicType {
+ enum class CharacteristicType {
DeviceName = 0x2a00,
Appearance = 0x2a01,
PeripheralPrivacyFlag = 0x2a02,
@@ -348,7 +347,7 @@ public:
BarometricPressureTrend = 0x2aa3
};
- enum DescriptorType {
+ enum class DescriptorType {
UnknownDescriptorType = 0x0,
CharacteristicExtendedProperties = 0x2900,
CharacteristicUserDescription = 0x2901,
@@ -370,13 +369,13 @@ public:
// values below are based on Bluetooth BASE_UUID
constexpr QBluetoothUuid(ProtocolUuid uuid) noexcept
- : QUuid(uuid, 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
+ : QUuid(static_cast<uint>(uuid), 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
constexpr QBluetoothUuid(ServiceClassUuid uuid) noexcept
- : QUuid(uuid, 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
+ : QUuid(static_cast<uint>(uuid), 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
constexpr QBluetoothUuid(CharacteristicType uuid) noexcept
- : QUuid(uuid, 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
+ : QUuid(static_cast<uint>(uuid), 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
constexpr QBluetoothUuid(DescriptorType uuid) noexcept
- : QUuid(uuid, 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
+ : QUuid(static_cast<uint>(uuid), 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
explicit constexpr QBluetoothUuid(quint16 uuid) noexcept
: QUuid(uuid, 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
explicit constexpr QBluetoothUuid(quint32 uuid) noexcept
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp
index e90a4c14..f46f5cdd 100644
--- a/src/bluetooth/qlowenergycontroller_bluez.cpp
+++ b/src/bluetooth/qlowenergycontroller_bluez.cpp
@@ -662,7 +662,7 @@ void QLowEnergyControllerPrivateBluez::createServicesForCentralIfRequired()
return; //nothing to do
//do not add the services each time we start a connection
- if (localServices.contains(QBluetoothUuid(QBluetoothUuid::GenericAccess)))
+ if (localServices.contains(QBluetoothUuid(QBluetoothUuid::ServiceClassUuid::GenericAccess)))
return;
qCDebug(QT_BT_BLUEZ) << "Creating default GAP/GATT services";
@@ -671,22 +671,22 @@ void QLowEnergyControllerPrivateBluez::createServicesForCentralIfRequired()
//for now the values are static
QLowEnergyServiceData gapServiceData;
gapServiceData.setType(QLowEnergyServiceData::ServiceTypePrimary);
- gapServiceData.setUuid(QBluetoothUuid::GenericAccess);
+ gapServiceData.setUuid(QBluetoothUuid::ServiceClassUuid::GenericAccess);
QLowEnergyCharacteristicData gapDeviceName;
- gapDeviceName.setUuid(QBluetoothUuid::DeviceName);
+ gapDeviceName.setUuid(QBluetoothUuid::CharacteristicType::DeviceName);
gapDeviceName.setProperties(QLowEnergyCharacteristic::Read);
QBluetoothLocalDevice mainAdapter;
gapDeviceName.setValue(mainAdapter.name().toLatin1()); //static name
QLowEnergyCharacteristicData gapAppearance;
- gapAppearance.setUuid(QBluetoothUuid::Appearance);
+ gapAppearance.setUuid(QBluetoothUuid::CharacteristicType::Appearance);
gapAppearance.setProperties(QLowEnergyCharacteristic::Read);
gapAppearance.setValue(QByteArray::fromHex("80")); // Generic Computer (0x80)
QLowEnergyCharacteristicData gapPrivacyFlag;
- gapPrivacyFlag.setUuid(QBluetoothUuid::PeripheralPrivacyFlag);
+ gapPrivacyFlag.setUuid(QBluetoothUuid::CharacteristicType::PeripheralPrivacyFlag);
gapPrivacyFlag.setProperties(QLowEnergyCharacteristic::Read);
gapPrivacyFlag.setValue(QByteArray::fromHex("00")); // disable privacy
@@ -701,16 +701,16 @@ void QLowEnergyControllerPrivateBluez::createServicesForCentralIfRequired()
QLowEnergyServiceData gattServiceData;
gattServiceData.setType(QLowEnergyServiceData::ServiceTypePrimary);
- gattServiceData.setUuid(QBluetoothUuid::GenericAttribute);
+ gattServiceData.setUuid(QBluetoothUuid::ServiceClassUuid::GenericAttribute);
QLowEnergyCharacteristicData serviceChangedChar;
- serviceChangedChar.setUuid(QBluetoothUuid::ServiceChanged);
+ serviceChangedChar.setUuid(QBluetoothUuid::CharacteristicType::ServiceChanged);
serviceChangedChar.setProperties(QLowEnergyCharacteristic::Indicate);
//arbitrary range of 2 bit handle range (1-4
serviceChangedChar.setValue(QByteArray::fromHex("0104"));
const QLowEnergyDescriptorData clientConfig(
- QBluetoothUuid::ClientCharacteristicConfiguration,
+ QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration,
QByteArray(2, 0));
serviceChangedChar.addDescriptor(clientConfig);
gattServiceData.addCharacteristic(serviceChangedChar);
@@ -2627,7 +2627,7 @@ void QLowEnergyControllerPrivateBluez::writeCharacteristicForPeripheral(
if (!hasNotifyProperty && !hasIndicateProperty)
return;
for (const QLowEnergyServicePrivate::DescData &desc : qAsConst(charData.descriptorList)) {
- if (desc.uuid != QBluetoothUuid::ClientCharacteristicConfiguration)
+ if (desc.uuid != QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)
continue;
// Notify/indicate currently connected client.
@@ -3176,7 +3176,7 @@ QLowEnergyControllerPrivateBluez::gatherClientConfigData()
for (auto descIt = charData.descriptorList.begin();
descIt != charData.descriptorList.end(); ++descIt) {
QLowEnergyServicePrivate::DescData &descData = descIt.value();
- if (descData.uuid == QBluetoothUuid::ClientCharacteristicConfiguration) {
+ if (descData.uuid == QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration) {
data << TempClientConfigurationData(&descData, charData.valueHandle,
descIt.key());
break;
@@ -3390,17 +3390,17 @@ void QLowEnergyControllerPrivateBluez::addToGenericAttributeList(const QLowEnerg
attribute.maxLength = INT_MAX;
// Spec v4.2, Vol. 3, Part G, 3.3.3.x
- if (attribute.type == QBluetoothUuid::CharacteristicExtendedProperties) {
+ if (attribute.type == QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties) {
attribute.properties = QLowEnergyCharacteristic::Read;
attribute.minLength = attribute.maxLength = 2;
- } else if (attribute.type == QBluetoothUuid::CharacteristicPresentationFormat) {
+ } else if (attribute.type == QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat) {
attribute.properties = QLowEnergyCharacteristic::Read;
attribute.minLength = attribute.maxLength = 7;
- } else if (attribute.type == QBluetoothUuid::CharacteristicAggregateFormat) {
+ } else if (attribute.type == QBluetoothUuid::DescriptorType::CharacteristicAggregateFormat) {
attribute.properties = QLowEnergyCharacteristic::Read;
attribute.minLength = 4;
- } else if (attribute.type == QBluetoothUuid::ClientCharacteristicConfiguration
- || attribute.type == QBluetoothUuid::ServerCharacteristicConfiguration) {
+ } else if (attribute.type == QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration
+ || attribute.type == QBluetoothUuid::DescriptorType::ServerCharacteristicConfiguration) {
attribute.properties = QLowEnergyCharacteristic::Read
| QLowEnergyCharacteristic::Write
| QLowEnergyCharacteristic::WriteNoResponse
diff --git a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp
index d35970c0..f9dd8a12 100644
--- a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp
+++ b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp
@@ -137,7 +137,7 @@ void QLowEnergyControllerPrivateBluezDBus::devicePropertiesChanged(
if (changedProperties.contains(QStringLiteral("Percentage"))) {
// if battery service is discovered and ClientCharConfig is enabled
// emit characteristicChanged() signal
- const QBluetoothUuid uuid(QBluetoothUuid::BatteryService);
+ const QBluetoothUuid uuid(QBluetoothUuid::ServiceClassUuid::BatteryService);
if (!serviceList.contains(uuid) || !dbusServices.contains(uuid)
|| !dbusServices[uuid].hasBatteryService
|| dbusServices[uuid].batteryInterface.isNull())
@@ -151,13 +151,13 @@ void QLowEnergyControllerPrivateBluezDBus::devicePropertiesChanged(
iter = serviceData->characteristicList.begin();
while (iter != serviceData->characteristicList.end()) {
auto &charData = iter.value();
- if (charData.uuid != QBluetoothUuid::BatteryLevel)
+ if (charData.uuid != QBluetoothUuid::CharacteristicType::BatteryLevel)
continue;
// Client Characteristic Notification enabled?
bool cccActive = false;
for (const QLowEnergyServicePrivate::DescData &descData : qAsConst(charData.descriptorList)) {
- if (descData.uuid != QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration))
+ if (descData.uuid != QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration))
continue;
if (descData.value == QByteArray::fromHex("0100")
|| descData.value == QByteArray::fromHex("0200")) {
@@ -197,7 +197,7 @@ void QLowEnergyControllerPrivateBluezDBus::characteristicPropertiesChanged(
const QLowEnergyCharacteristic changedChar = characteristicForHandle(charHandle);
const QLowEnergyDescriptor ccnDescriptor = changedChar.descriptor(
- QBluetoothUuid::ClientCharacteristicConfiguration);
+ QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
if (!ccnDescriptor.isValid())
return;
@@ -423,7 +423,7 @@ void QLowEnergyControllerPrivateBluezDBus::discoverServices()
GattService serviceContainer;
serviceContainer.servicePath = path;
- if (uuid == QBluetoothUuid::BatteryService)
+ if (uuid == QBluetoothUuid::ServiceClassUuid::BatteryService)
serviceContainer.hasBatteryService = true;
serviceList.insert(priv->uuid, priv);
@@ -451,7 +451,7 @@ void QLowEnergyControllerPrivateBluezDBus::discoverServices()
if (iface == QStringLiteral("org.bluez.Battery1")) {
qCDebug(QT_BT_BLUEZ) << "Found dedicated Battery service -> emulating generic btle access";
setupServicePrivate(QLowEnergyService::PrimaryService,
- QBluetoothUuid::BatteryService,
+ QBluetoothUuid::ServiceClassUuid::BatteryService,
it.key().path());
}
}
@@ -501,19 +501,19 @@ void QLowEnergyControllerPrivateBluezDBus::discoverBatteryServiceDetails(
charData.valueHandle = runningHandle++;
charData.properties.setFlag(QLowEnergyCharacteristic::Read);
charData.properties.setFlag(QLowEnergyCharacteristic::Notify);
- charData.uuid = QBluetoothUuid::BatteryLevel;
+ charData.uuid = QBluetoothUuid::CharacteristicType::BatteryLevel;
charData.value = QByteArray(1, char(batteryService->percentage()));
// Create the descriptors for the BatteryLevel
// They are hardcoded although CCC may change
QLowEnergyServicePrivate::DescData descData;
QLowEnergyHandle descriptorHandle = runningHandle++;
- descData.uuid = QBluetoothUuid::ClientCharacteristicConfiguration;
+ descData.uuid = QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration;
descData.value = QByteArray::fromHex("0000"); // all configs off
charData.descriptorList.insert(descriptorHandle, descData);
descriptorHandle = runningHandle++;
- descData.uuid = QBluetoothUuid::CharacteristicPresentationFormat;
+ descData.uuid = QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat;
//for details see Characteristic Presentation Format Vol3, Part G 3.3.3.5
// unsigend 8 bit, exp=1, org.bluetooth.unit.percentage, namespace & description
// bit order: little endian
@@ -521,7 +521,7 @@ void QLowEnergyControllerPrivateBluezDBus::discoverBatteryServiceDetails(
charData.descriptorList.insert(descriptorHandle, descData);
descriptorHandle = runningHandle++;
- descData.uuid = QBluetoothUuid::ReportReference;
+ descData.uuid = QBluetoothUuid::DescriptorType::ReportReference;
descData.value = QByteArray::fromHex("0401");
charData.descriptorList.insert(descriptorHandle, descData);
@@ -667,7 +667,7 @@ void QLowEnergyControllerPrivateBluezDBus::discoverServiceDetails(const QBluetoo
// every ClientCharacteristicConfiguration needs to track property changes
if (descData.uuid
- == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
dbusChar.charMonitor = QSharedPointer<OrgFreedesktopDBusPropertiesInterface>::create(
QStringLiteral("org.bluez"),
dbusChar.characteristic->path(),
@@ -1073,7 +1073,7 @@ void QLowEnergyControllerPrivateBluezDBus::scheduleNextJob()
//notifications enabled via characteristics Start/StopNotify() functions
//otherwise regular WriteValue() calls on descriptor interface
- if (descUuid == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ if (descUuid == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
const QByteArray value = nextJob.value;
QDBusPendingReply<> reply;
@@ -1244,7 +1244,7 @@ void QLowEnergyControllerPrivateBluezDBus::writeDescriptor(
if (!descriptor.isValid())
return;
- if (descriptor.uuid() == QBluetoothUuid::ClientCharacteristicConfiguration) {
+ if (descriptor.uuid() == QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration) {
if (newValue == QByteArray::fromHex("0000")
|| newValue == QByteArray::fromHex("0100")
|| newValue == QByteArray::fromHex("0200")) {
diff --git a/src/bluetooth/qlowenergycontroller_darwin.mm b/src/bluetooth/qlowenergycontroller_darwin.mm
index 67c99f24..f95c4977 100644
--- a/src/bluetooth/qlowenergycontroller_darwin.mm
+++ b/src/bluetooth/qlowenergycontroller_darwin.mm
@@ -636,7 +636,7 @@ void QLowEnergyControllerPrivateDarwin::_q_notificationEnabled(QLowEnergyHandle
}
const QLowEnergyDescriptor qtDescriptor =
- qtChar.descriptor(QBluetoothUuid::ClientCharacteristicConfiguration);
+ qtChar.descriptor(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
if (!qtDescriptor.isValid()) {
qCWarning(QT_BT_DARWIN) << "characteristic" << charHandle
<< "does not have a client characteristic "
diff --git a/src/bluetooth/qlowenergycontroller_win.cpp b/src/bluetooth/qlowenergycontroller_win.cpp
index 78c02618..2c0af5ab 100644
--- a/src/bluetooth/qlowenergycontroller_win.cpp
+++ b/src/bluetooth/qlowenergycontroller_win.cpp
@@ -629,18 +629,18 @@ static BTH_LE_GATT_CHARACTERISTIC recoverNativeLeGattCharacteristic(
static BTH_LE_GATT_DESCRIPTOR_TYPE nativeLeGattDescriptorTypeFromUuid(
const QBluetoothUuid &uuid)
{
- switch (uuid.toUInt16()) {
- case QBluetoothUuid::CharacteristicExtendedProperties:
+ switch (static_cast<QBluetoothUuid::DescriptorType>(uuid.toUInt16())) {
+ case QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties:
return CharacteristicExtendedProperties;
- case QBluetoothUuid::CharacteristicUserDescription:
+ case QBluetoothUuid::DescriptorType::CharacteristicUserDescription:
return CharacteristicUserDescription;
- case QBluetoothUuid::ClientCharacteristicConfiguration:
+ case QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration:
return ClientCharacteristicConfiguration;
- case QBluetoothUuid::ServerCharacteristicConfiguration:
+ case QBluetoothUuid::DescriptorType::ServerCharacteristicConfiguration:
return ServerCharacteristicConfiguration;
- case QBluetoothUuid::CharacteristicPresentationFormat:
+ case QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat:
return CharacteristicFormat;
- case QBluetoothUuid::CharacteristicAggregateFormat:
+ case QBluetoothUuid::DescriptorType::CharacteristicAggregateFormat:
return CharacteristicAggregateFormat;
default:
return CustomDescriptor;
diff --git a/src/bluetooth/qlowenergycontroller_winrt.cpp b/src/bluetooth/qlowenergycontroller_winrt.cpp
index 0cd41d0b..24bf9d44 100644
--- a/src/bluetooth/qlowenergycontroller_winrt.cpp
+++ b/src/bluetooth/qlowenergycontroller_winrt.cpp
@@ -169,7 +169,7 @@ public slots:
hr = descriptor->get_Uuid(&descriptorUuid);
Q_ASSERT_SUCCEEDED(hr);
descData.uuid = QBluetoothUuid(descriptorUuid);
- if (descData.uuid == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ if (descData.uuid == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
ComPtr<IAsyncOperation<ClientCharConfigDescriptorResult *>> readOp;
hr = characteristic->ReadClientCharacteristicConfigurationDescriptorAsync(&readOp);
Q_ASSERT_SUCCEEDED(hr);
@@ -205,7 +205,7 @@ public slots:
ComPtr<IGattReadResult> readResult;
hr = QWinRTFunctions::await(readOp, readResult.GetAddressOf());
Q_ASSERT_SUCCEEDED(hr);
- if (descData.uuid == QBluetoothUuid::CharacteristicUserDescription)
+ if (descData.uuid == QBluetoothUuid::DescriptorType::CharacteristicUserDescription)
descData.value = byteArrayFromGattResult(readResult, true);
else
descData.value = byteArrayFromGattResult(readResult);
@@ -763,7 +763,7 @@ void QLowEnergyControllerPrivateWinRT::readDescriptor(const QSharedPointer<QLowE
qCDebug(QT_BT_WINRT) << "Descriptor" << descHandle << "cannot be found in characteristic" << charHandle;
const QLowEnergyServicePrivate::DescData descData = charData.descriptorList.value(descHandle);
const QBluetoothUuid descUuid = descData.uuid;
- if (descUuid == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ if (descUuid == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
ComPtr<IAsyncOperation<ClientCharConfigDescriptorResult *>> readOp;
HRESULT hr = characteristic->ReadClientCharacteristicConfigurationDescriptorAsync(&readOp);
Q_ASSERT_SUCCEEDED(hr);
@@ -809,7 +809,7 @@ void QLowEnergyControllerPrivateWinRT::readDescriptor(const QSharedPointer<QLowE
return S_OK;
}
QLowEnergyServicePrivate::DescData descData;
- descData.uuid = QBluetoothUuid::ClientCharacteristicConfiguration;
+ descData.uuid = QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration;
descData.value = QByteArray(2, Qt::Uninitialized);
qToLittleEndian(result, descData.value.data());
service->characteristicList[charHandle].descriptorList[descHandle] = descData;
@@ -848,7 +848,7 @@ void QLowEnergyControllerPrivateWinRT::readDescriptor(const QSharedPointer<QLowE
return S_OK;
}
QLowEnergyServicePrivate::DescData descData;
- if (descUuid == QBluetoothUuid::CharacteristicUserDescription)
+ if (descUuid == QBluetoothUuid::DescriptorType::CharacteristicUserDescription)
descData.value = byteArrayFromGattResult(descriptorValue, true);
else
descData.value = byteArrayFromGattResult(descriptorValue);
@@ -984,7 +984,7 @@ void QLowEnergyControllerPrivateWinRT::writeDescriptor(
qCDebug(QT_BT_WINRT) << "Descriptor" << descHandle << "could not be found in Characteristic" << charHandle;
QLowEnergyServicePrivate::DescData descData = charData.descriptorList.value(descHandle);
- if (descData.uuid == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ if (descData.uuid == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
GattClientCharacteristicConfigurationDescriptorValue value;
quint16 intValue = qFromLittleEndian<quint16>(newValue);
if (intValue & GattClientCharacteristicConfigurationDescriptorValue_Indicate && intValue & GattClientCharacteristicConfigurationDescriptorValue_Notify) {
diff --git a/src/bluetooth/qlowenergycontroller_winrt_new.cpp b/src/bluetooth/qlowenergycontroller_winrt_new.cpp
index acf56cac..783beeac 100644
--- a/src/bluetooth/qlowenergycontroller_winrt_new.cpp
+++ b/src/bluetooth/qlowenergycontroller_winrt_new.cpp
@@ -324,7 +324,7 @@ public slots:
WARN_AND_CONTINUE_IF_FAILED(hr, "Could not obtain descriptor's Uuid")
descData.uuid = QBluetoothUuid(descriptorUuid);
charData.descriptorList.insert(descHandle, descData);
- if (descData.uuid == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ if (descData.uuid == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
ComPtr<IAsyncOperation<ClientCharConfigDescriptorResult *>> readOp;
hr = characteristic->ReadClientCharacteristicConfigurationDescriptorAsync(&readOp);
WARN_AND_CONTINUE_IF_FAILED(hr, "Could not read descriptor value")
@@ -361,7 +361,7 @@ public slots:
ComPtr<IGattReadResult> readResult;
hr = QWinRTFunctions::await(readOp, readResult.GetAddressOf());
WARN_AND_CONTINUE_IF_FAILED(hr, "Could await descriptor read result")
- if (descData.uuid == QBluetoothUuid::CharacteristicUserDescription)
+ if (descData.uuid == QBluetoothUuid::DescriptorType::CharacteristicUserDescription)
descData.value = byteArrayFromGattResult(readResult, true);
else
descData.value = byteArrayFromGattResult(readResult);
@@ -1042,7 +1042,7 @@ void QLowEnergyControllerPrivateWinRTNew::readDescriptor(
qCDebug(QT_BT_WINRT) << "Descriptor" << descHandle << "cannot be found in characteristic" << charHandle;
const QLowEnergyServicePrivate::DescData descData = charData.descriptorList.value(descHandle);
const QBluetoothUuid descUuid = descData.uuid;
- if (descUuid == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ if (descUuid == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
ComPtr<IAsyncOperation<ClientCharConfigDescriptorResult *>> readOp;
HRESULT hr = characteristic->ReadClientCharacteristicConfigurationDescriptorAsync(&readOp);
CHECK_HR_AND_SET_SERVICE_ERROR(hr, "Could not read client characteristic configuration",
@@ -1083,7 +1083,7 @@ void QLowEnergyControllerPrivateWinRTNew::readDescriptor(
return S_OK;
}
QLowEnergyServicePrivate::DescData descData;
- descData.uuid = QBluetoothUuid::ClientCharacteristicConfiguration;
+ descData.uuid = QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration;
descData.value = QByteArray(2, Qt::Uninitialized);
qToLittleEndian(result, descData.value.data());
service->characteristicList[charHandle].descriptorList[descHandle] = descData;
@@ -1162,7 +1162,7 @@ void QLowEnergyControllerPrivateWinRTNew::readDescriptor(
}
QLowEnergyServicePrivate::DescData descData;
descData.uuid = descUuid;
- if (descData.uuid == QBluetoothUuid::CharacteristicUserDescription)
+ if (descData.uuid == QBluetoothUuid::DescriptorType::CharacteristicUserDescription)
descData.value = byteArrayFromGattResult(descriptorValue, true);
else
descData.value = byteArrayFromGattResult(descriptorValue);
@@ -1321,7 +1321,7 @@ void QLowEnergyControllerPrivateWinRTNew::writeDescriptor(
<< charHandle;
QLowEnergyServicePrivate::DescData descData = charData.descriptorList.value(descHandle);
- if (descData.uuid == QBluetoothUuid(QBluetoothUuid::ClientCharacteristicConfiguration)) {
+ if (descData.uuid == QBluetoothUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration)) {
GattClientCharacteristicConfigurationDescriptorValue value;
quint16 intValue = qFromLittleEndian<quint16>(newValue);
if (intValue & GattClientCharacteristicConfigurationDescriptorValue_Indicate
diff --git a/src/bluetooth/qlowenergydescriptor.cpp b/src/bluetooth/qlowenergydescriptor.cpp
index 6908a041..994c17a8 100644
--- a/src/bluetooth/qlowenergydescriptor.cpp
+++ b/src/bluetooth/qlowenergydescriptor.cpp
@@ -281,27 +281,27 @@ QBluetoothUuid::DescriptorType QLowEnergyDescriptor::type() const
{
const QBluetoothUuid u = uuid();
bool ok = false;
- quint16 shortUuid = u.toUInt16(&ok);
+ QBluetoothUuid::DescriptorType shortUuid = static_cast<QBluetoothUuid::DescriptorType>(u.toUInt16(&ok));
if (!ok)
- return QBluetoothUuid::UnknownDescriptorType;
+ return QBluetoothUuid::DescriptorType::UnknownDescriptorType;
switch (shortUuid) {
- case QBluetoothUuid::CharacteristicExtendedProperties:
- case QBluetoothUuid::CharacteristicUserDescription:
- case QBluetoothUuid::ClientCharacteristicConfiguration:
- case QBluetoothUuid::ServerCharacteristicConfiguration:
- case QBluetoothUuid::CharacteristicPresentationFormat:
- case QBluetoothUuid::CharacteristicAggregateFormat:
- case QBluetoothUuid::ValidRange:
- case QBluetoothUuid::ExternalReportReference:
- case QBluetoothUuid::ReportReference:
+ case QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties:
+ case QBluetoothUuid::DescriptorType::CharacteristicUserDescription:
+ case QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration:
+ case QBluetoothUuid::DescriptorType::ServerCharacteristicConfiguration:
+ case QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat:
+ case QBluetoothUuid::DescriptorType::CharacteristicAggregateFormat:
+ case QBluetoothUuid::DescriptorType::ValidRange:
+ case QBluetoothUuid::DescriptorType::ExternalReportReference:
+ case QBluetoothUuid::DescriptorType::ReportReference:
return (QBluetoothUuid::DescriptorType) shortUuid;
default:
break;
}
- return QBluetoothUuid::UnknownDescriptorType;
+ return QBluetoothUuid::DescriptorType::UnknownDescriptorType;
}
/*!
diff --git a/src/bluetooth/qlowenergyservice.cpp b/src/bluetooth/qlowenergyservice.cpp
index b300103a..54fe8255 100644
--- a/src/bluetooth/qlowenergyservice.cpp
+++ b/src/bluetooth/qlowenergyservice.cpp
@@ -144,7 +144,7 @@ QT_BEGIN_NAMESPACE
the central is interested in receiving. In order for a characteristic to support
such notifications it must have the \l QLowEnergyCharacteristic::Notify or
\l QLowEnergyCharacteristic::Indicate property and a descriptor of type
- \l QBluetoothUuid::ClientCharacteristicConfiguration. Provided those conditions
+ \l QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration. Provided those conditions
are fulfilled notifications can be enabled as shown in the following code segment:
\snippet doc_src_qtbluetooth.cpp enable_btle_notifications
@@ -330,7 +330,7 @@ QT_BEGIN_NAMESPACE
role, this signal is emitted when the value of \a characteristic is changed by an event on the
peripheral/device side. In that case, the signal emission implies that change notifications must
have been activated via the characteristic's
- \l {QBluetoothUuid::ClientCharacteristicConfiguration}{ClientCharacteristicConfiguration}
+ \l {QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration}{ClientCharacteristicConfiguration}
descriptor prior to the change event on the peripheral. More details on how this might be
done can be found further \l{notifications}{above}.
@@ -814,7 +814,7 @@ void QLowEnergyService::writeDescriptor(const QLowEnergyDescriptor &descriptor,
return;
}
#ifdef Q_OS_DARWIN
- if (descriptor.uuid() == QBluetoothUuid::ClientCharacteristicConfiguration) {
+ if (descriptor.uuid() == QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration) {
// We have to identify a special case - ClientCharacteristicConfiguration
// since with CoreBluetooth:
//