mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
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:
@@ -62,7 +62,6 @@ class QUrl;
|
||||
class BandwidthScheduler;
|
||||
class FileSearcher;
|
||||
class FilterParserThread;
|
||||
class ResumeDataSavingManager;
|
||||
class Statistics;
|
||||
|
||||
// These values should remain unchanged when adding new items
|
||||
@@ -96,6 +95,7 @@ namespace BitTorrent
|
||||
{
|
||||
class InfoHash;
|
||||
class MagnetUri;
|
||||
class ResumeDataStorage;
|
||||
class Torrent;
|
||||
class TorrentImpl;
|
||||
class Tracker;
|
||||
@@ -567,7 +567,7 @@ namespace BitTorrent
|
||||
bool hasPerTorrentRatioLimit() const;
|
||||
bool hasPerTorrentSeedingTimeLimit() const;
|
||||
|
||||
void initResumeFolder();
|
||||
void initResumeDataStorage();
|
||||
|
||||
// Session configuration
|
||||
Q_INVOKABLE void configure();
|
||||
@@ -593,7 +593,6 @@ namespace BitTorrent
|
||||
void applyOSMemoryPriority() const;
|
||||
#endif
|
||||
|
||||
bool loadTorrentResumeData(const QByteArray &data, const TorrentInfo &metadata, LoadTorrentParams &torrentParams);
|
||||
bool loadTorrent(LoadTorrentParams params);
|
||||
LoadTorrentParams initLoadTorrentParams(const AddTorrentParams &addTorrentParams);
|
||||
bool addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &source, const AddTorrentParams &addTorrentParams);
|
||||
@@ -762,7 +761,7 @@ namespace BitTorrent
|
||||
QPointer<Tracker> m_tracker;
|
||||
// fastresume data writing thread
|
||||
QThread *m_ioThread = nullptr;
|
||||
ResumeDataSavingManager *m_resumeDataSavingManager = nullptr;
|
||||
ResumeDataStorage *m_resumeDataStorage = nullptr;
|
||||
FileSearcher *m_fileSearcher = nullptr;
|
||||
|
||||
QSet<TorrentID> m_downloadedMetadata;
|
||||
|
||||
Reference in New Issue
Block a user