Fix SDP BrowseGroupList entry
A BrowseGroupList is defined as sequence in which each element is a UUID that represents a browse group to which the service record belongs. Except for the QBluetoothServer::listen() implementation every other implementation did not use the sequence pattern. This patch unifies all BrowseGroupList entries through QtBluetooth and its examples/tests. Change-Id: I37640ae0500c557d79350359883abc6a66a46346 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
dfee9aa22f
commit
97dc04e0d7
|
|
@ -377,8 +377,9 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const
|
|||
|
||||
QBluetoothServiceInfo serviceInfo;
|
||||
serviceInfo.setAttribute(QSInfo::ServiceName, serviceName);
|
||||
serviceInfo.setAttribute(QSInfo::BrowseGroupList,
|
||||
QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
QBluetoothServiceInfo::Sequence publicBrowse;
|
||||
publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
serviceInfo.setAttribute(QSInfo::BrowseGroupList, publicBrowse);
|
||||
|
||||
QSInfo::Sequence profileSequence;
|
||||
QSInfo::Sequence classId;
|
||||
|
|
|
|||
|
|
@ -410,8 +410,9 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
|
|||
}
|
||||
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::ProtocolDescriptorList, protocolDescriptorList);
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList,
|
||||
QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
QBluetoothServiceInfo::Sequence publicBrowse;
|
||||
publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, publicBrowse);
|
||||
|
||||
if (!customUuids.contains(i)) {
|
||||
//if we don't have custom uuid use it as class id as well
|
||||
|
|
|
|||
|
|
@ -306,8 +306,9 @@ void QDeclarativeBluetoothService::setRegistered(bool registered)
|
|||
|
||||
//qDebug() << "name/uuid" << d->m_name << d->m_uuid << d->m_port;
|
||||
|
||||
d->m_service->setAttribute(QBluetoothServiceInfo::BrowseGroupList,
|
||||
QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
QBluetoothServiceInfo::Sequence publicBrowse;
|
||||
publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
d->m_service->setAttribute(QBluetoothServiceInfo::BrowseGroupList, publicBrowse);
|
||||
|
||||
QBluetoothServiceInfo::Sequence protocolDescriptorList;
|
||||
QBluetoothServiceInfo::Sequence protocol;
|
||||
|
|
|
|||
|
|
@ -286,8 +286,9 @@ void tst_QBluetoothServiceDiscoveryAgent::tst_serviceDiscoveryAdapters()
|
|||
server.listen(addresses[0]);
|
||||
QBluetoothServiceInfo serviceInfo;
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceName, "serviceName");
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList,
|
||||
QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
QBluetoothServiceInfo::Sequence publicBrowse;
|
||||
publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, publicBrowse);
|
||||
|
||||
QBluetoothServiceInfo::Sequence profileSequence;
|
||||
QBluetoothServiceInfo::Sequence classId;
|
||||
|
|
|
|||
|
|
@ -600,8 +600,9 @@ void BtLocalDevice::serverListenPort()
|
|||
|
||||
|
||||
// Service Discoverability
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList,
|
||||
QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
QBluetoothServiceInfo::Sequence browseSequence;
|
||||
browseSequence << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
|
||||
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, browseSequence);
|
||||
|
||||
// Protocol descriptor list
|
||||
QBluetoothServiceInfo::Sequence protocolDescriptorList;
|
||||
|
|
|
|||
Loading…
Reference in New Issue