mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
- 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:
parent
0266420798
commit
a70b106005
15 changed files with 352 additions and 209 deletions
|
@ -92,6 +92,9 @@ class RsTurtle
|
|||
// Get info from the turtle router. I use std strings to hide the internal structs.
|
||||
virtual void getInfo(std::vector<std::vector<std::string> >&,std::vector<std::vector<std::string> >&,
|
||||
std::vector<std::vector<std::string> >&,std::vector<std::vector<std::string> >&) const = 0;
|
||||
|
||||
// Convenience function.
|
||||
virtual bool isTurtlePeer(const std::string& peer_id) const = 0 ;
|
||||
|
||||
protected:
|
||||
FileSharingStrategy _sharing_strategy ;
|
||||
|
|
|
@ -57,6 +57,12 @@ class TransferInfo
|
|||
int status; /* FT_STATE_... */
|
||||
};
|
||||
|
||||
enum DwlPriority { PRIORITY_LOW = 0x00,
|
||||
PRIORITY_NORMAL = 0x01,
|
||||
PRIORITY_HIGH = 0x02,
|
||||
PRIORITY_AUTO = 0x03
|
||||
};
|
||||
|
||||
|
||||
class FileInfo
|
||||
{
|
||||
|
@ -101,6 +107,7 @@ class FileInfo
|
|||
uint32_t downloadStatus; /* 0 = Err, 1 = Ok, 2 = Done */
|
||||
std::list<TransferInfo> peers;
|
||||
|
||||
DwlPriority priority ;
|
||||
time_t lastTS;
|
||||
};
|
||||
|
||||
|
@ -247,13 +254,6 @@ class FileDetail
|
|||
uint32_t rank;
|
||||
};
|
||||
|
||||
enum DwlPriority { Low = 0, Normal, High, Auto };
|
||||
|
||||
// Macro to read a bits array for compressed chunk maps
|
||||
//
|
||||
//#define COMPRESSED_MAP_READ(A,j) (A[j >> 5] & (1 << (j & 0x11111)))
|
||||
//#define COMPRESSED_MAP_WRITE(A,j,x) (A[j >> 5] |= (1 << (j & 0x11111)))
|
||||
|
||||
class CompressedChunkMap ;
|
||||
|
||||
class FileChunksInfo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue