16#ifndef QGSFILEDOWNLOADER_H
17#define QGSFILEDOWNLOADER_H
23#include <QNetworkReply>
99 void onDownloadProgress( qint64 bytesReceived, qint64 bytesTotal );
101 void onRequestTimedOut( QNetworkReply *reply );
110 void onSslErrors( QNetworkReply *reply,
const QList<QSslError> &errors );
122 void error(
const QStringList &errorMessages );
123 void error(
const QString &errorMessage );
125 QNetworkReply *mReply =
nullptr;
127 bool mDownloadCanceled =
false;
HttpMethod
Different methods of HTTP requests.
void cancelDownload()
Call to abort the download and delete this object after the cancellation has been processed.
void downloadExited()
Emitted always when the downloader exits.
void downloadCanceled()
Emitted when the download was canceled by the user.
void downloadError(QStringList errorMessages)
Emitted when an error makes the download fail.
void startDownload()
Called to start the download.
QgsFileDownloader(const QUrl &url, const QString &outputFileName, const QString &authcfg=QString(), bool delayStart=false, Qgis::HttpMethod httpMethod=Qgis::HttpMethod::Get, const QByteArray &data=QByteArray())
QgsFileDownloader.
void downloadCompleted(const QUrl &url)
Emitted when the download has completed successfully.
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Emitted when data are ready to be processed.