summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothuuid.h
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2023-03-27 10:15:18 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2023-04-03 10:59:34 +0200
commit55abcc47ee36e901b6f14d08d9a2ea0483b40dab (patch)
tree26da3974d92269d1e2b8059ee9cc0420f43574f3 /src/bluetooth/qbluetoothuuid.h
parent913fb687a2f59003e81a42785b02450ffd3788cd (diff)
QBluetoothUuid - add platform-specific conversion functions
Namely: fromCBUUID and toCBUUID, similar to fromNSUUID and toNSUUID that we already have. [ChangeLog][QtBluetooth] Add CoreBluetooth-specific conversion to QBluetoothUuid class, to get CBUUID out of QBluetoothUuid and convert CBUUID to QBluetoothUuid. Fixes: QTBUG-112303 Change-Id: I4ca0b13395b4346f7c830a0e042a16f976998a33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothuuid.h')
-rw-r--r--src/bluetooth/qbluetoothuuid.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothuuid.h b/src/bluetooth/qbluetoothuuid.h
index 6ee1f26f..0978780d 100644
--- a/src/bluetooth/qbluetoothuuid.h
+++ b/src/bluetooth/qbluetoothuuid.h
@@ -12,6 +12,10 @@
#include <QtCore/QDebug>
+#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
+Q_FORWARD_DECLARE_OBJC_CLASS(CBUUID);
+#endif
+
QT_BEGIN_NAMESPACE
#if QT_BLUETOOTH_REMOVED_SINCE(6, 6)
@@ -376,6 +380,11 @@ public:
quint128 toUInt128() const;
#endif
+#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
+ static QBluetoothUuid fromCBUUID(CBUUID *cbUuid);
+ CBUUID *toCBUUID() const Q_DECL_NS_RETURNS_AUTORELEASED;
+#endif
+
static QString serviceClassToString(ServiceClassUuid uuid);
static QString protocolToString(ProtocolUuid uuid);
static QString characteristicToString(CharacteristicType uuid);