Use single parameter to accept torrent source

This commit is contained in:
Vladimir Golovnev (Glassez)
2021-01-03 16:19:04 +03:00
parent 4bb3d13921
commit ee5fe424e8
2 changed files with 8 additions and 5 deletions

View File

@@ -30,6 +30,7 @@
#pragma once
#include <memory>
#include <variant>
#include <vector>
#include <libtorrent/add_torrent_params.hpp>
@@ -600,7 +601,7 @@ namespace BitTorrent
bool loadTorrentResumeData(const QByteArray &data, const TorrentInfo &metadata, LoadTorrentParams &torrentParams);
bool loadTorrent(LoadTorrentParams params);
LoadTorrentParams initLoadTorrentParams(const AddTorrentParams &addTorrentParams);
bool addTorrent_impl(const AddTorrentParams &addTorrentParams, const MagnetUri &magnetUri, TorrentInfo torrentInfo = TorrentInfo());
bool addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &source, const AddTorrentParams &addTorrentParams);
void updateSeedingLimitTimer();
void exportTorrentFile(const TorrentHandle *torrent, TorrentExportFolder folder = TorrentExportFolder::Regular);