mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -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(): ";
|
||||
|
@ -99,8 +99,9 @@ public:
|
||||
bool checkForRequest(uint32_t token);
|
||||
void loadRequest(const TokenRequest &req);
|
||||
|
||||
bool activeRequestExist(const uint32_t& userType) const;
|
||||
void activeRequestTokens(const uint32_t& userType, std::list<uint32_t>& tokens) const;
|
||||
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