mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 14:30:43 -04:00
Added proper dl queue behavior
- suppressed old DwlQueue class - turned mDownloads into a list of pointers to allow easy cross-info update between queue and std::map of downloads - added queue functionality for moving files top/bottom/up/down - added the necessary functions in rsFiles Put back display of exact sizes in FileTransferInfoWidget Suppressed some warnings. **Warning**: this commit requires a make clean. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2493 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6c686496a9
commit
9e469d8baf
19 changed files with 904 additions and 641 deletions
|
@ -40,7 +40,7 @@ class ftFileCreator: public ftFileProvider
|
|||
{
|
||||
public:
|
||||
|
||||
ftFileCreator(std::string savepath, uint64_t size, std::string hash, uint64_t recvd);
|
||||
ftFileCreator(std::string savepath, uint64_t size, std::string hash);
|
||||
|
||||
~ftFileCreator();
|
||||
|
||||
|
@ -49,6 +49,9 @@ class ftFileCreator: public ftFileProvider
|
|||
bool finished() ;
|
||||
uint64_t getRecvd();
|
||||
|
||||
/// (temporarily) close the file, to save file descriptors.
|
||||
void closeFile() ;
|
||||
|
||||
void getChunkMap(FileChunksInfo& info) ;
|
||||
|
||||
void setChunkStrategy(FileChunksInfo::ChunkStrategy s) ;
|
||||
|
@ -70,6 +73,9 @@ class ftFileCreator: public ftFileProvider
|
|||
//
|
||||
void removeInactiveChunks() ;
|
||||
|
||||
// Returns the time stamp of the last data receive.
|
||||
time_t lastRecvTimeStamp() ;
|
||||
|
||||
// actually store data in the file, and update chunks info
|
||||
//
|
||||
bool addFileData(uint64_t offset, uint32_t chunk_size, void *data);
|
||||
|
@ -105,6 +111,8 @@ class ftFileCreator: public ftFileProvider
|
|||
std::map<uint64_t, ftChunk> mChunks;
|
||||
|
||||
ChunkMap chunkMap ;
|
||||
|
||||
time_t _last_recv_time_t ; /// last time stamp when data was received.
|
||||
};
|
||||
|
||||
#endif // FT_FILE_CREATOR_HEADER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue