Expose JSON API for ExtraFiles management

This commit is contained in:
Gioacchino Mazzurco 2019-08-01 15:20:54 +02:00
parent 3ffb57f998
commit 354739fa0f
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
7 changed files with 72 additions and 34 deletions

View file

@ -968,16 +968,18 @@ int p3FileDatabase::getSharedDirStatistics(const RsPeerId& pid,SharedDirStats& s
}
}
void p3FileDatabase::removeExtraFile(const RsFileHash& hash)
bool p3FileDatabase::removeExtraFile(const RsFileHash& hash)
{
bool ret = false;
{
RS_STACK_MUTEX(mFLSMtx) ;
mExtraFiles->removeExtraFile(hash);
ret = mExtraFiles->removeExtraFile(hash);
mLastExtraFilesCacheUpdate = 0 ; // forced cache reload
}
RsServer::notify()->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
return ret;
}
void p3FileDatabase::getExtraFilesDirDetails(void *ref,DirectoryStorage::EntryIndex e,DirDetails& d) const