mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
JSON API for /rsFiles/FileClearCompleted
This commit is contained in:
parent
81d23fa607
commit
db0a22a226
@ -1402,19 +1402,19 @@ bool ftController::FileClearCompleted()
|
|||||||
std::cerr << "ftController::FileClearCompleted()" <<std::endl;
|
std::cerr << "ftController::FileClearCompleted()" <<std::endl;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
RS_STACK_MUTEX(ctrlMutex);
|
||||||
|
|
||||||
for(std::map<RsFileHash, ftFileControl*>::iterator it(mCompleted.begin());it!=mCompleted.end();++it)
|
for(auto it(mCompleted.begin()); it != mCompleted.end(); ++it)
|
||||||
delete it->second;
|
delete it->second;
|
||||||
|
|
||||||
mCompleted.clear();
|
mCompleted.clear();
|
||||||
|
|
||||||
IndicateConfigChanged();
|
IndicateConfigChanged();
|
||||||
} /******* UNLOCKED ********/
|
}
|
||||||
|
|
||||||
RsServer::notify()->notifyDownloadCompleteCount(0);
|
RsServer::notify()->notifyDownloadCompleteCount(0);
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get Details of File Transfers */
|
/* get Details of File Transfers */
|
||||||
|
@ -318,7 +318,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Get free disk space limit
|
* @brief Get free disk space limit
|
||||||
* @jsonapi{development}
|
* @jsonapi{development}
|
||||||
* @return current current minimum free space on disk in MB
|
* @return current minimum free space on disk in MB
|
||||||
*/
|
*/
|
||||||
virtual uint32_t freeDiskSpaceLimit() const = 0;
|
virtual uint32_t freeDiskSpaceLimit() const = 0;
|
||||||
|
|
||||||
@ -330,7 +330,14 @@ public:
|
|||||||
virtual void setFreeDiskSpaceLimit(uint32_t minimumFreeMB) = 0;
|
virtual void setFreeDiskSpaceLimit(uint32_t minimumFreeMB) = 0;
|
||||||
|
|
||||||
virtual bool FileControl(const RsFileHash& hash, uint32_t flags) = 0;
|
virtual bool FileControl(const RsFileHash& hash, uint32_t flags) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear completed downloaded files list
|
||||||
|
* @jsonapi{development}
|
||||||
|
* @return false on error, true otherwise
|
||||||
|
*/
|
||||||
virtual bool FileClearCompleted() = 0;
|
virtual bool FileClearCompleted() = 0;
|
||||||
|
|
||||||
virtual void setDefaultEncryptionPolicy(uint32_t policy)=0; // RS_FILE_CTRL_ENCRYPTION_POLICY_STRICT/PERMISSIVE
|
virtual void setDefaultEncryptionPolicy(uint32_t policy)=0; // RS_FILE_CTRL_ENCRYPTION_POLICY_STRICT/PERMISSIVE
|
||||||
virtual uint32_t defaultEncryptionPolicy()=0;
|
virtual uint32_t defaultEncryptionPolicy()=0;
|
||||||
virtual void setMaxUploadSlotsPerFriend(uint32_t n)=0;
|
virtual void setMaxUploadSlotsPerFriend(uint32_t n)=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user