forked from premiere/premiere-libtorrent
added extension hook when files have been checked
This commit is contained in:
parent
ce14cb5783
commit
513d388c2c
|
@ -77,6 +77,10 @@ namespace libtorrent
|
|||
// default behavior will be skipped
|
||||
virtual bool on_pause() { return false; }
|
||||
virtual bool on_resume() { return false;}
|
||||
|
||||
// this is called when the initial checking of
|
||||
// files is completed.
|
||||
virtual void on_files_checked() {}
|
||||
};
|
||||
|
||||
struct TORRENT_EXPORT peer_plugin
|
||||
|
|
|
@ -2299,6 +2299,14 @@ namespace libtorrent
|
|||
#ifndef NDEBUG
|
||||
m_initial_done = boost::get<0>(bytes_done());
|
||||
#endif
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
for (extension_list_t::iterator i = m_extensions.begin()
|
||||
, end(m_extensions.end()); i != end; ++i)
|
||||
{
|
||||
try { (*i)->on_files_checked(); } catch (std::exception&) {}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
alert_manager& torrent::alerts() const
|
||||
|
|
Loading…
Reference in New Issue