Implement BencodeResumeDataStorage class

Implement ResumeDataStorage class as base for all "resume data" storages.
Implement BencodeResumeDataStorage class and put all existing logic of
"resume data" loading/saving there.
This commit is contained in:
Vladimir Golovnev (Glassez)
2021-03-22 10:26:43 +03:00
parent 9b31496b22
commit 35dedd3d83
10 changed files with 458 additions and 375 deletions

View File

@@ -52,27 +52,7 @@
namespace BitTorrent
{
class Session;
struct AddTorrentParams;
struct LoadTorrentParams
{
lt::add_torrent_params ltAddTorrentParams {};
QString name;
QString category;
QSet<QString> tags;
QString savePath;
TorrentContentLayout contentLayout = TorrentContentLayout::Original;
bool firstLastPiecePriority = false;
bool hasSeedStatus = false;
bool forced = false;
bool paused = false;
qreal ratioLimit = Torrent::USE_GLOBAL_RATIO;
int seedingTimeLimit = Torrent::USE_GLOBAL_SEEDING_TIME;
bool restored = false; // is existing torrent job?
};
struct LoadTorrentParams;
enum class MoveStorageMode
{