mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 09:11:06 -04:00
added count of total number of files and total file isze on top of shared directories
This commit is contained in:
parent
61131e4bf5
commit
5ef4e752d9
10 changed files with 128 additions and 9 deletions
|
@ -681,6 +681,26 @@ bool p3FileDatabase::findChildPointer( void *ref, int row, void *& result,
|
|||
return res;
|
||||
}
|
||||
|
||||
// This function returns statistics about the entire directory
|
||||
|
||||
int p3FileDatabase::getSharedDirStatistics(const RsPeerId& pid,SharedDirStats& stats)
|
||||
{
|
||||
RS_STACK_MUTEX(mFLSMtx) ;
|
||||
|
||||
if(pid == mOwnId)
|
||||
{
|
||||
mLocalSharedDirs->getStatistics(stats) ;
|
||||
return true ;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t fi = locked_getFriendIndex(pid);
|
||||
mRemoteDirectories[fi]->getStatistics(stats) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
|
||||
// This function converts a pointer into directory details, to be used by the AbstractItemModel for browsing the files.
|
||||
int p3FileDatabase::RequestDirDetails(void *ref, DirDetails& d, FileSearchFlags flags) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue