aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/downloadfilejob.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
committerAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
commit09eb39236666e81d5da014acea011dcd74d0999b (patch)
tree52876d96be71be1a39d5d935c1295a51995e8949 /lib/jobs/downloadfilejob.h
parentf1788ee27f33e9339334e0d79bde9a27d9ce2e44 (diff)
parenta4e78956f105875625b572d8b98459ffa86fafe5 (diff)
downloadlibquotient-09eb39236666e81d5da014acea011dcd74d0999b.tar.gz
libquotient-09eb39236666e81d5da014acea011dcd74d0999b.zip
Update upstream source from tag 'upstream/0.6.4'
Update to upstream version '0.6.4' with Debian dir aa8705fd74743e79c043bc9e3e425d5064404cfe
Diffstat (limited to 'lib/jobs/downloadfilejob.h')
-rw-r--r--lib/jobs/downloadfilejob.h39
1 files changed, 17 insertions, 22 deletions
diff --git a/lib/jobs/downloadfilejob.h b/lib/jobs/downloadfilejob.h
index ce47ab1c..e00fd9e4 100644
--- a/lib/jobs/downloadfilejob.h
+++ b/lib/jobs/downloadfilejob.h
@@ -2,29 +2,24 @@
#include "csapi/content-repo.h"
-namespace QMatrixClient
-{
- class DownloadFileJob : public GetContentJob
- {
- public:
- enum { FileError = BaseJob::UserDefinedError + 1 };
+namespace Quotient {
+class DownloadFileJob : public GetContentJob {
+public:
+ using GetContentJob::makeRequestUrl;
+ static QUrl makeRequestUrl(QUrl baseUrl, const QUrl& mxcUri);
- using GetContentJob::makeRequestUrl;
- static QUrl makeRequestUrl(QUrl baseUrl, const QUrl& mxcUri);
+ DownloadFileJob(const QString& serverName, const QString& mediaId,
+ const QString& localFilename = {});
- DownloadFileJob(const QString& serverName, const QString& mediaId,
- const QString& localFilename = {});
+ QString targetFileName() const;
- QString targetFileName() const;
+private:
+ class Private;
+ QScopedPointer<Private> d;
- private:
- class Private;
- QScopedPointer<Private> d;
-
- void beforeStart(const ConnectionData*) override;
- void afterStart(const ConnectionData*,
- QNetworkReply* reply) override;
- void beforeAbandon(QNetworkReply*) override;
- Status parseReply(QNetworkReply*) override;
- };
-}
+ void doPrepare() override;
+ void onSentRequest(QNetworkReply* reply) override;
+ void beforeAbandon() override;
+ Status prepareResult() override;
+};
+} // namespace Quotient