make libtorrent and examples build with deprecated functions disabled (with some slight performance improvements). use hex encoding instead of base32 in create_magnet_uri

This commit is contained in:
Arvid Norberg
2013-03-04 03:24:53 +00:00
parent 431efc6157
commit 0682272661
6 changed files with 27 additions and 48 deletions

View File

@@ -2351,8 +2351,6 @@ Its declaration looks like this::
boost::intrusive_ptr<torrent_info> torrent_file() const;
bool is_valid() const;
std::string name() const;
enum save_resume_flags_t { flush_disk_cache = 1, save_info_dict = 2 };
void save_resume_data(int flags = 0) const;
bool need_save_resume_data() const;
@@ -3228,7 +3226,9 @@ Example code to pause and save resume data for all torrents and wait for the ale
}
torrent_handle h = rd->handle;
std::ofstream out((h.status().save_path + "/" + h.torrent_file()->name() + ".fastresume").c_str()
torrent_status st = h.status(torrent_handle::query_save_path | torrent_handle::query_name);
std::ofstream out((st.save_path
+ "/" + st.name + ".fastresume").c_str()
, std::ios_base::binary);
out.unsetf(std::ios_base::skipws);
bencode(std::ostream_iterator<char>(out), *rd->resume_data);