-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Last changes for openrepos release. This is 0.9.7-8.
- Loading branch information
Jens Drescher
committed
Dec 19, 2017
1 parent
ed4a047
commit 9cbbab9
Showing
14 changed files
with
157 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
* Wed Dec 06 2017 Jens Drescher <[email protected]> 0.9.7-8 | ||
* Wed Dec 19 2017 Jens Drescher <[email protected]> 0.9.7-8 | ||
- added new feature/settings: Pebble smartwatch support | ||
- added new feature: edit workout name/description/type | ||
- fixed a bug: mediaplayer pause/resume was not working | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#include <QDebug> | ||
#include "pebblewatchcomm.h" | ||
|
||
PebbleWatchComm::PebbleWatchComm(QObject *parent) : QObject(parent) | ||
{ | ||
this->dbusPebble = NULL; | ||
} | ||
|
||
PebbleWatchComm::~PebbleWatchComm() | ||
{ | ||
this->dbusPebble = NULL; | ||
} | ||
|
||
void PebbleWatchComm::setServicePath(QString sServicePath) | ||
{ | ||
this->dbusPebble = new QDBusInterface(SERVER_SERVICE, sServicePath, SERVER_INTERFACE, QDBusConnection::sessionBus(), this); | ||
} | ||
|
||
QString PebbleWatchComm::getAddress() | ||
{ | ||
if (this->dbusPebble == NULL) | ||
return ""; | ||
|
||
QDBusReply<QString> reply = dbusPebble->call("Address"); | ||
|
||
if (reply.isValid()) | ||
{ | ||
return reply.value(); | ||
} | ||
else | ||
{ | ||
qDebug()<<"DBus error: " << reply.error().message(); | ||
return ""; | ||
} | ||
} | ||
|
||
QString PebbleWatchComm::getName() | ||
{ | ||
if (this->dbusPebble == NULL) | ||
return ""; | ||
|
||
QDBusReply<QString> reply = dbusPebble->call("Name"); | ||
|
||
if (reply.isValid()) | ||
{ | ||
return reply.value(); | ||
} | ||
else | ||
{ | ||
qDebug()<<"DBus error: " << reply.error().message(); | ||
return ""; | ||
} | ||
} | ||
|
||
bool PebbleWatchComm::isConnected() | ||
{ | ||
if (this->dbusPebble == NULL) | ||
return false; | ||
|
||
QDBusReply<bool> reply = dbusPebble->call("IsConnected"); | ||
|
||
if (reply.isValid()) | ||
{ | ||
return reply.value(); | ||
} | ||
else | ||
{ | ||
qDebug()<<"DBus error: " << reply.error().message(); | ||
return false; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef PEBBLEWATCHCOMM_H | ||
#define PEBBLEWATCHCOMM_H | ||
|
||
#include <QtDBus/QtDBus> | ||
#include <QObject> | ||
|
||
#define SERVER_INTERFACE "org.rockwork.Pebble" | ||
#define SERVER_SERVICE "org.rockwork" | ||
|
||
class PebbleWatchComm : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
PebbleWatchComm(QObject * parent = NULL); | ||
~PebbleWatchComm(); | ||
|
||
Q_INVOKABLE void setServicePath(QString sServicePath); | ||
Q_INVOKABLE QString getAddress(); | ||
Q_INVOKABLE QString getName(); | ||
Q_INVOKABLE bool isConnected(); | ||
|
||
private: | ||
QDBusInterface *dbusPebble; | ||
}; | ||
|
||
#endif // PEBBLEWATCHCOMM_H |