UniversalIndentGUI 1.2.0
UiGuiIndentServer.h
Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2006-2012 by Thomas Schweitzer                          *
00003  *   thomas-schweitzer(at)arcor.de                                         *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License version 2.0 as   *
00007  *   published by the Free Software Foundation.                            *
00008  *                                                                         *
00009  *   This program is distributed in the hope that it will be useful,       *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012  *   GNU General Public License for more details.                          *
00013  *                                                                         *
00014  *   You should have received a copy of the GNU General Public License     *
00015  *   along with this program in the file LICENSE.GPL; if not, write to the *
00016  *   Free Software Foundation, Inc.,                                       *
00017  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00018  ***************************************************************************/
00019 
00020 #ifndef UIGUIINDENTSERVER_H
00021 #define UIGUIINDENTSERVER_H
00022 
00023 #include <QObject>
00024 
00025 class QTcpServer;
00026 class QTcpSocket;
00027 
00028 
00029 class UiGuiIndentServer : public QObject
00030 {
00031     Q_OBJECT
00032 
00033 public:
00034     UiGuiIndentServer(void);
00035     ~UiGuiIndentServer(void);
00036 
00037 public slots:
00038     void startServer();
00039     void stopServer();
00040 
00041 private slots:
00042     void handleNewConnection();
00043     void handleReceivedData();
00044     void sendMessage(const QString &message);
00045     void checkIfReadyForHandleRequest();
00046 
00047 private:
00048     QTcpServer *_tcpServer;
00049     QByteArray _dataToSend;
00050     bool _readyForHandleRequest;
00051     QTcpSocket *_currentClientConnection;
00052     quint32 _blockSize;
00053 };
00054 
00055 #endif // UIGUIINDENTSERVER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines