summaryrefslogtreecommitdiff
path: root/indra/newview/llsyntaxid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsyntaxid.cpp')
-rw-r--r--indra/newview/llsyntaxid.cpp37
1 files changed, 27 insertions, 10 deletions
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index dfbb8c9551..7551c1a442 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -103,17 +103,34 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref)
//-----------------------------------------------------------------------------
// LLSyntaxIdLSL
//-----------------------------------------------------------------------------
-const std::string FILENAME_DEFAULT = "keywords_lsl_default.xml";
+const std::string LLSyntaxIdLSL::CAPABILITY_NAME = "LSLSyntax";
+const std::string LLSyntaxIdLSL::FILENAME_DEFAULT = "keywords_lsl_default.xml";
+const std::string LLSyntaxIdLSL::SIMULATOR_FEATURE = "LSLSyntaxId";
-LLSyntaxIdLSL::LLSyntaxIdLSL()
-: mFilePath(LL_PATH_APP_SETTINGS)
-, mFileNameCurrent(FILENAME_DEFAULT)
-, mSyntaxIdCurrent(LLUUID())
-{}
+/**
+ * @brief LLSyntaxIdLSL constructor
+ */
+LLSyntaxIdLSL::LLSyntaxIdLSL() :
+ mInitialized(false),
+ mKeywordsXml(LLSD()),
+ mLoaded(false),
+ mLoadFailed(false),
+ mVersionChanged(false),
+ mCapabilityName(CAPABILITY_NAME),
+ mCapabilityURL(""),
+ mFileNameCurrent(FILENAME_DEFAULT),
+ mFileNameDefault(FILENAME_DEFAULT),
+ mFileNameNew(""),
+ mFilePath(LL_PATH_APP_SETTINGS),
+ mSimulatorFeature(SIMULATOR_FEATURE),
+ mSyntaxIdCurrent(LLUUID()),
+ mSyntaxIdNew(LLUUID())
+{
+}
std::string LLSyntaxIdLSL::buildFileNameNew()
{
- mFileNameNew = mSyntaxIdNew.isNull() ? FILENAME_DEFAULT : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml";
+ mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml";
return mFileNameNew;
}
@@ -146,11 +163,11 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged()
region->getSimulatorFeatures(simFeatures);
// Does the sim have the required feature
- if (simFeatures.has("LSLSyntaxId"))
+ if (simFeatures.has(mSimulatorFeature))
{
// get and check the hash
- mSyntaxIdNew = simFeatures["LSLSyntaxId"].asUUID();
- mCapabilityURL = region->getCapability("LSLSyntax");
+ mSyntaxIdNew = simFeatures[mSimulatorFeature].asUUID();
+ mCapabilityURL = region->getCapability(mCapabilityName);
if (mSyntaxIdCurrent != mSyntaxIdNew)
{
LL_DEBUGS("SyntaxLSL") << "Region has LSLSyntaxId capability, and the new hash is '" << mSyntaxIdNew.asString() << "'" << LL_ENDL;