diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-02-03 10:42:01 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-02-03 10:42:01 +0200 |
commit | f8790210dd7824ac0cbe2ea54815c04908615609 (patch) | |
tree | 0930bbac810d41255cd35e4fbd0dbe820e8bf2df | |
parent | c398e5966da98ac2fb7b995c1d89bcf295155506 (diff) |
MAINT-7103 New URI namespace /legacyname
-rw-r--r-- | indra/llui/llurlentry.cpp | 16 | ||||
-rw-r--r-- | indra/llui/llurlentry.h | 8 | ||||
-rw-r--r-- | indra/llui/llurlregistry.cpp | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 05b7a4a9e9..b211829496 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -768,6 +768,22 @@ std::string LLUrlEntryAgentCompleteName::getName(const LLAvatarName& avatar_name } // +// LLUrlEntryAgentLegacyName describes a Second Life agent legacy name Url, e.g., +// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// +LLUrlEntryAgentLegacyName::LLUrlEntryAgentLegacyName() +{ + mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/legacyname", + boost::regex::perl|boost::regex::icase); +} + +std::string LLUrlEntryAgentLegacyName::getName(const LLAvatarName& avatar_name) +{ + return avatar_name.getLegacyName(); +} + +// // LLUrlEntryAgentDisplayName describes a Second Life agent display name Url, e.g., // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname // x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 413c20a657..28e9931718 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -269,6 +269,14 @@ private: /*virtual*/ std::string getName(const LLAvatarName& avatar_name); }; +class LLUrlEntryAgentLegacyName : public LLUrlEntryAgentName +{ +public: + LLUrlEntryAgentLegacyName(); +private: + /*virtual*/ std::string getName(const LLAvatarName& avatar_name); +}; + /// /// LLUrlEntryAgentDisplayName Describes a Second Life agent display name Url, e.g., /// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 23c6d5a954..fa6593267a 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -57,6 +57,7 @@ LLUrlRegistry::LLUrlRegistry() mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel(); registerUrl(mUrlEntryHTTPLabel); registerUrl(new LLUrlEntryAgentCompleteName()); + registerUrl(new LLUrlEntryAgentLegacyName()); registerUrl(new LLUrlEntryAgentDisplayName()); registerUrl(new LLUrlEntryAgentUserName()); // LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since |