aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-14 07:16:05 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-12-08 20:12:26 +0900
commit1ff8a0c26fc2738a085ca0302f0471ffa95a567e (patch)
tree9c4b1ea605ed91ea6a2f156ee48c8014c50b63be /lib/connection.h
parenta0053484024a85ae47dcd2b464cb15c0f85109e5 (diff)
downloadlibquotient-1ff8a0c26fc2738a085ca0302f0471ffa95a567e.tar.gz
libquotient-1ff8a0c26fc2738a085ca0302f0471ffa95a567e.zip
Connection: support members lazy-loading
This should cover the Connection-related part of #253. Connection gained lazyLoading/setLazyLoading accessors and the respective Q_PROPERTY. When lazy loading is on, sync() adds lazy_load_members: true to its filter.
Diffstat (limited to 'lib/connection.h')
-rw-r--r--lib/connection.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/connection.h b/lib/connection.h
index 32533b6e..220f6c8f 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -122,6 +122,8 @@ namespace QMatrixClient
Q_PROPERTY(QByteArray accessToken READ accessToken NOTIFY stateChanged)
Q_PROPERTY(QUrl homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged)
Q_PROPERTY(bool cacheState READ cacheState WRITE setCacheState NOTIFY cacheStateChanged)
+ Q_PROPERTY(bool lazyLoading READ lazyLoading WRITE setLazyLoading NOTIFY lazyLoadingChanged)
+
public:
// Room ids, rather than room pointers, are used in the direct chat
// map types because the library keeps Invite rooms separate from
@@ -308,6 +310,9 @@ namespace QMatrixClient
bool cacheState() const;
void setCacheState(bool newValue);
+ bool lazyLoading() const;
+ void setLazyLoading(bool newValue);
+
/** Start a job of a specified type with specified arguments and policy
*
* This is a universal method to start a job of a type passed
@@ -655,6 +660,7 @@ namespace QMatrixClient
IgnoredUsersList removals);
void cacheStateChanged();
+ void lazyLoadingChanged();
void turnServersChanged(const QJsonObject& servers);
protected: