diff options
author | Jacek Antonelli | 2008-08-15 23:45:27 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:27 -0500 |
commit | a8a62201ba762e98dff92cf49033e577fc34d8d4 (patch) | |
tree | 11f8513c5cdc222f2fac0c93eb724c089803c200 /linden/indra/newview/llfloateractivespeakers.h | |
parent | Second Life viewer sources 1.18.6.4-RC (diff) | |
download | meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.zip meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.gz meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.bz2 meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.xz |
Second Life viewer sources 1.19.0.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloateractivespeakers.h | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/linden/indra/newview/llfloateractivespeakers.h b/linden/indra/newview/llfloateractivespeakers.h index b8d39ca..cded35d 100644 --- a/linden/indra/newview/llfloateractivespeakers.h +++ b/linden/indra/newview/llfloateractivespeakers.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -36,6 +36,7 @@ | |||
36 | #include "llmemory.h" | 36 | #include "llmemory.h" |
37 | #include "llvoiceclient.h" | 37 | #include "llvoiceclient.h" |
38 | #include "llframetimer.h" | 38 | #include "llframetimer.h" |
39 | #include "llevent.h" | ||
39 | 40 | ||
40 | class LLScrollListCtrl; | 41 | class LLScrollListCtrl; |
41 | class LLButton; | 42 | class LLButton; |
@@ -45,9 +46,8 @@ class LLVoiceChannel; | |||
45 | 46 | ||
46 | 47 | ||
47 | // data for a given participant in a voice channel | 48 | // data for a given participant in a voice channel |
48 | class LLSpeaker : public LLRefCount | 49 | struct LLSpeaker : public LLRefCount, public LLObservable |
49 | { | 50 | { |
50 | public: | ||
51 | typedef enum e_speaker_type | 51 | typedef enum e_speaker_type |
52 | { | 52 | { |
53 | SPEAKER_AGENT, | 53 | SPEAKER_AGENT, |
@@ -72,8 +72,6 @@ public: | |||
72 | 72 | ||
73 | static void onAvatarNameLookup(const LLUUID& id, const char* first, const char* last, BOOL is_group, void* user_data); | 73 | static void onAvatarNameLookup(const LLUUID& id, const char* first, const char* last, BOOL is_group, void* user_data); |
74 | 74 | ||
75 | public: | ||
76 | |||
77 | ESpeakerStatus mStatus; // current activity status in speech group | 75 | ESpeakerStatus mStatus; // current activity status in speech group |
78 | F32 mLastSpokeTime; // timestamp when this speaker last spoke | 76 | F32 mLastSpokeTime; // timestamp when this speaker last spoke |
79 | F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) | 77 | F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) |
@@ -86,11 +84,28 @@ public: | |||
86 | S32 mSortIndex; | 84 | S32 mSortIndex; |
87 | LLViewHandle mHandle; | 85 | LLViewHandle mHandle; |
88 | ESpeakerType mType; | 86 | ESpeakerType mType; |
87 | BOOL mIsModerator; | ||
88 | BOOL mModeratorMutedVoice; | ||
89 | BOOL mModeratorMutedText; | ||
89 | 90 | ||
90 | typedef std::map<LLViewHandle, LLSpeaker*> speaker_map_t; | 91 | typedef std::map<LLViewHandle, LLSpeaker*> speaker_map_t; |
91 | static speaker_map_t sSpeakers; | 92 | static speaker_map_t sSpeakers; |
92 | }; | 93 | }; |
93 | 94 | ||
95 | class LLSpeakerTextModerationEvent : public LLEvent | ||
96 | { | ||
97 | public: | ||
98 | LLSpeakerTextModerationEvent(LLSpeaker* source); | ||
99 | /*virtual*/ LLSD getValue(); | ||
100 | }; | ||
101 | |||
102 | class LLSpeakerVoiceModerationEvent : public LLEvent | ||
103 | { | ||
104 | public: | ||
105 | LLSpeakerVoiceModerationEvent(LLSpeaker* source); | ||
106 | /*virtual*/ LLSD getValue(); | ||
107 | }; | ||
108 | |||
94 | class LLSpeakerMgr | 109 | class LLSpeakerMgr |
95 | { | 110 | { |
96 | public: | 111 | public: |
@@ -110,6 +125,7 @@ public: | |||
110 | 125 | ||
111 | typedef std::vector<LLPointer<LLSpeaker> > speaker_list_t; | 126 | typedef std::vector<LLPointer<LLSpeaker> > speaker_list_t; |
112 | void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text); | 127 | void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text); |
128 | const LLUUID getSessionID(); | ||
113 | 129 | ||
114 | protected: | 130 | protected: |
115 | virtual void updateSpeakerList(); | 131 | virtual void updateSpeakerList(); |
@@ -127,9 +143,8 @@ class LLIMSpeakerMgr : public LLSpeakerMgr | |||
127 | public: | 143 | public: |
128 | LLIMSpeakerMgr(LLVoiceChannel* channel); | 144 | LLIMSpeakerMgr(LLVoiceChannel* channel); |
129 | 145 | ||
130 | void processSpeakerListUpdate(LLSD update); | 146 | void updateSpeakers(const LLSD& update); |
131 | void processSpeakerList(LLSD list); | 147 | void setSpeakers(const LLSD& speakers); |
132 | void processSpeakerMap(LLSD list); | ||
133 | protected: | 148 | protected: |
134 | virtual void updateSpeakerList(); | 149 | virtual void updateSpeakerList(); |
135 | }; | 150 | }; |
@@ -185,19 +200,38 @@ public: | |||
185 | 200 | ||
186 | /*virtual*/ BOOL postBuild(); | 201 | /*virtual*/ BOOL postBuild(); |
187 | 202 | ||
203 | void handleSpeakerSelect(); | ||
188 | void refreshSpeakers(); | 204 | void refreshSpeakers(); |
189 | 205 | ||
190 | void setSpeaker(const LLUUID& id, | 206 | void setSpeaker(const LLUUID& id, |
191 | const LLString& name = LLString::null, | 207 | const LLString& name = LLString::null, |
192 | LLSpeaker::ESpeakerStatus status = LLSpeaker::STATUS_TEXT_ONLY, | 208 | LLSpeaker::ESpeakerStatus status = LLSpeaker::STATUS_TEXT_ONLY, |
193 | LLSpeaker::ESpeakerType = LLSpeaker::SPEAKER_AGENT); | 209 | LLSpeaker::ESpeakerType = LLSpeaker::SPEAKER_AGENT); |
210 | |||
211 | void setVoiceModerationCtrlMode(const BOOL& moderated_voice); | ||
194 | 212 | ||
195 | static void onClickMuteVoice(void* user_data); | 213 | static void onClickMuteVoice(void* user_data); |
196 | static void onClickMuteVoiceCommit(LLUICtrl* ctrl, void* user_data); | 214 | static void onClickMuteVoiceCommit(LLUICtrl* ctrl, void* user_data); |
197 | static void onClickMuteTextCommit(LLUICtrl* ctrl, void* user_data); | 215 | static void onClickMuteTextCommit(LLUICtrl* ctrl, void* user_data); |
198 | static void onVolumeChange(LLUICtrl* source, void* user_data); | 216 | static void onVolumeChange(LLUICtrl* source, void* user_data); |
199 | static void onClickProfile(void* user_data); | 217 | static void onClickProfile(void* user_data); |
218 | static void onDoubleClickSpeaker(void* user_data); | ||
219 | static void onSelectSpeaker(LLUICtrl* source, void* user_data); | ||
220 | static void onModeratorMuteVoice(LLUICtrl* ctrl, void* user_data); | ||
221 | static void onModeratorMuteText(LLUICtrl* ctrl, void* user_data); | ||
222 | static void onChangeModerationMode(LLUICtrl* ctrl, void* user_data); | ||
223 | |||
200 | protected: | 224 | protected: |
225 | class LLSpeakerListener : public LLSimpleListener | ||
226 | { | ||
227 | public: | ||
228 | LLSpeakerListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {} | ||
229 | |||
230 | /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); | ||
231 | |||
232 | LLPanelActiveSpeakers* mPanel; | ||
233 | }; | ||
234 | |||
201 | LLScrollListCtrl* mSpeakerList; | 235 | LLScrollListCtrl* mSpeakerList; |
202 | LLUICtrl* mMuteVoiceCtrl; | 236 | LLUICtrl* mMuteVoiceCtrl; |
203 | LLUICtrl* mMuteTextCtrl; | 237 | LLUICtrl* mMuteTextCtrl; |
@@ -206,6 +240,7 @@ protected: | |||
206 | BOOL mShowTextChatters; | 240 | BOOL mShowTextChatters; |
207 | LLSpeakerMgr* mSpeakerMgr; | 241 | LLSpeakerMgr* mSpeakerMgr; |
208 | LLFrameTimer mIconAnimationTimer; | 242 | LLFrameTimer mIconAnimationTimer; |
243 | LLPointer<LLSpeakerListener> mSpeakerListener; | ||
209 | }; | 244 | }; |
210 | 245 | ||
211 | extern LLLocalSpeakerMgr* gLocalSpeakerMgr; | 246 | extern LLLocalSpeakerMgr* gLocalSpeakerMgr; |