diff options
| author | Loren Shih <seraph@lindenlab.com> | 2009-11-11 10:44:39 -0500 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2009-11-11 10:44:39 -0500 |
| commit | 652c8f6b5e91e1333854ac5e300b0bf650d03fc2 (patch) | |
| tree | 4c0375dddbf315baa73c30fe648eb0915f3e3f2a /indra/newview/llmediadataclient.cpp | |
| parent | af9b99b457a6a6ab9f04a20bcde6a90091321375 (diff) | |
| parent | 062d0a13db505636b186084d42c527a49637f380 (diff) | |
merge
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 |
