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/llimpanel.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 'linden/indra/newview/llimpanel.h')
-rw-r--r-- | linden/indra/newview/llimpanel.h | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/linden/indra/newview/llimpanel.h b/linden/indra/newview/llimpanel.h index 7779344..daa6820 100644 --- a/linden/indra/newview/llimpanel.h +++ b/linden/indra/newview/llimpanel.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, |
@@ -74,14 +74,20 @@ public: | |||
74 | virtual void getChannelInfo(); | 74 | virtual void getChannelInfo(); |
75 | virtual BOOL isActive(); | 75 | virtual BOOL isActive(); |
76 | virtual BOOL callStarted(); | 76 | virtual BOOL callStarted(); |
77 | |||
78 | const LLUUID getSessionID() { return mSessionID; } | ||
77 | EState getState() { return mState; } | 79 | EState getState() { return mState; } |
78 | 80 | ||
79 | void updateSessionID(const LLUUID& new_session_id); | 81 | void updateSessionID(const LLUUID& new_session_id); |
82 | const LLString::format_map_t& getNotifyArgs() { return mNotifyArgs; } | ||
80 | 83 | ||
81 | static LLVoiceChannel* getChannelByID(const LLUUID& session_id); | 84 | static LLVoiceChannel* getChannelByID(const LLUUID& session_id); |
82 | static LLVoiceChannel* getChannelByURI(LLString uri); | 85 | static LLVoiceChannel* getChannelByURI(LLString uri); |
83 | static LLVoiceChannel* getCurrentVoiceChannel() { return sCurrentVoiceChannel; } | 86 | static LLVoiceChannel* getCurrentVoiceChannel() { return sCurrentVoiceChannel; } |
84 | static void initClass(); | 87 | static void initClass(); |
88 | |||
89 | static void suspend(); | ||
90 | static void resume(); | ||
85 | 91 | ||
86 | protected: | 92 | protected: |
87 | virtual void setState(EState state); | 93 | virtual void setState(EState state); |
@@ -103,13 +109,14 @@ protected: | |||
103 | static voice_channel_map_uri_t sVoiceChannelURIMap; | 109 | static voice_channel_map_uri_t sVoiceChannelURIMap; |
104 | 110 | ||
105 | static LLVoiceChannel* sCurrentVoiceChannel; | 111 | static LLVoiceChannel* sCurrentVoiceChannel; |
112 | static LLVoiceChannel* sSuspendedVoiceChannel; | ||
113 | static BOOL sSuspended; | ||
106 | }; | 114 | }; |
107 | 115 | ||
108 | class LLVoiceChannelGroup : public LLVoiceChannel | 116 | class LLVoiceChannelGroup : public LLVoiceChannel |
109 | { | 117 | { |
110 | public: | 118 | public: |
111 | LLVoiceChannelGroup(const LLUUID& session_id, const LLString& session_name); | 119 | LLVoiceChannelGroup(const LLUUID& session_id, const LLString& session_name); |
112 | virtual ~LLVoiceChannelGroup(); | ||
113 | 120 | ||
114 | /*virtual*/ void handleStatusChange(EStatusType status); | 121 | /*virtual*/ void handleStatusChange(EStatusType status); |
115 | /*virtual*/ void handleError(EStatusType status); | 122 | /*virtual*/ void handleError(EStatusType status); |
@@ -132,8 +139,7 @@ class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton<LLVoice | |||
132 | { | 139 | { |
133 | public: | 140 | public: |
134 | LLVoiceChannelProximal(); | 141 | LLVoiceChannelProximal(); |
135 | virtual ~LLVoiceChannelProximal(); | 142 | |
136 | |||
137 | /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); | 143 | /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); |
138 | /*virtual*/ void handleStatusChange(EStatusType status); | 144 | /*virtual*/ void handleStatusChange(EStatusType status); |
139 | /*virtual*/ void handleError(EStatusType status); | 145 | /*virtual*/ void handleError(EStatusType status); |
@@ -147,7 +153,6 @@ class LLVoiceChannelP2P : public LLVoiceChannelGroup | |||
147 | { | 153 | { |
148 | public: | 154 | public: |
149 | LLVoiceChannelP2P(const LLUUID& session_id, const LLString& session_name, const LLUUID& other_user_id); | 155 | LLVoiceChannelP2P(const LLUUID& session_id, const LLString& session_name, const LLUUID& other_user_id); |
150 | virtual ~LLVoiceChannelP2P(); | ||
151 | 156 | ||
152 | /*virtual*/ void handleStatusChange(EStatusType status); | 157 | /*virtual*/ void handleStatusChange(EStatusType status); |
153 | /*virtual*/ void handleError(EStatusType status); | 158 | /*virtual*/ void handleError(EStatusType status); |
@@ -156,9 +161,13 @@ public: | |||
156 | 161 | ||
157 | void setSessionHandle(const LLString& handle); | 162 | void setSessionHandle(const LLString& handle); |
158 | 163 | ||
164 | protected: | ||
165 | virtual void setState(EState state); | ||
166 | |||
159 | private: | 167 | private: |
160 | LLString mSessionHandle; | 168 | LLString mSessionHandle; |
161 | LLUUID mOtherUserID; | 169 | LLUUID mOtherUserID; |
170 | BOOL mReceivedCall; | ||
162 | }; | 171 | }; |
163 | 172 | ||
164 | class LLFloaterIMPanel : public LLFloater | 173 | class LLFloaterIMPanel : public LLFloater |
@@ -170,15 +179,11 @@ public: | |||
170 | // the default. For example, if you open a session though a | 179 | // the default. For example, if you open a session though a |
171 | // calling card, a new session id will be generated, but the | 180 | // calling card, a new session id will be generated, but the |
172 | // target_id will be the agent referenced by the calling card. | 181 | // target_id will be the agent referenced by the calling card. |
173 | LLFloaterIMPanel(const std::string& name, | 182 | LLFloaterIMPanel(const std::string& session_label, |
174 | const LLRect& rect, | ||
175 | const std::string& session_label, | ||
176 | const LLUUID& session_id, | 183 | const LLUUID& session_id, |
177 | const LLUUID& target_id, | 184 | const LLUUID& target_id, |
178 | EInstantMessage dialog); | 185 | EInstantMessage dialog); |
179 | LLFloaterIMPanel(const std::string& name, | 186 | LLFloaterIMPanel(const std::string& session_label, |
180 | const LLRect& rect, | ||
181 | const std::string& session_label, | ||
182 | const LLUUID& session_id, | 187 | const LLUUID& session_id, |
183 | const LLUUID& target_id, | 188 | const LLUUID& target_id, |
184 | const LLDynamicArray<LLUUID>& ids, | 189 | const LLDynamicArray<LLUUID>& ids, |
@@ -189,8 +194,8 @@ public: | |||
189 | 194 | ||
190 | // Check typing timeout timer. | 195 | // Check typing timeout timer. |
191 | /*virtual*/ void draw(); | 196 | /*virtual*/ void draw(); |
192 | |||
193 | /*virtual*/ void onClose(bool app_quitting = FALSE); | 197 | /*virtual*/ void onClose(bool app_quitting = FALSE); |
198 | /*virtual*/ void onVisibilityChange(BOOL new_visibility); | ||
194 | 199 | ||
195 | // add target ids to the session. | 200 | // add target ids to the session. |
196 | // Return TRUE if successful, otherwise FALSE. | 201 | // Return TRUE if successful, otherwise FALSE. |
@@ -209,14 +214,16 @@ public: | |||
209 | void selectNone(); | 214 | void selectNone(); |
210 | void setVisible(BOOL b); | 215 | void setVisible(BOOL b); |
211 | 216 | ||
217 | S32 getNumUnreadMessages() { return mNumUnreadMessages; } | ||
218 | |||
212 | BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); | 219 | BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); |
213 | BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, | 220 | BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, |
214 | BOOL drop, EDragAndDropType cargo_type, | 221 | BOOL drop, EDragAndDropType cargo_type, |
215 | void *cargo_data, EAcceptance *accept, | 222 | void *cargo_data, EAcceptance *accept, |
216 | LLString& tooltip_msg); | 223 | LLString& tooltip_msg); |
217 | 224 | ||
218 | static void onInputEditorFocusReceived( LLUICtrl* caller, void* userdata ); | 225 | static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ); |
219 | static void onInputEditorFocusLost(LLUICtrl* caller, void* userdata); | 226 | static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); |
220 | static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); | 227 | static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); |
221 | static void onCommitChat(LLUICtrl* caller, void* userdata); | 228 | static void onCommitChat(LLUICtrl* caller, void* userdata); |
222 | static void onTabClick( void* userdata ); | 229 | static void onTabClick( void* userdata ); |
@@ -229,16 +236,17 @@ public: | |||
229 | static void onClickSend( void* userdata ); | 236 | static void onClickSend( void* userdata ); |
230 | static void onClickToggleActiveSpeakers( void* userdata ); | 237 | static void onClickToggleActiveSpeakers( void* userdata ); |
231 | static void* createSpeakersPanel(void* data); | 238 | static void* createSpeakersPanel(void* data); |
239 | static void onKickSpeaker(void* user_data); | ||
232 | 240 | ||
233 | //callbacks for P2P muting and volume control | 241 | //callbacks for P2P muting and volume control |
234 | static void onClickMuteVoice(LLUICtrl* source, void* user_data); | 242 | static void onClickMuteVoice(void* user_data); |
235 | static void onVolumeChange(LLUICtrl* source, void* user_data); | 243 | static void onVolumeChange(LLUICtrl* source, void* user_data); |
236 | 244 | ||
237 | const LLUUID& getSessionID() const { return mSessionUUID; } | 245 | const LLUUID& getSessionID() const { return mSessionUUID; } |
238 | const LLUUID& getOtherParticipantID() const { return mOtherParticipantUUID; } | 246 | const LLUUID& getOtherParticipantID() const { return mOtherParticipantUUID; } |
239 | void updateSpeakersList(LLSD speaker_updates); | 247 | void updateSpeakersList(const LLSD& speaker_updates); |
240 | void setSpeakersListFromMap(LLSD speaker_list); | 248 | void processSessionUpdate(const LLSD& update); |
241 | void setSpeakersList(LLSD speaker_list); | 249 | void setSpeakers(const LLSD& speaker_list); |
242 | LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; } | 250 | LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; } |
243 | EInstantMessage getDialogType() const { return mDialog; } | 251 | EInstantMessage getDialogType() const { return mDialog; } |
244 | 252 | ||
@@ -250,6 +258,15 @@ public: | |||
250 | void processIMTyping(const LLIMInfo* im_info, BOOL typing); | 258 | void processIMTyping(const LLIMInfo* im_info, BOOL typing); |
251 | static void chatFromLogFile(LLString line, void* userdata); | 259 | static void chatFromLogFile(LLString line, void* userdata); |
252 | 260 | ||
261 | //show error statuses to the user | ||
262 | void showSessionStartError(const std::string& error_string); | ||
263 | void showSessionEventError( | ||
264 | const std::string& event_string, | ||
265 | const std::string& error_string); | ||
266 | void showSessionForceClose(const std::string& reason); | ||
267 | |||
268 | static void onConfirmForceCloseError(S32 option, void* data); | ||
269 | |||
253 | private: | 270 | private: |
254 | // called by constructors | 271 | // called by constructors |
255 | void init(const LLString& session_label); | 272 | void init(const LLString& session_label); |
@@ -289,6 +306,7 @@ private: | |||
289 | // 911 ==> Gaurdian_Angel_Group_ID ^ gAgent.getID() | 306 | // 911 ==> Gaurdian_Angel_Group_ID ^ gAgent.getID() |
290 | LLUUID mSessionUUID; | 307 | LLUUID mSessionUUID; |
291 | 308 | ||
309 | LLString mSessionLabel; | ||
292 | LLVoiceChannel* mVoiceChannel; | 310 | LLVoiceChannel* mVoiceChannel; |
293 | 311 | ||
294 | BOOL mSessionInitialized; | 312 | BOOL mSessionInitialized; |
@@ -318,6 +336,8 @@ private: | |||
318 | // Where does the "Starting session..." line start? | 336 | // Where does the "Starting session..." line start? |
319 | S32 mSessionStartMsgPos; | 337 | S32 mSessionStartMsgPos; |
320 | 338 | ||
339 | S32 mNumUnreadMessages; | ||
340 | |||
321 | BOOL mSentTypingState; | 341 | BOOL mSentTypingState; |
322 | 342 | ||
323 | BOOL mShowSpeakersOnConnect; | 343 | BOOL mShowSpeakersOnConnect; |