aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppUpload.cpp
diff options
context:
space:
mode:
authorJonah BrĂ¼chert <jbb@kaidan.im>2022-09-09 23:15:10 +0200
committerLinus Jahn <lnj@kaidan.im>2022-09-29 23:46:36 +0200
commit68f167995e7ba71a6f2e556a7a0eab3d234e2d1a (patch)
treede645b606d96f01da7ea6db63e90224519a89de3 /src/client/QXmppUpload.cpp
parent7b02df3ef42ccb2d8c40eea901c5c6dd4b140204 (diff)
downloadqxmpp-68f167995e7ba71a6f2e556a7a0eab3d234e2d1a.tar.gz
Implement XEP-0448: Stateless File Sharing
This adds a file sharing manager that is capable of using multiple back ends. Currently implemented are a normal HTTP File Upload backend and an encrypted HTTP File Upload. Jingle File Transfer could be implemented later. Co-authored-by: Linus Jahn <lnj@kaidan.im>
Diffstat (limited to 'src/client/QXmppUpload.cpp')
-rw-r--r--src/client/QXmppUpload.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/client/QXmppUpload.cpp b/src/client/QXmppUpload.cpp
new file mode 100644
index 00000000..e7b876e5
--- /dev/null
+++ b/src/client/QXmppUpload.cpp
@@ -0,0 +1,47 @@
+// SPDX-FileCopyrightText: 2022 Jonah BrĂ¼chert <jbb@kaidan.im>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+#include "QXmppUpload.h"
+
+///
+/// \class QXmppUpload
+///
+/// \brief Provides progress of stateless file sharing uploads.
+///
+/// \since QXmpp 1.5
+///
+
+///
+/// \class QXmppUpload::FileResult
+///
+/// \brief Contains QXmppFileShare of the uploaded file and possible data blobs containing
+/// referenced thumbnails.
+///
+
+///
+/// \var QXmppUpload::FileResult::fileShare
+///
+/// \brief File share with file metadata and file shares of the uploaded file.
+///
+
+///
+/// \var QXmppUpload::FileResult::dataBlobs
+///
+/// \brief Data blobs of possibly in the metadata referenced thumbnails.
+///
+/// The QXmppFileSharingManager may generate file thumbnails.
+///
+
+///
+/// \typedef QXmppUpload::Result
+///
+/// \brief Contains FileResult (successfully finished), QXmpp::Cancelled (manually cancelled)
+/// or QXmppError (an error occured while downloading).
+///
+
+///
+/// \fn QXmppUpload::finished
+///
+/// Emitted when the upload has finished.
+///