| error_code.hpp | | error_code.hpp | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| | | | |
| #if BOOST_VERSION < 103500 | | #if BOOST_VERSION < 103500 | |
| #include <asio/error_code.hpp> | | #include <asio/error_code.hpp> | |
| #else | | #else | |
| #include <boost/system/error_code.hpp> | | #include <boost/system/error_code.hpp> | |
| #endif | | #endif | |
| | | | |
| #include "libtorrent/string_util.hpp" // for allocate_string_copy | | #include "libtorrent/string_util.hpp" // for allocate_string_copy | |
| #include <stdlib.h> // free | | #include <stdlib.h> // free | |
| | | | |
|
| | | #ifndef BOOST_SYSTEM_NOEXCEPT | |
| | | #define BOOST_SYSTEM_NOEXCEPT throw() | |
| | | #endif | |
| | | | |
| namespace libtorrent | | namespace libtorrent | |
| { | | { | |
| | | | |
| namespace errors | | namespace errors | |
| { | | { | |
| enum error_code_enum | | enum error_code_enum | |
| { | | { | |
| no_error = 0, | | no_error = 0, | |
| file_collision, | | file_collision, | |
| failed_hash_check, | | failed_hash_check, | |
| | | | |
| skipping to change at line 332 | | skipping to change at line 336 | |
| boost::system::error_category const& get_http_category() | | boost::system::error_category const& get_http_category() | |
| { | | { | |
| static ::asio::error::error_category http_category(21); | | static ::asio::error::error_category http_category(21); | |
| return http_category; | | return http_category; | |
| } | | } | |
| | | | |
| #else | | #else | |
| | | | |
| struct TORRENT_EXPORT libtorrent_error_category : boost::system::err
or_category | | struct TORRENT_EXPORT libtorrent_error_category : boost::system::err
or_category | |
| { | | { | |
|
| virtual const char* name() const throw(); | | virtual const char* name() const BOOST_SYSTEM_NOEXCEPT; | |
| virtual std::string message(int ev) const throw(); | | virtual std::string message(int ev) const BOOST_SYSTEM_NOEXC | |
| virtual boost::system::error_condition default_error_conditi | | EPT; | |
| on(int ev) const throw() | | virtual boost::system::error_condition default_error_conditi | |
| | | on(int ev) const BOOST_SYSTEM_NOEXCEPT | |
| { return boost::system::error_condition(ev, *this); } | | { return boost::system::error_condition(ev, *this); } | |
| }; | | }; | |
| | | | |
| inline boost::system::error_category& get_libtorrent_category() | | inline boost::system::error_category& get_libtorrent_category() | |
| { | | { | |
| static libtorrent_error_category libtorrent_category; | | static libtorrent_error_category libtorrent_category; | |
| return libtorrent_category; | | return libtorrent_category; | |
| } | | } | |
| | | | |
| struct TORRENT_EXPORT http_error_category : boost::system::error_cat
egory | | struct TORRENT_EXPORT http_error_category : boost::system::error_cat
egory | |
| { | | { | |
|
| virtual const char* name() const throw(); | | virtual const char* name() const BOOST_SYSTEM_NOEXCEPT; | |
| virtual std::string message(int ev) const throw(); | | virtual std::string message(int ev) const BOOST_SYSTEM_NOEXC | |
| virtual boost::system::error_condition default_error_conditi | | EPT; | |
| on(int ev) const throw() | | virtual boost::system::error_condition default_error_conditi | |
| | | on(int ev) const BOOST_SYSTEM_NOEXCEPT | |
| { return boost::system::error_condition(ev, *this); } | | { return boost::system::error_condition(ev, *this); } | |
| }; | | }; | |
| | | | |
| inline boost::system::error_category& get_http_category() | | inline boost::system::error_category& get_http_category() | |
| { | | { | |
| static http_error_category http_category; | | static http_error_category http_category; | |
| return http_category; | | return http_category; | |
| } | | } | |
| | | | |
| namespace errors | | namespace errors | |
| | | | |
End of changes. 3 change blocks. |
| 8 lines changed or deleted | | 14 lines changed or added | |
|
| hasher.hpp | | hasher.hpp | |
| | | | |
| skipping to change at line 105 | | skipping to change at line 105 | |
| } | | } | |
| | | | |
| hasher& operator=(hasher const& h) | | hasher& operator=(hasher const& h) | |
| { | | { | |
| gcry_md_close(m_context); | | gcry_md_close(m_context); | |
| gcry_md_copy(&m_context, h.m_context); | | gcry_md_copy(&m_context, h.m_context); | |
| return *this; | | return *this; | |
| } | | } | |
| #endif | | #endif | |
| | | | |
|
| void update(std::string const& data) { update(data.c_str(), | | hasher& update(std::string const& data) { update(data.c_str( | |
| data.size()); } | | ), data.size()); return *this; } | |
| void update(const char* data, int len) | | hasher& update(const char* data, int len) | |
| { | | { | |
| TORRENT_ASSERT(data != 0); | | TORRENT_ASSERT(data != 0); | |
| TORRENT_ASSERT(len > 0); | | TORRENT_ASSERT(len > 0); | |
| #ifdef TORRENT_USE_GCRYPT | | #ifdef TORRENT_USE_GCRYPT | |
| gcry_md_write(m_context, data, len); | | gcry_md_write(m_context, data, len); | |
| #else | | #else | |
| SHA1_Update(&m_context, reinterpret_cast<unsigned ch
ar const*>(data), len); | | SHA1_Update(&m_context, reinterpret_cast<unsigned ch
ar const*>(data), len); | |
| #endif | | #endif | |
|
| | | return *this; | |
| } | | } | |
| | | | |
| sha1_hash final() | | sha1_hash final() | |
| { | | { | |
| sha1_hash digest; | | sha1_hash digest; | |
| #ifdef TORRENT_USE_GCRYPT | | #ifdef TORRENT_USE_GCRYPT | |
| gcry_md_final(m_context); | | gcry_md_final(m_context); | |
| digest.assign((const char*)gcry_md_read(m_context, 0
)); | | digest.assign((const char*)gcry_md_read(m_context, 0
)); | |
| #else | | #else | |
| SHA1_Final(digest.begin(), &m_context); | | SHA1_Final(digest.begin(), &m_context); | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 4 lines changed or added | |
|
| i2p_stream.hpp | | i2p_stream.hpp | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 70 | |
| invalid_key, | | invalid_key, | |
| invalid_id, | | invalid_id, | |
| timeout, | | timeout, | |
| key_not_found, | | key_not_found, | |
| num_errors | | num_errors | |
| }; | | }; | |
| } | | } | |
| | | | |
| struct TORRENT_EXPORT i2p_error_category : boost::system::error_category | | struct TORRENT_EXPORT i2p_error_category : boost::system::error_category | |
| { | | { | |
|
| virtual const char* name() const; | | virtual const char* name() const BOOST_SYSTEM_NOEXCEPT; | |
| virtual std::string message(int ev) const; | | virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT; | |
| virtual boost::system::error_condition default_error_condition(int e | | virtual boost::system::error_condition default_error_condition(int e | |
| v) const | | v) const BOOST_SYSTEM_NOEXCEPT | |
| { return boost::system::error_condition(ev, *this); } | | { return boost::system::error_condition(ev, *this); } | |
| }; | | }; | |
| | | | |
| extern i2p_error_category i2p_category; | | extern i2p_error_category i2p_category; | |
| | | | |
| class i2p_stream : public proxy_base | | class i2p_stream : public proxy_base | |
| { | | { | |
| public: | | public: | |
| | | | |
| explicit i2p_stream(io_service& io_service) | | explicit i2p_stream(io_service& io_service) | |
| | | | |
End of changes. 1 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| pe_crypto.hpp | | pe_crypto.hpp | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| | | | |
| #ifndef TORRENT_PE_CRYPTO_HPP_INCLUDED | | #ifndef TORRENT_PE_CRYPTO_HPP_INCLUDED | |
| #define TORRENT_PE_CRYPTO_HPP_INCLUDED | | #define TORRENT_PE_CRYPTO_HPP_INCLUDED | |
| | | | |
| #include "libtorrent/config.hpp" | | #include "libtorrent/config.hpp" | |
| | | | |
| #ifdef TORRENT_USE_GCRYPT | | #ifdef TORRENT_USE_GCRYPT | |
| #include <gcrypt.h> | | #include <gcrypt.h> | |
| #elif defined TORRENT_USE_OPENSSL | | #elif defined TORRENT_USE_OPENSSL | |
| #include <openssl/rc4.h> | | #include <openssl/rc4.h> | |
|
| #include <openssl/evp.h> | | | |
| #include <openssl/aes.h> | | | |
| #else | | #else | |
| // RC4 state from libtomcrypt | | // RC4 state from libtomcrypt | |
| struct rc4 { | | struct rc4 { | |
| int x, y; | | int x, y; | |
| unsigned char buf[256]; | | unsigned char buf[256]; | |
| }; | | }; | |
| | | | |
| void TORRENT_EXTRA_EXPORT rc4_init(const unsigned char* in, unsigned long l
en, rc4 *state); | | void TORRENT_EXTRA_EXPORT rc4_init(const unsigned char* in, unsigned long l
en, rc4 *state); | |
| unsigned long TORRENT_EXTRA_EXPORT rc4_encrypt(unsigned char *out, unsigned
long outlen, rc4 *state); | | unsigned long TORRENT_EXTRA_EXPORT rc4_encrypt(unsigned char *out, unsigned
long outlen, rc4 *state); | |
| #endif | | #endif | |
| | | | |
| skipping to change at line 203 | | skipping to change at line 201 | |
| RC4_KEY m_remote_key; // Key to decrypt incoming data | | RC4_KEY m_remote_key; // Key to decrypt incoming data | |
| #else | | #else | |
| rc4 m_rc4_incoming; | | rc4 m_rc4_incoming; | |
| rc4 m_rc4_outgoing; | | rc4 m_rc4_outgoing; | |
| #endif | | #endif | |
| // determines whether or not encryption and decryption is en
abled | | // determines whether or not encryption and decryption is en
abled | |
| bool m_encrypt; | | bool m_encrypt; | |
| bool m_decrypt; | | bool m_decrypt; | |
| }; | | }; | |
| | | | |
|
| #ifdef TORRENT_USE_OPENSSL | | | |
| struct aes256_handler : encryption_handler | | | |
| { | | | |
| aes256_handler() : m_enc_pos(0), m_dec_pos(0) | | | |
| { | | | |
| EVP_CIPHER_CTX_init(&m_enc); | | | |
| EVP_CIPHER_CTX_init(&m_dec); | | | |
| } | | | |
| | | | |
| ~aes256_handler() | | | |
| { | | | |
| EVP_CIPHER_CTX_cleanup(&m_enc); | | | |
| EVP_CIPHER_CTX_cleanup(&m_dec); | | | |
| } | | | |
| | | | |
| void set_incoming_key(unsigned char const* in_key, int len) | | | |
| { | | | |
| const int nrounds = 5; | | | |
| boost::uint8_t salt[8] = { 0xf1, 0x03, 0x46, 0xe2, 0 | | | |
| xb1, 0xa8, 0x29, 0x63 }; | | | |
| boost::uint8_t key[32]; | | | |
| boost::uint8_t iv[32]; | | | |
| | | | |
| EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha1(), salt, | | | |
| in_key, len, nrounds, key, iv); | | | |
| TORRENT_ASSERT(len == 32); | | | |
| EVP_EncryptInit_ex(&m_enc, EVP_aes_256_cbc(), NULL, | | | |
| key, iv); | | | |
| // since we're using the AES as a stream cipher, bot | | | |
| h the encrypt and | | | |
| // decrypt context will in fact only _encrypt_ stuff | | | |
| , so initializing | | | |
| // this as encrypt is not a typo | | | |
| EVP_EncryptInit_ex(&m_dec, EVP_aes_256_cbc(), NULL, | | | |
| key, iv); | | | |
| m_enc_pos = 0; | | | |
| m_dec_pos = 0; | | | |
| std::memcpy(m_enc_state, iv, sizeof(m_enc_state)); | | | |
| std::memcpy(m_dec_state, iv, sizeof(m_enc_state)); | | | |
| } | | | |
| void set_outgoing_key(unsigned char const* key, int len) { / | | | |
| * no-op */ } | | | |
| void encrypt(char* pos, int len) | | | |
| { | | | |
| while (len > 0) | | | |
| { | | | |
| while (m_enc_pos < AES_BLOCK_SIZE && len > 0 | | | |
| ) | | | |
| { | | | |
| *pos ^= m_enc_state[m_enc_pos]; | | | |
| ++m_enc_pos; | | | |
| ++pos; | | | |
| --len; | | | |
| } | | | |
| | | | |
| if (m_enc_pos == AES_BLOCK_SIZE) | | | |
| { | | | |
| next_block(&m_enc, m_enc_state); | | | |
| m_enc_pos = 0; | | | |
| } | | | |
| } | | | |
| } | | | |
| | | | |
| void decrypt(char* pos, int len) | | | |
| { | | | |
| while (len > 0) | | | |
| { | | | |
| while (m_dec_pos < AES_BLOCK_SIZE && len > 0 | | | |
| ) | | | |
| { | | | |
| *pos ^= m_dec_state[m_dec_pos]; | | | |
| ++m_dec_pos; | | | |
| ++pos; | | | |
| --len; | | | |
| } | | | |
| | | | |
| if (m_dec_pos == AES_BLOCK_SIZE) | | | |
| { | | | |
| next_block(&m_dec, m_dec_state); | | | |
| m_dec_pos = 0; | | | |
| } | | | |
| } | | | |
| } | | | |
| | | | |
| private: | | | |
| | | | |
| // we're turning the AES block-cipher into a stream cipher. | | | |
| This | | | |
| // function will produce the next block in the sequence of | | | |
| // block-sized buffers. We're using "Output feedback" (OFB) | | | |
| mode. | | | |
| void next_block(EVP_CIPHER_CTX* ctx, boost::uint8_t* pad) | | | |
| { | | | |
| int outlen = AES_BLOCK_SIZE; | | | |
| EVP_EncryptUpdate(ctx, pad, &outlen, pad, AES_BLOCK_ | | | |
| SIZE); | | | |
| TORRENT_ASSERT(outlen == AES_BLOCK_SIZE); | | | |
| } | | | |
| | | | |
| EVP_CIPHER_CTX m_enc; | | | |
| EVP_CIPHER_CTX m_dec; | | | |
| | | | |
| boost::uint8_t m_enc_state[AES_BLOCK_SIZE]; | | | |
| boost::uint8_t m_dec_state[AES_BLOCK_SIZE]; | | | |
| int m_enc_pos; | | | |
| int m_dec_pos; | | | |
| | | | |
| }; | | | |
| #endif // TORRENT_USE_OPENSSL | | | |
| | | | |
| } // namespace libtorrent | | } // namespace libtorrent | |
| | | | |
| #endif // TORRENT_PE_CRYPTO_HPP_INCLUDED | | #endif // TORRENT_PE_CRYPTO_HPP_INCLUDED | |
| #endif // TORRENT_DISABLE_ENCRYPTION | | #endif // TORRENT_DISABLE_ENCRYPTION | |
| | | | |
End of changes. 2 change blocks. |
| 112 lines changed or deleted | | 0 lines changed or added | |
|
| rpc_manager.hpp | | rpc_manager.hpp | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 72 | |
| , udp::endpoint const& ep, node_id const& id): observer(a, e
p, id) {} | | , udp::endpoint const& ep, node_id const& id): observer(a, e
p, id) {} | |
| virtual void reply(msg const&) { flags |= flag_done; } | | virtual void reply(msg const&) { flags |= flag_done; } | |
| }; | | }; | |
| | | | |
| class routing_table; | | class routing_table; | |
| | | | |
| class TORRENT_EXTRA_EXPORT rpc_manager | | class TORRENT_EXTRA_EXPORT rpc_manager | |
| { | | { | |
| public: | | public: | |
| typedef bool (*send_fun)(void* userdata, entry&, udp::endpoint const
&, int); | | typedef bool (*send_fun)(void* userdata, entry&, udp::endpoint const
&, int); | |
|
| typedef boost::function3<void, address, int, address> external_ip_fu
n; | | | |
| | | | |
| rpc_manager(node_id const& our_id | | rpc_manager(node_id const& our_id | |
| , routing_table& table, send_fun const& sf | | , routing_table& table, send_fun const& sf | |
|
| , void* userdata, external_ip_fun ext_ip); | | , void* userdata); | |
| ~rpc_manager(); | | ~rpc_manager(); | |
| | | | |
| void unreachable(udp::endpoint const& ep); | | void unreachable(udp::endpoint const& ep); | |
| | | | |
| // returns true if the node needs a refresh | | // returns true if the node needs a refresh | |
| // if so, id is assigned the node id to refresh | | // if so, id is assigned the node id to refresh | |
| bool incoming(msg const&, node_id* id); | | bool incoming(msg const&, node_id* id); | |
| time_duration tick(); | | time_duration tick(); | |
| | | | |
| bool invoke(entry& e, udp::endpoint target | | bool invoke(entry& e, udp::endpoint target | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 119 | |
| transactions_t m_transactions; | | transactions_t m_transactions; | |
| | | | |
| send_fun m_send; | | send_fun m_send; | |
| void* m_userdata; | | void* m_userdata; | |
| node_id m_our_id; | | node_id m_our_id; | |
| routing_table& m_table; | | routing_table& m_table; | |
| ptime m_timer; | | ptime m_timer; | |
| node_id m_random_number; | | node_id m_random_number; | |
| int m_allocated_observers; | | int m_allocated_observers; | |
| bool m_destructing; | | bool m_destructing; | |
|
| external_ip_fun m_ext_ip; | | | |
| }; | | }; | |
| | | | |
| } } // namespace libtorrent::dht | | } } // namespace libtorrent::dht | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 1 lines changed or added | |
|
| session_impl.hpp | | session_impl.hpp | |
| | | | |
| skipping to change at line 416 | | skipping to change at line 416 | |
| proxy_settings const& web_seed_proxy() const { retur
n proxy(); } | | proxy_settings const& web_seed_proxy() const { retur
n proxy(); } | |
| proxy_settings const& tracker_proxy() const { return
proxy(); } | | proxy_settings const& tracker_proxy() const { return
proxy(); } | |
| | | | |
| #ifndef TORRENT_DISABLE_DHT | | #ifndef TORRENT_DISABLE_DHT | |
| void set_dht_proxy(proxy_settings const& s) { set_pr
oxy(s); } | | void set_dht_proxy(proxy_settings const& s) { set_pr
oxy(s); } | |
| proxy_settings const& dht_proxy() const { return pro
xy(); } | | proxy_settings const& dht_proxy() const { return pro
xy(); } | |
| #endif | | #endif | |
| #endif // TORRENT_NO_DEPRECATE | | #endif // TORRENT_NO_DEPRECATE | |
| | | | |
| #ifndef TORRENT_DISABLE_DHT | | #ifndef TORRENT_DISABLE_DHT | |
|
| bool is_dht_running() const { return m_dht; } | | bool is_dht_running() const { return m_dht.get(); } | |
| #endif | | #endif | |
| | | | |
| #if TORRENT_USE_I2P | | #if TORRENT_USE_I2P | |
| void set_i2p_proxy(proxy_settings const& s) | | void set_i2p_proxy(proxy_settings const& s) | |
| { | | { | |
| m_i2p_conn.open(s, boost::bind(&session_impl
::on_i2p_open, this, _1)); | | m_i2p_conn.open(s, boost::bind(&session_impl
::on_i2p_open, this, _1)); | |
| open_new_incoming_i2p_connection(); | | open_new_incoming_i2p_connection(); | |
| } | | } | |
| void on_i2p_open(error_code const& ec); | | void on_i2p_open(error_code const& ec); | |
| proxy_settings const& i2p_proxy() const | | proxy_settings const& i2p_proxy() const | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| socket_io.hpp | | socket_io.hpp | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| #include "libtorrent/lazy_entry.hpp" | | #include "libtorrent/lazy_entry.hpp" | |
| #include "libtorrent/peer_id.hpp" // for sha1_hash | | #include "libtorrent/peer_id.hpp" // for sha1_hash | |
| #include <string> | | #include <string> | |
| | | | |
| namespace libtorrent | | namespace libtorrent | |
| { | | { | |
| TORRENT_EXPORT std::string print_address(address const& addr); | | TORRENT_EXPORT std::string print_address(address const& addr); | |
| TORRENT_EXPORT std::string print_endpoint(tcp::endpoint const& ep); | | TORRENT_EXPORT std::string print_endpoint(tcp::endpoint const& ep); | |
| TORRENT_EXPORT std::string print_endpoint(udp::endpoint const& ep); | | TORRENT_EXPORT std::string print_endpoint(udp::endpoint const& ep); | |
| TORRENT_EXPORT std::string address_to_bytes(address const& a); | | TORRENT_EXPORT std::string address_to_bytes(address const& a); | |
|
| | | TORRENT_EXPORT std::string endpoint_to_bytes(udp::endpoint const& ep
); | |
| TORRENT_EXTRA_EXPORT void hash_address(address const& ip, sha1_hash&
h); | | TORRENT_EXTRA_EXPORT void hash_address(address const& ip, sha1_hash&
h); | |
| | | | |
| namespace detail | | namespace detail | |
| { | | { | |
| template<class OutIt> | | template<class OutIt> | |
| void write_address(address const& a, OutIt& out) | | void write_address(address const& a, OutIt& out) | |
| { | | { | |
| #if TORRENT_USE_IPV6 | | #if TORRENT_USE_IPV6 | |
| if (a.is_v4()) | | if (a.is_v4()) | |
| { | | { | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|
| socks5_stream.hpp | | socks5_stream.hpp | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| num_errors | | num_errors | |
| }; | | }; | |
| } | | } | |
| | | | |
| #if BOOST_VERSION < 103500 | | #if BOOST_VERSION < 103500 | |
| typedef asio::error::error_category socks_error_category; | | typedef asio::error::error_category socks_error_category; | |
| #else | | #else | |
| | | | |
| struct TORRENT_EXTRA_EXPORT socks_error_category : boost::system::error_cat
egory | | struct TORRENT_EXTRA_EXPORT socks_error_category : boost::system::error_cat
egory | |
| { | | { | |
|
| virtual const char* name() const; | | virtual const char* name() const BOOST_SYSTEM_NOEXCEPT; | |
| virtual std::string message(int ev) const; | | virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT; | |
| virtual boost::system::error_condition default_error_condition(int e | | virtual boost::system::error_condition default_error_condition(int e | |
| v) const | | v) const BOOST_SYSTEM_NOEXCEPT | |
| { return boost::system::error_condition(ev, *this); } | | { return boost::system::error_condition(ev, *this); } | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
| extern socks_error_category socks_category; | | extern socks_error_category socks_category; | |
| | | | |
| class socks5_stream : public proxy_base | | class socks5_stream : public proxy_base | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 1 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| torrent.hpp | | torrent.hpp | |
| | | | |
| skipping to change at line 455 | | skipping to change at line 455 | |
| virtual void tracker_scrape_response(tracker_request const&
req | | virtual void tracker_scrape_response(tracker_request const&
req | |
| , int complete, int incomplete, int downloaded, int
downloaders); | | , int complete, int incomplete, int downloaded, int
downloaders); | |
| | | | |
| // if no password and username is set | | // if no password and username is set | |
| // this will return an empty string, otherwise | | // this will return an empty string, otherwise | |
| // it will concatenate the login and password | | // it will concatenate the login and password | |
| // ready to be sent over http (but without | | // ready to be sent over http (but without | |
| // base64 encoding). | | // base64 encoding). | |
| std::string tracker_login() const; | | std::string tracker_login() const; | |
| | | | |
|
| | | // generate the tracker key for this torrent. | |
| | | // The key is passed to http trackers as ``&key=``. | |
| | | boost::uint32_t tracker_key() const; | |
| | | | |
| // returns the absolute time when the next tracker | | // returns the absolute time when the next tracker | |
| // announce will take place. | | // announce will take place. | |
| ptime next_announce() const; | | ptime next_announce() const; | |
| | | | |
| // forcefully sets next_announce to the current time | | // forcefully sets next_announce to the current time | |
| void force_tracker_request(); | | void force_tracker_request(); | |
| void force_tracker_request(ptime); | | void force_tracker_request(ptime); | |
| void scrape_tracker(); | | void scrape_tracker(); | |
| void announce_with_tracker(tracker_request::event_t e | | void announce_with_tracker(tracker_request::event_t e | |
| = tracker_request::none | | = tracker_request::none | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 4 lines changed or added | |
|
| upnp.hpp | | upnp.hpp | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 82 | |
| external_port_must_be_wildcard = 727 | | external_port_must_be_wildcard = 727 | |
| }; | | }; | |
| } | | } | |
| | | | |
| #if BOOST_VERSION < 103500 | | #if BOOST_VERSION < 103500 | |
| extern asio::error::error_category upnp_category; | | extern asio::error::error_category upnp_category; | |
| #else | | #else | |
| | | | |
| struct TORRENT_EXPORT upnp_error_category : boost::system::error_cat
egory | | struct TORRENT_EXPORT upnp_error_category : boost::system::error_cat
egory | |
| { | | { | |
|
| virtual const char* name() const; | | virtual const char* name() const BOOST_SYSTEM_NOEXCEPT; | |
| virtual std::string message(int ev) const; | | virtual std::string message(int ev) const BOOST_SYSTEM_NOEXC | |
| virtual boost::system::error_condition default_error_conditi | | EPT; | |
| on(int ev) const | | virtual boost::system::error_condition default_error_conditi | |
| | | on(int ev) const BOOST_SYSTEM_NOEXCEPT | |
| { return boost::system::error_condition(ev, *this); } | | { return boost::system::error_condition(ev, *this); } | |
| }; | | }; | |
| | | | |
| extern TORRENT_EXPORT upnp_error_category upnp_category; | | extern TORRENT_EXPORT upnp_error_category upnp_category; | |
| #endif | | #endif | |
| | | | |
| // int: port-mapping index | | // int: port-mapping index | |
| // address: external address as queried from router | | // address: external address as queried from router | |
| // int: external port | | // int: external port | |
| // std::string: error message | | // std::string: error message | |
| | | | |
End of changes. 1 change blocks. |
| 4 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 11 | | #define LIBTORRENT_VERSION_TINY 12 | |
| | | | |
| // 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.11.0" | | #define LIBTORRENT_VERSION "0.16.12.0" | |
| #define LIBTORRENT_REVISION "$Rev: 8829 $" | | #define LIBTORRENT_REVISION "$Rev: 9199 $" | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|