diff --git a/src/base/bittorrent/session.h b/src/base/bittorrent/session.h index 1a4b82103..806506ebb 100644 --- a/src/base/bittorrent/session.h +++ b/src/base/bittorrent/session.h @@ -34,15 +34,10 @@ #include "base/pathfwd.h" #include "addtorrentparams.h" -#include "cachestatus.h" #include "categoryoptions.h" -#include "sessionstatus.h" -#include "torrentinfo.h" #include "trackerentry.h" class QString; -class QTimer; -class QUrl; // These values should remain unchanged when adding new items // so as not to break the existing user settings. @@ -60,23 +55,14 @@ enum DeleteOption DeleteTorrentAndFiles }; -namespace Net -{ - struct DownloadResult; -} - namespace BitTorrent { class InfoHash; class MagnetUri; - class ResumeDataStorage; - class SessionImpl; class Torrent; - class TorrentImpl; - class Tracker; - struct LoadTorrentParams; - - enum class MoveStorageMode; + class TorrentInfo; + struct CacheStatus; + struct SessionStatus; // Using `Q_ENUM_NS()` without a wrapper namespace in our case is not advised // since `Q_NAMESPACE` cannot be used when the same namespace resides at different files. @@ -427,9 +413,9 @@ namespace BitTorrent virtual void banIP(const QString &ip) = 0; virtual bool isKnownTorrent(const InfoHash &infoHash) const = 0; - virtual bool addTorrent(const QString &source, const AddTorrentParams ¶ms = AddTorrentParams()) = 0; - virtual bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams ¶ms = AddTorrentParams()) = 0; - virtual bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams ¶ms = AddTorrentParams()) = 0; + virtual bool addTorrent(const QString &source, const AddTorrentParams ¶ms = {}) = 0; + virtual bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams ¶ms = {}) = 0; + virtual bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams ¶ms = {}) = 0; virtual bool deleteTorrent(const TorrentID &id, DeleteOption deleteOption = DeleteOption::DeleteTorrent) = 0; virtual bool downloadMetadata(const MagnetUri &magnetUri) = 0; virtual bool cancelDownloadMetadata(const TorrentID &id) = 0; diff --git a/src/base/bittorrent/sessionimpl.cpp b/src/base/bittorrent/sessionimpl.cpp index ccab08d88..465b3ef73 100644 --- a/src/base/bittorrent/sessionimpl.cpp +++ b/src/base/bittorrent/sessionimpl.cpp @@ -43,6 +43,7 @@ #include #endif +#include #include #include #include diff --git a/src/base/bittorrent/sessionimpl.h b/src/base/bittorrent/sessionimpl.h index 4614dfabf..a37234f23 100644 --- a/src/base/bittorrent/sessionimpl.h +++ b/src/base/bittorrent/sessionimpl.h @@ -32,7 +32,6 @@ #include #include -#include #include #include @@ -395,9 +394,9 @@ namespace BitTorrent void banIP(const QString &ip) override; bool isKnownTorrent(const InfoHash &infoHash) const override; - bool addTorrent(const QString &source, const AddTorrentParams ¶ms = AddTorrentParams()) override; - bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams ¶ms = AddTorrentParams()) override; - bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams ¶ms = AddTorrentParams()) override; + bool addTorrent(const QString &source, const AddTorrentParams ¶ms = {}) override; + bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams ¶ms = {}) override; + bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams ¶ms = {}) override; bool deleteTorrent(const TorrentID &id, DeleteOption deleteOption = DeleteTorrent) override; bool downloadMetadata(const MagnetUri &magnetUri) override; bool cancelDownloadMetadata(const TorrentID &id) override; diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index 4d8da73df..e4ed8a75a 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -48,6 +48,7 @@ #include "base/bittorrent/peerinfo.h" #include "base/bittorrent/session.h" #include "base/bittorrent/torrent.h" +#include "base/bittorrent/torrentinfo.h" #include "base/global.h" #include "base/logger.h" #include "base/net/geoipmanager.h" diff --git a/src/webui/api/synccontroller.cpp b/src/webui/api/synccontroller.cpp index 74d3e83e2..92c3bdc0b 100644 --- a/src/webui/api/synccontroller.cpp +++ b/src/webui/api/synccontroller.cpp @@ -34,11 +34,14 @@ #include #include +#include "base/bittorrent/cachestatus.h" #include "base/bittorrent/infohash.h" #include "base/bittorrent/peeraddress.h" #include "base/bittorrent/peerinfo.h" #include "base/bittorrent/session.h" +#include "base/bittorrent/sessionstatus.h" #include "base/bittorrent/torrent.h" +#include "base/bittorrent/torrentinfo.h" #include "base/bittorrent/trackerentry.h" #include "base/global.h" #include "base/net/geoipmanager.h" diff --git a/src/webui/api/transfercontroller.cpp b/src/webui/api/transfercontroller.cpp index 69eea87f6..d3b235b49 100644 --- a/src/webui/api/transfercontroller.cpp +++ b/src/webui/api/transfercontroller.cpp @@ -34,6 +34,7 @@ #include "base/bittorrent/peeraddress.h" #include "base/bittorrent/peerinfo.h" #include "base/bittorrent/session.h" +#include "base/bittorrent/sessionstatus.h" #include "base/global.h" #include "base/utils/string.h" #include "apierror.h"