diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-10-02 02:45:09 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-10-02 23:01:13 +0200 |
| commit | b871f6d3557c20fc7d1456e5080c33ea90795c84 (patch) | |
| tree | fda2457ed2728a4cd6d346bce8168523b88c2b15 /src/client/QXmppFileSharingManager.h | |
| parent | 6ee26103c5383cef8664d9e7d19c96c83f9a89af (diff) | |
| download | qxmpp-b871f6d3557c20fc7d1456e5080c33ea90795c84.tar.gz | |
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.
Diffstat (limited to 'src/client/QXmppFileSharingManager.h')
| -rw-r--r-- | src/client/QXmppFileSharingManager.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<QString> &description = {}); std::shared_ptr<QXmppDownload> downloadFile(const QXmppFileShare &fileShare, - std::unique_ptr<QIODevice> &&output); + std::unique_ptr<QIODevice> output); private: void internalRegisterProvider(std::type_index, std::shared_ptr<QXmppFileSharingProvider> provider); |
