summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdeviceinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothdeviceinfo.cpp')
-rw-r--r--src/bluetooth/qbluetoothdeviceinfo.cpp42
1 files changed, 38 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothdeviceinfo.cpp b/src/bluetooth/qbluetoothdeviceinfo.cpp
index bde8655e..46df5c7b 100644
--- a/src/bluetooth/qbluetoothdeviceinfo.cpp
+++ b/src/bluetooth/qbluetoothdeviceinfo.cpp
@@ -61,7 +61,10 @@ QT_BEGIN_NAMESPACE
\value MiscellaneousDevice A miscellaneous device.
\value ComputerDevice A computer device or PDA.
\value PhoneDevice A telephone device.
- \value LANAccessDevice A device that provides access to a local area network.
+ \value LANAccessDevice A device that provides access to a local area network
+ (deprecated since Qt 5.13 and replaced by
+ \l QBluetoothDeviceInfo::NetworkDevice).
+ \value NetworkDevice A device that provides access to a local area network (since Qt 5.13).
\value AudioVideoDevice A device capable of playback or capture of audio and/or video.
\value PeripheralDevice A peripheral device such as a keyboard, mouse, and so on.
\value ImagingDevice An imaging device such as a display, printer, scanner or camera.
@@ -536,6 +539,8 @@ quint8 QBluetoothDeviceInfo::minorDeviceClass() const
}
/*!
+ \deprecated
+
Sets the list of service UUIDs to \a uuids and the completeness of the data to \a completeness.
*/
void QBluetoothDeviceInfo::setServiceUuids(const QList<QBluetoothUuid> &uuids,
@@ -543,11 +548,38 @@ void QBluetoothDeviceInfo::setServiceUuids(const QList<QBluetoothUuid> &uuids,
{
Q_D(QBluetoothDeviceInfo);
- d->serviceUuids = uuids;
+ d->serviceUuids = uuids.toVector();
d->serviceUuidsCompleteness = completeness;
}
/*!
+ Sets the list of service UUIDs to \a uuids.
+ \since 5.13
+ */
+void QBluetoothDeviceInfo::setServiceUuids(const QVector<QBluetoothUuid> &uuids)
+{
+ Q_D(QBluetoothDeviceInfo);
+ d->serviceUuids = uuids;
+}
+
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+/*!
+ Returns the list of service UUIDS supported by the device. Most commonly this
+ list of uuids represents custom uuids or a uuid value specified by
+ \l QBluetoothUuid::ServiceClassUuid.
+
+ \sa serviceUuids()
+ \since 6.0
+*/
+QVector<QBluetoothUuid> QBluetoothDeviceInfo::serviceUuids() const
+{
+ Q_D(const QBluetoothDeviceInfo);
+ return d->serviceUuids;
+}
+
+#else
+
+/*!
Returns the list of service UUIDS supported by the device. If \a completeness is not 0 it will
be set to DataComplete and the complete list of UUIDs supported by the device is returned.
DataIncomplete if additional service UUIDs are supported by the device and DataUnavailable if
@@ -562,10 +594,13 @@ QList<QBluetoothUuid> QBluetoothDeviceInfo::serviceUuids(DataCompleteness *compl
if (completeness)
*completeness = d->serviceUuidsCompleteness;
- return d->serviceUuids;
+ return d->serviceUuids.toList();
}
+#endif //QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
/*!
+ \deprecated
+
Returns the completeness of the service UUID list. If DataComplete is returned,
serviceUuids() returns the complete list of service UUIDs supported by the device, otherwise
only the partial or empty list of service UUIDs. To get a list
@@ -612,7 +647,6 @@ QVector<quint16> QBluetoothDeviceInfo::manufacturerIds() const
*/
QByteArray QBluetoothDeviceInfo::manufacturerData(quint16 manufacturerId) const
{
- // TODO Currently not implemented on WinRT
Q_D(const QBluetoothDeviceInfo);
return d->manufacturerData.value(manufacturerId);
}