/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: FtpCLient.h * Author: shjd * * Created on 2019年12月4日, 上午10:35 */ #ifndef FTPCLIENT_H #define FTPCLIENT_H #include #include #include #include #include #include #include #include #include #include #include class FtpCLient:public QObject { Q_OBJECT protected slots: void finished_get(QNetworkReply * reply); void finished_put(QNetworkReply * reply); void loadError(QNetworkReply::NetworkError); public: FtpCLient(); void FtpGet(QString sor, QString dev); void FtpPut(QString source, QString dev); void FtpSetUserInfor(QString user, QString pwd); void FtpSetHostPort(QString str, int port =21); int FtpPutState(); int FtpGetState(); private: QFile * m_gpFile; QFile * m_ppFile; QNetworkReply *m_pReply; QNetworkAccessManager * m_pManager; QUrl * m_pUrl; int fileputstate; int filegetstate; }; #endif /* FTPCLIENT_H */