37 #include <QNetworkReply>
40 #include "definitions/definitions.h"
63 bool protected_contents =
false,
64 const QString &username = QString(),
65 const QString &password = QString());
71 const QString &key,
const QString &author_name,
72 const QString &author_email,
const QString &application_name,
73 const QString &application_icon);
79 void progress(qint64 bytes_received, qint64 bytes_total);
84 void completed(QNetworkReply::NetworkError status, QByteArray contents = QByteArray());
88 void finished(QNetworkReply *reply);
91 void progressInternal(qint64 bytes_received, qint64 bytes_total);
98 void runGetRequest(
const QNetworkRequest &request);
99 void runPostRequest(
const QNetworkRequest &request,
const QByteArray &data);
102 QNetworkReply *m_activeReply;
107 #endif // DOWNLOADER_H
void completed(QNetworkReply::NetworkError status, QByteArray contents=QByteArray())
Emitted if file download or upload completes (un)successfully.
Simple file downloader with progress reporting.
Network access manager with supressed authentication dialogs.
void progress(qint64 bytes_received, qint64 bytes_total)
Emitted when new progress is known.
void downloadFile(const QString &url, bool protected_contents=false, const QString &username=QString(), const QString &password=QString())
Performs asynchronous download of given file. Redirections are handled.
Downloader(QObject *parent=0)
Constructor.
void uploadBundleFile(QString url, const QString &bundle_data, const QString &key, const QString &author_name, const QString &author_email, const QString &application_name, const QString &application_icon)
Uploads given bundle_data to store server via HTTP POST.