summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/bluetooth/btchat/chatserver.cpp9
-rw-r--r--src/bluetooth/qbluetoothserviceinfo.cpp6
-rw-r--r--src/bluetooth/qbluetoothuuid.cpp4
3 files changed, 15 insertions, 4 deletions
diff --git a/examples/bluetooth/btchat/chatserver.cpp b/examples/bluetooth/btchat/chatserver.cpp
index 8b1bf6f0..0b29b87b 100644
--- a/examples/bluetooth/btchat/chatserver.cpp
+++ b/examples/bluetooth/btchat/chatserver.cpp
@@ -73,11 +73,16 @@ void ChatServer::startServer(const QBluetoothAddress& localAdapter)
}
//! [Create the server]
- serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceRecordHandle, (uint)0x00010010);
+ //serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceRecordHandle, (uint)0x00010010);
//! [Class Uuuid must contain at least 1 entry]
QBluetoothServiceInfo::Sequence classId;
- classId << QVariant::fromValue(QBluetoothUuid(serviceUuid));
+
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ serviceInfo.setAttribute(QBluetoothServiceInfo::BluetoothProfileDescriptorList,
+ classId);
+
+ classId.prepend(QVariant::fromValue(QBluetoothUuid(serviceUuid)));
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId);
//! [Class Uuuid must contain at least 1 entry]
diff --git a/src/bluetooth/qbluetoothserviceinfo.cpp b/src/bluetooth/qbluetoothserviceinfo.cpp
index 5ff48b4e..c38d5bbc 100644
--- a/src/bluetooth/qbluetoothserviceinfo.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo.cpp
@@ -110,10 +110,12 @@ QT_BEGIN_NAMESPACE
Bluetooth service attributes. Please check the Bluetooth Core Specification for a more detailed description of these attributes.
\value ServiceRecordHandle Specifies a service record from which attributes can be retrieved.
- \value ServiceClassIds UUIDs of service classes that the service conforms to.
+ \value ServiceClassIds UUIDs of service classes that the service conforms to. The
+ most common service classes are defined in (\l QBluetoothUuid::ServiceClassUuid)
\value ServiceRecordState Attibute changes when any other service attribute is added, deleted or modified.
\value ServiceId UUID that uniquely identifies the service.
- \value ProtocolDescriptorList List of protocols used by the service.
+ \value ProtocolDescriptorList List of protocols used by the service. The most common protocol Uuids are defined
+ in \l QBluetoothUuid::ProtocolUuid
\value BrowseGroupList List of browse groups the service is in.
\value LanguageBaseAttributeIdList List of language base attribute IDs to support human-readable attributes.
\value ServiceInfoTimeToLive Number of seconds for which the service record is expected to remain valid and unchanged.
diff --git a/src/bluetooth/qbluetoothuuid.cpp b/src/bluetooth/qbluetoothuuid.cpp
index 5426e943..fcf5a5f7 100644
--- a/src/bluetooth/qbluetoothuuid.cpp
+++ b/src/bluetooth/qbluetoothuuid.cpp
@@ -96,6 +96,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(QUuid, baseUuid, ("{00000000-0000-1000-8000-00805F9B34
\value McapControlChannel Multi-Channel Adaptation Protocol UUID
\value McapDataChannel Multi-Channel Adaptation Protocol UUID
\value L2cap L2CAP protocol UUID
+
+ \sa QBluetoothServiceInfo::ProtocolDescriptorList
*/
/*!
@@ -161,6 +163,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(QUuid, baseUuid, ("{00000000-0000-1000-8000-00805F9B34
\value HDP Health Device Profile
\value HDPSource Health Device Profile
\value HDPSink Health Device Profile
+
+ \sa QBluetoothServiceInfo::ServiceClassIds
*/
/*!