forked from premiere/premiere-libtorrent
Add torrent_resumed torrent alert.
This commit is contained in:
parent
31bd3b1550
commit
d825c1d5bd
|
@ -28,6 +28,7 @@ extern char const* block_finished_alert_doc;
|
||||||
extern char const* block_downloading_alert_doc;
|
extern char const* block_downloading_alert_doc;
|
||||||
extern char const* storage_moved_alert_doc;
|
extern char const* storage_moved_alert_doc;
|
||||||
extern char const* torrent_paused_alert_doc;
|
extern char const* torrent_paused_alert_doc;
|
||||||
|
extern char const* torrent_resumed_alert_doc;
|
||||||
extern char const* torrent_checked_alert_doc;
|
extern char const* torrent_checked_alert_doc;
|
||||||
extern char const* url_seed_alert_doc;
|
extern char const* url_seed_alert_doc;
|
||||||
extern char const* file_error_alert_doc;
|
extern char const* file_error_alert_doc;
|
||||||
|
@ -163,6 +164,10 @@ void bind_alert()
|
||||||
"torrent_paused_alert", torrent_paused_alert_doc, no_init
|
"torrent_paused_alert", torrent_paused_alert_doc, no_init
|
||||||
);
|
);
|
||||||
|
|
||||||
|
class_<torrent_resumed_alert, bases<torrent_alert>, noncopyable>(
|
||||||
|
"torrent_resumed_alert", torrent_resumed_alert_doc, no_init
|
||||||
|
);
|
||||||
|
|
||||||
class_<torrent_checked_alert, bases<torrent_alert>, noncopyable>(
|
class_<torrent_checked_alert, bases<torrent_alert>, noncopyable>(
|
||||||
"torrent_checked_alert", torrent_checked_alert_doc, no_init
|
"torrent_checked_alert", torrent_checked_alert_doc, no_init
|
||||||
);
|
);
|
||||||
|
|
|
@ -276,6 +276,9 @@ char const* torrent_paused_alert_doc =
|
||||||
"It contains a `torrent_handle` to the torrent in question. This alert\n"
|
"It contains a `torrent_handle` to the torrent in question. This alert\n"
|
||||||
"is generated as severity level `alert.severity_levels.warning`.";
|
"is generated as severity level `alert.severity_levels.warning`.";
|
||||||
|
|
||||||
|
char const* torrent_resumed_alert_doc =
|
||||||
|
"";
|
||||||
|
|
||||||
char const* torrent_checked_alert_doc =
|
char const* torrent_checked_alert_doc =
|
||||||
"";
|
"";
|
||||||
|
|
||||||
|
|
|
@ -301,6 +301,16 @@ namespace libtorrent
|
||||||
{ return std::auto_ptr<alert>(new torrent_paused_alert(*this)); }
|
{ return std::auto_ptr<alert>(new torrent_paused_alert(*this)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TORRENT_EXPORT torrent_resumed_alert: torrent_alert
|
||||||
|
{
|
||||||
|
torrent_resumed_alert(torrent_handle const& h, std::string const& msg)
|
||||||
|
: torrent_alert(h, alert::warning, msg)
|
||||||
|
{}
|
||||||
|
|
||||||
|
virtual std::auto_ptr<alert> clone() const
|
||||||
|
{ return std::auto_ptr<alert>(new torrent_resumed_alert(*this)); }
|
||||||
|
};
|
||||||
|
|
||||||
struct TORRENT_EXPORT torrent_checked_alert: torrent_alert
|
struct TORRENT_EXPORT torrent_checked_alert: torrent_alert
|
||||||
{
|
{
|
||||||
torrent_checked_alert(torrent_handle const& h, std::string const& msg)
|
torrent_checked_alert(torrent_handle const& h, std::string const& msg)
|
||||||
|
|
|
@ -3148,6 +3148,11 @@ namespace libtorrent
|
||||||
|
|
||||||
m_paused = false;
|
m_paused = false;
|
||||||
|
|
||||||
|
if (alerts().should_post(alert::warning))
|
||||||
|
{
|
||||||
|
alerts().post_alert(torrent_resumed_alert(get_handle(), "torrent resumed"));
|
||||||
|
}
|
||||||
|
|
||||||
// tell the tracker that we're back
|
// tell the tracker that we're back
|
||||||
m_event = tracker_request::started;
|
m_event = tracker_request::started;
|
||||||
force_tracker_request();
|
force_tracker_request();
|
||||||
|
|
Loading…
Reference in New Issue