diff options
Diffstat (limited to 'linden/indra/newview/llurldispatcher.cpp')
-rw-r--r-- | linden/indra/newview/llurldispatcher.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/linden/indra/newview/llurldispatcher.cpp b/linden/indra/newview/llurldispatcher.cpp index 1144c58..460ffb2 100644 --- a/linden/indra/newview/llurldispatcher.cpp +++ b/linden/indra/newview/llurldispatcher.cpp | |||
@@ -55,6 +55,11 @@ const std::string SLURL_SECONDLIFE_PREFIX = "secondlife://"; | |||
55 | const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/"; | 55 | const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/"; |
56 | const std::string SLURL_SLURL_ALT_PREFIX = "http://maps.secondlife.com/secondlife/"; | 56 | const std::string SLURL_SLURL_ALT_PREFIX = "http://maps.secondlife.com/secondlife/"; |
57 | 57 | ||
58 | const std::string IZURL_IZ_HELP_PREFIX = "inworldz://app."; | ||
59 | const std::string IZURL_IZ_PREFIX = "iz://"; | ||
60 | const std::string IZURL_INWORLDZ_PREFIX = "inworldz://"; | ||
61 | const std::string IZURL_IZURL_PREFIX = "http://places.inworldz.com/"; | ||
62 | |||
58 | const std::string SLURL_APP_TOKEN = "app/"; | 63 | const std::string SLURL_APP_TOKEN = "app/"; |
59 | 64 | ||
60 | class LLURLDispatcherImpl | 65 | class LLURLDispatcherImpl |
@@ -119,6 +124,10 @@ bool LLURLDispatcherImpl::isSLURL(const std::string& url) | |||
119 | if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true; | 124 | if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true; |
120 | if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true; | 125 | if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true; |
121 | if (matchPrefix(url, SLURL_SLURL_ALT_PREFIX)) return true; | 126 | if (matchPrefix(url, SLURL_SLURL_ALT_PREFIX)) return true; |
127 | if (matchPrefix(url, IZURL_IZ_HELP_PREFIX)) return true; | ||
128 | if (matchPrefix(url, IZURL_IZ_PREFIX)) return true; | ||
129 | if (matchPrefix(url, IZURL_INWORLDZ_PREFIX)) return true; | ||
130 | if (matchPrefix(url, IZURL_IZURL_PREFIX)) return true; | ||
122 | return false; | 131 | return false; |
123 | } | 132 | } |
124 | 133 | ||
@@ -128,7 +137,10 @@ bool LLURLDispatcherImpl::isSLURLCommand(const std::string& url) | |||
128 | if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN) | 137 | if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN) |
129 | || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN) | 138 | || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN) |
130 | || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) | 139 | || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) |
131 | || matchPrefix(url, SLURL_SLURL_ALT_PREFIX + SLURL_APP_TOKEN)) | 140 | || matchPrefix(url, SLURL_SLURL_ALT_PREFIX + SLURL_APP_TOKEN) |
141 | || matchPrefix(url, IZURL_IZ_PREFIX + SLURL_APP_TOKEN) | ||
142 | || matchPrefix(url, IZURL_INWORLDZ_PREFIX + "/" + SLURL_APP_TOKEN) | ||
143 | || matchPrefix(url, IZURL_IZURL_PREFIX + SLURL_APP_TOKEN)) | ||
132 | { | 144 | { |
133 | return true; | 145 | return true; |
134 | } | 146 | } |
@@ -371,6 +383,22 @@ std::string LLURLDispatcherImpl::stripProtocol(const std::string& url) | |||
371 | { | 383 | { |
372 | stripped.erase(0, SLURL_SLURL_ALT_PREFIX.length()); | 384 | stripped.erase(0, SLURL_SLURL_ALT_PREFIX.length()); |
373 | } | 385 | } |
386 | else if (matchPrefix(stripped, IZURL_IZ_HELP_PREFIX)) | ||
387 | { | ||
388 | stripped.erase(0, IZURL_IZ_HELP_PREFIX.length()); | ||
389 | } | ||
390 | else if (matchPrefix(stripped, IZURL_IZ_PREFIX)) | ||
391 | { | ||
392 | stripped.erase(0, IZURL_IZ_PREFIX.length()); | ||
393 | } | ||
394 | else if (matchPrefix(stripped, IZURL_INWORLDZ_PREFIX)) | ||
395 | { | ||
396 | stripped.erase(0, IZURL_INWORLDZ_PREFIX.length()); | ||
397 | } | ||
398 | else if (matchPrefix(stripped, IZURL_IZURL_PREFIX)) | ||
399 | { | ||
400 | stripped.erase(0, IZURL_IZURL_PREFIX.length()); | ||
401 | } | ||
374 | return stripped; | 402 | return stripped; |
375 | } | 403 | } |
376 | 404 | ||