| alert.hpp | | alert.hpp | |
| | | | |
| skipping to change at line 102 | | skipping to change at line 102 | |
| tracker_notification = 0x10, | | tracker_notification = 0x10, | |
| debug_notification = 0x20, | | debug_notification = 0x20, | |
| status_notification = 0x40, | | status_notification = 0x40, | |
| progress_notification = 0x80, | | progress_notification = 0x80, | |
| ip_block_notification = 0x100, | | ip_block_notification = 0x100, | |
| performance_warning = 0x200, | | performance_warning = 0x200, | |
| dht_notification = 0x400, | | dht_notification = 0x400, | |
| stats_notification = 0x800, | | stats_notification = 0x800, | |
| rss_notification = 0x1000, | | rss_notification = 0x1000, | |
| | | | |
|
| all_categories = 0xffffffff | | // since the enum is signed, make sure this isn't | |
| | | // interpreted as -1. For instance, boost.python | |
| | | // does that and fails when assigning it to an | |
| | | // unsigned parameter. | |
| | | all_categories = 0x7fffffff | |
| }; | | }; | |
| | | | |
| alert(); | | alert(); | |
| virtual ~alert(); | | virtual ~alert(); | |
| | | | |
| // a timestamp is automatically created in the constructor | | // a timestamp is automatically created in the constructor | |
| ptime timestamp() const; | | ptime timestamp() const; | |
| | | | |
| virtual int type() const = 0; | | virtual int type() const = 0; | |
| virtual char const* what() const = 0; | | virtual char const* what() const = 0; | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| escape_string.hpp | | escape_string.hpp | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 82 | |
| TORRENT_EXPORT std::string to_hex(std::string const& s); | | TORRENT_EXPORT std::string to_hex(std::string const& s); | |
| TORRENT_EXPORT bool is_hex(char const *in, int len); | | TORRENT_EXPORT bool is_hex(char const *in, int len); | |
| TORRENT_EXPORT void to_hex(char const *in, int len, char* out); | | TORRENT_EXPORT void to_hex(char const *in, int len, char* out); | |
| TORRENT_EXPORT bool from_hex(char const *in, int len, char* out); | | TORRENT_EXPORT bool from_hex(char const *in, int len, char* out); | |
| | | | |
| #if defined TORRENT_WINDOWS && TORRENT_USE_WSTRING | | #if defined TORRENT_WINDOWS && TORRENT_USE_WSTRING | |
| TORRENT_EXTRA_EXPORT std::wstring convert_to_wstring(std::string con
st& s); | | TORRENT_EXTRA_EXPORT std::wstring convert_to_wstring(std::string con
st& s); | |
| TORRENT_EXTRA_EXPORT std::string convert_from_wstring(std::wstring c
onst& s); | | TORRENT_EXTRA_EXPORT std::string convert_from_wstring(std::wstring c
onst& s); | |
| #endif | | #endif | |
| | | | |
|
| #if TORRENT_USE_ICONV || TORRENT_USE_LOCALE | | #if TORRENT_USE_ICONV || TORRENT_USE_LOCALE || defined TORRENT_WINDOWS | |
| TORRENT_EXTRA_EXPORT std::string convert_to_native(std::string const
& s); | | TORRENT_EXTRA_EXPORT std::string convert_to_native(std::string const
& s); | |
| TORRENT_EXTRA_EXPORT std::string convert_from_native(std::string con
st& s); | | TORRENT_EXTRA_EXPORT std::string convert_from_native(std::string con
st& s); | |
| #else | | #else | |
| inline std::string const& convert_to_native(std::string const& s) {
return s; } | | inline std::string const& convert_to_native(std::string const& s) {
return s; } | |
| inline std::string const& convert_from_native(std::string const& s)
{ return s; } | | inline std::string const& convert_from_native(std::string const& s)
{ return s; } | |
| #endif | | #endif | |
| } | | } | |
| | | | |
| #endif // TORRENT_ESCAPE_STRING_HPP_INCLUDED | | #endif // TORRENT_ESCAPE_STRING_HPP_INCLUDED | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| peer_id.hpp | | peer_id.hpp | |
| | | | |
| skipping to change at line 137 | | skipping to change at line 137 | |
| std::memset(m_number + number_size - num_byt
es, 0, num_bytes); | | std::memset(m_number + number_size - num_byt
es, 0, num_bytes); | |
| n -= num_bytes * 8; | | n -= num_bytes * 8; | |
| } | | } | |
| if (n > 0) | | if (n > 0) | |
| { | | { | |
| for (int i = 0; i < number_size - 1; ++i) | | for (int i = 0; i < number_size - 1; ++i) | |
| { | | { | |
| m_number[i] <<= n; | | m_number[i] <<= n; | |
| m_number[i] |= m_number[i+1] >> (8 -
n); | | m_number[i] |= m_number[i+1] >> (8 -
n); | |
| } | | } | |
|
| | | m_number[number_size-1] <<= n; | |
| } | | } | |
| return *this; | | return *this; | |
| } | | } | |
| | | | |
| big_number& operator>>=(int n) | | big_number& operator>>=(int n) | |
| { | | { | |
| TORRENT_ASSERT(n >= 0); | | TORRENT_ASSERT(n >= 0); | |
| int num_bytes = n / 8; | | int num_bytes = n / 8; | |
| if (num_bytes >= number_size) | | if (num_bytes >= number_size) | |
| { | | { | |
| | | | |
| skipping to change at line 163 | | skipping to change at line 164 | |
| std::memset(m_number, 0, num_bytes); | | std::memset(m_number, 0, num_bytes); | |
| n -= num_bytes * 8; | | n -= num_bytes * 8; | |
| } | | } | |
| if (n > 0) | | if (n > 0) | |
| { | | { | |
| for (int i = number_size - 1; i > 0; --i) | | for (int i = number_size - 1; i > 0; --i) | |
| { | | { | |
| m_number[i] >>= n; | | m_number[i] >>= n; | |
| m_number[i] |= m_number[i-1] << (8 -
n); | | m_number[i] |= m_number[i-1] << (8 -
n); | |
| } | | } | |
|
| | | m_number[0] >>= n; | |
| } | | } | |
| return *this; | | return *this; | |
| } | | } | |
| | | | |
| bool operator==(big_number const& n) const | | bool operator==(big_number const& n) const | |
| { | | { | |
| return std::equal(n.m_number, n.m_number+number_size
, m_number); | | return std::equal(n.m_number, n.m_number+number_size
, m_number); | |
| } | | } | |
| | | | |
| bool operator!=(big_number const& n) const | | bool operator!=(big_number const& n) const | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 2 lines changed or added | |
|
| torrent.hpp | | torrent.hpp | |
| | | | |
| skipping to change at line 783 | | skipping to change at line 783 | |
| { | | { | |
| if (!m_seed_mode) return; | | if (!m_seed_mode) return; | |
| m_seed_mode = false; | | m_seed_mode = false; | |
| // seed is false if we turned out not | | // seed is false if we turned out not | |
| // to be a seed after all | | // to be a seed after all | |
| if (!seed) force_recheck(); | | if (!seed) force_recheck(); | |
| m_num_verified = 0; | | m_num_verified = 0; | |
| m_verified.free(); | | m_verified.free(); | |
| } | | } | |
| bool all_verified() const | | bool all_verified() const | |
|
| { return m_num_verified == m_torrent_file->num_pieces(); } | | { return int(m_num_verified) == m_torrent_file->num_pieces()
; } | |
| bool verified_piece(int piece) const | | bool verified_piece(int piece) const | |
| { | | { | |
| TORRENT_ASSERT(piece < int(m_verified.size())); | | TORRENT_ASSERT(piece < int(m_verified.size())); | |
| TORRENT_ASSERT(piece >= 0); | | TORRENT_ASSERT(piece >= 0); | |
| return m_verified.get_bit(piece); | | return m_verified.get_bit(piece); | |
| } | | } | |
| void verified(int piece) | | void verified(int piece) | |
| { | | { | |
| TORRENT_ASSERT(piece < int(m_verified.size())); | | TORRENT_ASSERT(piece < int(m_verified.size())); | |
| TORRENT_ASSERT(piece >= 0); | | TORRENT_ASSERT(piece >= 0); | |
| | | | |
| skipping to change at line 966 | | skipping to change at line 966 | |
| // this is the upload and download statistics for the whole
torrent. | | // this is the upload and download statistics for the whole
torrent. | |
| // it's updated from all its peers once every second. | | // it's updated from all its peers once every second. | |
| libtorrent::stat m_stat; | | libtorrent::stat m_stat; | |
| | | | |
| // ----------------------------- | | // ----------------------------- | |
| | | | |
| // a back reference to the session | | // a back reference to the session | |
| // this torrent belongs to. | | // this torrent belongs to. | |
| aux::session_impl& m_ses; | | aux::session_impl& m_ses; | |
| | | | |
|
| | | // used to resolve hostnames for web seeds | |
| | | mutable tcp::resolver m_host_resolver; | |
| | | | |
| std::vector<boost::uint8_t> m_file_priority; | | std::vector<boost::uint8_t> m_file_priority; | |
| | | | |
| // this vector contains the number of bytes completely | | // this vector contains the number of bytes completely | |
| // downloaded (as in passed-hash-check) in each file. | | // downloaded (as in passed-hash-check) in each file. | |
| // this lets us trigger on individual files completing | | // this lets us trigger on individual files completing | |
| std::vector<size_type> m_file_progress; | | std::vector<size_type> m_file_progress; | |
| | | | |
| boost::scoped_ptr<piece_picker> m_picker; | | boost::scoped_ptr<piece_picker> m_picker; | |
| | | | |
| std::vector<announce_entry> m_trackers; | | std::vector<announce_entry> m_trackers; | |
| | | | |
| skipping to change at line 1271 | | skipping to change at line 1274 | |
| // this torrent depending on queuing rules. Torrents | | // this torrent depending on queuing rules. Torrents | |
| // started with auto_managed flag set may be added in | | // started with auto_managed flag set may be added in | |
| // a paused state in case there are no available | | // a paused state in case there are no available | |
| // slots. | | // slots. | |
| bool m_auto_managed:1; | | bool m_auto_managed:1; | |
| | | | |
| // this is set when the torrent is in share-mode | | // this is set when the torrent is in share-mode | |
| bool m_share_mode:1; | | bool m_share_mode:1; | |
| | | | |
| // m_num_verified = m_verified.count() | | // m_num_verified = m_verified.count() | |
|
| boost::uint16_t m_num_verified; | | boost::uint32_t m_num_verified; | |
| | | | |
| // the number of seconds since the last scrape request to | | // the number of seconds since the last scrape request to | |
| // one of the trackers in this torrent | | // one of the trackers in this torrent | |
|
| boost::uint16_t m_last_scrape; | | boost::uint32_t m_last_scrape; | |
| | | | |
| // the number of seconds since the last piece passed for | | // the number of seconds since the last piece passed for | |
| // this torrent | | // this torrent | |
|
| boost::uint16_t m_last_download; | | boost::uint32_t m_last_download; | |
| | | | |
| // the number of seconds since the last byte was uploaded | | // the number of seconds since the last byte was uploaded | |
| // from this torrent | | // from this torrent | |
|
| boost::uint16_t m_last_upload; | | boost::uint32_t m_last_upload; | |
| | | | |
| // the scrape data from the tracker response, this | | // the scrape data from the tracker response, this | |
| // is optional and may be 0xffffff | | // is optional and may be 0xffffff | |
| unsigned int m_downloaders:24; | | unsigned int m_downloaders:24; | |
| | | | |
| // round-robin index into m_interfaces | | // round-robin index into m_interfaces | |
| mutable boost::uint8_t m_interface_index; | | mutable boost::uint8_t m_interface_index; | |
| | | | |
| // set to true when this torrent has been paused but | | // set to true when this torrent has been paused but | |
| // is waiting to finish all current download requests | | // is waiting to finish all current download requests | |
| | | | |
End of changes. 6 change blocks. |
| 5 lines changed or deleted | | 8 lines changed or added | |
|
| torrent_info.hpp | | torrent_info.hpp | |
| | | | |
| skipping to change at line 77 | | skipping to change at line 77 | |
| | | | |
| enum | | enum | |
| { | | { | |
| // wait at least 5 seconds before retrying a failed tracker | | // wait at least 5 seconds before retrying a failed tracker | |
| tracker_retry_delay_min = 5 | | tracker_retry_delay_min = 5 | |
| // when tracker_failed_max trackers | | // when tracker_failed_max trackers | |
| // has failed, wait 60 minutes instead | | // has failed, wait 60 minutes instead | |
| , tracker_retry_delay_max = 60 * 60 | | , tracker_retry_delay_max = 60 * 60 | |
| }; | | }; | |
| | | | |
|
| | | TORRENT_EXTRA_EXPORT int merkle_num_leafs(int); | |
| | | TORRENT_EXTRA_EXPORT int merkle_num_nodes(int); | |
| | | TORRENT_EXTRA_EXPORT int merkle_get_parent(int); | |
| | | TORRENT_EXTRA_EXPORT int merkle_get_sibling(int); | |
| | | | |
| struct TORRENT_EXPORT announce_entry | | struct TORRENT_EXPORT announce_entry | |
| { | | { | |
| announce_entry(std::string const& u); | | announce_entry(std::string const& u); | |
| ~announce_entry(); | | ~announce_entry(); | |
| | | | |
| // tracker URL as it appeared in the torrent file | | // tracker URL as it appeared in the torrent file | |
| std::string url; | | std::string url; | |
| std::string trackerid; | | std::string trackerid; | |
| | | | |
| // if this tracker has returned an error or warning message | | // if this tracker has returned an error or warning message | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 5 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 7 | | #define LIBTORRENT_VERSION_TINY 8 | |
| | | | |
| // 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.7.0" | | #define LIBTORRENT_VERSION "0.16.8.0" | |
| #define LIBTORRENT_REVISION "$Rev: 7859 $" | | #define LIBTORRENT_REVISION "$Rev: 7997 $" | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|