alert_types.hpp | alert_types.hpp | |||
---|---|---|---|---|
skipping to change at line 467 | skipping to change at line 467 | |||
, event(event_) | , event(event_) | |||
{ TORRENT_ASSERT(!url.empty()); } | { TORRENT_ASSERT(!url.empty()); } | |||
int event; | int event; | |||
virtual std::auto_ptr<alert> clone() const | virtual std::auto_ptr<alert> clone() const | |||
{ return std::auto_ptr<alert>(new tracker_announce_alert(*th is)); } | { return std::auto_ptr<alert>(new tracker_announce_alert(*th is)); } | |||
virtual char const* what() const { return "tracker announce sent"; } | virtual char const* what() const { return "tracker announce sent"; } | |||
virtual std::string message() const | virtual std::string message() const | |||
{ | { | |||
const static char* event_str[] = {"none", "completed | const static char* event_str[] = {"none", "completed | |||
", "started", "stopped"}; | ", "started", "stopped", "paused"}; | |||
TORRENT_ASSERT(event < sizeof(event_str)/sizeof(even | ||||
t_str[0])); | ||||
return tracker_alert::message() + " sending announce (" + event_str[event] + ")"; | return tracker_alert::message() + " sending announce (" + event_str[event] + ")"; | |||
} | } | |||
}; | }; | |||
struct TORRENT_EXPORT hash_failed_alert: torrent_alert | struct TORRENT_EXPORT hash_failed_alert: torrent_alert | |||
{ | { | |||
hash_failed_alert( | hash_failed_alert( | |||
torrent_handle const& h | torrent_handle const& h | |||
, int index) | , int index) | |||
: torrent_alert(h) | : torrent_alert(h) | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 4 lines changed or added | |||
http_parser.hpp | http_parser.hpp | |||
---|---|---|---|---|
skipping to change at line 58 | skipping to change at line 58 | |||
#pragma warning(pop) | #pragma warning(pop) | |||
#endif | #endif | |||
#include "libtorrent/config.hpp" | #include "libtorrent/config.hpp" | |||
#include "libtorrent/buffer.hpp" | #include "libtorrent/buffer.hpp" | |||
#include "libtorrent/size_type.hpp" | #include "libtorrent/size_type.hpp" | |||
namespace libtorrent | namespace libtorrent | |||
{ | { | |||
// return true if the status code is 200, 206, or in the 300-400 ran | ||||
ge | ||||
bool is_ok_status(int http_status); | ||||
// return true if the status code is a redirect | ||||
bool is_redirect(int http_status); | ||||
class TORRENT_EXPORT http_parser | class TORRENT_EXPORT http_parser | |||
{ | { | |||
public: | public: | |||
http_parser(); | http_parser(); | |||
std::string const& header(char const* key) const | std::string const& header(char const* key) const | |||
{ | { | |||
static std::string empty; | static std::string empty; | |||
std::map<std::string, std::string>::const_iterator i | std::map<std::string, std::string>::const_iterator i | |||
= m_header.find(key); | = m_header.find(key); | |||
if (i == m_header.end()) return empty; | if (i == m_header.end()) return empty; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 7 lines changed or added | |||
natpmp.hpp | natpmp.hpp | |||
---|---|---|---|---|
skipping to change at line 95 | skipping to change at line 95 | |||
struct mapping_t | struct mapping_t | |||
{ | { | |||
enum action_t { action_none, action_add, action_delete }; | enum action_t { action_none, action_add, action_delete }; | |||
mapping_t() | mapping_t() | |||
: action(action_none) | : action(action_none) | |||
, local_port(0) | , local_port(0) | |||
, external_port(0) | , external_port(0) | |||
, protocol(none) | , protocol(none) | |||
, map_sent(false) | , map_sent(false) | |||
, outstanding_request(false) | ||||
{} | {} | |||
// indicates that the mapping has changed | // indicates that the mapping has changed | |||
// and needs an update | // and needs an update | |||
int action; | int action; | |||
// the time the port mapping will expire | // the time the port mapping will expire | |||
ptime expires; | ptime expires; | |||
// the local port for this mapping. If this is set | // the local port for this mapping. If this is set | |||
skipping to change at line 117 | skipping to change at line 118 | |||
// the external (on the NAT router) port | // the external (on the NAT router) port | |||
// for the mapping. This is the port we | // for the mapping. This is the port we | |||
// should announce to others | // should announce to others | |||
int external_port; | int external_port; | |||
int protocol; | int protocol; | |||
// set to true when the first map request is sent | // set to true when the first map request is sent | |||
bool map_sent; | bool map_sent; | |||
// set to true while we're waiting for a response | ||||
bool outstanding_request; | ||||
}; | }; | |||
portmap_callback_t m_callback; | portmap_callback_t m_callback; | |||
log_callback_t m_log_callback; | log_callback_t m_log_callback; | |||
std::vector<mapping_t> m_mappings; | std::vector<mapping_t> m_mappings; | |||
// the endpoint to the nat router | // the endpoint to the nat router | |||
udp::endpoint m_nat_endpoint; | udp::endpoint m_nat_endpoint; | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added | |||
torrent.hpp | torrent.hpp | |||
---|---|---|---|---|
skipping to change at line 347 | skipping to change at line 347 | |||
std::set<web_seed_entry> web_seeds() const | std::set<web_seed_entry> web_seeds() const | |||
{ return m_web_seeds; } | { return m_web_seeds; } | |||
std::set<std::string> web_seeds(web_seed_entry::type_t type) const; | std::set<std::string> web_seeds(web_seed_entry::type_t type) const; | |||
bool free_upload_slots() const | bool free_upload_slots() const | |||
{ return m_num_uploads < m_max_uploads; } | { return m_num_uploads < m_max_uploads; } | |||
bool choke_peer(peer_connection& c); | bool choke_peer(peer_connection& c); | |||
bool unchoke_peer(peer_connection& c); | bool unchoke_peer(peer_connection& c, bool optimistic = fals e); | |||
// used by peer_connection to attach itself to a torrent | // used by peer_connection to attach itself to a torrent | |||
// since incoming connections don't know what torrent | // since incoming connections don't know what torrent | |||
// they're a part of until they have received an info_hash. | // they're a part of until they have received an info_hash. | |||
// false means attach failed | // false means attach failed | |||
bool attach_peer(peer_connection* p); | bool attach_peer(peer_connection* p); | |||
// this will remove the peer and make sure all | // this will remove the peer and make sure all | |||
// the pieces it had have their reference counter | // the pieces it had have their reference counter | |||
// decreased in the piece_picker | // decreased in the piece_picker | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 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 15 | #define LIBTORRENT_VERSION_MINOR 15 | |||
#define LIBTORRENT_VERSION_TINY 3 | #define LIBTORRENT_VERSION_TINY 4 | |||
#define LIBTORRENT_VERSION "0.15.3.0" | #define LIBTORRENT_VERSION "0.15.4.0" | |||
#define LIBTORRENT_REVISION "$Rev: 4826 $" | #define LIBTORRENT_REVISION "$Rev: 4876 $" | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||