diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-10 17:28:19 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-10 17:28:19 -0800 |
commit | 04eaf3f34fbc0b2ba7f6dd22600e8df1aaa63ed8 (patch) | |
tree | 63ec15263fc5cd3a8bc9426c40e4ddb27cd689fc /indra/newview/llmediadataclient.cpp | |
parent | 88b937d65c66a99c79b7041e5792ea94aa039d50 (diff) | |
parent | 353ac3969efc5bda81b34f4edb3756dd6ced0412 (diff) |
Automated merge with ssh://rick@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llmediadataclient.cpp')
-rwxr-xr-x | indra/newview/llmediadataclient.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 512104a2f4..986c14acff 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -324,6 +324,22 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::PriorityQueue return s; } +// find the given object in the queue. +bool LLMediaDataClient::PriorityQueue::find(const LLMediaDataClientObject::ptr_t &obj) const +{ + std::vector<LLMediaDataClient::request_ptr_t>::const_iterator iter = c.begin(); + std::vector<LLMediaDataClient::request_ptr_t>::const_iterator end = c.end(); + while (iter < end) + { + if (obj->getID() == (*iter)->getObject()->getID()) + { + return true; + } + iter++; + } + return false; +} + ////////////////////////////////////////////////////////////////////////////////////// // // LLMediaDataClient::QueueTimer @@ -491,6 +507,11 @@ bool LLMediaDataClient::isEmpty() const return (NULL == pRequestQueue) ? true : pRequestQueue->empty(); } +bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object) const +{ + return (NULL == pRequestQueue) ? false : pRequestQueue->find(object); +} + ////////////////////////////////////////////////////////////////////////////////////// // // LLObjectMediaDataClient |