aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-23 15:38:59 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-23 15:55:16 +0900
commit49ad563550ba9d2d03fc7a519ccb857a6d08791c (patch)
treec4beac95c51d29c78ca4826898a0d85344769268 /lib/room.h
parent64799eaf667840c7f81d80810508d948f64f97d6 (diff)
downloadlibquotient-49ad563550ba9d2d03fc7a519ccb857a6d08791c.tar.gz
libquotient-49ad563550ba9d2d03fc7a519ccb857a6d08791c.zip
Room/Connection: don't save the just loaded room cache
Diffstat (limited to 'lib/room.h')
-rw-r--r--lib/room.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/room.h b/lib/room.h
index ab8298d4..480de6fe 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -456,14 +456,6 @@ namespace QMatrixClient
/// The room is about to be deleted
void beforeDestruction(Room*);
- public: // Used by Connection - not a part of the client API
- QJsonObject toJson() const;
- void updateData(SyncRoomData&& data );
-
- // Clients should use Connection::joinRoom() and Room::leaveRoom()
- // to change the room state
- void setJoinState( JoinState state );
-
protected:
/// Returns true if any of room names/aliases has changed
virtual Changes processStateEvent(const RoomEvent& e);
@@ -473,10 +465,19 @@ namespace QMatrixClient
virtual void onAddHistoricalTimelineEvents(rev_iter_t /*from*/) { }
virtual void onRedaction(const RoomEvent& /*prevEvent*/,
const RoomEvent& /*after*/) { }
+ virtual QJsonObject toJson() const;
+ virtual void updateData(SyncRoomData&& data, bool fromCache = false);
private:
+ friend class Connection;
+
class Private;
Private* d;
+
+ // This is called from Connection, reflecting a state change that
+ // arrived from the server. Clients should use
+ // Connection::joinRoom() and Room::leaveRoom() to change the state.
+ void setJoinState(JoinState state);
};
class MemberSorter