summaryrefslogtreecommitdiff
path: root/musicconn.cc
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-12-26 20:02:47 +0100
committerJavier <dev.git@javispedro.com>2015-12-26 20:02:47 +0100
commitceafe544919a35f674684c2e71593b9fb35747a5 (patch)
treed0912a51b60b91cf4f6177a0c18aab0629d501b8 /musicconn.cc
parent693f100e919132bd1cf703c5987c5d503bc2289c (diff)
downloadsapd-ceafe544919a35f674684c2e71593b9fb35747a5.tar.gz
sapd-ceafe544919a35f674684c2e71593b9fb35747a5.zip
prepare new agent for music controller
Diffstat (limited to 'musicconn.cc')
-rw-r--r--musicconn.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/musicconn.cc b/musicconn.cc
new file mode 100644
index 0000000..256e6a8
--- /dev/null
+++ b/musicconn.cc
@@ -0,0 +1,30 @@
+#include <QtCore/QDebug>
+
+#include "sappeer.h"
+#include "musicconn.h"
+
+#if SAILFISH
+#include "libwatchfish/musiccontroller.h"
+
+static watchfish::MusicController *controller = 0;
+#endif
+
+MusicConn::MusicConn(SAPConnection *conn, QObject *parent)
+ : QObject(parent), _conn(conn), _socket(conn->getSocket(100))
+{
+ connect(_conn, SIGNAL(disconnected()), SLOT(deleteLater()));
+ connect(_conn, SIGNAL(destroyed()), SLOT(deleteLater()));
+ Q_ASSERT(_socket);
+ connect(_socket, SIGNAL(connected()), SLOT(handleConnected()));
+ connect(_socket, SIGNAL(messageReceived()), SLOT(handleMessageReceived()));
+}
+
+void MusicConn::handleConnected()
+{
+
+}
+
+void MusicConn::handleMessageReceived()
+{
+
+}