libtorrent::piece_manager Class Reference

#include <storage.hpp>

List of all members.

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

Classes

class  impl


Detailed Description

Definition at line 124 of file storage.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

bool libtorrent::piece_manager::check_fastresume ( aux::piece_checker_data d,
std::vector< bool > &  pieces,
int &  num_pieces,
bool  compact_mode 
)

Definition at line 1649 of file storage.cpp.

References m_pimpl.

Referenced by run_storage_tests().

std::pair< bool, float > libtorrent::piece_manager::check_files ( std::vector< bool > &  pieces,
int &  num_pieces,
boost::recursive_mutex &  mutex 
)

Definition at line 1656 of file storage.cpp.

References m_pimpl.

Referenced by run_storage_tests().

void libtorrent::piece_manager::release_files (  ) 

Definition at line 869 of file storage.cpp.

References m_pimpl.

Referenced by run_storage_tests().

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  ) 

Definition at line 1861 of file storage.cpp.

References m_pimpl.

void libtorrent::piece_manager::mark_failed ( int  index  ) 

Definition at line 930 of file storage.cpp.

References m_pimpl.

unsigned long libtorrent::piece_manager::piece_crc ( int  slot_index,
int  block_size,
const std::bitset< 256 > &  bitmask 
)

Definition at line 952 of file storage.cpp.

References m_pimpl.

int libtorrent::piece_manager::slot_for_piece ( int  piece_index  )  const

Definition at line 941 of file storage.cpp.

References m_pimpl.

size_type libtorrent::piece_manager::read ( char *  buf,
int  piece_index,
int  offset,
int  size 
)

Definition at line 1013 of file storage.cpp.

References m_pimpl.

Referenced by run_storage_tests().

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

Definition at line 1866 of file storage.cpp.

References m_pimpl.

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

Definition at line 904 of file storage.cpp.

References m_pimpl.


Member Data Documentation

std::auto_ptr<impl> libtorrent::piece_manager::m_pimpl [private]


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:43 2008 by  doxygen 1.5.6