added alert for torrent state changes. Fixes #360
This commit is contained in:
@@ -68,6 +68,21 @@ namespace libtorrent
|
||||
std::string name;
|
||||
};
|
||||
|
||||
struct TORRENT_EXPORT state_changed_alert: torrent_alert
|
||||
{
|
||||
state_changed_alert(torrent_handle const& h
|
||||
, torrent_status::state_t const& state_
|
||||
, std::string const& msg)
|
||||
: torrent_alert(h, alert::info, msg)
|
||||
, state(state_)
|
||||
{}
|
||||
|
||||
virtual std::auto_ptr<alert> clone() const
|
||||
{ return std::auto_ptr<alert>(new state_changed_alert(*this)); }
|
||||
|
||||
torrent_status::state_t state;
|
||||
};
|
||||
|
||||
struct TORRENT_EXPORT tracker_alert: torrent_alert
|
||||
{
|
||||
tracker_alert(torrent_handle const& h
|
||||
|
@@ -167,6 +167,7 @@ namespace libtorrent
|
||||
bool is_aborted() const { return m_abort; }
|
||||
|
||||
torrent_status::state_t state() const { return m_state; }
|
||||
void set_state(torrent_status::state_t s);
|
||||
|
||||
session_settings const& settings() const;
|
||||
|
||||
|
Reference in New Issue
Block a user