aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-03 19:33:24 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-03 19:33:24 +0900
commit27386af703974154256cf755712bb46099500847 (patch)
tree7035cc5dba7d844a6e1614146541166c23494c08
parent56728b20b227e2e767f103787c394d86b7148843 (diff)
downloadlibquotient-27386af703974154256cf755712bb46099500847.tar.gz
libquotient-27386af703974154256cf755712bb46099500847.zip
room.h: more doc-comments
-rw-r--r--lib/room.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/room.h b/lib/room.h
index adec7650..33d1f4ea 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -356,8 +356,28 @@ namespace QMatrixClient
Q_INVOKABLE QUrl urlToThumbnail(const QString& eventId) const;
Q_INVOKABLE QUrl urlToDownload(const QString& eventId) const;
+
+ /// Get a file name for downloading for a given event id
+ /*!
+ * The event MUST be RoomMessageEvent and have content
+ * for downloading. \sa RoomMessageEvent::hasContent
+ */
Q_INVOKABLE QString fileNameToDownload(const QString& eventId) const;
+
+ /// Get information on file upload/download
+ /*!
+ * \param id uploads are identified by the corresponding event's
+ * transactionId (because uploads are done before
+ * the event is even sent), while downloads are using
+ * the normal event id for identifier.
+ */
Q_INVOKABLE FileTransferInfo fileTransferInfo(const QString& id) const;
+
+ /// Get the URL to the actual file source in a unified way
+ /*!
+ * For uploads it will return a URL to a local file; for downloads
+ * the URL will be taken from the corresponding room event.
+ */
Q_INVOKABLE QUrl fileSource(const QString& id) const;
/** Pretty-prints plain text into HTML