diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 4bf4012746d66b1488b01b4cb3541b4e66965906..5fb3ad6ca892ac77460b56576383d3a0c6a25870 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3343,6 +3343,38 @@ std::string LLViewerRegion::getSearchServerURL() const return url; } +std::string LLViewerRegion::getGridURL() const +{ + std::string url; + if (mSimulatorFeatures.has("OpenSimExtras") + && mSimulatorFeatures["OpenSimExtras"].has("GridURL")) + { + url = mSimulatorFeatures["OpenSimExtras"]["GridURL"].asString(); + } + else + { + std::vector<std::string> uris; + LLGridManager::getInstance()->getLoginURIs(uris); + url = uris.front(); + } + return url; +} + +std::string LLViewerRegion::getGridName() const +{ + std::string name; + if (mSimulatorFeatures.has("OpenSimExtras") + && mSimulatorFeatures["OpenSimExtras"].has("GridName")) + { + name = mSimulatorFeatures["OpenSimExtras"]["GridName"].asString(); + } + else + { + name = LLGridManager::getInstance()->getGridLabel(); + } + return name; +} + void LLViewerRegion::setGodnames() { mGodNames.clear(); diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 43f9e1b23e96e14c76cd76bd23ca0da66b37119b..2dfc6c9b625bfe346331e506bdf11b162f776dfc 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -390,11 +390,26 @@ public: static BOOL isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;} + /* ================================================================ + * @name OpenSimExtras Simulator Features capability + * @{ + */ + /// Avatar picker url std::string getAvatarPickerURL() const; + /// Destination guide url std::string getDestinationGuideURL() const; + /// Hypergrid map server url std::string getMapServerURL() const; + /// Hypergrid search server url std::string getSearchServerURL() const; + /// Grid login/gateway uri (for generating slurls (0.8.1) + std::string getGridURL() const; + /// Grid name (0.8.1) + std::string getGridName() const; + /// "God names" surname and full account names map std::set<std::string> getGods() const { return mGodNames; }; + //@} + LLViewerTexture* getMapImage(); // <alchemy/> private: