summaryrefslogtreecommitdiffstats
path: root/app/mixer.h
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-12-13 09:46:10 +0100
committerLoïc Collignon <loic.collignon@iot.bzh>2018-12-13 11:35:50 +0100
commit1b8ad361e3955ee469a38486a715bc0dc615c59f (patch)
treef567b88733a40b41f497f316d3aa4ccc8a6fa10b /app/mixer.h
parent09f1cb780345b0e975fd4d74b32c38e5e9596f63 (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.h14
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);
};