X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=homescreen%2Fsrc%2Fmastervolume.h;fp=homescreen%2Fsrc%2Fmastervolume.h;h=fbbab4bf178d8ad3d4c873489731b7048328bd9e;hb=e490ff1e1e31b4a837cb8063f7346dc65ffe073e;hp=04ce3b5b8527ee323d90129ed524c171c75e5e3e;hpb=c35327b02a28a83536450a664326d183662e89e1;p=apps%2Fhomescreen.git diff --git a/homescreen/src/mastervolume.h b/homescreen/src/mastervolume.h index 04ce3b5..fbbab4b 100644 --- a/homescreen/src/mastervolume.h +++ b/homescreen/src/mastervolume.h @@ -16,32 +16,33 @@ #include #include +#include "vehiclesignals.h" -class MasterVolume - : public QObject +class MasterVolume : public QObject { Q_OBJECT Q_PROPERTY (uint32_t volume READ getVolume WRITE setVolume NOTIFY VolumeChanged) private: qint32 m_volume; + VehicleSignals *m_vs; + bool m_connected; + + void updateVolume(QString value); public: MasterVolume(QObject* parent = nullptr); ~MasterVolume() = default; - //Q_INVOKABLE void open(const QUrl& url); Q_INVOKABLE qint32 getVolume() const; Q_INVOKABLE void setVolume(qint32 val); private slots: -#if 0 - void onClientConnected(); - void onClientDisconnected(); - void onClientError(QAbstractSocket::SocketError se); - void onClientEventReceived(QString name, const QJsonValue& data); - void TryOpen(); -#endif + void onConnected(); + void onAuthorized(); + void onDisconnected(); + void onGetSuccessResponse(QString path, QString value, QString timestamp); + void onSignalNotification(QString path, QString value, QString timestamp); signals: void VolumeChanged();