Add libtorrent v1.1 basic support

This commit is contained in:
Vladimir Golovnev (Glassez)
2016-01-20 10:15:10 +03:00
parent c93ada1e7b
commit decfae7b8a
8 changed files with 60 additions and 2 deletions

View File

@@ -32,6 +32,7 @@
#include <QtGlobal>
#include <libtorrent/torrent_info.hpp>
#include <libtorrent/version.hpp>
class QString;
class QUrl;
@@ -48,8 +49,13 @@ namespace BitTorrent
class TorrentInfo
{
public:
#if LIBTORRENT_VERSION_NUM < 10100
typedef boost::intrusive_ptr<const libtorrent::torrent_info> NativeConstPtr;
typedef boost::intrusive_ptr<libtorrent::torrent_info> NativePtr;
#else
typedef boost::shared_ptr<const libtorrent::torrent_info> NativeConstPtr;
typedef boost::shared_ptr<libtorrent::torrent_info> NativePtr;
#endif
explicit TorrentInfo(NativeConstPtr nativeInfo = NativeConstPtr());
TorrentInfo(const TorrentInfo &other);