diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-08-01 22:12:00 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-08-01 22:12:00 +0000 |
commit | f6a10b3214d79df4e8f5768acaa68edbd2de5620 (patch) | |
tree | fe9221b3bacdb8df54050db2474bcac62ddd88fd | |
parent | a8ee4f5787160063ed996024bf77c202779b4ee9 (diff) |
Result of svn merge -r66742:66741 svn+ssh://svn/svn/linden/release in release to revert revision 66742 which was a merge from mp-backbone.
-rw-r--r-- | indra/llcommon/lluri.cpp | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 18867a77e1..22526c9a03 100644 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -299,6 +299,117 @@ LLURI LLURI::buildHTTP(const std::string& host, return LLURI::buildHTTP(llformat("%s:%u", host.c_str(), port), path, query); } +namespace { + LLURI buildBackboneURL(LLApp* app, + const std::string& p1 = "", + const std::string& p2 = "", + const std::string& p3 = "") + { + std::string host = "localhost:12040"; + + if (app) + { + host = app->getOption("backbone-host-port").asString(); + } + + LLSD path = LLSD::emptyArray(); + if (!p1.empty()) path.append(p1); + if (!p2.empty()) path.append(p2); + if (!p3.empty()) path.append(p3); + + return LLURI::buildHTTP(host, path); + } +} + +#if LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS +// static +LLURI LLURI::buildBulkAgentNamesURI(LLApp* app) +{ + std::string host = "localhost:12040"; + + if (app) + { + host = app->getOption("backbone-host-port").asString(); + } + + LLSD path = LLSD::emptyArray(); + path.append("agent"); + path.append("names"); + + return buildHTTP(host, path); +} + +// static +LLURI LLURI::buildBulkAgentNamesURI(LLApp* app) +{ + std::string host = "localhost:12040"; + + if (app) + { + host = app->getOption("backbone-host-port").asString(); + } + + LLSD path = LLSD::emptyArray(); + path.append("agent"); + path.append("names"); + + return buildHTTP(host, path); +} + +// static +LLURI LLURI::buildAgentSessionURI(const LLUUID& agent_id, LLApp* app) +{ + return buildBackboneURL(app, "agent", agent_id.asString(), "session"); +} + +// static +LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app) +{ + std::string host = "localhost:12040"; + + if (app) + { + host = app->getOption("backbone-host-port").asString(); + } + + LLSD path = LLSD::emptyArray(); + path.append("agent"); + path.append(agent_id); + path.append("name"); + + return buildHTTP(host, path); +} + +// static +LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app) +{ + std::string host = "localhost:12040"; + + if (app) + { + host = app->getOption("backbone-host-port").asString(); + } + + LLSD path = LLSD::emptyArray(); + path.append("agent"); + path.append(agent_id); + path.append("name"); + + return buildHTTP(host, path); +} + +// static +LLURI LLURI::buildAgentLoginInfoURI(const LLUUID& agent_id, const std::string& dataserver) +{ + LLSD path = LLSD::emptyArray(); + path.append("agent"); + path.append(agent_id); + path.append("logininfo"); + + return buildHTTP(dataserver, path); +} +#endif // LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS + std::string LLURI::asString() const { if (mScheme.empty()) |