qavrg 0.0.28
|
00001 #ifndef QAVRGSERVER_H 00002 #define QAVRGSERVER_H 00003 00004 #include <QTcpServer> 00005 #include <QHostAddress> 00006 #include <QScriptValue> 00007 00008 class QavrgApplication; 00009 class QavrgAcquisition; 00010 00011 class QavrgServer : public QTcpServer 00012 { 00013 Q_OBJECT; 00014 00015 public: 00016 QavrgServer(QObject *parent=0); 00017 typedef QTcpServer inherited; 00018 00019 public: 00020 void startServer(QHostAddress addr, int port); 00021 00022 public slots: 00023 void openNewConnection(); 00024 void connectionClosed(); 00025 void clientRead(); 00026 00027 signals: 00028 void printMessage(QString msg); 00029 00030 signals: 00031 void executeCommand(QString cmd); 00032 public slots: 00033 void finishedCommand(QScriptValue result); 00034 00035 private: 00036 QTcpSocket *m_Socket; 00037 }; 00038 00039 #endif