summaryrefslogtreecommitdiff
path: root/indra/llmessage/llexperiencecache.h
diff options
context:
space:
mode:
authordolphin@dolphin-THINK.lindenlab.com <dolphin@dolphin-THINK.lindenlab.com>2012-11-26 08:42:23 -0800
committerdolphin@dolphin-THINK.lindenlab.com <dolphin@dolphin-THINK.lindenlab.com>2012-11-26 08:42:23 -0800
commit2566e0d08fd7e8a47fc690a8163c1273d91141c2 (patch)
tree99dc6e5cb288bf594291fcd2664c19905fa49fc1 /indra/llmessage/llexperiencecache.h
parentad3f7ea13f0f7cdaa8f4a41d2bc2044620cdfdfb (diff)
Added code for simulator integration.
Added signals for cache update callbacks. Added expiration timers for cached experiences.
Diffstat (limited to 'indra/llmessage/llexperiencecache.h')
-rw-r--r--indra/llmessage/llexperiencecache.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h
index 799cdea13a..2f2647d5a3 100644
--- a/indra/llmessage/llexperiencecache.h
+++ b/indra/llmessage/llexperiencecache.h
@@ -30,6 +30,7 @@
#define LL_LLEXPERIENCECACHE_H
#include <string>
+#include <boost/signals2.hpp>
class LLUUID;
@@ -43,27 +44,40 @@ public:
std::string mDisplayName;
std::string mDescription;
+ F64 mExpires;
};
namespace LLExperienceCache
{
+ // dummy name used when we have nothing else
+ const std::string DUMMY_NAME = "\?\?\?";
+ // Callback types for get() below
+ typedef boost::signals2::signal<
+ void (const LLUUID& agent_id, const LLExperienceData& experience)>
+ callback_signal_t;
+ typedef callback_signal_t::slot_type callback_slot_t;
+ typedef std::map<LLUUID, LLExperienceData> cache_t;
+
+
void setLookupURL(const std::string& lookup_url);
bool hasLookupURL();
+ void setMaximumLookups(int maximumLookups);
void idle();
void exportFile(std::ostream& ostr);
void importFile(std::istream& istr);
- void initClass(bool running);
+ void initClass();
void erase(const LLUUID& agent_id);
void fetch(const LLUUID& agent_id);
void insert(const LLUUID& agent_id, const LLExperienceData& experience_data);
bool get(const LLUUID& agent_id, LLExperienceData* experience_data);
- typedef std::map<LLUUID, LLExperienceData> cache_t;
+ // If name information is in cache, callback will be called immediately.
+ void get(const LLUUID& agent_id, callback_slot_t slot);
const cache_t& getCached();
};