mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
fixed a completion issue in FT
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2174 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1d6bef168b
commit
e08d13397a
5 changed files with 22 additions and 13 deletions
|
@ -106,8 +106,11 @@ class ChunkMap
|
|||
/// If not, randomly/streamly select a new chunk depending on the strategy.
|
||||
/// adds an entry in the chunk_ids map, and sets up 1 interval for it.
|
||||
/// the chunk should be available from the designated peer.
|
||||
/// On return:
|
||||
/// - source_chunk_map_needed = true if the source map should be asked
|
||||
/// - file_is_complete = true if the file is complete.
|
||||
|
||||
virtual bool getDataChunk(const std::string& peer_id,uint32_t size_hint,ftChunk& chunk,bool& source_chunk_map_needed) ;
|
||||
virtual bool getDataChunk(const std::string& peer_id,uint32_t size_hint,ftChunk& chunk,bool& source_chunk_map_needed,bool& file_is_complete) ;
|
||||
|
||||
/// Notify received a slice of data. This needs to
|
||||
/// - carve in the map of chunks what is received, what is not.
|
||||
|
@ -160,7 +163,7 @@ class ChunkMap
|
|||
|
||||
/// Returns the first chunk available starting from start_location for this peer_id.
|
||||
//
|
||||
uint32_t getAvailableChunk(uint32_t start_location,const std::string& peer_id,bool& chunk_map_too_old) ;
|
||||
uint32_t getAvailableChunk(uint32_t start_location,const std::string& peer_id,bool& chunk_map_too_old,bool& file_is_complete) ;
|
||||
|
||||
private:
|
||||
uint64_t _file_size ; //! total size of the file in bytes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue