From 2cde962d5db94baf860eb94fecaf9671548b2c53 Mon Sep 17 00:00:00 2001 From: "dolphin@dolphin-THINK.lindenlab.com" Date: Mon, 19 Nov 2012 08:06:42 -0800 Subject: Test populating the experience keys UI with avatar name data. --- indra/newview/llappviewer.cpp | 50 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a674ab0cf8..b80202bd45 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -100,6 +100,7 @@ // Linden library includes #include "llavatarnamecache.h" #include "lldiriterator.h" +#include "llexperiencecache.h" #include "llimagej2c.h" #include "llmemory.h" #include "llprimitive.h" @@ -4145,7 +4146,7 @@ void LLAppViewer::loadNameCache() } void LLAppViewer::saveNameCache() - { +{ // display names cache std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); @@ -4153,7 +4154,7 @@ void LLAppViewer::saveNameCache() if(name_cache_stream.is_open()) { LLAvatarNameCache::exportFile(name_cache_stream); -} + } if (!gCacheName) return; @@ -4166,6 +4167,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); + 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); + 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. @@ -4368,7 +4395,7 @@ void LLAppViewer::idle() // floating throughout the various object lists. // idleNameCache(); - + idleExperienceCache(); idleNetwork(); @@ -4782,6 +4809,22 @@ void LLAppViewer::idleNameCache() LLAvatarNameCache::idle(); } +void LLAppViewer::idleExperienceCache() +{ + LLViewerRegion* region = gAgent.getRegion(); + if (!region) return; + + std::string lookup_url=region->getCapability("GetDisplayNames"); // use GetDisplayNames for testing round trip + if(!lookup_url.empty() && lookup_url.back() != '/') + { + lookup_url += '/'; + } + + LLExperienceCache::setLookupURL(lookup_url); + + LLExperienceCache::idle(); +} + // // Handle messages, and all message related stuff // @@ -4945,6 +4988,7 @@ void LLAppViewer::disconnectViewer() } saveNameCache(); + saveExperienceCache(); // close inventory interface, close all windows LLFloaterInventory::cleanup(); -- cgit v1.2.3 From 179e944f45476e03eb7b828e427f9d299529ad12 Mon Sep 17 00:00:00 2001 From: dolphin Date: Tue, 18 Dec 2012 16:06:00 -0800 Subject: Updated client to use new caps brought over server changes to llExperienceCache --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e49212d9de..c4fdc1ee21 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4818,12 +4818,12 @@ void LLAppViewer::idleExperienceCache() LLViewerRegion* region = gAgent.getRegion(); if (!region) return; - std::string lookup_url=region->getCapability("GetDisplayNames"); // use GetDisplayNames for testing round trip + std::string lookup_url=region->getCapability("GetExperienceInfo"); if(!lookup_url.empty() && lookup_url.back() != '/') { lookup_url += '/'; } - + LLExperienceCache::setLookupURL(lookup_url); LLExperienceCache::idle(); -- cgit v1.2.3 From b03918c73d47290597bdf101d9b013ebfab1f95f Mon Sep 17 00:00:00 2001 From: dolphin Date: Mon, 11 Feb 2013 11:57:42 -0800 Subject: removed reference to std::string::back for linuxy compilation --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 262175e009..3a218b58da 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4812,7 +4812,7 @@ void LLAppViewer::idleExperienceCache() if (!region) return; std::string lookup_url=region->getCapability("GetExperienceInfo"); - if(!lookup_url.empty() && lookup_url.back() != '/') + if(!lookup_url.empty() && *lookup_url.rbegin() != '/') { lookup_url += '/'; } -- cgit v1.2.3 From 1fce3cc89eca7edf05ef550707e955af3d4d5fc7 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 8 Jun 2015 17:35:18 -0400 Subject: corrections needed for new tools --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8185c7c2aa..a2aee2e000 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4705,7 +4705,7 @@ 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); + llofstream cache_stream(filename.c_str()); if(cache_stream.is_open()) { LLExperienceCache::exportFile(cache_stream); @@ -4717,7 +4717,7 @@ 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); + llifstream cache_stream(filename.c_str()); if(cache_stream.is_open()) { LLExperienceCache::importFile(cache_stream); -- cgit v1.2.3