Add support for exporting .torrent data to buffer

Related: https://github.com/qbittorrent/qBittorrent/pull/16886#discussion_r855882018
PR #16931.
This commit is contained in:
Chocobo1
2022-04-27 12:29:00 +08:00
committed by GitHub
parent 7432c4dbfe
commit 9351f66c26
3 changed files with 37 additions and 7 deletions

View File

@@ -40,6 +40,7 @@
#include "abstractfilestorage.h"
class QBitArray;
class QByteArray;
class QDateTime;
class QUrl;
@@ -301,6 +302,7 @@ namespace BitTorrent
virtual void clearPeers() = 0;
virtual QString createMagnetURI() const = 0;
virtual nonstd::expected<QByteArray, QString> exportToBuffer() const = 0;
virtual nonstd::expected<void, QString> exportToFile(const Path &path) const = 0;
TorrentID id() const;