config.hpp | config.hpp | |||
---|---|---|---|---|
skipping to change at line 53 | skipping to change at line 53 | |||
#endif | #endif | |||
#if !defined BOOST_ASIO_SEPARATE_COMPILATION && !defined BOOST_ASIO_DYN_LIN K | #if !defined BOOST_ASIO_SEPARATE_COMPILATION && !defined BOOST_ASIO_DYN_LIN K | |||
#error you must define either BOOST_ASIO_SEPARATE_COMPILATION or BOOST_ASIO _DYN_LINK in your project in \ | #error you must define either BOOST_ASIO_SEPARATE_COMPILATION or BOOST_ASIO _DYN_LINK in your project in \ | |||
order for asio's declarations to be correct. If you're linking dynam ically against libtorrent, define \ | order for asio's declarations to be correct. If you're linking dynam ically against libtorrent, define \ | |||
BOOST_ASIO_DYN_LINK otherwise BOOST_ASIO_SEPARATE_COMPILATION. You c an also use pkg-config or boost \ | BOOST_ASIO_DYN_LINK otherwise BOOST_ASIO_SEPARATE_COMPILATION. You c an also use pkg-config or boost \ | |||
build, to automatically apply these defines | build, to automatically apply these defines | |||
#endif | #endif | |||
#ifndef _MSC_VER | #ifndef _MSC_VER | |||
#define __STDC_FORMAT_MACROS | #define __STDC_FORMAT_MACROS 1 | |||
#include <inttypes.h> | #define __STDC_LIMIT_MACROS 1 | |||
#include <inttypes.h> // for PRId64 et.al. | ||||
#include <stdint.h> // for INT64_MAX | ||||
#endif | #endif | |||
#ifndef PRId64 | #ifndef PRId64 | |||
// MinGW uses microsofts runtime | // MinGW uses microsofts runtime | |||
#if defined _MSC_VER || defined __MINGW32__ | #if defined _MSC_VER || defined __MINGW32__ | |||
#define PRId64 "I64d" | #define PRId64 "I64d" | |||
#define PRIu64 "I64u" | #define PRIu64 "I64u" | |||
#define PRIu32 "u" | #define PRIu32 "u" | |||
#else | #else | |||
#define PRId64 "lld" | #define PRId64 "lld" | |||
#define PRIu64 "llu" | #define PRIu64 "llu" | |||
#define PRIu32 "u" | #define PRIu32 "u" | |||
#endif | #endif | |||
#endif | #endif | |||
#if !defined INT64_MAX | ||||
#define INT64_MAX 0x7fffffffffffffffLL | ||||
#endif | ||||
// backwards compatibility with older versions of boost | // backwards compatibility with older versions of boost | |||
#if !defined BOOST_SYMBOL_EXPORT && !defined BOOST_SYMBOL_IMPORT | #if !defined BOOST_SYMBOL_EXPORT && !defined BOOST_SYMBOL_IMPORT | |||
# if defined _MSC_VER || defined __MINGW32__ | # if defined _MSC_VER || defined __MINGW32__ | |||
# define BOOST_SYMBOL_EXPORT __declspec(dllexport) | # define BOOST_SYMBOL_EXPORT __declspec(dllexport) | |||
# define BOOST_SYMBOL_IMPORT __declspec(dllimport) | # define BOOST_SYMBOL_IMPORT __declspec(dllimport) | |||
# elif __GNU__ >= 4 | # elif __GNU__ >= 4 | |||
# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) | # define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) | |||
# define BOOST_SYMBOL_IMPORT __attribute__((visibility("default"))) | # define BOOST_SYMBOL_IMPORT __attribute__((visibility("default"))) | |||
# else | # else | |||
# define BOOST_SYMBOL_EXPORT | # define BOOST_SYMBOL_EXPORT | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 8 lines changed or added | |||
file.hpp | file.hpp | |||
---|---|---|---|---|
skipping to change at line 127 | skipping to change at line 127 | |||
, error_code& ec); | , error_code& ec); | |||
TORRENT_EXPORT void create_directory(std::string const& f | TORRENT_EXPORT void create_directory(std::string const& f | |||
, error_code& ec); | , error_code& ec); | |||
TORRENT_EXPORT void remove_all(std::string const& f | TORRENT_EXPORT void remove_all(std::string const& f | |||
, error_code& ec); | , error_code& ec); | |||
TORRENT_EXPORT void remove(std::string const& f, error_code& ec); | TORRENT_EXPORT void remove(std::string const& f, error_code& ec); | |||
TORRENT_EXPORT bool exists(std::string const& f); | TORRENT_EXPORT bool exists(std::string const& f); | |||
TORRENT_EXPORT size_type file_size(std::string const& f); | TORRENT_EXPORT size_type file_size(std::string const& f); | |||
TORRENT_EXPORT bool is_directory(std::string const& f | TORRENT_EXPORT bool is_directory(std::string const& f | |||
, error_code& ec); | , error_code& ec); | |||
TORRENT_EXPORT void recursive_copy(std::string const& old_path | ||||
, std::string const& new_path, error_code& ec); | ||||
TORRENT_EXPORT void copy_file(std::string const& f | TORRENT_EXPORT void copy_file(std::string const& f | |||
, std::string const& newf, error_code& ec); | , std::string const& newf, error_code& ec); | |||
TORRENT_EXPORT std::string split_path(std::string const& f); | TORRENT_EXPORT std::string split_path(std::string const& f); | |||
TORRENT_EXPORT char const* next_path_element(char const* p); | TORRENT_EXPORT char const* next_path_element(char const* p); | |||
TORRENT_EXPORT std::string extension(std::string const& f); | TORRENT_EXPORT std::string extension(std::string const& f); | |||
TORRENT_EXPORT void replace_extension(std::string& f, std::string co nst& ext); | TORRENT_EXPORT void replace_extension(std::string& f, std::string co nst& ext); | |||
TORRENT_EXPORT bool is_root_path(std::string const& f); | TORRENT_EXPORT bool is_root_path(std::string const& f); | |||
TORRENT_EXPORT std::string parent_path(std::string const& f); | TORRENT_EXPORT std::string parent_path(std::string const& f); | |||
TORRENT_EXPORT bool has_parent_path(std::string const& f); | TORRENT_EXPORT bool has_parent_path(std::string const& f); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
observer.hpp | observer.hpp | |||
---|---|---|---|---|
skipping to change at line 84 | skipping to change at line 84 | |||
, m_algorithm(a) | , m_algorithm(a) | |||
, m_id(id) | , m_id(id) | |||
, m_port(0) | , m_port(0) | |||
, m_transaction_id() | , m_transaction_id() | |||
, flags(0) | , flags(0) | |||
{ | { | |||
TORRENT_ASSERT(a); | TORRENT_ASSERT(a); | |||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS | #if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS | |||
m_in_constructor = true; | m_in_constructor = true; | |||
m_was_sent = false; | m_was_sent = false; | |||
m_was_abandoned = false; | ||||
#endif | #endif | |||
set_target(ep); | set_target(ep); | |||
} | } | |||
virtual ~observer(); | virtual ~observer(); | |||
// this is called when a reply is received | // this is called when a reply is received | |||
virtual void reply(msg const& m) = 0; | virtual void reply(msg const& m) = 0; | |||
// this is called if no response has been received after | // this is called if no response has been received after | |||
skipping to change at line 168 | skipping to change at line 169 | |||
boost::uint16_t m_port; | boost::uint16_t m_port; | |||
// the transaction ID for this call | // the transaction ID for this call | |||
boost::uint16_t m_transaction_id; | boost::uint16_t m_transaction_id; | |||
public: | public: | |||
unsigned char flags; | unsigned char flags; | |||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS | #if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS | |||
bool m_in_constructor:1; | bool m_in_constructor:1; | |||
bool m_was_sent:1; | bool m_was_sent:1; | |||
bool m_was_abandoned:1; | ||||
#endif | #endif | |||
}; | }; | |||
typedef boost::intrusive_ptr<observer> observer_ptr; | typedef boost::intrusive_ptr<observer> observer_ptr; | |||
} } | } } | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
piece_picker.hpp | piece_picker.hpp | |||
---|---|---|---|---|
skipping to change at line 332 | skipping to change at line 332 | |||
// the number of downloaded blocks that hasn't passed | // the number of downloaded blocks that hasn't passed | |||
// the hash-check yet | // the hash-check yet | |||
int unverified_blocks() const; | int unverified_blocks() const; | |||
void get_downloaders(std::vector<void*>& d, int index) const ; | void get_downloaders(std::vector<void*>& d, int index) const ; | |||
std::vector<downloading_piece> const& get_download_queue() c onst | std::vector<downloading_piece> const& get_download_queue() c onst | |||
{ return m_downloads; } | { return m_downloads; } | |||
int num_downloading_pieces() const { return int(m_downloads. | ||||
size()); } | ||||
void* get_downloader(piece_block block) const; | void* get_downloader(piece_block block) const; | |||
// the number of filtered pieces we don't have | // the number of filtered pieces we don't have | |||
int num_filtered() const { return m_num_filtered; } | int num_filtered() const { return m_num_filtered; } | |||
// the number of filtered pieces we already have | // the number of filtered pieces we already have | |||
int num_have_filtered() const { return m_num_have_filtered; } | int num_have_filtered() const { return m_num_have_filtered; } | |||
int num_have() const { return m_num_have; } | int num_have() const { return m_num_have; } | |||
// the number of pieces we want and don't have | ||||
int num_want_left() const { return num_pieces() - m_num_have | ||||
- m_num_filtered; } | ||||
#ifdef TORRENT_DEBUG | #ifdef TORRENT_DEBUG | |||
// used in debug mode | // used in debug mode | |||
void verify_priority(int start, int end, int prio) const; | void verify_priority(int start, int end, int prio) const; | |||
void check_invariant(const torrent* t = 0) const; | void check_invariant(const torrent* t = 0) const; | |||
void verify_pick(std::vector<piece_block> const& picked | void verify_pick(std::vector<piece_block> const& picked | |||
, bitfield const& bits) const; | , bitfield const& bits) const; | |||
#endif | #endif | |||
#if defined TORRENT_PICKER_LOG | #if defined TORRENT_PICKER_LOG | |||
void print_pieces() const; | void print_pieces() const; | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 7 lines changed or added | |||
session.hpp | session.hpp | |||
---|---|---|---|---|
skipping to change at line 332 | skipping to change at line 332 | |||
// succeeded and is currently listening, | // succeeded and is currently listening, | |||
// a call to this function will shut down the | // a call to this function will shut down the | |||
// listen port and reopen it using these new | // listen port and reopen it using these new | |||
// properties (the given interface and port range). | // properties (the given interface and port range). | |||
// As usual, if the interface is left as 0 | // As usual, if the interface is left as 0 | |||
// this function will return false on failure. | // this function will return false on failure. | |||
// If it fails, it will also generate alerts describing | // If it fails, it will also generate alerts describing | |||
// the error. It will return true on success. | // the error. It will return true on success. | |||
enum listen_on_flags_t | enum listen_on_flags_t | |||
{ | { | |||
#ifndef TORRENT_NO_DEPRECATE | ||||
// this is always on starting with 0.16.2 | ||||
listen_reuse_address = 0x01, | listen_reuse_address = 0x01, | |||
#endif | ||||
listen_no_system_port = 0x02 | listen_no_system_port = 0x02 | |||
}; | }; | |||
#ifndef TORRENT_NO_DEPRECATE | #ifndef TORRENT_NO_DEPRECATE | |||
// deprecated in 0.16 | // deprecated in 0.16 | |||
TORRENT_DEPRECATED_PREFIX | TORRENT_DEPRECATED_PREFIX | |||
bool listen_on( | bool listen_on( | |||
std::pair<int, int> const& port_range | std::pair<int, int> const& port_range | |||
, const char* net_interface = 0 | , const char* net_interface = 0 | |||
, int flags = 0) TORRENT_DEPRECATED; | , int flags = 0) TORRENT_DEPRECATED; | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added | |||
session_settings.hpp | session_settings.hpp | |||
---|---|---|---|---|
skipping to change at line 760 | skipping to change at line 760 | |||
// file and is typically compared to make sure the files hav en't changed | // file and is typically compared to make sure the files hav en't changed | |||
// since the last session | // since the last session | |||
bool ignore_resume_timestamps; | bool ignore_resume_timestamps; | |||
// normally, if a resume file is incomplete (typically there 's no | // normally, if a resume file is incomplete (typically there 's no | |||
// "file sizes" field) the torrent is queued for a full chec k. If | // "file sizes" field) the torrent is queued for a full chec k. If | |||
// this settings is set to true, instead libtorrent will ass ume | // this settings is set to true, instead libtorrent will ass ume | |||
// we have none of the files and go straight to download | // we have none of the files and go straight to download | |||
bool no_recheck_incomplete_resume; | bool no_recheck_incomplete_resume; | |||
// when this is true, libtorrent will take actions to make s ure any | // when this is true, libtorrent will take actions to make s ure no | |||
// privacy sensitive information is leaked out from the clie nt. This | // privacy sensitive information is leaked out from the clie nt. This | |||
// mode is assumed to be combined with using a proxy for all your | // mode is assumed to be combined with using a proxy for all your | |||
// traffic. With this option, your true IP address will not be exposed | // traffic. With this option, your true IP address will not be exposed | |||
// nor anything that can tie your connection to your true IP | ||||
bool anonymous_mode; | bool anonymous_mode; | |||
// the number of milliseconds between internal ticks. Should be no | // the number of milliseconds between internal ticks. Should be no | |||
// more than one second (i.e. 1000). | // more than one second (i.e. 1000). | |||
int tick_interval; | int tick_interval; | |||
// specifies whether downloads from web seeds is reported to the | // specifies whether downloads from web seeds is reported to the | |||
// tracker or not. Defaults to on | // tracker or not. Defaults to on | |||
bool report_web_seed_downloads; | bool report_web_seed_downloads; | |||
End of changes. 2 change blocks. | ||||
1 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 1 | #define LIBTORRENT_VERSION_TINY 2 | |||
// 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.1.0" | #define LIBTORRENT_VERSION "0.16.2.0" | |||
#define LIBTORRENT_REVISION "$Rev: 6976 $" | #define LIBTORRENT_REVISION "$Rev: 7169 $" | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||