aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/public_rooms_response.cpp
diff options
context:
space:
mode:
authorBlack Hat <bhat@encom.eu.org>2019-09-26 22:22:36 -0700
committerBlack Hat <bhat@encom.eu.org>2019-09-26 22:22:36 -0700
commit363cf452bcdbaf6ff1cf94a83ca66cbb31122346 (patch)
treec64c8fda885e4e1785130e8ee3e7c47fd18cbf67 /lib/csapi/definitions/public_rooms_response.cpp
parent412e2cf19449e73aa7da729e9c5de6502687aade (diff)
parent944653463fe4134c82d85e2d01e2bc0fa43fd727 (diff)
downloadlibquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.tar.gz
libquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.zip
Merge branch 'master' of https://github.com/quotient-im/libQuotient into
bhat-libqtolm-update
Diffstat (limited to 'lib/csapi/definitions/public_rooms_response.cpp')
-rw-r--r--lib/csapi/definitions/public_rooms_response.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/csapi/definitions/public_rooms_response.cpp b/lib/csapi/definitions/public_rooms_response.cpp
index 0d26662c..b6009718 100644
--- a/lib/csapi/definitions/public_rooms_response.cpp
+++ b/lib/csapi/definitions/public_rooms_response.cpp
@@ -4,13 +4,14 @@
#include "public_rooms_response.h"
-using namespace QMatrixClient;
+using namespace Quotient;
-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);
@@ -20,8 +21,8 @@ void JsonObjectConverter<PublicRoomsChunk>::dumpTo(
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);
@@ -35,12 +36,13 @@ void JsonObjectConverter<PublicRoomsChunk>::fillFrom(
}
void JsonObjectConverter<PublicRoomsResponse>::dumpTo(
- QJsonObject& jo, const PublicRoomsResponse& pod)
+ 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(
@@ -49,6 +51,6 @@ void JsonObjectConverter<PublicRoomsResponse>::fillFrom(
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);
}
-