mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Expose /rsFiles/requestDirDetails via JSON API
This method is useful to browse own shared directries, or directries shared by friends whith browseable permission
This commit is contained in:
parent
2139090f5d
commit
c05c376351
6 changed files with 89 additions and 29 deletions
|
@ -698,11 +698,6 @@ bool ftServer::ExtraFileMove(std::string fname, const RsFileHash& hash, uint64_t
|
|||
/******************** Directory Listing ************************/
|
||||
/***************************************************************/
|
||||
|
||||
int ftServer::RequestDirDetails(const RsPeerId& uid, const std::string& path, DirDetails &details)
|
||||
{
|
||||
return mFileDatabase->RequestDirDetails(uid, path, details);
|
||||
}
|
||||
|
||||
bool ftServer::findChildPointer(void *ref, int row, void *& result, FileSearchFlags flags)
|
||||
{
|
||||
return mFileDatabase->findChildPointer(ref,row,result,flags) ;
|
||||
|
@ -711,6 +706,12 @@ int ftServer::RequestDirDetails(void *ref, DirDetails &details, FileSearchFlags
|
|||
{
|
||||
return mFileDatabase->RequestDirDetails(ref,details,flags) ;
|
||||
}
|
||||
|
||||
bool ftServer::requestDirDetails( DirDetails& details, std::uintptr_t handle,
|
||||
FileSearchFlags flags )
|
||||
{
|
||||
return RequestDirDetails(reinterpret_cast<void*>(handle), details, flags);
|
||||
}
|
||||
uint32_t ftServer::getType(void *ref, FileSearchFlags /* flags */)
|
||||
{
|
||||
return mFileDatabase->getType(ref) ;
|
||||
|
|
|
@ -189,8 +189,13 @@ public:
|
|||
/***
|
||||
* Directory Listing / Search Interface
|
||||
***/
|
||||
virtual int RequestDirDetails(const RsPeerId& uid, const std::string& path, DirDetails &details);
|
||||
virtual int RequestDirDetails(void *ref, DirDetails &details, FileSearchFlags flags);
|
||||
|
||||
/// @see RsFiles::RequestDirDetails
|
||||
virtual bool requestDirDetails(
|
||||
DirDetails &details, std::uintptr_t handle = 0,
|
||||
FileSearchFlags flags = RS_FILE_HINTS_LOCAL );
|
||||
|
||||
virtual bool findChildPointer(void *ref, int row, void *& result, FileSearchFlags flags) ;
|
||||
virtual uint32_t getType(void *ref,FileSearchFlags flags) ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue