tests/qtp/qtp_qftp/ftpserver.h
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Wed, 21 Apr 2010 11:15:19 +0300
branchRCL_3
changeset 11 25a739ee40f4
parent 3 41300fa6a67c
permissions -rw-r--r--
3a438a6e0b41f1ef657ef0e648d352db636204aa

#ifndef FTPSERVER_H
#define FTPSERVER_H

#include <QTcpServer>
#include <QTcpSocket>

 class ftpServer : public QTcpServer // , public QThread
 {
     Q_OBJECT

 public:
     ftpServer( QObject *parent = 0 );
     ~ftpServer();

     bool isDone();
//     void run();
/*
private:
    void sendSomething( QTcpSocket *outSock, quint16 port );
*/
private slots:
    void handleNewConnection();
    void readConnection();
    void displayConnectionError(QAbstractSocket::SocketError socketError);

    void readDataConnection();
    void handleNewDataConnection();
    void displayDataConnectionError(QAbstractSocket::SocketError socketError);

 private:
    QTcpServer *tcpServer;
    QTcpSocket *ftpSocket;

    QTcpServer *dataServer;
    QTcpSocket *dataSocket;

    bool not_done;
};

#endif // FTPSERVER_H