- added NETWORK_WIDE flag to remote dir model download

- added file priority strategy based on which files are requested first. This provides:
	- equal file speed for files with equal (source,priority)
	- effective priority speed for file of same source but different priority
- removed state variable load/save from turtle, as it's not needed anymore (FileRequest re-opens tunnels as needed)
- manage availability per peer instead of per file type: direct peer ids always assume file availability, while turtle tunnels don't

I still need to make the download queue work, and code this gui for it.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2133 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-01-26 20:40:21 +00:00
parent 0266420798
commit a70b106005
15 changed files with 352 additions and 209 deletions

View file

@ -27,6 +27,8 @@
// This class handles a slice of a chunk of arbitrary uint32_t size, at the level of ftFileCreator
class ftController ;
class ftChunk
{
public:
@ -90,7 +92,7 @@ class ChunkMap
/// Constructor. Decides what will be the size of chunks and how many there will be.
ChunkMap(uint64_t file_size,bool assume_sources_availability) ;
ChunkMap(uint64_t file_size) ;
/// constructor from saved map info
ChunkMap(uint64_t file_size,const std::vector<uint32_t>& map,uint32_t chunk_size,uint32_t chunk_number,FileChunksInfo::ChunkStrategy s) ;
@ -169,7 +171,6 @@ class ChunkMap
std::vector<FileChunksInfo::ChunkState> _map ; //! vector of chunk state over the whole file
std::map<std::string,SourceChunksInfo> _peers_chunks_availability ; //! what does each source peer have
uint64_t _total_downloaded ; //! completion for the file
bool _assume_availability ; //! set for transfers where the source is always available
};