- internal : URL handler for secondlife:///app/agent/<uuid>/rlvanonym

-> will be used when there is a need to anonymize "/inspect", "/completename", "/displayname" or "/username" agent URLs

--HG--
branch : RLVa
meow-7.2.2
Kitty Barnett 2010-11-01 20:10:07 +01:00
parent 79067afe5d
commit e790c1d424
4 changed files with 49 additions and 1 deletions

View File

@ -599,6 +599,27 @@ std::string LLUrlEntryAgentUserName::getName(const LLAvatarName& avatar_name)
return avatar_name.mUsername.empty() ? avatar_name.getLegacyName() : avatar_name.mUsername;
}
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
// Defined in rlvcommon.cpp - redirects to RlvStrings::getAnonym() since we can't really get to that class from here
extern const std::string& rlvGetAnonym(const LLAvatarName& avName);
//
// LLUrlEntryAgentRLVAnonymizedName Describes an RLV anonymized agent name Url, e.g.,
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
//
LLUrlEntryAgentRLVAnonymizedName::LLUrlEntryAgentRLVAnonymizedName()
{
mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/rlvanonym", boost::regex::perl|boost::regex::icase);
}
std::string LLUrlEntryAgentRLVAnonymizedName::getName(const LLAvatarName& avatar_name)
{
return rlvGetAnonym(avatar_name);
}
// [/RLVa:KB]
//
// LLUrlEntryGroup Describes a Second Life group Url, e.g.,
// secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/about

View File

@ -235,6 +235,21 @@ private:
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
};
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
///
/// LLUrlEntryAgentRLVAnonymizedName Describes an RLV anonymized agent name Url, e.g.,
/// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
/// that diplays an anonym (based on the display name) for an avatar
/// such as "An individual"
class LLUrlEntryAgentRLVAnonymizedName : public LLUrlEntryAgentName
{
public:
LLUrlEntryAgentRLVAnonymizedName();
private:
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
};
// [/RLVa:KB]
///
/// LLUrlEntryGroup Describes a Second Life group Url, e.g.,
/// secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/about

View File

@ -37,7 +37,10 @@ void LLUrlRegistryNullCallback(const std::string &url, const std::string &label,
LLUrlRegistry::LLUrlRegistry()
{
mUrlEntry.reserve(20);
// mUrlEntry.reserve(20);
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
mUrlEntry.reserve(21);
// [/RLVa:KB]
// Urls are matched in the order that they were registered
registerUrl(new LLUrlEntryNoLink());
@ -48,6 +51,9 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntryAgentCompleteName());
registerUrl(new LLUrlEntryAgentDisplayName());
registerUrl(new LLUrlEntryAgentUserName());
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
registerUrl(new LLUrlEntryAgentRLVAnonymizedName());
// [/RLVa:KB]
// LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since
// LLUrlEntryAgent is a less specific (catchall for agent urls)
registerUrl(new LLUrlEntryAgent());

View File

@ -571,4 +571,10 @@ BOOL rlvEnableSharedWearEnabler(void* pParam)
}
*/
// Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
const std::string& rlvGetAnonym(const LLAvatarName& avName)
{
return RlvStrings::getAnonym(avName);
}
// ============================================================================