aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppFileShare.h
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/base/QXmppFileShare.h
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/base/QXmppFileShare.h')
-rw-r--r--src/base/QXmppFileShare.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/base/QXmppFileShare.h b/src/base/QXmppFileShare.h
index b0d48bd3..b8506836 100644
--- a/src/base/QXmppFileShare.h
+++ b/src/base/QXmppFileShare.h
@@ -7,6 +7,9 @@
#include "QXmppGlobal.h"
+#include <any>
+#include <functional>
+
#include <QSharedDataPointer>
class QDomElement;
@@ -43,6 +46,13 @@ public:
/// \cond
bool parse(const QDomElement &el);
void toXml(QXmlStreamWriter *writer) const;
+
+protected:
+ friend class QXmppFileSharingManager;
+
+ // Private, internally used API:
+ void visitSources(std::function<bool(const std::any &)> &&visitor) const;
+ void addSource(const std::any &source);
/// \endcond
private: