diff options
author | Cinder <cinder.roxley@phoenixviewer.com> | 2014-05-16 07:28:03 -0600 |
---|---|---|
committer | Cinder <cinder.roxley@phoenixviewer.com> | 2014-05-16 07:28:03 -0600 |
commit | d73a7fefab55fdc06bbd6e7e3a4dd9d9794bddb5 (patch) | |
tree | 661c60ce4c5cee9b7f96e533726029dbff409ffb | |
parent | 4ce0f6d6eac3817e586bee1edd42ae80aaf21f4f (diff) | |
parent | 15d8f355072f2184f046a7aafb1b5c606fe97880 (diff) |
Merge upstream
-rw-r--r-- | indra/newview/llsyntaxid.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llsyntaxid.h | 7 |
2 files changed, 34 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; diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 0f347a6ce3..f14693d619 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -72,6 +72,10 @@ protected: void setFileNameNew(const std::string name) { mFileNameNew = name; } private: + static const std::string CAPABILITY_NAME; + static const std::string FILENAME_DEFAULT; + static const std::string SIMULATOR_FEATURE; + bool mInitialized; LLSD mKeywordsXml; bool mLoaded; @@ -79,11 +83,14 @@ private: bool mVersionChanged; file_fetched_signal_t mFileFetchedSignal; + std::string mCapabilityName; std::string mCapabilityURL; std::string mFileNameCurrent; + std::string mFileNameDefault; std::string mFileNameNew; ELLPath mFilePath; std::string mFullFileSpec; + std::string mSimulatorFeature; LLUUID mSyntaxIdCurrent; LLUUID mSyntaxIdNew; }; |