added get_storage_impl() to torrent_handle

This commit is contained in:
Arvid Norberg
2008-09-04 16:20:19 +00:00
parent c7c0974d3f
commit 7f143791d5
5 changed files with 27 additions and 0 deletions

View File

@@ -259,6 +259,8 @@ namespace libtorrent
disk_check_aborted = -3
};
storage_interface* get_storage_impl() { return m_storage.get(); }
private:
fs::path save_path() const;

View File

@@ -170,6 +170,12 @@ namespace libtorrent
int seed_rank(session_settings const& s) const;
storage_mode_t storage_mode() const { return m_storage_mode; }
storage_interface* get_storage()
{
if (!m_owning_storage) return 0;
return m_owning_storage->get_storage_impl();
}
// this will flag the torrent as aborted. The main
// loop in session_impl will check for this state
// on all torrents once every second, and take

View File

@@ -366,6 +366,8 @@ namespace libtorrent
bool resolve_countries() const;
#endif
storage_interface* get_storage_impl() const;
// all these are deprecated, use piece
// priority functions instead