diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-12 23:31:46 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-14 00:19:02 +0900 |
commit | bb4d1e98f077d29b62efa5f453086fa569698856 (patch) | |
tree | 569b9025c119406ef7074bda286af43b5bff1796 /connection.h | |
parent | daff357c0631d675606feb4e001c98d1742b0bb0 (diff) | |
download | libquotient-bb4d1e98f077d29b62efa5f453086fa569698856.tar.gz libquotient-bb4d1e98f077d29b62efa5f453086fa569698856.zip |
Connection: files up/downloading support
Diffstat (limited to 'connection.h')
-rw-r--r-- | connection.h | 15 |
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. |