summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-07-02 14:50:23 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-07-02 14:50:23 +0300
commit2684c536906388da121ce2712a34d55aa786fa3f (patch)
tree7d0baee83515e113e16819d6419b696670a7d046 /indra/newview/llappviewer.cpp
parent1845816aa2419353ace258b7cfe24bdd08357ebe (diff)
parent4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff)
Merge from viewer-relese and become version 3.8.1
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rwxr-xr-xindra/newview/llappviewer.cpp46
1 files changed, 45 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b858d1538e..9b9b591cd1 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -105,6 +105,7 @@
// Linden library includes
#include "llavatarnamecache.h"
#include "lldiriterator.h"
+#include "llexperiencecache.h"
#include "llimagej2c.h"
#include "llmemory.h"
#include "llprimitive.h"
@@ -4698,6 +4699,32 @@ void LLAppViewer::saveNameCache()
}
}
+
+void LLAppViewer::saveExperienceCache()
+{
+ std::string filename =
+ gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "experience_cache.xml");
+ LL_INFOS("ExperienceCache") << "Saving " << filename << LL_ENDL;
+ llofstream cache_stream(filename.c_str());
+ if(cache_stream.is_open())
+ {
+ LLExperienceCache::exportFile(cache_stream);
+ }
+}
+
+void LLAppViewer::loadExperienceCache()
+{
+ std::string filename =
+ gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "experience_cache.xml");
+ LL_INFOS("ExperienceCache") << "Loading " << filename << LL_ENDL;
+ llifstream cache_stream(filename.c_str());
+ if(cache_stream.is_open())
+ {
+ LLExperienceCache::importFile(cache_stream);
+ }
+}
+
+
/*! @brief This class is an LLFrameTimer that can be created with
an elapsed time that starts counting up from the given value
rather than 0.0.
@@ -4893,7 +4920,7 @@ void LLAppViewer::idle()
// floating throughout the various object lists.
//
idleNameCache();
-
+ idleExperienceCache();
idleNetwork();
@@ -5323,6 +5350,22 @@ void LLAppViewer::idleNameCache()
LLAvatarNameCache::idle();
}
+void LLAppViewer::idleExperienceCache()
+{
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region) return;
+
+ std::string lookup_url=region->getCapability("GetExperienceInfo");
+ if(!lookup_url.empty() && *lookup_url.rbegin() != '/')
+ {
+ lookup_url += '/';
+ }
+
+ LLExperienceCache::setLookupURL(lookup_url);
+
+ LLExperienceCache::idle();
+}
+
//
// Handle messages, and all message related stuff
//
@@ -5485,6 +5528,7 @@ void LLAppViewer::disconnectViewer()
}
saveNameCache();
+ saveExperienceCache();
// close inventory interface, close all windows
LLFloaterInventory::cleanup();