summaryrefslogtreecommitdiff
path: root/indra/newview/llmediadataclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmediadataclient.cpp')
-rwxr-xr-xindra/newview/llmediadataclient.cpp21
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