aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/directory.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-18 18:39:56 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-18 18:39:56 +0900
commit5e6b4bb975fa9697a6aca001629c65db506a437f (patch)
treedeeb501bd6b534dc1ce454fb03e2d91e09597770 /lib/csapi/directory.h
parent56480bc96b28356c44547cc3d9ea1afbda9f04f9 (diff)
downloadlibquotient-5e6b4bb975fa9697a6aca001629c65db506a437f.tar.gz
libquotient-5e6b4bb975fa9697a6aca001629c65db506a437f.zip
csapi: Doxy-comments thanks to the latest GTAD
Diffstat (limited to 'lib/csapi/directory.h')
-rw-r--r--lib/csapi/directory.h43
1 files changed, 37 insertions, 6 deletions
diff --git a/lib/csapi/directory.h b/lib/csapi/directory.h
index 1e6b2f46..69069ee0 100644
--- a/lib/csapi/directory.h
+++ b/lib/csapi/directory.h
@@ -11,20 +11,39 @@ namespace QMatrixClient
{
// Operations
+ /// Create a new mapping from room alias to room ID.
class SetRoomAliasJob : public BaseJob
{
public:
+ /*! Create a new mapping from room alias to room ID.
+ * \param roomAlias
+ * The room alias to set.
+ * \param roomId
+ * The room ID to set.
+ */
explicit SetRoomAliasJob(const QString& roomAlias, const QString& roomId = {});
};
+ /// Get the room ID corresponding to this room alias.
+ ///
+ /// Requests that the server resolve a room alias to a room ID.
+ ///
+ /// The server will use the federation API to resolve the alias if the
+ /// domain part of the alias does not correspond to the server's own
+ /// domain.
class GetRoomIdByAliasJob : public BaseJob
{
public:
+ /*! Get the room ID corresponding to this room alias.
+ * \param roomAlias
+ * The room alias.
+ */
explicit GetRoomIdByAliasJob(const QString& roomAlias);
- /** Construct a URL out of baseUrl and usual parameters passed to
- * GetRoomIdByAliasJob. This function can be used when
- * a URL for GetRoomIdByAliasJob is necessary but the job
+ /*! Construct a URL without creating a full-fledged job object
+ *
+ * This function can be used when a URL for
+ * GetRoomIdByAliasJob is necessary but the job
* itself isn't.
*/
static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomAlias);
@@ -33,7 +52,9 @@ namespace QMatrixClient
// Result properties
+ /// The room ID for this room alias.
const QString& roomId() const;
+ /// A list of servers that are aware of this room alias.
const QStringList& servers() const;
protected:
@@ -44,14 +65,24 @@ namespace QMatrixClient
QScopedPointer<Private> d;
};
+ /// Remove a mapping of room alias to room ID.
+ ///
+ /// Remove a mapping of room alias to room ID.
+ ///
+ /// Servers may choose to implement additional access control checks here, for instance that room aliases can only be deleted by their creator or a server administrator.
class DeleteRoomAliasJob : public BaseJob
{
public:
+ /*! Remove a mapping of room alias to room ID.
+ * \param roomAlias
+ * The room alias to remove.
+ */
explicit DeleteRoomAliasJob(const QString& roomAlias);
- /** Construct a URL out of baseUrl and usual parameters passed to
- * DeleteRoomAliasJob. This function can be used when
- * a URL for DeleteRoomAliasJob is necessary but the job
+ /*! Construct a URL without creating a full-fledged job object
+ *
+ * This function can be used when a URL for
+ * DeleteRoomAliasJob is necessary but the job
* itself isn't.
*/
static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomAlias);