aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/whoami.h
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/whoami.h
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/whoami.h')
-rw-r--r--lib/csapi/whoami.h84
1 files changed, 43 insertions, 41 deletions
diff --git a/lib/csapi/whoami.h b/lib/csapi/whoami.h
index 71e9d532..bbbb3899 100644
--- a/lib/csapi/whoami.h
+++ b/lib/csapi/whoami.h
@@ -6,46 +6,48 @@
#include "jobs/basejob.h"
+namespace Quotient
+{
-namespace QMatrixClient
+// Operations
+
+/// Gets information about the owner of an access token.
+/*!
+ * Gets information about the owner of a given access token.
+ *
+ * Note that, as with the rest of the Client-Server API,
+ * Application Services may masquerade as users within their
+ * namespace by giving a ``user_id`` query parameter. In this
+ * situation, the server should verify that the given ``user_id``
+ * is registered by the appservice, and return it in the response
+ * body.
+ */
+class GetTokenOwnerJob : public BaseJob
{
- // Operations
-
- /// Gets information about the owner of an access token.
- ///
- /// Gets information about the owner of a given access token.
- ///
- /// Note that, as with the rest of the Client-Server API,
- /// Application Services may masquerade as users within their
- /// namespace by giving a ``user_id`` query parameter. In this
- /// situation, the server should verify that the given ``user_id``
- /// is registered by the appservice, and return it in the response
- /// body.
- class GetTokenOwnerJob : public BaseJob
- {
- public:
- explicit GetTokenOwnerJob();
-
- /*! Construct a URL without creating a full-fledged job object
- *
- * This function can be used when a URL for
- * GetTokenOwnerJob is necessary but the job
- * itself isn't.
- */
- static QUrl makeRequestUrl(QUrl baseUrl);
-
- ~GetTokenOwnerJob() override;
-
- // Result properties
-
- /// The user id that owns the access token.
- const QString& userId() const;
-
- protected:
- Status parseJson(const QJsonDocument& data) override;
-
- private:
- class Private;
- QScopedPointer<Private> d;
- };
-} // namespace QMatrixClient
+public:
+ explicit GetTokenOwnerJob();
+
+ /*! Construct a URL without creating a full-fledged job object
+ *
+ * This function can be used when a URL for
+ * GetTokenOwnerJob is necessary but the job
+ * itself isn't.
+ */
+ static QUrl makeRequestUrl(QUrl baseUrl);
+
+ ~GetTokenOwnerJob() override;
+
+ // Result properties
+
+ /// The user id that owns the access token.
+ const QString& userId() const;
+
+protected:
+ Status parseJson(const QJsonDocument& data) override;
+
+private:
+ class Private;
+ QScopedPointer<Private> d;
+};
+
+} // namespace Quotient