aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/generated/create_room.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-03 20:10:14 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-03 22:47:47 +0900
commitf3927ca0c16a61fcb0933333ecff8095917a5b47 (patch)
treee68d2fc1c19b2e3790086d3d6e43348a486fda69 /lib/jobs/generated/create_room.cpp
parent564d518c086f2aeab0f0466b7cd1915e20edc7da (diff)
downloadlibquotient-f3927ca0c16a61fcb0933333ecff8095917a5b47.tar.gz
libquotient-f3927ca0c16a61fcb0933333ecff8095917a5b47.zip
jobs/generated: Drop unused code
Diffstat (limited to 'lib/jobs/generated/create_room.cpp')
-rw-r--r--lib/jobs/generated/create_room.cpp43
1 files changed, 4 insertions, 39 deletions
diff --git a/lib/jobs/generated/create_room.cpp b/lib/jobs/generated/create_room.cpp
index 4fc75974..a417c2b1 100644
--- a/lib/jobs/generated/create_room.cpp
+++ b/lib/jobs/generated/create_room.cpp
@@ -12,62 +12,27 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0");
namespace QMatrixClient
{
+ // Converters
+
QJsonObject toJson(const CreateRoomJob::Invite3pid& pod)
{
QJsonObject o;
o.insert("id_server", toJson(pod.idServer));
o.insert("medium", toJson(pod.medium));
o.insert("address", toJson(pod.address));
-
+
return o;
}
- template <> struct FromJson<CreateRoomJob::Invite3pid>
- {
- CreateRoomJob::Invite3pid operator()(const QJsonValue& jv)
- {
- const auto& o = jv.toObject();
- CreateRoomJob::Invite3pid result;
- result.idServer =
- fromJson<QString>(o.value("id_server"));
- result.medium =
- fromJson<QString>(o.value("medium"));
- result.address =
- fromJson<QString>(o.value("address"));
-
- return result;
- }
- };
-} // namespace QMatrixClient
-
-namespace QMatrixClient
-{
QJsonObject toJson(const CreateRoomJob::StateEvent& pod)
{
QJsonObject o;
o.insert("type", toJson(pod.type));
o.insert("state_key", toJson(pod.stateKey));
o.insert("content", toJson(pod.content));
-
+
return o;
}
-
- template <> struct FromJson<CreateRoomJob::StateEvent>
- {
- CreateRoomJob::StateEvent operator()(const QJsonValue& jv)
- {
- const auto& o = jv.toObject();
- CreateRoomJob::StateEvent result;
- result.type =
- fromJson<QString>(o.value("type"));
- result.stateKey =
- fromJson<QString>(o.value("state_key"));
- result.content =
- fromJson<QJsonObject>(o.value("content"));
-
- return result;
- }
- };
} // namespace QMatrixClient
class CreateRoomJob::Private