Implement gateway for adding new torrents

PR #19355.
This commit is contained in:
Vladimir Golovnev
2023-08-14 18:17:56 +03:00
committed by GitHub
parent e4313d6651
commit dcf3e97291
42 changed files with 933 additions and 639 deletions

View File

@@ -67,11 +67,6 @@ class FileSearcher;
class FilterParserThread;
class NativeSessionExtension;
namespace Net
{
struct DownloadResult;
}
namespace BitTorrent
{
class InfoHash;
@@ -414,13 +409,11 @@ namespace BitTorrent
void banIP(const QString &ip) override;
bool isKnownTorrent(const InfoHash &infoHash) const override;
bool addTorrent(const QString &source, const AddTorrentParams &params = {}) override;
bool addTorrent(const TorrentDescriptor &torrentDescr, const AddTorrentParams &params = {}) override;
bool deleteTorrent(const TorrentID &id, DeleteOption deleteOption = DeleteTorrent) override;
bool downloadMetadata(const TorrentDescriptor &torrentDescr) override;
bool cancelDownloadMetadata(const TorrentID &id) override;
void recursiveTorrentDownload(const TorrentID &id) override;
void increaseTorrentsQueuePos(const QVector<TorrentID> &ids) override;
void decreaseTorrentsQueuePos(const QVector<TorrentID> &ids) override;
void topTorrentsQueuePos(const QVector<TorrentID> &ids) override;
@@ -477,7 +470,6 @@ namespace BitTorrent
void generateResumeData();
void handleIPFilterParsed(int ruleCount);
void handleIPFilterError();
void handleDownloadFinished(const Net::DownloadResult &result);
void fileSearchFinished(const TorrentID &id, const Path &savePath, const PathList &fileNames);
private:
@@ -746,7 +738,6 @@ namespace BitTorrent
QHash<TorrentID, TorrentImpl *> m_torrents;
QHash<TorrentID, TorrentImpl *> m_hybridTorrentsByAltID;
QHash<TorrentID, LoadTorrentParams> m_loadingTorrents;
QHash<QString, AddTorrentParams> m_downloadedTorrents;
QHash<TorrentID, RemovingTorrentData> m_removingTorrents;
QSet<TorrentID> m_needSaveResumeDataTorrents;
QHash<TorrentID, TorrentID> m_changedTorrentIDs;