summaryrefslogtreecommitdiff
path: root/indra/newview/llparticipantlist.h
diff options
context:
space:
mode:
authorrichard <none@none>2009-10-26 14:28:09 -0700
committerrichard <none@none>2009-10-26 14:28:09 -0700
commitf2a48ed7f9c67ecc15b9174dc08069da25b33380 (patch)
tree265af2b431939a8ff88db532b7de3b3396437c5b /indra/newview/llparticipantlist.h
parent977dd845346cae05eab2249945f083df47552c8f (diff)
parente84ff39e4c7c5b028a6b8b4f6dc5d37c525eb1c4 (diff)
merge
Diffstat (limited to 'indra/newview/llparticipantlist.h')
-rw-r--r--indra/newview/llparticipantlist.h45
1 files changed, 40 insertions, 5 deletions
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 2ec563a356..68aae0aee5 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -1,10 +1,10 @@
/**
* @file llparticipantlist.h
- * @brief LLParticipantList implementing LLSimpleListener listener
+ * @brief LLParticipantList intended to update view(LLAvatarList) according to incoming messages
*
- * $LicenseInfo:firstyear=2005&license=viewergpl$
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
*
- * Copyright (c) 2005-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -36,13 +36,48 @@
class LLSpeakerMgr;
class LLAvatarList;
-class LLParticipantList: public LLOldEvents::LLSimpleListener
+class LLParticipantList
{
public:
LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list);
- /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ ~LLParticipantList();
+ protected:
+
+ //List of listeners implementing LLOldEvents::LLSimpleListener.
+ //There is no way to handle all the events in one listener as LLSpeakerMgr registers listeners in such a way
+ //that one listener can handle only one type of event
+ class SpeakerAddListener : public LLOldEvents::LLSimpleListener
+ {
+ public:
+ SpeakerAddListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ LLAvatarList* mAvatarList;
+ };
+
+ class SpeakerRemoveListener : public LLOldEvents::LLSimpleListener
+ {
+ public:
+ SpeakerRemoveListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ LLAvatarList* mAvatarList;
+ };
+
+ class SpeakerClearListener : public LLOldEvents::LLSimpleListener
+ {
+ public:
+ SpeakerClearListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ LLAvatarList* mAvatarList;
+ };
private:
LLSpeakerMgr* mSpeakerMgr;
LLAvatarList* mAvatarList;
+
+ SpeakerAddListener* mSpeakerAddListener;
+ SpeakerRemoveListener* mSpeakerRemoveListener;
+ SpeakerClearListener* mSpeakerClearListener;
};