summaryrefslogtreecommitdiff
path: root/app/pebbledinterface.h
diff options
context:
space:
mode:
authorTomasz Sterna <tomek@xiaoka.com>2014-07-07 00:50:22 +0200
committerTomasz Sterna <tomek@xiaoka.com>2014-07-09 01:57:32 +0200
commit54a34201f993c3dc5bff0347349e1727febacf97 (patch)
treec6c651b2d361187e2d73c2e06952d8282701c96d /app/pebbledinterface.h
parent7283842cbed6a378d430552d327eab4a27775538 (diff)
Implemented org.pebbled service QML interface
Diffstat (limited to 'app/pebbledinterface.h')
-rw-r--r--app/pebbledinterface.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/app/pebbledinterface.h b/app/pebbledinterface.h
new file mode 100644
index 0000000..110cecc
--- /dev/null
+++ b/app/pebbledinterface.h
@@ -0,0 +1,53 @@
+#ifndef PEBBLEDINTERFACE_H
+#define PEBBLEDINTERFACE_H
+
+#include <QObject>
+#include <QtDBus/QtDBus>
+
+class PebbledInterface : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
+ bool enabled() const;
+ void setEnabled(bool);
+
+ Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
+ bool active() const;
+ void setActive(bool);
+
+ Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
+ bool connected() const;
+
+ Q_PROPERTY(QVariantMap pebble READ pebble NOTIFY pebbleChanged)
+ QVariantMap pebble() const;
+
+ Q_PROPERTY(QString name READ name NOTIFY nameChanged)
+ QString name() const;
+
+ Q_PROPERTY(QString address READ address NOTIFY addressChanged)
+ QString address() const;
+
+
+public:
+ explicit PebbledInterface(QObject *parent = 0);
+
+signals:
+ void enabledChanged();
+ void activeChanged();
+
+ void connectedChanged();
+ void pebbleChanged();
+ void nameChanged();
+ void addressChanged();
+
+public slots:
+
+private:
+ QDBusInterface *systemd;
+ QString systemdUnit;
+
+ QDBusInterface *pebbled;
+};
+
+#endif // PEBBLEDINTERFACE_H