diff options
Diffstat (limited to 'indra/newview/llparticipantlist.h')
-rw-r--r-- | indra/newview/llparticipantlist.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index c4eb180917..70badbc40d 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -33,7 +33,6 @@ #include "llviewerprecompiledheaders.h" #include "llevent.h" #include "llpanelpeoplemenus.h" -#include "llimview.h" #include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator class LLSpeakerMgr; @@ -44,6 +43,9 @@ class LLParticipantList { LOG_CLASS(LLParticipantList); public: + + typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t; + LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true); ~LLParticipantList(); void setSpeakingIndicatorsVisible(BOOL visible); @@ -54,6 +56,13 @@ class LLParticipantList } EParticipantSortOrder; /** + * Adds specified avatar ID to the existing list if it is not Agent's ID + * + * @param[in] avatar_id - Avatar UUID to be added into the list + */ + void addAvatarIDExceptAgent(const LLUUID& avatar_id); + + /** * Set and sort Avatarlist by given order */ void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); @@ -64,6 +73,15 @@ class LLParticipantList */ void updateRecentSpeakersOrder(); + /** + * Set a callback to be called before adding a speaker. Invalid speakers will not be added. + * + * If the callback is unset all speakers are considered as valid. + * + * @see onAddItemEvent() + */ + void setValidateSpeakerCallback(validate_speaker_callback_t cb); + protected: /** * LLSpeakerMgr event handlers @@ -218,14 +236,6 @@ class LLParticipantList void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); /** - * 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. @@ -260,4 +270,5 @@ class LLParticipantList boost::signals2::connection mAvatarListReturnConnection; LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers; + validate_speaker_callback_t mValidateSpeakerCallback; }; |