aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/content-repo.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-17 07:42:13 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-17 07:49:41 +0200
commit7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 (patch)
treefa9e37d8874303bf56d5381b0844738bd516a79b /lib/csapi/content-repo.h
parent906699cc525e9e0be231a58cabffc31ad1f5193c (diff)
downloadlibquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.tar.gz
libquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.zip
Regenerate API files using new GTAD and refreshed templates
No functional changes.
Diffstat (limited to 'lib/csapi/content-repo.h')
-rw-r--r--lib/csapi/content-repo.h112
1 files changed, 56 insertions, 56 deletions
diff --git a/lib/csapi/content-repo.h b/lib/csapi/content-repo.h
index 83069490..6263ef0b 100644
--- a/lib/csapi/content-repo.h
+++ b/lib/csapi/content-repo.h
@@ -10,17 +10,17 @@
#include <QtCore/QIODevice>
-namespace Quotient
-{
+namespace Quotient {
// Operations
-/// Upload some content to the content repository.
-
-class UploadContentJob : public BaseJob
-{
+/*! \brief Upload some content to the content repository.
+ *
+ */
+class UploadContentJob : public BaseJob {
public:
- /*! Upload some content to the content repository.
+ /*! \brief Upload some content to the content repository.
+ *
* \param content
* \param filename
* The name of the file being uploaded
@@ -45,12 +45,13 @@ private:
QScopedPointer<Private> d;
};
-/// Download content from the content repository.
-
-class GetContentJob : public BaseJob
-{
+/*! \brief Download content from the content repository.
+ *
+ */
+class GetContentJob : public BaseJob {
public:
- /*! Download content from the content repository.
+ /*! \brief Download content from the content repository.
+ *
* \param serverName
* The server name from the ``mxc://`` URI (the authoritory component)
* \param mediaId
@@ -63,23 +64,23 @@ public:
explicit GetContentJob(const QString& serverName, const QString& mediaId,
bool allowRemote = true);
- /*! Construct a URL without creating a full-fledged job object
+ /*! \brief Construct a URL without creating a full-fledged job object
*
- * This function can be used when a URL for
- * GetContentJob is necessary but the job
- * itself isn't.
+ * This function can be used when a URL for GetContentJob
+ * is necessary but the job itself isn't.
*/
static QUrl makeRequestUrl(QUrl baseUrl, const QString& serverName,
const QString& mediaId, bool allowRemote = true);
-
~GetContentJob() override;
// Result properties
/// The content type of the file that was previously uploaded.
const QString& contentType() const;
+
/// The name of the file that was previously uploaded, if set.
const QString& contentDisposition() const;
+
/// The content that was previously uploaded.
QIODevice* data() const;
@@ -91,12 +92,13 @@ private:
QScopedPointer<Private> d;
};
-/// Download content from the content repository as a given filename.
-
-class GetContentOverrideNameJob : public BaseJob
-{
+/*! \brief Download content from the content repository as a given filename.
+ *
+ */
+class GetContentOverrideNameJob : public BaseJob {
public:
- /*! Download content from the content repository as a given filename.
+ /*! \brief Download content from the content repository as a given filename.
+ *
* \param serverName
* The server name from the ``mxc://`` URI (the authoritory component)
* \param mediaId
@@ -113,24 +115,24 @@ public:
const QString& fileName,
bool allowRemote = true);
- /*! Construct a URL without creating a full-fledged job object
+ /*! \brief Construct a URL without creating a full-fledged job object
*
- * This function can be used when a URL for
- * GetContentOverrideNameJob is necessary but the job
- * itself isn't.
+ * This function can be used when a URL for GetContentOverrideNameJob
+ * is necessary but the job itself isn't.
*/
static QUrl makeRequestUrl(QUrl baseUrl, const QString& serverName,
const QString& mediaId, const QString& fileName,
bool allowRemote = true);
-
~GetContentOverrideNameJob() override;
// Result properties
/// The content type of the file that was previously uploaded.
const QString& contentType() const;
+
/// The name of file given in the request
const QString& contentDisposition() const;
+
/// The content that was previously uploaded.
QIODevice* data() const;
@@ -142,12 +144,13 @@ private:
QScopedPointer<Private> d;
};
-/// Download a thumbnail of the content from the content repository.
-
-class GetContentThumbnailJob : public BaseJob
-{
+/*! \brief Download a thumbnail of the content from the content repository.
+ *
+ */
+class GetContentThumbnailJob : public BaseJob {
public:
- /*! Download a thumbnail of the content from the content repository.
+ /*! \brief Download a thumbnail of the content from the content repository.
+ *
* \param serverName
* The server name from the ``mxc://`` URI (the authoritory component)
* \param mediaId
@@ -170,23 +173,22 @@ public:
int height, const QString& method = {},
bool allowRemote = true);
- /*! Construct a URL without creating a full-fledged job object
+ /*! \brief Construct a URL without creating a full-fledged job object
*
- * This function can be used when a URL for
- * GetContentThumbnailJob is necessary but the job
- * itself isn't.
+ * This function can be used when a URL for GetContentThumbnailJob
+ * is necessary but the job itself isn't.
*/
static QUrl makeRequestUrl(QUrl baseUrl, const QString& serverName,
const QString& mediaId, int width, int height,
const QString& method = {},
bool allowRemote = true);
-
~GetContentThumbnailJob() override;
// Result properties
/// The content type of the thumbnail.
const QString& contentType() const;
+
/// A thumbnail of the requested content.
QIODevice* data() const;
@@ -198,12 +200,13 @@ private:
QScopedPointer<Private> d;
};
-/// Get information about a URL for a client
-
-class GetUrlPreviewJob : public BaseJob
-{
+/*! \brief Get information about a URL for a client
+ *
+ */
+class GetUrlPreviewJob : public BaseJob {
public:
- /*! Get information about a URL for a client
+ /*! \brief Get information about a URL for a client
+ *
* \param url
* The URL to get a preview of
* \param ts
@@ -213,21 +216,20 @@ public:
*/
explicit GetUrlPreviewJob(const QString& url, Omittable<qint64> ts = none);
- /*! Construct a URL without creating a full-fledged job object
+ /*! \brief Construct a URL without creating a full-fledged job object
*
- * This function can be used when a URL for
- * GetUrlPreviewJob is necessary but the job
- * itself isn't.
+ * This function can be used when a URL for GetUrlPreviewJob
+ * is necessary but the job itself isn't.
*/
static QUrl makeRequestUrl(QUrl baseUrl, const QString& url,
Omittable<qint64> ts = none);
-
~GetUrlPreviewJob() override;
// Result properties
/// The byte-size of the image. Omitted if there is no image attached.
Omittable<qint64> matrixImageSize() const;
+
/// An MXC URI to the image. Omitted if there is no image.
const QString& ogImage() const;
@@ -239,8 +241,8 @@ private:
QScopedPointer<Private> d;
};
-/// Get the configuration for the content repository.
-/*!
+/*! \brief Get the configuration for the content repository.
+ *
* This endpoint allows clients to retrieve the configuration of the content
* repository, such as upload limitations.
* Clients SHOULD use this as a guide when using content repository endpoints.
@@ -252,19 +254,17 @@ private:
* content repository APIs, for example, proxies may enforce a lower upload size
* limit than is advertised by the server on this endpoint.
*/
-class GetConfigJob : public BaseJob
-{
+class GetConfigJob : public BaseJob {
public:
+ /// Get the configuration for the content repository.
explicit GetConfigJob();
- /*! Construct a URL without creating a full-fledged job object
+ /*! \brief Construct a URL without creating a full-fledged job object
*
- * This function can be used when a URL for
- * GetConfigJob is necessary but the job
- * itself isn't.
+ * This function can be used when a URL for GetConfigJob
+ * is necessary but the job itself isn't.
*/
static QUrl makeRequestUrl(QUrl baseUrl);
-
~GetConfigJob() override;
// Result properties