From 5c8b0d9b4f6ca7dc67c52040be30a0d60218cce9 Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Wed, 9 Jul 2014 01:55:13 +0200 Subject: Implemented daemon interfaces for QML Manager app --- app/pebbledinterface.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'app/pebbledinterface.h') diff --git a/app/pebbledinterface.h b/app/pebbledinterface.h index 110cecc..2afc6c0 100644 --- a/app/pebbledinterface.h +++ b/app/pebbledinterface.h @@ -3,18 +3,20 @@ #include #include +#include class PebbledInterface : public QObject { Q_OBJECT + static QString PEBBLED_SYSTEMD_UNIT; + static QString SYSTEMD_UNIT_IFACE; + 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; @@ -42,12 +44,20 @@ signals: void addressChanged(); public slots: + void setEnabled(bool); + void setActive(bool); + +private slots: + void getUnitProperties(); + void onPropertiesChanged(QString interface, QMap changed, QStringList invalidated); + void onPebbleChanged(); private: + QDBusInterface *pebbled; QDBusInterface *systemd; - QString systemdUnit; + QDBusInterface *unitprops; - QDBusInterface *pebbled; + QVariantMap properties; }; #endif // PEBBLEDINTERFACE_H -- cgit v1.2.3