Mercurial > hg > forks > UniversalIndentGUI
annotate src/UiGuiIndentServer.h @ 794:fa7aa6f543f1
Changed the copyright date within the code files to 2012.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1072 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Sun, 01 Jan 2012 15:57:45 +0000 |
parents | f3631db17328 |
children |
rev | line source |
---|---|
638
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
1 /*************************************************************************** |
794
fa7aa6f543f1
Changed the copyright date within the code files to 2012.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
768
diff
changeset
|
2 * Copyright (C) 2006-2012 by Thomas Schweitzer * |
638
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
3 * thomas-schweitzer(at)arcor.de * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
4 * * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License version 2.0 as * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
8 * * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
12 * GNU General Public License for more details. * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
13 * * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
15 * along with this program in the file LICENSE.GPL; if not, write to the * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
16 * Free Software Foundation, Inc., * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
18 ***************************************************************************/ |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
19 |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
20 #ifndef UIGUIINDENTSERVER_H |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
21 #define UIGUIINDENTSERVER_H |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
22 |
751
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
23 #include <QObject> |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
24 |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
25 class QTcpServer; |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
26 class QTcpSocket; |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
27 |
638
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
28 |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
29 class UiGuiIndentServer : public QObject |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
30 { |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
31 Q_OBJECT |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
32 |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
33 public: |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
34 UiGuiIndentServer(void); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
35 ~UiGuiIndentServer(void); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
36 |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
37 public slots: |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
38 void startServer(); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
39 void stopServer(); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
40 |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
41 private slots: |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
42 void handleNewConnection(); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
43 void handleReceivedData(); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
44 void sendMessage(const QString &message); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
45 void checkIfReadyForHandleRequest(); |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
46 |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
47 private: |
751
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
48 QTcpServer *_tcpServer; |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
49 QByteArray _dataToSend; |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
50 bool _readyForHandleRequest; |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
51 QTcpSocket *_currentClientConnection; |
ac165b6ae67e
Done some refactoring:
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
727
diff
changeset
|
52 quint32 _blockSize; |
638
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
53 }; |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
54 |
94734b9eb54f
Renamed the source files and some classes to have consistent names. What a nice kind of work.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff
changeset
|
55 #endif // UIGUIINDENTSERVER_H |