summaryrefslogtreecommitdiff
path: root/indra/newview/llcallfloater.h
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-12-22 14:45:49 +0200
committerMike Antipov <mantipov@productengine.com>2009-12-22 14:45:49 +0200
commitc6e24e53a1041ab12b74469e335281f416af5b75 (patch)
tree7ea8834a608f1e47a79f001c800839d6a2a04d12 /indra/newview/llcallfloater.h
parent34b684c49e3e25002b34cf20466a5aeed3ee1f82 (diff)
Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls)
-- implemented removing of participant who has left voice chat from the list (after hardcoded 10 seconds) -- added struct params to be set from the xml --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llcallfloater.h')
-rw-r--r--indra/newview/llcallfloater.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 1e64066647..537c57f671 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -57,6 +57,15 @@ class LLSpeakerMgr;
class LLCallFloater : public LLDockableFloater, LLVoiceClientParticipantObserver
{
public:
+ struct Params : public LLInitParam::Block<Params, LLDockableFloater::Params>
+ {
+ Optional<S32> voice_left_remove_delay;
+
+ Params();
+ };
+
+ LOG_CLASS(LLCallFloater);
+
LLCallFloater(const LLSD& key);
~LLCallFloater();
@@ -151,6 +160,34 @@ private:
return mSpeakerStateMap[speaker_id];
}
+
+ /**
+ * Instantiates new LLAvatarListItemRemoveTimer and adds it into the map if it is not already created.
+ *
+ * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list when timer expires.
+ */
+ void setVoiceRemoveTimer(const LLUUID& voice_speaker_id);
+
+ /**
+ * Removes specified by UUID Avatar List item.
+ *
+ * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list.
+ */
+ void removeVoiceLeftParticipant(const LLUUID& voice_speaker_id);
+
+ /**
+ * Deletes all timers from the list to prevent started timers from ticking after destruction
+ * and after switching on another voice channel.
+ */
+ void resetVoiceRemoveTimers();
+
+ /**
+ * Removes specified by UUID timer from the map.
+ *
+ * @param voice_speaker_id LLUUID of Avatar List item whose timer should be removed from the map.
+ */
+ void removeVoiceRemoveTimer(const LLUUID& voice_speaker_id);
+
private:
speaker_state_map_t mSpeakerStateMap;
LLSpeakerMgr* mSpeakerManager;
@@ -175,6 +212,32 @@ private:
boost::signals2::connection mAvatarListRefreshConnection;
+ /**
+ * class LLAvatarListItemRemoveTimer
+ *
+ * Implements a timer that removes avatar list item of a participant
+ * who has left the call.
+ */
+ class LLAvatarListItemRemoveTimer : public LLEventTimer
+ {
+ public:
+ typedef boost::function<void(const LLUUID&)> callback_t;
+
+ LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id);
+ virtual ~LLAvatarListItemRemoveTimer() {};
+
+ virtual BOOL tick();
+
+ private:
+ callback_t mRemoveCallback;
+ LLUUID mSpeakerId;
+ };
+
+ typedef std::pair<LLUUID, LLAvatarListItemRemoveTimer*> timer_pair;
+ typedef std::map<LLUUID, LLAvatarListItemRemoveTimer*> timers_map;
+
+ timers_map mVoiceLeftTimersMap;
+ S32 mVoiceLeftRemoveDelay;
};