summaryrefslogtreecommitdiff
path: root/indra/newview/llmediadataclient.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-12 19:29:05 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-12 19:29:05 +0200
commitd149b28173c2b255bd1bf1db902368dfbdf3064a (patch)
treed433c57f07aad0959519f8b88ccd1ed8447af7bf /indra/newview/llmediadataclient.cpp
parent38115eb90b1760025ee299a167f6a9a2311f59ab (diff)
parent3b7ed8a4e9fdff83f89b49760d281ee5c13c8155 (diff)
Merge
--HG-- branch : product-engine
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