added extension hook when files have been checked

This commit is contained in:
Arvid Norberg 2007-03-28 22:59:35 +00:00
parent ce14cb5783
commit 513d388c2c
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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