improved support for padding files by not counting them in total_wanted_done and total_wanted or progress

This commit is contained in:
Arvid Norberg
2009-01-14 07:41:25 +00:00
parent 692c3cd6f8
commit 66ccc9d23f
3 changed files with 155 additions and 99 deletions

View File

@@ -241,7 +241,8 @@ namespace libtorrent
stat statistics() const { return m_stat; }
void add_stats(stat const& s) { m_stat += s; }
size_type bytes_left() const;
boost::tuples::tuple<size_type, size_type> bytes_done() const;
int block_bytes_wanted(piece_block const& p) const;
void bytes_done(torrent_status& st) const;
size_type quantized_bytes_done() const;
void ip_filter_updated() { m_policy.ip_filter_updated(); }
@@ -854,6 +855,9 @@ namespace libtorrent
size_type m_total_failed_bytes;
size_type m_total_redundant_bytes;
// the number of bytes of padding files
int m_padding;
std::string m_username;
std::string m_password;