aboutsummaryrefslogtreecommitdiff
path: root/jobs/syncjob.h
diff options
context:
space:
mode:
authorKitsuneRal <KitsuneRal@users.noreply.github.com>2016-05-26 14:01:42 +0900
committerKitsuneRal <KitsuneRal@users.noreply.github.com>2016-05-26 14:01:42 +0900
commitd5df4568d34487aea519ae97dd1666927dcfb62b (patch)
treee8f61160d9b4f8f8fc67b0f6817c940a02a1c314 /jobs/syncjob.h
parent408853a4f327978c990cd65b071e7c6496a0b95c (diff)
parenta48e46dd315c66c196626f280cedbf4f0fa52355 (diff)
downloadlibquotient-d5df4568d34487aea519ae97dd1666927dcfb62b.tar.gz
libquotient-d5df4568d34487aea519ae97dd1666927dcfb62b.zip
Merge pull request #8 from Fxrh/event-lists
Load a different set of event lists depending on the join state (and actually introduce EventList class)
Diffstat (limited to 'jobs/syncjob.h')
-rw-r--r--jobs/syncjob.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/jobs/syncjob.h b/jobs/syncjob.h
index 507d46eb..abbef23a 100644
--- a/jobs/syncjob.h
+++ b/jobs/syncjob.h
@@ -30,12 +30,22 @@ namespace QMatrixClient
class SyncRoomData
{
public:
+ class EventList : public QList<Event*>
+ {
+ private:
+ QString jsonKey;
+ public:
+ explicit EventList(QString k) : jsonKey(k) { }
+ void fromJson(const QJsonObject& roomContents);
+ };
+
QString roomId;
JoinState joinState;
- QList<Event*> state;
- QList<Event*> timeline;
- QList<Event*> ephemeral;
- QList<Event*> accountData;
+ EventList state;
+ EventList timeline;
+ EventList ephemeral;
+ EventList accountData;
+ EventList inviteState;
bool timelineLimited;
QString timelinePrevBatch;