summary refs log tree commit diff
path: root/src/timeline/TimelineModel.h
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2019-12-05 20:15:01 -0500
committerGitHub <noreply@github.com>2019-12-05 20:15:01 -0500
commit9d9b214e4c340bac4a64994d2c1a7da1b3883ce5 (patch)
tree91c33080a83eed2d8f3d16268c263c799bc917b3 /src/timeline/TimelineModel.h
parentRename qml namespace from com.github.nheko to im.nheko (diff)
parentUpdate mtxclient to current 0.3.0-dev version (diff)
downloadnheko-9d9b214e4c340bac4a64994d2c1a7da1b3883ce5.tar.xz
Merge pull request #100 from Nheko-Reborn/file-encryption
Add file encryption / decryption support
Diffstat (limited to 'src/timeline/TimelineModel.h')
-rw-r--r--src/timeline/TimelineModel.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h

index e7842b99..06c64acf 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h
@@ -6,6 +6,7 @@ #include <QHash> #include <QSet> +#include <mtx/common.hpp> #include <mtx/responses.hpp> #include "Cache.h" @@ -159,6 +160,8 @@ public: Q_INVOKABLE void redactEvent(QString id); Q_INVOKABLE int idToIndex(QString id) const; Q_INVOKABLE QString indexToId(int index) const; + Q_INVOKABLE void cacheMedia(QString eventId); + Q_INVOKABLE void saveMedia(QString eventId) const; void addEvents(const mtx::responses::Timeline &events); template<class T> @@ -185,6 +188,8 @@ signals: void eventRedacted(QString id); void nextPendingMessage(); void newMessageToSend(mtx::events::collections::TimelineEvents event); + void mediaCached(QString mxcUrl, QString cacheUrl); + void newEncryptedImage(mtx::crypto::EncryptedFile encryptionInfo); private: DecryptionResult decryptEvent(