diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-21 22:59:17 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-21 22:59:17 +0900 |
commit | 22b14860e6b2bda990a05167ae61d8d7f24a2427 (patch) | |
tree | 70e0b47a8460af0ee2b8ab9007977178ab196dd6 /lib/csapi/third_party_lookup.h | |
parent | d3f1f39dafc87ce5b4654ac2a9b21df53dad1a4b (diff) | |
download | libquotient-22b14860e6b2bda990a05167ae61d8d7f24a2427.tar.gz libquotient-22b14860e6b2bda990a05167ae61d8d7f24a2427.zip |
csapi: add definitions/auth_data.* and optimise out trivial files with the latest GTAD
Diffstat (limited to 'lib/csapi/third_party_lookup.h')
-rw-r--r-- | lib/csapi/third_party_lookup.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/csapi/third_party_lookup.h b/lib/csapi/third_party_lookup.h index 8dec11a4..03d607a8 100644 --- a/lib/csapi/third_party_lookup.h +++ b/lib/csapi/third_party_lookup.h @@ -6,11 +6,12 @@ #include "jobs/basejob.h" -#include "csapi/../application-service/definitions/protocol_metadata.h" -#include "csapi/../application-service/definitions/protocol.h" +#include "csapi/../application-service/definitions/user.h" +#include "csapi/../application-service/definitions/location.h" +#include <QtCore/QHash> +#include <QtCore/QVector> #include "converters.h" -#include "csapi/../application-service/definitions/location_batch.h" -#include "csapi/../application-service/definitions/user_batch.h" +#include "csapi/../application-service/definitions/protocol.h" namespace QMatrixClient { @@ -39,7 +40,7 @@ namespace QMatrixClient // Result properties /// The protocols supported by the homeserver. - const ProtocolMetadata& data() const; + const QHash<QString, ThirdPartyProtocol>& data() const; protected: Status parseJson(const QJsonDocument& data) override; @@ -119,7 +120,7 @@ namespace QMatrixClient // Result properties /// At least one portal room was found. - const LocationBatch& data() const; + const QVector<ThirdPartyLocation>& data() const; protected: Status parseJson(const QJsonDocument& data) override; @@ -139,10 +140,10 @@ namespace QMatrixClient /*! Retrieve the Matrix User ID of a corresponding third party user. * \param protocol * The name of the protocol. - * \param field1Field2 + * \param fields * One or more custom fields that are passed to the AS to help identify the user. */ - explicit QueryUserByProtocolJob(const QString& protocol, const QString& field1Field2 = {}); + explicit QueryUserByProtocolJob(const QString& protocol, const QString& fields = {}); /*! Construct a URL without creating a full-fledged job object * @@ -150,14 +151,14 @@ namespace QMatrixClient * QueryUserByProtocolJob is necessary but the job * itself isn't. */ - static QUrl makeRequestUrl(QUrl baseUrl, const QString& protocol, const QString& field1Field2 = {}); + static QUrl makeRequestUrl(QUrl baseUrl, const QString& protocol, const QString& fields = {}); ~QueryUserByProtocolJob() override; // Result properties /// The Matrix User IDs found with the given parameters. - const UserBatch& data() const; + const QVector<ThirdPartyUser>& data() const; protected: Status parseJson(const QJsonDocument& data) override; @@ -193,7 +194,7 @@ namespace QMatrixClient // Result properties /// All found third party locations. - const LocationBatch& data() const; + const QVector<ThirdPartyLocation>& data() const; protected: Status parseJson(const QJsonDocument& data) override; @@ -228,7 +229,7 @@ namespace QMatrixClient // Result properties /// An array of third party users. - const UserBatch& data() const; + const QVector<ThirdPartyUser>& data() const; protected: Status parseJson(const QJsonDocument& data) override; |