aboutsummaryrefslogtreecommitdiff
path: root/jobs/mediathumbnailjob.h
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/mediathumbnailjob.h')
-rw-r--r--jobs/mediathumbnailjob.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/jobs/mediathumbnailjob.h b/jobs/mediathumbnailjob.h
index f8f36fe9..ef834cd7 100644
--- a/jobs/mediathumbnailjob.h
+++ b/jobs/mediathumbnailjob.h
@@ -18,25 +18,24 @@
#pragma once
-#include "basejob.h"
+#include "generated/content-repo.h"
#include <QtGui/QPixmap>
namespace QMatrixClient
{
- enum class ThumbnailType {Crop, Scale};
-
- class MediaThumbnailJob: public BaseJob
+ class MediaThumbnailJob: public GetContentThumbnailJob
{
public:
- MediaThumbnailJob(QUrl url, QSize requestedSize,
- ThumbnailType thumbnailType = ThumbnailType::Scale);
+ MediaThumbnailJob(const QString& serverName, const QString& mediaId,
+ QSize requestedSize);
+ MediaThumbnailJob(const QUrl& mxcUri, QSize requestedSize);
QImage thumbnail() const;
QImage scaledThumbnail(QSize toSize) const;
protected:
- Status parseReply(QByteArray data) override;
+ Status parseReply(QNetworkReply* reply) override;
private:
QImage _thumbnail;