Added consistent display of chunk map

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1837 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2009-11-18 23:02:37 +00:00
parent adbdb51c5d
commit e88d2c1928
7 changed files with 52 additions and 15 deletions

View file

@ -307,17 +307,19 @@ void ftServer::getDwlDetails(std::list<DwlDetails> & details)
bool ftServer::FileChunksDetails(const std::string& hash,FileChunksInfo& info)
{
// for know put some dummy info. It's for display sake only.
info.chunk_size = 1024*1024 ;
info.file_size = 250*info.chunk_size - 123 ; // last chunk is not complete.
info.chunks.resize(250,FileChunksInfo::CHUNK_DONE) ;
int n = rand()%150 + 50 ;
for(int i=0;i<10;++i)
info.chunks[n+i] = FileChunksInfo::CHUNK_ACTIVE ;
for(int i=n+10;i<250;++i)
info.chunks[i] = FileChunksInfo::CHUNK_OUTSTANDING ;
return true ;
return mFtController->getFileChunksDetails(hash,info);
//
// // for know put some dummy info. It's for display sake only.
// info.chunk_size = 1024*1024 ;
// info.file_size = 250*info.chunk_size - 123 ; // last chunk is not complete.
// info.chunks.resize(250,FileChunksInfo::CHUNK_DONE) ;
// int n = rand()%150 + 50 ;
// for(int i=0;i<10;++i)
// info.chunks[n+i] = FileChunksInfo::CHUNK_ACTIVE ;
// for(int i=n+10;i<250;++i)
// info.chunks[i] = FileChunksInfo::CHUNK_OUTSTANDING ;
//
// return true ;
}
/* Directory Handling */