summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcachename.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-03-16 20:39:40 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-03-16 20:39:40 +0000
commit5e9e67cb2d1d3dfc82dfe96103270b2341991ddd (patch)
tree2df2a064523b2bffef6ff7566399c76b1f2cc196 /indra/llmessage/llcachename.cpp
parent1ada34fc0c5dc20bffba231ef513b569dbec32ea (diff)
merge -r 59028:59178 maintenance -> release.
Diffstat (limited to 'indra/llmessage/llcachename.cpp')
-rw-r--r--indra/llmessage/llcachename.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 6841dda9a4..339fdda9ef 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -257,6 +257,40 @@ void LLCacheName::addObserver(LLCacheNameCallback callback)
impl.mObservers.push_back(callback);
}
+void LLCacheName::removeObserver(LLCacheNameCallback callback)
+{
+ Observers::iterator it = impl.mObservers.begin();
+ Observers::iterator end = impl.mObservers.end();
+
+ for ( ; it != end; ++it)
+ {
+ const LLCacheNameCallback& cb = (*it);
+ if (cb == callback)
+ {
+ impl.mObservers.erase(it);
+ return;
+ }
+ }
+}
+
+void LLCacheName::cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data)
+{
+ ReplyQueue::iterator it = impl.mReplyQueue.begin();
+ ReplyQueue::iterator end = impl.mReplyQueue.end();
+
+ for(; it != end; ++it)
+ {
+ const PendingReply& reply = (*it);
+
+ if ((callback == reply.mCallback)
+ && (id == reply.mID)
+ && (user_data == reply.mData) )
+ {
+ impl.mReplyQueue.erase(it);
+ return;
+ }
+ }
+}
void LLCacheName::importFile(FILE* fp)
{