aboutsummaryrefslogtreecommitdiff
path: root/connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'connection.h')
-rw-r--r--connection.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/connection.h b/connection.h
index 1d483fe8..79d7d658 100644
--- a/connection.h
+++ b/connection.h
@@ -41,6 +41,9 @@ namespace QMatrixClient
class PostReceiptJob;
class MediaThumbnailJob;
class JoinRoomJob;
+ class UploadContentJob;
+ class GetContentJob;
+ class DownloadFileJob;
class Connection: public QObject {
Q_OBJECT
@@ -182,6 +185,18 @@ namespace QMatrixClient
int requestedWidth,
int requestedHeight) const;
+ // QIODevice* should already be open
+ virtual UploadContentJob* uploadContent(QIODevice* contentSource,
+ const QString& filename = {},
+ const QString& contentType = {}) const;
+ virtual UploadContentJob* uploadFile(const QString& fileName,
+ const QString& contentType = {});
+ virtual GetContentJob* getContent(const QString& mediaId) const;
+ GetContentJob* getContent(const QUrl& url) const;
+ // If localFilename is empty, a temporary file will be created
+ virtual DownloadFileJob* downloadFile(const QUrl& url,
+ const QString& localFilename = {}) const;
+
virtual JoinRoomJob* joinRoom(const QString& roomAlias);
// Old API that will be abolished any time soon. DO NOT USE.