bt_peer_connection.hpp   bt_peer_connection.hpp 
skipping to change at line 108 skipping to change at line 108
bt_peer_connection( bt_peer_connection(
aux::session_impl& ses aux::session_impl& ses
, boost::shared_ptr<socket_type> s , boost::shared_ptr<socket_type> s
, tcp::endpoint const& remote , tcp::endpoint const& remote
, policy::peer* peerinfo); , policy::peer* peerinfo);
void start(); void start();
enum enum
{ {
upload_only_msg = 2, // pex_msg = 1,
holepunch_msg = 3, // metadata_msg = 2,
share_mode_msg = 4, upload_only_msg = 3,
dont_have_msg = 5, holepunch_msg = 4,
// recommend_msg = 5,
// comment_msg = 6,
dont_have_msg = 7,
share_mode_msg = 8,
}; };
~bt_peer_connection(); ~bt_peer_connection();
#ifndef TORRENT_DISABLE_ENCRYPTION #ifndef TORRENT_DISABLE_ENCRYPTION
bool supports_encryption() const bool supports_encryption() const
{ return m_encrypted; } { return m_encrypted; }
bool rc4_encrypted() const bool rc4_encrypted() const
{ return m_rc4_encrypted; } { return m_rc4_encrypted; }
#endif #endif
 End of changes. 1 change blocks. 
4 lines changed or deleted 8 lines changed or added


 disk_io_thread.hpp   disk_io_thread.hpp 
skipping to change at line 104 skipping to change at line 104
, check_fastresume , check_fastresume
, check_files , check_files
, save_resume_data , save_resume_data
, rename_file , rename_file
, abort_thread , abort_thread
, clear_read_cache , clear_read_cache
, abort_torrent , abort_torrent
, update_settings , update_settings
, read_and_hash , read_and_hash
, cache_piece , cache_piece
#ifndef TORRENT_NO_DEPRECATE
, finalize_file , finalize_file
#endif
}; };
action_t action; action_t action;
char* buffer; char* buffer;
int buffer_size; int buffer_size;
boost::intrusive_ptr<piece_manager> storage; boost::intrusive_ptr<piece_manager> storage;
// arguments used for read and write // arguments used for read and write
int piece, offset; int piece, offset;
// used for move_storage and rename_file. On errors, this is set // used for move_storage and rename_file. On errors, this is set
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 file.hpp   file.hpp 
skipping to change at line 227 skipping to change at line 227
file(); file();
file(std::string const& p, int m, error_code& ec); file(std::string const& p, int m, error_code& ec);
~file(); ~file();
bool open(std::string const& p, int m, error_code& ec); bool open(std::string const& p, int m, error_code& ec);
bool is_open() const; bool is_open() const;
void close(); void close();
bool set_size(size_type size, error_code& ec); bool set_size(size_type size, error_code& ec);
// called when we're done writing to the file.
// On windows this will clear the sparse bit
void finalize();
int open_mode() const { return m_open_mode; } int open_mode() const { return m_open_mode; }
// when opened in unbuffered mode, this is the // when opened in unbuffered mode, this is the
// required alignment of file_offsets. i.e. // required alignment of file_offsets. i.e.
// any (file_offset & (pos_alignment()-1)) == 0 // any (file_offset & (pos_alignment()-1)) == 0
// is a precondition to read and write operations // is a precondition to read and write operations
int pos_alignment() const; int pos_alignment() const;
// when opened in unbuffered mode, this is the // when opened in unbuffered mode, this is the
// required alignment of buffer addresses // required alignment of buffer addresses
 End of changes. 1 change blocks. 
4 lines changed or deleted 0 lines changed or added


 storage.hpp   storage.hpp 
skipping to change at line 113 skipping to change at line 113
storage_interface(): m_disk_pool(0), m_settings(0) {} storage_interface(): m_disk_pool(0), m_settings(0) {}
// create directories and set file sizes // create directories and set file sizes
// if allocate_files is true. // if allocate_files is true.
// allocate_files is true if allocation mode // allocate_files is true if allocation mode
// is set to full and sparse files are supported // is set to full and sparse files are supported
// false return value indicates an error // false return value indicates an error
virtual bool initialize(bool allocate_files) = 0; virtual bool initialize(bool allocate_files) = 0;
virtual bool has_any_file() = 0; virtual bool has_any_file() = 0;
virtual int readv(file::iovec_t const* bufs, int slot, int o virtual int readv(file::iovec_t const* bufs, int slot, int o
ffset, int num_bufs); ffset, int num_bufs, int flags = file::random_access);
virtual int writev(file::iovec_t const* bufs, int slot, int virtual int writev(file::iovec_t const* bufs, int slot, int
offset, int num_bufs); offset, int num_bufs, int flags = file::random_access);
virtual void hint_read(int slot, int offset, int len) {} virtual void hint_read(int slot, int offset, int len) {}
// negative return value indicates an error // negative return value indicates an error
virtual int read(char* buf, int slot, int offset, int size) = 0; virtual int read(char* buf, int slot, int offset, int size) = 0;
// negative return value indicates an error // negative return value indicates an error
virtual int write(const char* buf, int slot, int offset, int size) = 0; virtual int write(const char* buf, int slot, int offset, int size) = 0;
virtual size_type physical_offset(int slot, int offset) = 0; virtual size_type physical_offset(int slot, int offset) = 0;
skipping to change at line 162 skipping to change at line 162
// non-zero return value indicates an error // non-zero return value indicates an error
virtual bool release_files() = 0; virtual bool release_files() = 0;
// this will rename the file specified by index. // this will rename the file specified by index.
virtual bool rename_file(int index, std::string const& new_f ilename) = 0; virtual bool rename_file(int index, std::string const& new_f ilename) = 0;
// this will close all open files and delete them // this will close all open files and delete them
// non-zero return value indicates an error // non-zero return value indicates an error
virtual bool delete_files() = 0; virtual bool delete_files() = 0;
#ifndef TORRENT_NO_DEPRECATE
virtual void finalize_file(int file) {} virtual void finalize_file(int file) {}
#endif
disk_buffer_pool* disk_pool() { return m_disk_pool; } disk_buffer_pool* disk_pool() { return m_disk_pool; }
session_settings const& settings() const { return *m_setting s; } session_settings const& settings() const { return *m_setting s; }
void set_error(std::string const& file, error_code const& ec ) const; void set_error(std::string const& file, error_code const& ec ) const;
error_code const& error() const { return m_error; } error_code const& error() const { return m_error; }
std::string const& error_file() const { return m_error_file; } std::string const& error_file() const { return m_error_file; }
virtual void clear_error() { m_error = error_code(); m_error _file.resize(0); } virtual void clear_error() { m_error = error_code(); m_error _file.resize(0); }
skipping to change at line 189 skipping to change at line 191
session_settings* m_settings; session_settings* m_settings;
}; };
class TORRENT_EXPORT default_storage : public storage_interface, boo st::noncopyable class TORRENT_EXPORT default_storage : public storage_interface, boo st::noncopyable
{ {
public: public:
default_storage(file_storage const& fs, file_storage const* mapped, std::string const& path default_storage(file_storage const& fs, file_storage const* mapped, std::string const& path
, file_pool& fp, std::vector<boost::uint8_t> const& file_prio); , file_pool& fp, std::vector<boost::uint8_t> const& file_prio);
~default_storage(); ~default_storage();
#ifndef TORRENT_NO_DEPRECATE
void finalize_file(int file); void finalize_file(int file);
#endif
bool has_any_file(); bool has_any_file();
bool rename_file(int index, std::string const& new_filename) ; bool rename_file(int index, std::string const& new_filename) ;
bool release_files(); bool release_files();
bool delete_files(); bool delete_files();
bool initialize(bool allocate_files); bool initialize(bool allocate_files);
bool move_storage(std::string const& save_path); bool move_storage(std::string const& save_path);
int read(char* buf, int slot, int offset, int size); int read(char* buf, int slot, int offset, int size);
int write(char const* buf, int slot, int offset, int size); int write(char const* buf, int slot, int offset, int size);
int sparse_end(int start) const; int sparse_end(int start) const;
void hint_read(int slot, int offset, int len); void hint_read(int slot, int offset, int len);
int readv(file::iovec_t const* bufs, int slot, int offset, i int readv(file::iovec_t const* bufs, int slot, int offset, i
nt num_bufs); nt num_bufs, int flags = file::random_access);
int writev(file::iovec_t const* buf, int slot, int offset, i int writev(file::iovec_t const* buf, int slot, int offset, i
nt num_bufs); nt num_bufs, int flags = file::random_access);
size_type physical_offset(int slot, int offset); size_type physical_offset(int slot, int offset);
bool move_slot(int src_slot, int dst_slot); bool move_slot(int src_slot, int dst_slot);
bool swap_slots(int slot1, int slot2); bool swap_slots(int slot1, int slot2);
bool swap_slots3(int slot1, int slot2, int slot3); bool swap_slots3(int slot1, int slot2, int slot3);
bool verify_resume_data(lazy_entry const& rd, error_code& er ror); bool verify_resume_data(lazy_entry const& rd, error_code& er ror);
bool write_resume_data(entry& rd) const; bool write_resume_data(entry& rd) const;
// this identifies a read or write operation // this identifies a read or write operation
// so that default_storage::readwritev() knows what to // so that default_storage::readwritev() knows what to
// do when it's actually touching the file // do when it's actually touching the file
skipping to change at line 273 skipping to change at line 277
disabled_storage(int piece_size) : m_piece_size(piece_size) {} disabled_storage(int piece_size) : m_piece_size(piece_size) {}
bool has_any_file() { return false; } bool has_any_file() { return false; }
bool rename_file(int index, std::string const& new_filename) { return false; } bool rename_file(int index, std::string const& new_filename) { return false; }
bool release_files() { return false; } bool release_files() { return false; }
bool delete_files() { return false; } bool delete_files() { return false; }
bool initialize(bool allocate_files) { return false; } bool initialize(bool allocate_files) { return false; }
bool move_storage(std::string const& save_path) { return tru e; } bool move_storage(std::string const& save_path) { return tru e; }
int read(char* buf, int slot, int offset, int size) { return size; } int read(char* buf, int slot, int offset, int size) { return size; }
int write(char const* buf, int slot, int offset, int size) { return size; } int write(char const* buf, int slot, int offset, int size) { return size; }
size_type physical_offset(int slot, int offset) { return 0; } size_type physical_offset(int slot, int offset) { return 0; }
int readv(file::iovec_t const* bufs, int slot, int offset, i int readv(file::iovec_t const* bufs, int slot, int offset, i
nt num_bufs); nt num_bufs, int flags = file::random_access);
int writev(file::iovec_t const* bufs, int slot, int offset, int writev(file::iovec_t const* bufs, int slot, int offset,
int num_bufs); int num_bufs, int flags = file::random_access);
bool move_slot(int src_slot, int dst_slot) { return false; } bool move_slot(int src_slot, int dst_slot) { return false; }
bool swap_slots(int slot1, int slot2) { return false; } bool swap_slots(int slot1, int slot2) { return false; }
bool swap_slots3(int slot1, int slot2, int slot3) { return f alse; } bool swap_slots3(int slot1, int slot2, int slot3) { return f alse; }
bool verify_resume_data(lazy_entry const& rd, error_code& er ror) { return false; } bool verify_resume_data(lazy_entry const& rd, error_code& er ror) { return false; }
bool write_resume_data(entry& rd) const { return false; } bool write_resume_data(entry& rd) const { return false; }
int m_piece_size; int m_piece_size;
}; };
struct disk_io_thread; struct disk_io_thread;
skipping to change at line 309 skipping to change at line 313
, disk_io_thread& io , disk_io_thread& io
, storage_constructor_type sc , storage_constructor_type sc
, storage_mode_t sm , storage_mode_t sm
, std::vector<boost::uint8_t> const& file_prio); , std::vector<boost::uint8_t> const& file_prio);
~piece_manager(); ~piece_manager();
boost::intrusive_ptr<torrent_info const> info() const { retu rn m_info; } boost::intrusive_ptr<torrent_info const> info() const { retu rn m_info; }
void write_resume_data(entry& rd) const; void write_resume_data(entry& rd) const;
void async_finalize_file(int file);
void async_check_fastresume(lazy_entry const* resume_data void async_check_fastresume(lazy_entry const* resume_data
, boost::function<void(int, disk_io_job const&)> con st& handler); , boost::function<void(int, disk_io_job const&)> con st& handler);
void async_check_files(boost::function<void(int, disk_io_job const&)> const& handler); void async_check_files(boost::function<void(int, disk_io_job const&)> const& handler);
void async_rename_file(int index, std::string const& name void async_rename_file(int index, std::string const& name
, boost::function<void(int, disk_io_job const&)> con st& handler); , boost::function<void(int, disk_io_job const&)> con st& handler);
void async_read( void async_read(
peer_request const& r peer_request const& r
skipping to change at line 439 skipping to change at line 441
, int num_bufs); , int num_bufs);
int write_impl( int write_impl(
file::iovec_t* bufs file::iovec_t* bufs
, int piece_index , int piece_index
, int offset , int offset
, int num_bufs); , int num_bufs);
size_type physical_offset(int piece_index, int offset); size_type physical_offset(int piece_index, int offset);
void finalize_file(int index);
// returns the number of pieces left in the // returns the number of pieces left in the
// file currently being checked // file currently being checked
int skip_file() const; int skip_file() const;
// -1=error 0=ok >0=skip this many pieces // -1=error 0=ok >0=skip this many pieces
int check_one_piece(int& have_piece); int check_one_piece(int& have_piece);
int identify_data( int identify_data(
sha1_hash const& large_hash sha1_hash const& large_hash
, sha1_hash const& small_hash , sha1_hash const& small_hash
, int current_slot); , int current_slot);
 End of changes. 9 change blocks. 
16 lines changed or deleted 16 lines changed or added


 torrent.hpp   torrent.hpp 
skipping to change at line 40 skipping to change at line 40
*/ */
#ifndef TORRENT_TORRENT_HPP_INCLUDE #ifndef TORRENT_TORRENT_HPP_INCLUDE
#define TORRENT_TORRENT_HPP_INCLUDE #define TORRENT_TORRENT_HPP_INCLUDE
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include <set> #include <set>
#include <list> #include <list>
#include <deque>
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push, 1) #pragma warning(push, 1)
#endif #endif
#include <boost/limits.hpp> #include <boost/limits.hpp>
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
#include <boost/enable_shared_from_this.hpp> #include <boost/enable_shared_from_this.hpp>
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <boost/intrusive_ptr.hpp> #include <boost/intrusive_ptr.hpp>
skipping to change at line 1000 skipping to change at line 1001
int flags; int flags;
// how many peers it's been requested from // how many peers it's been requested from
int peers; int peers;
// the piece index // the piece index
int piece; int piece;
bool operator<(time_critical_piece const& rhs) const bool operator<(time_critical_piece const& rhs) const
{ return deadline < rhs.deadline; } { return deadline < rhs.deadline; }
}; };
// this list is sorted by time_critical_piece::deadline // this list is sorted by time_critical_piece::deadline
// TODO: this should be a deque std::deque<time_critical_piece> m_time_critical_pieces;
std::list<time_critical_piece> m_time_critical_pieces;
std::string m_trackerid; std::string m_trackerid;
std::string m_username; std::string m_username;
std::string m_password; std::string m_password;
// the network interfaces outgoing connections // the network interfaces outgoing connections
// are opened through. If there is more then one, // are opened through. If there is more then one,
// they are used in a round-robin fasion // they are used in a round-robin fasion
std::vector<union_endpoint> m_net_interfaces; std::vector<union_endpoint> m_net_interfaces;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 version.hpp   version.hpp 
skipping to change at line 38 skipping to change at line 38
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef TORRENT_VERSION_HPP_INCLUDED #ifndef TORRENT_VERSION_HPP_INCLUDED
#define TORRENT_VERSION_HPP_INCLUDED #define TORRENT_VERSION_HPP_INCLUDED
#define LIBTORRENT_VERSION_MAJOR 0 #define LIBTORRENT_VERSION_MAJOR 0
#define LIBTORRENT_VERSION_MINOR 16 #define LIBTORRENT_VERSION_MINOR 16
#define LIBTORRENT_VERSION_TINY 8 #define LIBTORRENT_VERSION_TINY 9
// the format of this version is: MMmmtt // the format of this version is: MMmmtt
// M = Major version, m = minor version, t = tiny version // M = Major version, m = minor version, t = tiny version
#define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTO RRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY) #define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTO RRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY)
#define LIBTORRENT_VERSION "0.16.8.0" #define LIBTORRENT_VERSION "0.16.9.0"
#define LIBTORRENT_REVISION "$Rev: 7997 $" #define LIBTORRENT_REVISION "$Rev: 8143 $"
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/