aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/public_rooms_response.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-12-14 23:32:16 +0900
committerGitHub <noreply@github.com>2018-12-14 23:32:16 +0900
commitfcc8d2ca615fce6e42bf1cf6585d60f94a2db926 (patch)
treeb0dd17b632a5c5775f2221fd0b53b21a8c02ce58 /lib/csapi/definitions/public_rooms_response.h
parent50571a92b4e9f634c4daf546222fa082120db6c7 (diff)
parent12a0b95fdcfea15cd0ef313aec8868656629b986 (diff)
downloadlibquotient-fcc8d2ca615fce6e42bf1cf6585d60f94a2db926.tar.gz
libquotient-fcc8d2ca615fce6e42bf1cf6585d60f94a2db926.zip
Merge pull request #263 from QMatrixClient/kitsune-lazy-loading
Lazy loading members
Diffstat (limited to 'lib/csapi/definitions/public_rooms_response.h')
-rw-r--r--lib/csapi/definitions/public_rooms_response.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/csapi/definitions/public_rooms_response.h b/lib/csapi/definitions/public_rooms_response.h
index 88c805ba..4c54ac25 100644
--- a/lib/csapi/definitions/public_rooms_response.h
+++ b/lib/csapi/definitions/public_rooms_response.h
@@ -36,12 +36,10 @@ namespace QMatrixClient
/// The URL for the room's avatar, if one is set.
QString avatarUrl;
};
-
- QJsonObject toJson(const PublicRoomsChunk& pod);
-
- template <> struct FromJsonObject<PublicRoomsChunk>
+ template <> struct JsonObjectConverter<PublicRoomsChunk>
{
- PublicRoomsChunk operator()(const QJsonObject& jo) const;
+ static void dumpTo(QJsonObject& jo, const PublicRoomsChunk& pod);
+ static void fillFrom(const QJsonObject& jo, PublicRoomsChunk& pod);
};
/// A list of the rooms on the server.
@@ -61,12 +59,10 @@ namespace QMatrixClient
/// server has an estimate.
Omittable<int> totalRoomCountEstimate;
};
-
- QJsonObject toJson(const PublicRoomsResponse& pod);
-
- template <> struct FromJsonObject<PublicRoomsResponse>
+ template <> struct JsonObjectConverter<PublicRoomsResponse>
{
- PublicRoomsResponse operator()(const QJsonObject& jo) const;
+ static void dumpTo(QJsonObject& jo, const PublicRoomsResponse& pod);
+ static void fillFrom(const QJsonObject& jo, PublicRoomsResponse& pod);
};
} // namespace QMatrixClient