aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-22 16:51:49 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-22 16:53:59 +0900
commit5fb74ca3d253b658fe77aaeb6a106cf6c0a9e7f0 (patch)
tree203d3533550e6c665220578f7922317833efb22c /lib/connection.h
parent0c3a45356a803baa0eb5e553262a85cac897ac4f (diff)
downloadlibquotient-5fb74ca3d253b658fe77aaeb6a106cf6c0a9e7f0.tar.gz
libquotient-5fb74ca3d253b658fe77aaeb6a106cf6c0a9e7f0.zip
Save state cache per-room
Closes #257.
Diffstat (limited to 'lib/connection.h')
-rw-r--r--lib/connection.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/connection.h b/lib/connection.h
index 20dade76..20a1f47e 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -280,7 +280,7 @@ namespace QMatrixClient
* to be QML-friendly. Empty parameter means using a path
* defined by stateCachePath().
*/
- Q_INVOKABLE void loadState(const QUrl &fromFile = {});
+ Q_INVOKABLE void loadState();
/**
* This method saves the current state of rooms (but not messages
* in them) to a local cache file, so that it could be loaded by
@@ -290,7 +290,10 @@ namespace QMatrixClient
* QML-friendly. Empty parameter means using a path defined by
* stateCachePath().
*/
- Q_INVOKABLE void saveState(const QUrl &toFile = {}) const;
+ Q_INVOKABLE void saveState() const;
+
+ /// This method saves the current state of a single room.
+ void saveRoomState(Room* r) const;
/**
* The default path to store the cached room state, defined as