diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2018-12-13 09:46:10 +0100 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2018-12-19 18:19:45 +0100 |
commit | 73ccc498819462d7de5f549037c3847e1cf0088d (patch) | |
tree | 18515a0baef7c45b217aed924b1252e3f504db8b /app/mixer.h | |
parent | 4674ea3a6f5f37c359ca651edf0aa447226480ad (diff) |
Handle the volume_changed event
4A's High Level API now raises event when volume of a role is changed.
This handles it by subscribing to the event and update the corresponding
slider.
Bug: SPEC-2054
Change-Id: I137eaa461f0baa9206ee714c91e3ac998b9b2bf2
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'app/mixer.h')
-rw-r--r-- | app/mixer.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/mixer.h b/app/mixer.h index 1eb6b76..5cbb819 100644 --- a/app/mixer.h +++ b/app/mixer.h @@ -23,7 +23,6 @@ #include <QStringList> #include <QMap> #include "qafbwebsocketclient.h" -//#include "volumeslider.h" class Mixer : public QObject @@ -32,7 +31,10 @@ class Mixer Q_PROPERTY(QStringList roles READ roles NOTIFY rolesChanged) private: - QMap<QString, int> volumes_; + QUrl m_url; + QMap<QString, int> m_volumes; + QStringList m_roles; + QAfbWebsocketClient m_client; public: explicit Mixer(QObject* parent = nullptr); @@ -49,8 +51,8 @@ signals: private slots: void onClientConnected(); - -private: - QStringList m_roles; - QAfbWebsocketClient m_client; + void onClientDisconnected(); + void onClientError(QAbstractSocket::SocketError se); + void onRetryOpen(); + void onClientEventReceived(QString eventName, const QJsonValue& data); }; |