aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llcommandhandler.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:19 -0500
committerJacek Antonelli2008-08-15 23:45:19 -0500
commitb235c59d60472f818a9142c0886b95a0ff4191d7 (patch)
treed323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/newview/llcommandhandler.cpp
parentSecond Life viewer sources 1.18.5.3 (diff)
downloadmeta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.zip
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.gz
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.bz2
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.xz
Second Life viewer sources 1.18.6.0-RC
Diffstat (limited to 'linden/indra/newview/llcommandhandler.cpp')
-rw-r--r--linden/indra/newview/llcommandhandler.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/linden/indra/newview/llcommandhandler.cpp b/linden/indra/newview/llcommandhandler.cpp
index fd3aef9..95a30e8 100644
--- a/linden/indra/newview/llcommandhandler.cpp
+++ b/linden/indra/newview/llcommandhandler.cpp
@@ -46,7 +46,7 @@ class LLCommandHandlerRegistry
46public: 46public:
47 static LLCommandHandlerRegistry& instance(); 47 static LLCommandHandlerRegistry& instance();
48 void add(const char* cmd, LLCommandHandler* handler); 48 void add(const char* cmd, LLCommandHandler* handler);
49 bool dispatch(const std::string& cmd, const std::vector<std::string>& params); 49 bool dispatch(const std::string& cmd, const LLSD& params, const LLSD& queryMap);
50 50
51private: 51private:
52 std::map<std::string, LLCommandHandler*> mMap; 52 std::map<std::string, LLCommandHandler*> mMap;
@@ -68,13 +68,14 @@ void LLCommandHandlerRegistry::add(const char* cmd, LLCommandHandler* handler)
68} 68}
69 69
70bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, 70bool LLCommandHandlerRegistry::dispatch(const std::string& cmd,
71 const std::vector<std::string>& params) 71 const LLSD& params,
72 const LLSD& queryMap)
72{ 73{
73 std::map<std::string, LLCommandHandler*>::iterator it = mMap.find(cmd); 74 std::map<std::string, LLCommandHandler*>::iterator it = mMap.find(cmd);
74 if (it == mMap.end()) return false; 75 if (it == mMap.end()) return false;
75 LLCommandHandler* handler = it->second; 76 LLCommandHandler* handler = it->second;
76 if (!handler) return false; 77 if (!handler) return false;
77 return handler->handle(params); 78 return handler->handle(params, queryMap);
78} 79}
79 80
80//--------------------------------------------------------------------------- 81//---------------------------------------------------------------------------
@@ -97,7 +98,7 @@ LLCommandHandler::~LLCommandHandler()
97//--------------------------------------------------------------------------- 98//---------------------------------------------------------------------------
98 99
99// static 100// static
100bool LLCommandDispatcher::dispatch(const std::string& cmd, const std::vector<std::string>& params) 101bool LLCommandDispatcher::dispatch(const std::string& cmd, const LLSD& params, const LLSD& queryMap)
101{ 102{
102 return LLCommandHandlerRegistry::instance().dispatch(cmd, params); 103 return LLCommandHandlerRegistry::instance().dispatch(cmd, params, queryMap);
103} 104}