aboutsummaryrefslogtreecommitdiff
path: root/lib/events/eventcontent.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-01-06 00:12:05 +0900
committerGitHub <noreply@github.com>2019-01-06 00:12:05 +0900
commit9c08bbce341081a8ccbe0fccf48658b3e75e02cf (patch)
tree171ff3fcf35acb2c4a707488e6f43a2e35fff56f /lib/events/eventcontent.h
parentf545d181ade8736dfda93e8abb34ab93ac34e931 (diff)
parent27555e44dfbaae26a0e030cb3c22eb00ba8371f0 (diff)
downloadlibquotient-9c08bbce341081a8ccbe0fccf48658b3e75e02cf.tar.gz
libquotient-9c08bbce341081a8ccbe0fccf48658b3e75e02cf.zip
Merge pull request #272 from QMatrixClient/kitsune-upload-attachments
Support of attachments uploading
Diffstat (limited to 'lib/events/eventcontent.h')
-rw-r--r--lib/events/eventcontent.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/events/eventcontent.h b/lib/events/eventcontent.h
index ea321fb6..0588c0e2 100644
--- a/lib/events/eventcontent.h
+++ b/lib/events/eventcontent.h
@@ -88,7 +88,7 @@ namespace QMatrixClient
class FileInfo
{
public:
- explicit FileInfo(const QUrl& u, int payloadSize = -1,
+ explicit FileInfo(const QUrl& u, qint64 payloadSize = -1,
const QMimeType& mimeType = {},
const QString& originalFilename = {});
FileInfo(const QUrl& u, const QJsonObject& infoJson,
@@ -109,7 +109,7 @@ namespace QMatrixClient
QJsonObject originalInfoJson;
QMimeType mimeType;
QUrl url;
- int payloadSize;
+ qint64 payloadSize;
QString originalName;
};
@@ -127,9 +127,10 @@ namespace QMatrixClient
class ImageInfo : public FileInfo
{
public:
- explicit ImageInfo(const QUrl& u, int fileSize = -1,
+ explicit ImageInfo(const QUrl& u, qint64 fileSize = -1,
QMimeType mimeType = {},
- const QSize& imageSize = {});
+ const QSize& imageSize = {},
+ const QString& originalFilename = {});
ImageInfo(const QUrl& u, const QJsonObject& infoJson,
const QString& originalFilename = {});
@@ -167,6 +168,7 @@ namespace QMatrixClient
explicit TypedBase(const QJsonObject& o = {}) : Base(o) { }
virtual QMimeType type() const = 0;
virtual const FileInfo* fileInfo() const { return nullptr; }
+ virtual FileInfo* fileInfo() { return nullptr; }
virtual const Thumbnail* thumbnailInfo() const { return nullptr; }
};
@@ -196,6 +198,7 @@ namespace QMatrixClient
QMimeType type() const override { return InfoT::mimeType; }
const FileInfo* fileInfo() const override { return this; }
+ FileInfo* fileInfo() override { return this; }
protected:
void fillJson(QJsonObject* json) const override