summaryrefslogtreecommitdiff
path: root/gatouuid.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2014-05-10 23:56:23 +0200
committerJavier S. Pedro <maemo@javispedro.com>2014-05-10 23:56:23 +0200
commitff9fd605200825322beed8f86df765b70370b9d3 (patch)
tree741ff558aa3363396d8630da0d6c681e499ba5c5 /gatouuid.h
parent55496b91d2b144c5b8aafd20a8c8332aee4607ab (diff)
downloadlibgato-ff9fd605200825322beed8f86df765b70370b9d3.tar.gz
libgato-ff9fd605200825322beed8f86df765b70370b9d3.zip
bluez5 keeps removing APIs, so switch to our own
Diffstat (limited to 'gatouuid.h')
-rw-r--r--gatouuid.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/gatouuid.h b/gatouuid.h
index d94d7ae..08d0305 100644
--- a/gatouuid.h
+++ b/gatouuid.h
@@ -3,8 +3,7 @@
#include <QtCore/QDebug>
#include <QtCore/QtEndian>
-#include <QtCore/QSharedDataPointer>
-#include <QtCore/QString>
+#include <QtCore/QUuid>
#include "libgato_global.h"
class GatoUUIDPrivate;
@@ -44,11 +43,8 @@ inline LIBGATO_EXPORT void qToLittleEndian<gatouint128>(gatouint128 src, uchar *
#endif
}
-class LIBGATO_EXPORT GatoUUID
+class LIBGATO_EXPORT GatoUUID : public QUuid
{
- Q_GADGET
- Q_ENUMS(GattUuid)
-
public:
enum GattUuid {
GattGenericAccessProfile = 0x1800,
@@ -78,23 +74,14 @@ public:
explicit GatoUUID(gatouint128 uuid);
explicit GatoUUID(const QString &uuid);
GatoUUID(const GatoUUID &o);
+ GatoUUID(const QUuid &uuid);
~GatoUUID();
- bool isNull() const;
-
int minimumSize() const;
quint16 toUInt16(bool *ok = 0) const;
quint32 toUInt32(bool *ok = 0) const;
gatouint128 toUInt128() const;
- QString toString() const;
-
- GatoUUID& operator=(const GatoUUID& o);
- friend bool operator==(const GatoUUID &a, const GatoUUID &b);
- friend bool operator!=(const GatoUUID &a, const GatoUUID &b);
-
-private:
- QSharedDataPointer<GatoUUIDPrivate> d;
};
LIBGATO_EXPORT QDebug operator<<(QDebug debug, const GatoUUID &uuid);