mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 19:12:28 -04:00
restaured priority queue methods, and made better context menues.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7b35b7dc6a
commit
7fd5c7ad4b
12 changed files with 207 additions and 178 deletions
|
@ -263,7 +263,12 @@ bool ftServer::setChunkStrategy(const std::string& hash,FileChunksInfo::ChunkStr
|
|||
|
||||
bool ftServer::FileCancel(std::string hash)
|
||||
{
|
||||
return mFtController->FileCancel(hash);
|
||||
// Remove from both queue and ftController, by default.
|
||||
//
|
||||
mFtDwlQueue->clearDownload(hash);
|
||||
mFtController->FileCancel(hash);
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ftServer::FileControl(std::string hash, uint32_t flags)
|
||||
|
@ -277,26 +282,35 @@ bool ftServer::FileClearCompleted()
|
|||
}
|
||||
|
||||
/* Control of Downloads Priority. */
|
||||
bool ftServer::changePriority(const std::string hash, int priority)
|
||||
bool ftServer::changeQueuePriority(const std::string hash, int priority)
|
||||
{
|
||||
mFtController->setPriority(hash, (DwlPriority) priority);
|
||||
return mFtDwlQueue->changePriority(hash,(DwlPriority)priority) ;
|
||||
}
|
||||
bool ftServer::changeDownloadSpeed(const std::string hash, int speed)
|
||||
{
|
||||
mFtController->setPriority(hash, (DwlSpeed)speed);
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ftServer::getPriority(const std::string hash, int & priority)
|
||||
bool ftServer::getDownloadSpeed(const std::string hash, int & speed)
|
||||
{
|
||||
DwlPriority _priority;
|
||||
int ret = mFtController->getPriority(hash, _priority);
|
||||
if (ret) {
|
||||
priority = _priority;
|
||||
}
|
||||
DwlSpeed _speed;
|
||||
int ret = mFtController->getPriority(hash, _speed);
|
||||
if (ret)
|
||||
speed = _speed;
|
||||
|
||||
return ret;
|
||||
}
|
||||
bool ftServer::getQueuePriority(const std::string hash, int & priority)
|
||||
{
|
||||
DwlPriority _priority;
|
||||
int ret = mFtDwlQueue->getPriority(hash, _priority);
|
||||
if (ret)
|
||||
priority = _priority;
|
||||
|
||||
return ret;
|
||||
}
|
||||
bool ftServer::clearDownload(const std::string hash)
|
||||
{
|
||||
return mFtDwlQueue->clearDownload(hash);
|
||||
}
|
||||
|
||||
void ftServer::clearQueue()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue