mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 00:22:31 -06:00
Prepare for libtorrent v1.1 support
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#define BITTORRENT_TORRENTINFO_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <libtorrent/torrent_info.hpp>
|
||||
|
||||
class QString;
|
||||
@@ -47,7 +48,10 @@ namespace BitTorrent
|
||||
class TorrentInfo
|
||||
{
|
||||
public:
|
||||
explicit TorrentInfo(boost::intrusive_ptr<const libtorrent::torrent_info> nativeInfo = boost::intrusive_ptr<const libtorrent::torrent_info>());
|
||||
typedef boost::intrusive_ptr<const libtorrent::torrent_info> NativeConstPtr;
|
||||
typedef boost::intrusive_ptr<libtorrent::torrent_info> NativePtr;
|
||||
|
||||
explicit TorrentInfo(NativeConstPtr nativeInfo = NativeConstPtr());
|
||||
TorrentInfo(const TorrentInfo &other);
|
||||
|
||||
static TorrentInfo loadFromFile(const QString &path, QString &error);
|
||||
@@ -77,10 +81,11 @@ namespace BitTorrent
|
||||
QByteArray metadata() const;
|
||||
|
||||
void renameFile(uint index, const QString &newPath);
|
||||
boost::intrusive_ptr<libtorrent::torrent_info> nativeInfo() const;
|
||||
|
||||
NativePtr nativeInfo() const;
|
||||
|
||||
private:
|
||||
boost::intrusive_ptr<libtorrent::torrent_info> m_nativeInfo;
|
||||
NativeConstPtr m_nativeInfo;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user