From cc1af30276d3650dd71589cd1d7c005da3a64873 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sat, 20 Sep 2014 19:18:00 +0200 Subject: add normal/rfcomm bluetooth transport for older MWs --- src/metawatch.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/metawatch.h') diff --git a/src/metawatch.h b/src/metawatch.h index 61eaa3a..606e478 100644 --- a/src/metawatch.h +++ b/src/metawatch.h @@ -12,11 +12,17 @@ QT_USE_NAMESPACE_BLUETOOTH class MetaWatch : public QObject { Q_OBJECT - Q_ENUMS(MessageTypes DeviceType WatchMode WatchProperty UiStyle) + Q_ENUMS(TransportType MessageTypes DeviceType WatchMode WatchProperty UiStyle) Q_FLAGS(WatchProperties) public: - explicit MetaWatch(const QString &btAddr, QObject *parent = 0); + enum TransportType { + TransportBluetooth, + TransportBluetoothLowEnergy + }; + + explicit MetaWatch(const QString &btAddr, TransportType transport, QObject *parent = 0); + ~MetaWatch(); enum MessageTypes { MessageGetDeviceType = 0x01, @@ -77,6 +83,8 @@ public: UiGen2 = 1 }; + bool isDeviceConnected() const; + void setVibrateMode(bool enable, int on_duration, int off_duration, int cycles); void setDateTime(const QDateTime &dt); void configure(WatchProperties props); -- cgit v1.2.3