summaryrefslogtreecommitdiffstats
path: root/src/net/pvsLocalhostCommunicator.h
diff options
context:
space:
mode:
authorSebastian2010-05-12 19:42:27 +0200
committerSebastian2010-05-12 19:42:27 +0200
commitce3329047d378a14006ce74ec273ac59e3375303 (patch)
tree782430f270b4c7aca1b35d5b7813518e3797c555 /src/net/pvsLocalhostCommunicator.h
downloadpvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.gz
pvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.xz
pvs-ce3329047d378a14006ce74ec273ac59e3375303.zip
initial import of latest svn version
Diffstat (limited to 'src/net/pvsLocalhostCommunicator.h')
-rw-r--r--src/net/pvsLocalhostCommunicator.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/net/pvsLocalhostCommunicator.h b/src/net/pvsLocalhostCommunicator.h
new file mode 100644
index 0000000..425cc37
--- /dev/null
+++ b/src/net/pvsLocalhostCommunicator.h
@@ -0,0 +1,51 @@
+/// test documentation
+/// whatever
+//! and one more
+
+
+
+#ifndef _PVSLocalhostCommunicator_H_
+#define _PVSLocalhostCommunicator_H_
+#include <src/util/dispatcher.h>
+#include <QtNetwork/QUdpSocket>
+
+
+class PVSMsg;
+
+class PVSLocalhostCommunicator : public QObject
+{
+ Q_OBJECT
+public:
+ PVSLocalhostCommunicator(QString path);
+ void run();
+ bool server()
+ {
+ return _isServer;
+ };
+ bool running()
+ {
+ return _isRunning;
+ };
+ void stop();
+ void sendCommand(QString ident, QString cmd);
+ EventIdentDispatcher<PVSMsg>* getDispatcher()
+ {
+ return &_daemonDispatcher;
+ };
+
+private Q_SLOTS:
+ void sock_dataArrival();
+
+private:
+
+ bool _isServer, _isRunning;
+ QUdpSocket* _sock;
+
+
+
+ EventIdentDispatcher<PVSMsg> _daemonDispatcher; //!< Dispatcher for Daemon Commands
+};
+
+typedef PVSLocalhostCommunicator PVSUDSC;
+
+#endif