summaryrefslogblamecommitdiffstats
path: root/src/net/pvsLocalhostCommunicator.h
blob: 425cc37bd5e3621950601b6fa2d191840140453f (plain) (tree)


















































                                                                                       
/// 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