summaryrefslogtreecommitdiff
path: root/indra/newview/llparticipantlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llparticipantlist.h')
-rw-r--r--indra/newview/llparticipantlist.h80
1 files changed, 76 insertions, 4 deletions
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 83191a5b8d..bc6c6c2b50 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -52,10 +52,16 @@ class LLParticipantList
} EParticipantSortOrder;
/**
- * Set and sort Avatarlist by given order
- */
+ * Set and sort Avatarlist by given order
+ */
void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME);
+ /**
+ * Refreshes participants to display ones not in voice as disabled.
+ * TODO: mantipov: probably should be moved into derived class for LLFloaterCall
+ */
+ void refreshVoiceState();
+
protected:
/**
* LLSpeakerMgr event handlers
@@ -64,6 +70,7 @@ class LLParticipantList
bool onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
bool onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
bool onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ bool onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
/**
* Sorts the Avatarlist by stored order
@@ -109,6 +116,14 @@ class LLParticipantList
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
+ class SpeakerMuteListener : public BaseSpeakerListner
+ {
+ public:
+ SpeakerMuteListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ };
+
/**
* Menu used in the participant list.
*/
@@ -129,9 +144,55 @@ class LLParticipantList
void toggleMuteText(const LLSD& userdata);
void toggleMuteVoice(const LLSD& userdata);
+ /**
+ * Return true if Agent is group moderator(and moderator of group call).
+ */
+ bool isGroupModerator();
+
// Voice moderation support
+ /**
+ * Check whether specified by argument avatar is muted for group chat or not.
+ */
+ bool isMuted(const LLUUID& avatar_id);
+
+ /**
+ * Processes Voice moderation menu items.
+ *
+ * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on
+ * passed parameter.
+ *
+ * @param userdata can be "selected" or "others".
+ *
+ * @see moderateVoiceParticipant()
+ * @see moderateVoiceOtherParticipants()
+ */
void moderateVoice(const LLSD& userdata);
- void moderateVoiceOtherParticipants(const LLSD& userdata);
+
+ /**
+ * Mutes/Unmutes avatar for current group voice chat.
+ *
+ * It only marks avatar as muted for session and does not use local Agent's Block list.
+ * It does not mute Agent itself.
+ *
+ * @param[in] avatar_id UUID of avatar to be processed
+ * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted.
+ *
+ * @see moderateVoiceOtherParticipants()
+ */
+ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
+
+ /**
+ * Mutes/Unmutes all avatars except specified for current group voice chat.
+ *
+ * It only marks avatars as muted for session and does not use local Agent's Block list.
+ * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted.
+ *
+ * @param[in] excluded_avatar_id UUID of avatar NOT to be processed
+ * @param[in] unmute if true - avatars will be muted, otherwise - unmuted.
+ *
+ * @see moderateVoiceParticipant()
+ */
+ void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute);
};
private:
@@ -140,8 +201,18 @@ class LLParticipantList
/**
* Adds specified avatar ID to the existing list if it is not Agent's ID
+ *
+ * @param[in, out] existing_list - vector with avatars' UUIDs already in the list
+ * @param[in] avatar_id - Avatar UUID to be added into the list
+ */
+ void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id);
+
+ /**
+ * Adjusts passed participant to work properly.
+ *
+ * Adds SpeakerMuteListener to process moderation actions.
*/
- static void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id);
+ void adjustParticipant(const LLUUID& speaker_id);
LLSpeakerMgr* mSpeakerMgr;
LLAvatarList* mAvatarList;
@@ -153,6 +224,7 @@ class LLParticipantList
LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener;
LLPointer<SpeakerClearListener> mSpeakerClearListener;
LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener;
+ LLPointer<SpeakerMuteListener> mSpeakerMuteListener;
LLParticipantListMenu* mParticipantListMenu;