equal
deleted
inserted
replaced
|
1 #ifndef FTPSERVER_H |
|
2 #define FTPSERVER_H |
|
3 |
|
4 #include <QTcpServer> |
|
5 #include <QTcpSocket> |
|
6 |
|
7 class ftpServer : public QTcpServer // , public QThread |
|
8 { |
|
9 Q_OBJECT |
|
10 |
|
11 public: |
|
12 ftpServer( QObject *parent = 0 ); |
|
13 ~ftpServer(); |
|
14 |
|
15 bool isDone(); |
|
16 // void run(); |
|
17 /* |
|
18 private: |
|
19 void sendSomething( QTcpSocket *outSock, quint16 port ); |
|
20 */ |
|
21 private slots: |
|
22 void handleNewConnection(); |
|
23 void readConnection(); |
|
24 void displayConnectionError(QAbstractSocket::SocketError socketError); |
|
25 |
|
26 void readDataConnection(); |
|
27 void handleNewDataConnection(); |
|
28 void displayDataConnectionError(QAbstractSocket::SocketError socketError); |
|
29 |
|
30 private: |
|
31 QTcpServer *tcpServer; |
|
32 QTcpSocket *ftpSocket; |
|
33 |
|
34 QTcpServer *dataServer; |
|
35 QTcpSocket *dataSocket; |
|
36 |
|
37 bool not_done; |
|
38 }; |
|
39 |
|
40 #endif // FTPSERVER_H |