summaryrefslogtreecommitdiff
path: root/indra/llmessage/llexperiencecache.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llexperiencecache.h')
-rw-r--r--indra/llmessage/llexperiencecache.h38
1 files changed, 31 insertions, 7 deletions
diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h
index 937225a80a..1002b33f80 100644
--- a/indra/llmessage/llexperiencecache.h
+++ b/indra/llmessage/llexperiencecache.h
@@ -47,22 +47,39 @@ class LLExperienceCache: public LLSingleton < LLExperienceCache >
public:
typedef boost::function<std::string(const std::string &)> CapabilityQuery_t;
- typedef boost::function<void(const LLSD &)> Callback_t;
+ typedef boost::function<void(const LLSD &)> ExperienceGetFn_t;
+ void setCapabilityQuery(CapabilityQuery_t queryfn);
void cleanup();
+ //-------------------------------------------
+ // Cache methods
void erase(const LLUUID& key);
bool fetch(const LLUUID& key, bool refresh = false);
void insert(const LLSD& experience_data);
const LLSD& get(const LLUUID& key);
-
- // If name information is in cache, callback will be called immediately.
- void get(const LLUUID& key, Callback_t slot);
+ void get(const LLUUID& key, ExperienceGetFn_t slot); // If name information is in cache, callback will be called immediately.
bool isRequestPending(const LLUUID& public_key);
- void setCapabilityQuery(CapabilityQuery_t queryfn);
+ //-------------------------------------------
+ void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, ExperienceGetFn_t fn);
+ void findExperienceByName(const std::string text, int page, ExperienceGetFn_t fn);
+ void getGroupExperiences(const LLUUID &groupId, ExperienceGetFn_t fn);
+
+ // the Get/Set Region Experiences take a CapabilityQuery to get the capability since
+ // the region being queried may not be the region that the agent is standing on.
+ void getRegionExperiences(CapabilityQuery_t regioncaps, ExperienceGetFn_t fn);
+ void setRegionExperiences(CapabilityQuery_t regioncaps, const LLSD &experiences, ExperienceGetFn_t fn);
+
+ void getExperiencePermission(const LLUUID &experienceId, ExperienceGetFn_t fn);
+ void setExperiencePermission(const LLUUID &experienceId, const std::string &permission, ExperienceGetFn_t fn);
+ void forgetExperiencePermission(const LLUUID &experienceId, ExperienceGetFn_t fn);
+
+ void getExperienceAdmin(const LLUUID &experienceId, ExperienceGetFn_t fn);
+ void updateExperience(LLSD updateData, ExperienceGetFn_t fn);
+ //-------------------------------------------
static const std::string NAME; // "name"
static const std::string EXPERIENCE_ID; // "public_id"
static const std::string AGENT_ID; // "agent_id"
@@ -91,6 +108,7 @@ private:
virtual void initSingleton();
+ typedef boost::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLCore::HttpRequest::ptr_t, std::string)> permissionInvoker_fn;
// Callback types for get()
typedef boost::signals2::signal < void(const LLSD &) > callback_signal_t;
@@ -110,6 +128,7 @@ private:
// default values
static const F64 DEFAULT_EXPIRATION; // 600.0
static const S32 DEFAULT_QUOTA; // 128 this is megabytes
+ static const int SEARCH_PAGE_SIZE;
//--------------------------------------------
void processExperience(const LLUUID& public_key, const LLSD& experience);
@@ -120,7 +139,6 @@ private:
RequestQueue_t mRequestQueue;
PendingQueue_t mPendingQueue;
- LLFrameTimer mRequestTimer;
LLFrameTimer mEraseExpiredTimer; // Periodically clean out expired entries from the cache
CapabilityQuery_t mCapability;
std::string mCacheFileName;
@@ -131,7 +149,13 @@ private:
void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t);
void requestExperiences();
- void setMaximumLookups(int maximumLookups);
+ void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, ExperienceGetFn_t);
+ void findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, int, ExperienceGetFn_t);
+ void getGroupExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID , ExperienceGetFn_t);
+ void regionExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, CapabilityQuery_t regioncaps, bool update, LLSD experiences, ExperienceGetFn_t fn);
+ void experiencePermissionCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, permissionInvoker_fn invokerfn, std::string url, ExperienceGetFn_t fn);
+ void getExperienceAdminCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID experienceId, ExperienceGetFn_t fn);
+ void updateExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLSD updateData, ExperienceGetFn_t fn);
void bootstrap(const LLSD& legacyKeys, int initialExpiration);
void exportFile(std::ostream& ostr) const;