diff options
author | Itay Grudev <itay@mail.bg> | 2012-12-23 00:12:38 +0200 |
---|---|---|
committer | Itay Grudev <itay@mail.bg> | 2012-12-23 00:12:38 +0200 |
commit | 230b4ebe94400ac7af47731e5c2b965b0c5fb2da (patch) | |
tree | ad0b511cdff2023e0cabe0268986707efcc7b6ff /localserver.h | |
download | singleapplication-230b4ebe94400ac7af47731e5c2b965b0c5fb2da.tar.xz |
Add base files
Diffstat (limited to 'localserver.h')
-rw-r--r-- | localserver.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/localserver.h b/localserver.h new file mode 100644 index 0000000..92c9bb1 --- /dev/null +++ b/localserver.h @@ -0,0 +1,37 @@ +#ifndef LOCALSERVER_H +#define LOCALSERVER_H + +#include <QThread> +#include <QVector> +#include <QLocalServer> +#include <QLocalSocket> + +class LocalServer : public QThread +{ + Q_OBJECT +public: + LocalServer(); + ~LocalServer(); + void shut(); + +protected: + void run(); + void exec(); + +signals: + void dataReceived(QString data); + void privateDataReceived(QString data); + void showUp(); + +private slots: + void slotNewConnection(); + void slotOnData(QString data); + +private: + QLocalServer* server; + QVector<QLocalSocket*> clients; + void onCMD(QString data); + +}; + +#endif // LOCALSERVER_H |