Browse Source

Apply forward declaration

Follow up 525692759d.
PR #17621.
adaptive-webui-19844
Chocobo1 2 years ago committed by GitHub
parent
commit
f6e2715f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      src/base/bittorrent/session.h
  2. 1
      src/base/bittorrent/sessionimpl.cpp
  3. 7
      src/base/bittorrent/sessionimpl.h
  4. 1
      src/gui/properties/peerlistwidget.cpp
  5. 3
      src/webui/api/synccontroller.cpp
  6. 1
      src/webui/api/transfercontroller.cpp

26
src/base/bittorrent/session.h

@ -34,15 +34,10 @@ @@ -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 @@ -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 @@ -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 &params = AddTorrentParams()) = 0;
virtual bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams &params = AddTorrentParams()) = 0;
virtual bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams &params = AddTorrentParams()) = 0;
virtual bool addTorrent(const QString &source, const AddTorrentParams &params = {}) = 0;
virtual bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams &params = {}) = 0;
virtual bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams &params = {}) = 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;

1
src/base/bittorrent/sessionimpl.cpp

@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
#include <iphlpapi.h>
#endif
#include <libtorrent/add_torrent_params.hpp>
#include <libtorrent/alert_types.hpp>
#include <libtorrent/error_code.hpp>
#include <libtorrent/extensions/smart_ban.hpp>

7
src/base/bittorrent/sessionimpl.h

@ -32,7 +32,6 @@ @@ -32,7 +32,6 @@
#include <variant>
#include <vector>
#include <libtorrent/add_torrent_params.hpp>
#include <libtorrent/fwd.hpp>
#include <libtorrent/torrent_handle.hpp>
@ -395,9 +394,9 @@ namespace BitTorrent @@ -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 &params = AddTorrentParams()) override;
bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams &params = AddTorrentParams()) override;
bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams &params = AddTorrentParams()) override;
bool addTorrent(const QString &source, const AddTorrentParams &params = {}) override;
bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams &params = {}) override;
bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams &params = {}) override;
bool deleteTorrent(const TorrentID &id, DeleteOption deleteOption = DeleteTorrent) override;
bool downloadMetadata(const MagnetUri &magnetUri) override;
bool cancelDownloadMetadata(const TorrentID &id) override;

1
src/gui/properties/peerlistwidget.cpp

@ -48,6 +48,7 @@ @@ -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"

3
src/webui/api/synccontroller.cpp

@ -34,11 +34,14 @@ @@ -34,11 +34,14 @@
#include <QMetaObject>
#include <QThread>
#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"

1
src/webui/api/transfercontroller.cpp

@ -34,6 +34,7 @@ @@ -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"

Loading…
Cancel
Save