diff options
author | Tobias Fella <fella@posteo.de> | 2021-08-28 01:03:49 +0200 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2021-12-01 21:56:59 +0100 |
commit | 77a13cfdace5cb27adb52b3a644a155aee522b12 (patch) | |
tree | 7e1fd7acff76143e584b7a98e400965e2e7298ed /lib/connection.cpp | |
parent | 0583534d83f902235b46ef6761d6698ddb6e6aba (diff) | |
download | libquotient-77a13cfdace5cb27adb52b3a644a155aee522b12.tar.gz libquotient-77a13cfdace5cb27adb52b3a644a155aee522b12.zip |
Implement download and decryption of encrypted files
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r-- | lib/connection.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index 77ab3b72..4a1130ae 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -1017,6 +1017,21 @@ DownloadFileJob* Connection::downloadFile(const QUrl& url, return job; } +#ifdef Quotient_E2EE_ENABLED +DownloadFileJob* Connection::downloadFile(const QUrl& url, + const QString& key, + const QString& iv, + const QString& sha256, + const QString& localFilename) +{ + auto mediaId = url.authority() + url.path(); + auto idParts = splitMediaId(mediaId); + auto* job = + callApi<DownloadFileJob>(idParts.front(), idParts.back(), key, iv, sha256, localFilename); + return job; +} +#endif + CreateRoomJob* Connection::createRoom(RoomVisibility visibility, const QString& alias, const QString& name, const QString& topic, |