From b871f6d3557c20fc7d1456e5080c33ea90795c84 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Sun, 2 Oct 2022 02:45:09 +0200 Subject: Generate QXmppUpload/Download only by FileSharingManager Previously all the providers had to subclass the QXmppUpload/Download. It should be much easier to do additional tasks (e.g. hashing after downloading) now because the manager (and not the provider) decides when to emit the finished signal. Making the encrypted source provider able to handle arbitrary unencrypted sources should be possible too. --- src/client/QXmppFileSharingManager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/QXmppFileSharingManager.h') diff --git a/src/client/QXmppFileSharingManager.h b/src/client/QXmppFileSharingManager.h index 20a1cdc4..05039f79 100644 --- a/src/client/QXmppFileSharingManager.h +++ b/src/client/QXmppFileSharingManager.h @@ -6,7 +6,6 @@ #define QXMPPFILESHARINGMANAGER_H #include "QXmppClientExtension.h" -#include "QXmppFileShare.h" #include "QXmppFileSharingProvider.h" #include "QXmppGlobal.h" @@ -21,6 +20,7 @@ class QIODevice; class QXmppFileMetadata; +class QXmppFileShare; class QXmppFileSharingManagerPrivate; class QXMPP_EXPORT QXmppFileSharingManager : public QXmppClientExtension @@ -66,7 +66,7 @@ public: const std::optional &description = {}); std::shared_ptr downloadFile(const QXmppFileShare &fileShare, - std::unique_ptr &&output); + std::unique_ptr output); private: void internalRegisterProvider(std::type_index, std::shared_ptr provider); -- cgit v1.2.3