diff options
Diffstat (limited to 'app/pebbledinterface.h')
| -rw-r--r-- | app/pebbledinterface.h | 18 |
1 files changed, 14 insertions, 4 deletions
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 <QObject> #include <QtDBus/QtDBus> +#include <QDBusArgument> 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<QString, QVariant> changed, QStringList invalidated); + void onPebbleChanged(); private: + QDBusInterface *pebbled; QDBusInterface *systemd; - QString systemdUnit; + QDBusInterface *unitprops; - QDBusInterface *pebbled; + QVariantMap properties; }; #endif // PEBBLEDINTERFACE_H |
