5 #include <Quotient/jobs/basejob.h>
7 #include <Quotient/application-service/definitions/location.h>
8 #include <Quotient/application-service/definitions/protocol.h>
9 #include <Quotient/application-service/definitions/user.h>
20 explicit GetProtocolsJob();
26 static QUrl makeRequestUrl(
const HomeserverData& hsData);
31 QHash<QString, ThirdPartyProtocol> protocols()
const
33 return fromJson<QHash<QString, ThirdPartyProtocol>>(jsonData());
37 inline auto collectResponse(
const GetProtocolsJob* job) {
return job->protocols(); }
46 explicit GetProtocolMetadataJob(
const QString& protocol);
52 static QUrl makeRequestUrl(
const HomeserverData& hsData,
const QString& protocol);
57 ThirdPartyProtocol data()
const {
return fromJson<ThirdPartyProtocol>(jsonData()); }
60 inline auto collectResponse(
const GetProtocolMetadataJob* job) {
return job->data(); }
80 explicit QueryLocationByProtocolJob(
const QString& protocol,
const QString& searchFields = {});
86 static QUrl makeRequestUrl(
const HomeserverData& hsData,
const QString& protocol,
87 const QString& searchFields = {});
92 QVector<ThirdPartyLocation> data()
const
94 return fromJson<QVector<ThirdPartyLocation>>(jsonData());
98 inline auto collectResponse(
const QueryLocationByProtocolJob* job) {
return job->data(); }
111 explicit QueryUserByProtocolJob(
const QString& protocol,
112 const QHash<QString, QString>& fields = {});
118 static QUrl makeRequestUrl(
const HomeserverData& hsData,
const QString& protocol,
119 const QHash<QString, QString>& fields = {});
124 QVector<ThirdPartyUser> data()
const {
return fromJson<QVector<ThirdPartyUser>>(jsonData()); }
127 inline auto collectResponse(
const QueryUserByProtocolJob* job) {
return job->data(); }
137 explicit QueryLocationByAliasJob(
const QString& alias);
143 static QUrl makeRequestUrl(
const HomeserverData& hsData,
const QString& alias);
148 QVector<ThirdPartyLocation> data()
const
150 return fromJson<QVector<ThirdPartyLocation>>(jsonData());
154 inline auto collectResponse(
const QueryLocationByAliasJob* job) {
return job->data(); }
163 explicit QueryUserByIDJob(
const QString& userid);
169 static QUrl makeRequestUrl(
const HomeserverData& hsData,
const QString& userid);
174 QVector<ThirdPartyUser> data()
const {
return fromJson<QVector<ThirdPartyUser>>(jsonData()); }
177 inline auto collectResponse(
const QueryUserByIDJob* job) {
return job->data(); }