1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/examples/qqthttpdownload/qqthttpdownloadmanager.h

37 lines
812 B
C
Raw Normal View History

2017-11-23 12:33:32 +08:00
#ifndef QQTHTTPDOWNLOADPROTOCOL_H
#define QQTHTTPDOWNLOADPROTOCOL_H
#include <qqtwebaccessmanager.h>
class QQtHttpDownloadWebWorkSession: public QQtWebAccessSession
{
Q_OBJECT
public:
2017-11-24 13:27:45 +08:00
explicit QQtHttpDownloadWebWorkSession ( QObject* parent = 0 ) :
QQtWebAccessSession ( parent ) {
filename = "tmp.download";
}
2017-11-23 12:33:32 +08:00
virtual ~QQtHttpDownloadWebWorkSession() {}
2017-11-24 13:27:45 +08:00
QString filename;
2017-11-23 12:33:32 +08:00
};
class QQtHttpDownloadManager : public QQtWebAccessManager
{
Q_OBJECT
public:
explicit QQtHttpDownloadManager ( QObject* parent = nullptr );
virtual ~QQtHttpDownloadManager() {}
2017-11-24 13:27:45 +08:00
void sendRequest ( QString strUrl, QString filename );
2017-11-23 12:33:32 +08:00
signals:
public slots:
private slots:
2017-11-23 19:12:48 +08:00
void replyReadyRead ( QQtWebAccessSession* session );
2017-11-23 12:33:32 +08:00
private:
};
#endif // QQTHTTPDOWNLOADPROTOCOL_H