libQuotient
A Qt library for building matrix clients
homeserver.h
Go to the documentation of this file.
1 // THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2 
3 #pragma once
4 
5 #include <Quotient/converters.h>
6 
7 namespace Quotient {
8 //! Used by clients to discover homeserver information.
9 struct QUOTIENT_API HomeserverInformation {
10  //! The base URL for the homeserver for client-server connections.
11  QUrl baseUrl;
12 };
13 
14 template <>
15 struct JsonObjectConverter<HomeserverInformation> {
16  static void dumpTo(QJsonObject& jo, const HomeserverInformation& pod)
17  {
18  addParam<>(jo, "base_url"_L1, pod.baseUrl);
19  }
20  static void fillFrom(const QJsonObject& jo, HomeserverInformation& pod)
21  {
22  fillFromJson(jo.value("base_url"_L1), pod.baseUrl);
23  }
24 };
25 
26 } // namespace Quotient