#include <storage.hpp>
Public Member Functions | |
| piece_manager (const torrent_info &info, const boost::filesystem::path &path, file_pool &fp) | |
| ~piece_manager () | |
| bool | check_fastresume (aux::piece_checker_data &d, std::vector< bool > &pieces, int &num_pieces, bool compact_mode) |
| std::pair< bool, float > | check_files (std::vector< bool > &pieces, int &num_pieces, boost::recursive_mutex &mutex) |
| void | release_files () |
| bool | is_allocating () const |
| void | allocate_slots (int num_slots) |
| void | mark_failed (int index) |
| unsigned long | piece_crc (int slot_index, int block_size, const std::bitset< 256 > &bitmask) |
| int | slot_for_piece (int piece_index) const |
| size_type | read (char *buf, int piece_index, int offset, int size) |
| void | write (const char *buf, int piece_index, int offset, int size) |
| boost::filesystem::path const & | save_path () const |
| bool | move_storage (boost::filesystem::path const &) |
| void | export_piece_map (std::vector< int > &pieces) const |
Private Attributes | |
| std::auto_ptr< impl > | m_pimpl |
Classes | |
| class | impl |
Definition at line 124 of file storage.hpp.
| libtorrent::piece_manager::piece_manager | ( | const torrent_info & | info, | |
| const boost::filesystem::path & | path, | |||
| file_pool & | fp | |||
| ) |
| libtorrent::piece_manager::~piece_manager | ( | ) |
Definition at line 865 of file storage.cpp.
| bool libtorrent::piece_manager::check_fastresume | ( | aux::piece_checker_data & | d, | |
| std::vector< bool > & | pieces, | |||
| int & | num_pieces, | |||
| bool | compact_mode | |||
| ) |
| void libtorrent::piece_manager::release_files | ( | ) |
| bool libtorrent::piece_manager::is_allocating | ( | ) | const |
Definition at line 935 of file storage.cpp.
References m_pimpl, and libtorrent::piece_manager::impl::state_allocating.
| void libtorrent::piece_manager::allocate_slots | ( | int | num_slots | ) |
| void libtorrent::piece_manager::mark_failed | ( | int | index | ) |
| unsigned long libtorrent::piece_manager::piece_crc | ( | int | slot_index, | |
| int | block_size, | |||
| const std::bitset< 256 > & | bitmask | |||
| ) |
| int libtorrent::piece_manager::slot_for_piece | ( | int | piece_index | ) | const |
| size_type libtorrent::piece_manager::read | ( | char * | buf, | |
| int | piece_index, | |||
| int | offset, | |||
| int | size | |||
| ) |
| void libtorrent::piece_manager::write | ( | const char * | buf, | |
| int | piece_index, | |||
| int | offset, | |||
| int | size | |||
| ) |
Definition at line 1037 of file storage.cpp.
References m_pimpl.
Referenced by libtorrent::peer_connection::incoming_piece().
| path const & libtorrent::piece_manager::save_path | ( | ) | const |
| bool libtorrent::piece_manager::move_storage | ( | boost::filesystem::path const & | ) |
Referenced by run_storage_tests().
| void libtorrent::piece_manager::export_piece_map | ( | std::vector< int > & | pieces | ) | const |
std::auto_ptr<impl> libtorrent::piece_manager::m_pimpl [private] |
Definition at line 174 of file storage.hpp.
Referenced by allocate_slots(), check_fastresume(), check_files(), export_piece_map(), is_allocating(), mark_failed(), piece_crc(), read(), release_files(), save_path(), slot_for_piece(), and write().
1.5.6