diff options
author | Javier S. Pedro <dev.git@javispedro.com> | 2014-09-20 19:18:00 +0200 |
---|---|---|
committer | Javier S. Pedro <dev.git@javispedro.com> | 2014-09-20 19:18:00 +0200 |
commit | cc1af30276d3650dd71589cd1d7c005da3a64873 (patch) | |
tree | 6e6ab2a2e1d4c8f8567d7785e34dfe5b043b2ebd /src/metawatch.h | |
parent | bca10d6ab21bf0e49253fc01e313a4618b7fcae7 (diff) | |
download | salmeta-cc1af30276d3650dd71589cd1d7c005da3a64873.tar.gz salmeta-cc1af30276d3650dd71589cd1d7c005da3a64873.zip |
add normal/rfcomm bluetooth transport for older MWs
Diffstat (limited to 'src/metawatch.h')
-rw-r--r-- | src/metawatch.h | 12 |
1 files changed, 10 insertions, 2 deletions
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); |