diff options
author | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
commit | b235c59d60472f818a9142c0886b95a0ff4191d7 (patch) | |
tree | d323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/newview/llcommandhandler.cpp | |
parent | Second Life viewer sources 1.18.5.3 (diff) | |
download | meta-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.cpp | 11 |
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 | |||
46 | public: | 46 | public: |
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 | ||
51 | private: | 51 | private: |
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 | ||
70 | bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, | 70 | bool 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 |
100 | bool LLCommandDispatcher::dispatch(const std::string& cmd, const std::vector<std::string>& params) | 101 | bool 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 | } |