summaryrefslogtreecommitdiffstats
path: root/tests/manual/planets-qml/networkcontroller.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/planets-qml/networkcontroller.h')
-rw-r--r--tests/manual/planets-qml/networkcontroller.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/manual/planets-qml/networkcontroller.h b/tests/manual/planets-qml/networkcontroller.h
new file mode 100644
index 000000000..90712025e
--- /dev/null
+++ b/tests/manual/planets-qml/networkcontroller.h
@@ -0,0 +1,30 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef NETWORKCONTROLLER_H
+#define NETWORKCONTROLLER_H
+
+#include <QObject>
+#include <QTcpServer>
+#include <QTcpSocket>
+
+class NetworkController : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit NetworkController(QObject *parent = 0);
+
+private:
+ QTcpServer m_server;
+
+private slots:
+ void newConnection();
+ void disconnected();
+ void readyRead();
+
+signals:
+ void commandAccepted(QString command, QString value);
+};
+
+#endif // NETWORKCONTROLLER_H