aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llcommandhandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llcommandhandler.h')
-rw-r--r--linden/indra/newview/llcommandhandler.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/linden/indra/newview/llcommandhandler.h b/linden/indra/newview/llcommandhandler.h
index 9fdee93..8bad6b4 100644
--- a/linden/indra/newview/llcommandhandler.h
+++ b/linden/indra/newview/llcommandhandler.h
@@ -14,12 +14,12 @@
14 * ("GPL"), unless you have obtained a separate licensing agreement 14 * ("GPL"), unless you have obtained a separate licensing agreement
15 * ("Other License"), formally executed by you and Linden Lab. Terms of 15 * ("Other License"), formally executed by you and Linden Lab. Terms of
16 * the GPL can be found in doc/GPL-license.txt in this distribution, or 16 * the GPL can be found in doc/GPL-license.txt in this distribution, or
17 * online at http://secondlife.com/developers/opensource/gplv2 17 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
18 * 18 *
19 * There are special exceptions to the terms and conditions of the GPL as 19 * There are special exceptions to the terms and conditions of the GPL as
20 * it is applied to this Source Code. View the full text of the exception 20 * it is applied to this Source Code. View the full text of the exception
21 * in the file doc/FLOSS-exception.txt in this software distribution, or 21 * in the file doc/FLOSS-exception.txt in this software distribution, or
22 * online at http://secondlife.com/developers/opensource/flossexception 22 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 * 23 *
24 * By copying, modifying or distributing this software, you acknowledge 24 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above, 25 * that you have read and understood your obligations described above,
@@ -40,8 +40,9 @@ class LLFooHandler : public LLCommandHandler
40{ 40{
41public: 41public:
42 // Inform the system you handle commands starting 42 // Inform the system you handle commands starting
43 // with "foo" 43 // with "foo" and they are not allowed from external web
44 LLFooHandler() : LLCommandHandler("foo") { } 44 // browser links.
45 LLFooHandler() : LLCommandHandler("foo", false) { }
45 46
46 // Your code here 47 // Your code here
47 bool handle(const LLSD& tokens, const LLSD& queryMap) 48 bool handle(const LLSD& tokens, const LLSD& queryMap)
@@ -59,9 +60,11 @@ LLFooHandler gFooHandler;
59class LLCommandHandler 60class LLCommandHandler
60{ 61{
61public: 62public:
62 LLCommandHandler(const char* command); 63 LLCommandHandler(const char* command, bool allow_from_external_browser);
63 // Automatically registers object to get called when 64 // Automatically registers object to get called when
64 // command is executed. 65 // command is executed. All commands can be processed
66 // in links from LLWebBrowserCtrl, but some (like teleport)
67 // should not be allowed from outside the app.
65 68
66 virtual ~LLCommandHandler(); 69 virtual ~LLCommandHandler();
67 70
@@ -78,6 +81,7 @@ class LLCommandDispatcher
78{ 81{
79public: 82public:
80 static bool dispatch(const std::string& cmd, 83 static bool dispatch(const std::string& cmd,
84 bool from_external_browser,
81 const LLSD& params, 85 const LLSD& params,
82 const LLSD& queryMap); 86 const LLSD& queryMap);
83 // Execute a command registered via the above mechanism, 87 // Execute a command registered via the above mechanism,