aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/rlvevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/rlvevent.h')
-rw-r--r--linden/indra/newview/rlvevent.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/linden/indra/newview/rlvevent.h b/linden/indra/newview/rlvevent.h
index c3d9c45..a98996f 100644
--- a/linden/indra/newview/rlvevent.h
+++ b/linden/indra/newview/rlvevent.h
@@ -10,11 +10,8 @@
10#include "rlvhelper.h" 10#include "rlvhelper.h"
11 11
12// ============================================================================ 12// ============================================================================
13/* 13// RlvEvent - Passed to observer event handlers (contains the same paramaters as RlvHandler::processXXXCommand)
14 * RlvEvent 14//
15 * ========
16 * Passed to observer event handlers (contains the same paramaters as RlvHandler::processXXXCommand)
17 */
18 15
19class RlvEvent 16class RlvEvent
20{ 17{
@@ -63,6 +60,7 @@ public:
63 60
64 virtual BOOL onAddCommand(const EventType& rlvEvent) { return FALSE; } 61 virtual BOOL onAddCommand(const EventType& rlvEvent) { return FALSE; }
65 virtual BOOL onRemoveCommand(const EventType& rlvEvent) { return FALSE; } 62 virtual BOOL onRemoveCommand(const EventType& rlvEvent) { return FALSE; }
63 virtual BOOL onClearCommand(const EventType& rlvEvent) { return FALSE; }
66 virtual BOOL onReplyCommand(const EventType& rlvEvent) { return FALSE; } 64 virtual BOOL onReplyCommand(const EventType& rlvEvent) { return FALSE; }
67 virtual BOOL onForceCommand(const EventType& rlvEvent) { return FALSE; } 65 virtual BOOL onForceCommand(const EventType& rlvEvent) { return FALSE; }
68}; 66};
@@ -168,11 +166,16 @@ public:
168 166
169 void changed(const RlvCommand& rlvCmd, bool fInternal) 167 void changed(const RlvCommand& rlvCmd, bool fInternal)
170 { 168 {
171 if ( (fInternal) || ((RLV_TYPE_ADD != rlvCmd.getParamType()) && (RLV_TYPE_REMOVE != rlvCmd.getParamType())) ) 169 if (fInternal)
172 return; 170 return;
173 171
174 std::string strCmd = rlvCmd.asString(); 172 std::string strCmd = rlvCmd.asString(), strNotify; ERlvParamType eCmdType = rlvCmd.getParamType();
175 std::string strNotify = llformat("/%s=%c", strCmd.c_str(), (RLV_TYPE_ADD == rlvCmd.getParamType()) ? 'n' : 'y'); 173 if ( (RLV_TYPE_ADD == eCmdType) || (RLV_TYPE_REMOVE == eCmdType) )
174 strNotify = llformat("/%s=%s", strCmd.c_str(), rlvCmd.getParam().c_str());
175 else if (RLV_TYPE_CLEAR == eCmdType)
176 strNotify = llformat("/%s", strCmd.c_str());
177 else
178 return;
176 179
177 for (std::multimap<LLUUID, notifyData>::const_iterator itNotify = m_Notifications.begin(); 180 for (std::multimap<LLUUID, notifyData>::const_iterator itNotify = m_Notifications.begin();
178 itNotify != m_Notifications.end(); ++itNotify) 181 itNotify != m_Notifications.end(); ++itNotify)