diff options
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 79 |
1 files changed, 43 insertions, 36 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 87b6652056..750151ea2d 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -56,6 +56,7 @@ #include "llhttpnode.h" #include "llsdutil.h" #include "llstartup.h" +#include "lltrans.h" #include "llviewerobjectlist.h" #include "llviewerparceloverlay.h" #include "llvlmanager.h" @@ -162,6 +163,11 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mSimAccess( SIM_ACCESS_MIN ), mBillableFactor(1.0), mMaxTasks(DEFAULT_MAX_REGION_WIDE_PRIM_COUNT), + mClassID(0), + mCPURatio(0), + mColoName("unknown"), + mProductSKU("unknown"), + mProductName("unknown"), mCacheLoaded(FALSE), mCacheEntriesCount(0), mCacheID(), @@ -539,56 +545,30 @@ std::string LLViewerRegion::regionFlagsToString(U32 flags) return result; } -// *TODO:Translate -const char* SIM_ACCESS_STR[] = { "Free Trial", - "PG", - "Mature", - "Offline", - "Unknown" }; - // static std::string LLViewerRegion::accessToString(U8 sim_access) { switch(sim_access) { - case SIM_ACCESS_TRIAL: - return SIM_ACCESS_STR[0]; - case SIM_ACCESS_PG: - return SIM_ACCESS_STR[1]; + return LLTrans::getString("SIM_ACCESS_PG"); case SIM_ACCESS_MATURE: - return SIM_ACCESS_STR[2]; + return LLTrans::getString("SIM_ACCESS_MATURE"); + + case SIM_ACCESS_ADULT: + return LLTrans::getString("SIM_ACCESS_ADULT"); case SIM_ACCESS_DOWN: - return SIM_ACCESS_STR[3]; + return LLTrans::getString("SIM_ACCESS_DOWN"); case SIM_ACCESS_MIN: default: - return SIM_ACCESS_STR[4]; + return LLTrans::getString("SIM_ACCESS_MIN"); } } // static -U8 LLViewerRegion::stringToAccess(const std::string& access_str) -{ - U8 sim_access = SIM_ACCESS_MIN; - if (access_str == SIM_ACCESS_STR[0]) - { - sim_access = SIM_ACCESS_TRIAL; - } - else if (access_str == SIM_ACCESS_STR[1]) - { - sim_access = SIM_ACCESS_PG; - } - else if (access_str == SIM_ACCESS_STR[2]) - { - sim_access = SIM_ACCESS_MATURE; - } - return sim_access; -} - -// static std::string LLViewerRegion::accessToShortString(U8 sim_access) { switch(sim_access) /* Flawfinder: ignore */ @@ -596,12 +576,12 @@ std::string LLViewerRegion::accessToShortString(U8 sim_access) case SIM_ACCESS_PG: return "PG"; - case SIM_ACCESS_TRIAL: - return "TR"; - case SIM_ACCESS_MATURE: return "M"; + case SIM_ACCESS_ADULT: + return "A"; + case SIM_ACCESS_MIN: default: return "U"; @@ -1315,6 +1295,32 @@ void LLViewerRegion::unpackRegionHandshake() LLUUID region_id; msg->getUUID("RegionInfo2", "RegionID", region_id); setRegionID(region_id); + + // Retrieve the CR-53 (Homestead/Land SKU) information + S32 classID = 0; + S32 cpuRatio = 0; + std::string coloName; + std::string productSKU; + std::string productName; + + // the only reasonable way to decide if we actually have any data is to + // check to see if any of these fields have nonzero sizes + if (msg->getSize("RegionInfo3", "ColoName") || + msg->getSize("RegionInfo3", "ProductSKU") || + msg->getSize("RegionInfo3", "ProductName")) + { + msg->getS32 ("RegionInfo3", "CPUClassID", classID); + msg->getS32 ("RegionInfo3", "CPURatio", cpuRatio); + msg->getString ("RegionInfo3", "ColoName", coloName); + msg->getString ("RegionInfo3", "ProductSKU", productSKU); + msg->getString ("RegionInfo3", "ProductName", productName); + + mClassID = classID; + mCPURatio = cpuRatio; + mColoName = coloName; + mProductSKU = productSKU; + mProductName = productName; + } LLVLComposition *compp = getComposition(); if (compp) @@ -1420,6 +1426,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("ServerReleaseNotes"); capabilityNames.append("StartGroupProposal"); capabilityNames.append("UntrustedSimulatorMessage"); + capabilityNames.append("UpdateAgentInformation"); capabilityNames.append("UpdateAgentLanguage"); capabilityNames.append("UpdateGestureAgentInventory"); capabilityNames.append("UpdateNotecardAgentInventory"); |