aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/wellknown.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
committerAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
commit09eb39236666e81d5da014acea011dcd74d0999b (patch)
tree52876d96be71be1a39d5d935c1295a51995e8949 /lib/csapi/wellknown.h
parentf1788ee27f33e9339334e0d79bde9a27d9ce2e44 (diff)
parenta4e78956f105875625b572d8b98459ffa86fafe5 (diff)
downloadlibquotient-09eb39236666e81d5da014acea011dcd74d0999b.tar.gz
libquotient-09eb39236666e81d5da014acea011dcd74d0999b.zip
Update upstream source from tag 'upstream/0.6.4'
Update to upstream version '0.6.4' with Debian dir aa8705fd74743e79c043bc9e3e425d5064404cfe
Diffstat (limited to 'lib/csapi/wellknown.h')
-rw-r--r--lib/csapi/wellknown.h70
1 files changed, 31 insertions, 39 deletions
diff --git a/lib/csapi/wellknown.h b/lib/csapi/wellknown.h
index 8da9ce9f..b21d9fc7 100644
--- a/lib/csapi/wellknown.h
+++ b/lib/csapi/wellknown.h
@@ -4,50 +4,42 @@
#pragma once
-#include "jobs/basejob.h"
-
#include "csapi/definitions/wellknown/full.h"
-#include "converters.h"
-namespace QMatrixClient
-{
- // Operations
+#include "jobs/basejob.h"
+namespace Quotient {
+
+/*! \brief Gets Matrix server discovery information about the domain.
+ *
+ * Gets discovery information about the domain. The file may include
+ * additional keys, which MUST follow the Java package naming convention,
+ * e.g. ``com.example.myapp.property``. This ensures property names are
+ * suitably namespaced for each application and reduces the risk of
+ * clashes.
+ *
+ * Note that this endpoint is not necessarily handled by the homeserver,
+ * but by another webserver, to be used for discovering the homeserver URL.
+ */
+class GetWellknownJob : public BaseJob {
+public:
/// Gets Matrix server discovery information about the domain.
- ///
- /// Gets discovery information about the domain. The file may include
- /// additional keys, which MUST follow the Java package naming convention,
- /// e.g. ``com.example.myapp.property``. This ensures property names are
- /// suitably namespaced for each application and reduces the risk of
- /// clashes.
- ///
- /// Note that this endpoint is not necessarily handled by the homeserver,
- /// but by another webserver, to be used for discovering the homeserver URL.
- class GetWellknownJob : public BaseJob
- {
- public:
- explicit GetWellknownJob();
-
- /*! Construct a URL without creating a full-fledged job object
- *
- * This function can be used when a URL for
- * GetWellknownJob is necessary but the job
- * itself isn't.
- */
- static QUrl makeRequestUrl(QUrl baseUrl);
+ explicit GetWellknownJob();
- ~GetWellknownJob() override;
+ /*! \brief Construct a URL without creating a full-fledged job object
+ *
+ * This function can be used when a URL for GetWellknownJob
+ * is necessary but the job itself isn't.
+ */
+ static QUrl makeRequestUrl(QUrl baseUrl);
- // Result properties
+ // Result properties
- /// Server discovery information.
- const DiscoveryInformation& data() const;
-
- protected:
- Status parseJson(const QJsonDocument& data) override;
+ /// Server discovery information.
+ DiscoveryInformation data() const
+ {
+ return fromJson<DiscoveryInformation>(jsonData());
+ }
+};
- private:
- class Private;
- QScopedPointer<Private> d;
- };
-} // namespace QMatrixClient
+} // namespace Quotient