diff options
author | sr | 2013-02-04 19:50:31 +0100 |
---|---|---|
committer | sr | 2013-02-04 19:50:31 +0100 |
commit | 1a5709501f94014d41987b956338bb6424b9f90c (patch) | |
tree | d3b93fe8dc406bca56aff147ef5cc4cbf9ed6be0 /src/client/vnc/vncserver.h | |
parent | Test (diff) | |
download | pvs2-1a5709501f94014d41987b956338bb6424b9f90c.tar.gz pvs2-1a5709501f94014d41987b956338bb6424b9f90c.tar.xz pvs2-1a5709501f94014d41987b956338bb6424b9f90c.zip |
Initial commit
Diffstat (limited to 'src/client/vnc/vncserver.h')
-rw-r--r-- | src/client/vnc/vncserver.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/client/vnc/vncserver.h b/src/client/vnc/vncserver.h new file mode 100644 index 0000000..2aae49c --- /dev/null +++ b/src/client/vnc/vncserver.h @@ -0,0 +1,52 @@ +/* + * vncserver.h + * + * Created on: 24.01.2013 + * Author: sr + */ + +#ifndef VNCSERVER_H_ +#define VNCSERVER_H_ + +#include <QtCore> + +class VncServer; + +class VncServer : public QObject +{ + Q_OBJECT + +private: + QProcess *_process; + QString _ropass; + QString _rwpass; + int _port; + int _timerId; + + VncServer(); + virtual ~VncServer(); + + static VncServer *me; + +public: + static VncServer *instance(); + + void start(); + void stop(); + +protected: + void timerEvent(QTimerEvent *event); + +signals: + // Emited when started succesfully, or if startup failed. port will be <= 0 if it failed. + void started(int port, QString& ropass, QString& rwpass); + +private slots: + void onStdOut(); + void onStdErr(); + void onFinished(int exitCode); + void onError(QProcess::ProcessError error); + +}; + +#endif /* VNCSERVER_H_ */ |