aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/public_rooms_response.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/public_rooms_response.cpp')
-rw-r--r--lib/csapi/definitions/public_rooms_response.cpp36
1 files changed, 20 insertions, 16 deletions
diff --git a/lib/csapi/definitions/public_rooms_response.cpp b/lib/csapi/definitions/public_rooms_response.cpp
index 199a7a93..2c03b7d3 100644
--- a/lib/csapi/definitions/public_rooms_response.cpp
+++ b/lib/csapi/definitions/public_rooms_response.cpp
@@ -4,14 +4,14 @@
#include "public_rooms_response.h"
+
using namespace QMatrixClient;
-void JsonObjectConverter<PublicRoomsChunk>::dumpTo(QJsonObject& jo,
- const PublicRoomsChunk& pod)
+
+void JsonObjectConverter<PublicRoomsChunk>::dumpTo(QJsonObject& jo, const PublicRoomsChunk& pod)
{
addParam<IfNotEmpty>(jo, QStringLiteral("aliases"), pod.aliases);
- addParam<IfNotEmpty>(jo, QStringLiteral("canonical_alias"),
- pod.canonicalAlias);
+ addParam<IfNotEmpty>(jo, QStringLiteral("canonical_alias"), pod.canonicalAlias);
addParam<IfNotEmpty>(jo, QStringLiteral("name"), pod.name);
addParam<>(jo, QStringLiteral("num_joined_members"), pod.numJoinedMembers);
addParam<>(jo, QStringLiteral("room_id"), pod.roomId);
@@ -19,10 +19,10 @@ void JsonObjectConverter<PublicRoomsChunk>::dumpTo(QJsonObject& jo,
addParam<>(jo, QStringLiteral("world_readable"), pod.worldReadable);
addParam<>(jo, QStringLiteral("guest_can_join"), pod.guestCanJoin);
addParam<IfNotEmpty>(jo, QStringLiteral("avatar_url"), pod.avatarUrl);
-}
-void JsonObjectConverter<PublicRoomsChunk>::fillFrom(const QJsonObject& jo,
- PublicRoomsChunk& result)
+}
+
+void JsonObjectConverter<PublicRoomsChunk>::fillFrom(const QJsonObject& jo, PublicRoomsChunk& result)
{
fromJson(jo.value("aliases"_ls), result.aliases);
fromJson(jo.value("canonical_alias"_ls), result.canonicalAlias);
@@ -33,24 +33,28 @@ void JsonObjectConverter<PublicRoomsChunk>::fillFrom(const QJsonObject& jo,
fromJson(jo.value("world_readable"_ls), result.worldReadable);
fromJson(jo.value("guest_can_join"_ls), result.guestCanJoin);
fromJson(jo.value("avatar_url"_ls), result.avatarUrl);
+
}
+
-void JsonObjectConverter<PublicRoomsResponse>::dumpTo(
- QJsonObject& jo, const PublicRoomsResponse& pod)
+
+void JsonObjectConverter<PublicRoomsResponse>::dumpTo(QJsonObject& jo, const PublicRoomsResponse& pod)
{
addParam<>(jo, QStringLiteral("chunk"), pod.chunk);
addParam<IfNotEmpty>(jo, QStringLiteral("next_batch"), pod.nextBatch);
addParam<IfNotEmpty>(jo, QStringLiteral("prev_batch"), pod.prevBatch);
- addParam<IfNotEmpty>(jo, QStringLiteral("total_room_count_estimate"),
- pod.totalRoomCountEstimate);
-}
+ addParam<IfNotEmpty>(jo, QStringLiteral("total_room_count_estimate"), pod.totalRoomCountEstimate);
-void JsonObjectConverter<PublicRoomsResponse>::fillFrom(
- const QJsonObject& jo, PublicRoomsResponse& result)
+}
+
+void JsonObjectConverter<PublicRoomsResponse>::fillFrom(const QJsonObject& jo, PublicRoomsResponse& result)
{
fromJson(jo.value("chunk"_ls), result.chunk);
fromJson(jo.value("next_batch"_ls), result.nextBatch);
fromJson(jo.value("prev_batch"_ls), result.prevBatch);
- fromJson(jo.value("total_room_count_estimate"_ls),
- result.totalRoomCountEstimate);
+ fromJson(jo.value("total_room_count_estimate"_ls), result.totalRoomCountEstimate);
+
}
+
+
+