mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
Added new method cancelActiveRequestTokens to TokenQueue.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6492 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6ee0aa9b3f
commit
249f2ff2e0
@ -209,6 +209,18 @@ void TokenQueue::activeRequestTokens(const uint32_t& userType, std::list<uint32_
|
||||
|
||||
}
|
||||
|
||||
void TokenQueue::cancelActiveRequestTokens(const uint32_t& userType)
|
||||
{
|
||||
std::list<uint32_t> tokens;
|
||||
activeRequestTokens(userType, tokens);
|
||||
if (!tokens.empty()) {
|
||||
std::list<uint32_t>::iterator tokenIt;
|
||||
for (tokenIt = tokens.begin(); tokenIt != tokens.end(); ++tokenIt) {
|
||||
cancelRequest(*tokenIt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TokenQueue::loadRequest(const TokenRequest &req)
|
||||
{
|
||||
std::cerr << "TokenQueue::loadRequest(): ";
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
|
||||
bool activeRequestExist(const uint32_t& userType) const;
|
||||
void activeRequestTokens(const uint32_t& userType, std::list<uint32_t>& tokens) const;
|
||||
void cancelActiveRequestTokens(const uint32_t& userType);
|
||||
|
||||
protected:
|
||||
void doPoll(float dt);
|
||||
|
Loading…
Reference in New Issue
Block a user