libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
third_party_lookup.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/jobs/basejob.h>
6
7#include <Quotient/application-service/definitions/location.h>
8#include <Quotient/application-service/definitions/protocol.h>
9#include <Quotient/application-service/definitions/user.h>
10
11namespace Quotient {
12
13//! \brief Retrieve metadata about all protocols that a homeserver supports.
14//!
15//! Fetches the overall metadata about protocols supported by the
16//! homeserver. Includes both the available protocols and all fields
17//! required for queries against each protocol.
19public:
20 explicit GetProtocolsJob();
21
22 //! \brief Construct a URL without creating a full-fledged job object
23 //!
24 //! This function can be used when a URL for GetProtocolsJob
25 //! is necessary but the job itself isn't.
27
28 // Result properties
29
30 //! The protocols supported by the homeserver.
32 {
34 }
35};
36
37inline auto collectResponse(const GetProtocolsJob* job) { return job->protocols(); }
38
39//! \brief Retrieve metadata about a specific protocol that the homeserver supports.
40//!
41//! Fetches the metadata from the homeserver about a particular third-party protocol.
43public:
44 //! \param protocol
45 //! The name of the protocol.
47
48 //! \brief Construct a URL without creating a full-fledged job object
49 //!
50 //! This function can be used when a URL for GetProtocolMetadataJob
51 //! is necessary but the job itself isn't.
53
54 // Result properties
55
56 //! The protocol was found and metadata returned.
58};
59
60inline auto collectResponse(const GetProtocolMetadataJob* job) { return job->data(); }
61
62//! \brief Retrieve Matrix-side portals rooms leading to a third-party location.
63//!
64//! Requesting this endpoint with a valid protocol name results in a list
65//! of successful mapping results in a JSON array. Each result contains
66//! objects to represent the Matrix room or rooms that represent a portal
67//! to this third-party network. Each has the Matrix room alias string,
68//! an identifier for the particular third-party network protocol, and an
69//! object containing the network-specific fields that comprise this
70//! identifier. It should attempt to canonicalise the identifier as much
71//! as reasonably possible given the network type.
73public:
74 //! \param protocol
75 //! The protocol used to communicate to the third-party network.
76 //!
77 //! \param searchFields
78 //! One or more custom fields to help identify the third-party
79 //! location.
81
82 //! \brief Construct a URL without creating a full-fledged job object
83 //!
84 //! This function can be used when a URL for QueryLocationByProtocolJob
85 //! is necessary but the job itself isn't.
87 const QString& searchFields = {});
88
89 // Result properties
90
91 //! At least one portal room was found.
93 {
95 }
96};
97
98inline auto collectResponse(const QueryLocationByProtocolJob* job) { return job->data(); }
99
100//! \brief Retrieve the Matrix User ID of a corresponding third-party user.
101//!
102//! Retrieve a Matrix User ID linked to a user on the third-party service, given
103//! a set of user parameters.
105public:
106 //! \param protocol
107 //! The name of the protocol.
108 //!
109 //! \param fields
110 //! One or more custom fields that are passed to the AS to help identify the user.
112 const QHash<QString, QString>& fields = {});
113
114 //! \brief Construct a URL without creating a full-fledged job object
115 //!
116 //! This function can be used when a URL for QueryUserByProtocolJob
117 //! is necessary but the job itself isn't.
119 const QHash<QString, QString>& fields = {});
120
121 // Result properties
122
123 //! The Matrix User IDs found with the given parameters.
125};
126
127inline auto collectResponse(const QueryUserByProtocolJob* job) { return job->data(); }
128
129//! \brief Reverse-lookup third-party locations given a Matrix room alias.
130//!
131//! Retrieve an array of third-party network locations from a Matrix room
132//! alias.
134public:
135 //! \param alias
136 //! The Matrix room alias to look up.
138
139 //! \brief Construct a URL without creating a full-fledged job object
140 //!
141 //! This function can be used when a URL for QueryLocationByAliasJob
142 //! is necessary but the job itself isn't.
144
145 // Result properties
146
147 //! All found third-party locations.
149 {
151 }
152};
153
154inline auto collectResponse(const QueryLocationByAliasJob* job) { return job->data(); }
155
156//! \brief Reverse-lookup third-party users given a Matrix User ID.
157//!
158//! Retrieve an array of third-party users from a Matrix User ID.
160public:
161 //! \param userid
162 //! The Matrix User ID to look up.
164
165 //! \brief Construct a URL without creating a full-fledged job object
166 //!
167 //! This function can be used when a URL for QueryUserByIDJob
168 //! is necessary but the job itself isn't.
170
171 // Result properties
172
173 //! An array of third-party users.
175};
176
177inline auto collectResponse(const QueryUserByIDJob* job) { return job->data(); }
178
179} // namespace Quotient
Retrieve metadata about a specific protocol that the homeserver supports.
Retrieve metadata about all protocols that a homeserver supports.
Reverse-lookup third-party locations given a Matrix room alias.
Retrieve Matrix-side portals rooms leading to a third-party location.
Reverse-lookup third-party users given a Matrix User ID.
Retrieve the Matrix User ID of a corresponding third-party user.
auto collectResponse(const GetAccountDataJob *job)
#define QUOTIENT_API