summaryrefslogtreecommitdiff
path: root/indra/newview/llviewernetwork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewernetwork.cpp')
-rw-r--r--indra/newview/llviewernetwork.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 6666aecca2..2525886222 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -49,6 +49,8 @@ const std::string GRID_UPDATE_SERVICE_URL = "update_query_url_base";
const std::string GRID_HELPER_URI_VALUE = "helper_uri";
/// the splash page url
const std::string GRID_LOGIN_PAGE_VALUE = "login_page";
+/// url for the web profile site
+const std::string GRID_WEB_PROFILE_VALUE = "web_profile_url";
/// internal data on system grids
const std::string GRID_IS_SYSTEM_GRID_VALUE = "system_grid";
/// whether this is single or double names
@@ -70,6 +72,8 @@ const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update";
const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app";
+const std::string MAIN_GRID_WEB_PROFILE_URL = "https://my.secondlife.com/";
+
const char* SYSTEM_GRID_SLURL_BASE = "secondlife://%s/secondlife/";
const char* DEFAULT_SLURL_BASE = "https://%s/region/";
const char* DEFAULT_APP_SLURL_BASE = "x-grid-location-info://%s/app";
@@ -125,6 +129,7 @@ void LLGridManager::initialize(const std::string& grid_file)
"https://secondlife.com/helpers/",
DEFAULT_LOGIN_PAGE,
SL_UPDATE_QUERY_URL,
+ MAIN_GRID_WEB_PROFILE_URL,
"Agni");
addSystemGrid(LLTrans::getString("AditiGridLabel"),
"util.aditi.lindenlab.com",
@@ -132,6 +137,7 @@ void LLGridManager::initialize(const std::string& grid_file)
"http://aditi-secondlife.webdev.lindenlab.com/helpers/",
DEFAULT_LOGIN_PAGE,
SL_UPDATE_QUERY_URL,
+ "https://my.aditi.lindenlab.com/",
"Aditi");
LLSD other_grids;
@@ -288,6 +294,10 @@ bool LLGridManager::addGrid(LLSD& grid_data)
{
grid_data[GRID_HELPER_URI_VALUE] = std::string("https://") + grid + "/helpers/";
}
+ if (!grid_data.has(GRID_WEB_PROFILE_VALUE))
+ {
+ grid_data[GRID_WEB_PROFILE_VALUE] = std::string("https://") + grid + "/";
+ }
if (!grid_data.has(GRID_LOGIN_IDENTIFIER_TYPES))
{
@@ -302,7 +312,8 @@ bool LLGridManager::addGrid(LLSD& grid_data)
<<" id: "<<grid_data[GRID_ID_VALUE].asString()<<"\n"
<<" label: "<<grid_data[GRID_LABEL_VALUE].asString()<<"\n"
<<" login page: "<<grid_data[GRID_LOGIN_PAGE_VALUE].asString()<<"\n"
- <<" helper page: "<<grid_data[GRID_HELPER_URI_VALUE].asString()<<"\n";
+ <<" helper page: "<<grid_data[GRID_HELPER_URI_VALUE].asString()<<"\n"
+ <<" web profile: "<<grid_data[GRID_WEB_PROFILE_VALUE].asString()<<"\n";
/* still in LL_DEBUGS */
for (LLSD::array_const_iterator login_uris = grid_data[GRID_LOGIN_URI_VALUE].beginArray();
login_uris != grid_data[GRID_LOGIN_URI_VALUE].endArray();
@@ -339,6 +350,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
const std::string& helper,
const std::string& login_page,
const std::string& update_url_base,
+ const std::string& web_profile_url,
const std::string& login_id)
{
LLSD grid = LLSD::emptyMap();
@@ -349,6 +361,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
grid[GRID_LOGIN_URI_VALUE].append(login_uri);
grid[GRID_LOGIN_PAGE_VALUE] = login_page;
grid[GRID_UPDATE_SERVICE_URL] = update_url_base;
+ grid[GRID_WEB_PROFILE_VALUE] = web_profile_url;
grid[GRID_IS_SYSTEM_GRID_VALUE] = true;
grid[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray();
grid[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT);
@@ -535,6 +548,21 @@ std::string LLGridManager::getLoginPage()
return login_page;
}
+std::string LLGridManager::getWebProfileURL(const std::string& grid)
+{
+ std::string web_profile_url;
+ std::string grid_name = getGrid(grid);
+ if (!grid_name.empty())
+ {
+ web_profile_url = mGridList[grid_name][GRID_WEB_PROFILE_VALUE].asString();
+ }
+ else
+ {
+ LL_WARNS("GridManager")<<"invalid grid '"<<grid<<"'"<<LL_ENDL;
+ }
+ return web_profile_url;
+}
+
void LLGridManager::getLoginIdentifierTypes(LLSD& idTypes)
{
idTypes = mGridList[mGrid][GRID_LOGIN_IDENTIFIER_TYPES];