diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-29 07:43:28 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-29 07:56:09 +0300 |
commit | 1b68f71348ecf3983b76b40d7940da8377f049b7 (patch) | |
tree | 2974eddaef130a067c26033d60a59fc790365b3d /indra/llmessage/llexperiencecache.h | |
parent | af4ea94efc1999f3b19fd8d643d0331f0b77e265 (diff) |
#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed
Diffstat (limited to 'indra/llmessage/llexperiencecache.h')
-rw-r--r-- | indra/llmessage/llexperiencecache.h | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h index 3ee45da2e7..81e904107f 100644 --- a/indra/llmessage/llexperiencecache.h +++ b/indra/llmessage/llexperiencecache.h @@ -1,25 +1,25 @@ -/** +/** * @file llexperiencecache.h * @brief Caches information relating to experience keys * * $LicenseInfo:firstyear=2012&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2012, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -53,7 +53,7 @@ public: void cleanup(); //------------------------------------------- - // Cache methods + // Cache methods void erase(const LLUUID& key); bool fetch(const LLUUID& key, bool refresh = false); void insert(const LLSD& experience_data); @@ -68,7 +68,7 @@ public: 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 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); @@ -81,13 +81,13 @@ public: 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 NAME; // "name" + static const std::string EXPERIENCE_ID; // "public_id" static const std::string AGENT_ID; // "agent_id" static const std::string GROUP_ID; // "group_id" - static const std::string PROPERTIES; // "properties" - static const std::string EXPIRES; // "expiration" - static const std::string DESCRIPTION; // "description" + static const std::string PROPERTIES; // "properties" + static const std::string EXPIRES; // "expiration" + static const std::string DESCRIPTION; // "description" static const std::string QUOTA; // "quota" static const std::string MATURITY; // "maturity" static const std::string METADATA; // "extended_metadata" @@ -96,12 +96,12 @@ public: static const std::string MISSING; // "DoesNotExist" // should be in sync with experience-api/experiences/models.py - static const int PROPERTY_INVALID; // 1 << 0 - static const int PROPERTY_PRIVILEGED; // 1 << 3 - static const int PROPERTY_GRID; // 1 << 4 - static const int PROPERTY_PRIVATE; // 1 << 5 - static const int PROPERTY_DISABLED; // 1 << 6 - static const int PROPERTY_SUSPENDED; // 1 << 7 + static const int PROPERTY_INVALID; // 1 << 0 + static const int PROPERTY_PRIVILEGED; // 1 << 3 + static const int PROPERTY_GRID; // 1 << 4 + static const int PROPERTY_PRIVATE; // 1 << 5 + static const int PROPERTY_DISABLED; // 1 << 6 + static const int PROPERTY_SUSPENDED; // 1 << 7 private: virtual ~LLExperienceCache(); @@ -110,33 +110,33 @@ private: typedef boost::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLCore::HttpRequest::ptr_t, std::string)> permissionInvoker_fn; - // Callback types for get() + // Callback types for get() typedef boost::signals2::signal < void(const LLSD &) > callback_signal_t; - typedef std::shared_ptr<callback_signal_t> signal_ptr; - // May have multiple callbacks for a single ID, which are - // represented as multiple slots bound to the signal. - // Avoid copying signals via pointers. - typedef std::map<LLUUID, signal_ptr> signal_map_t; - typedef std::map<LLUUID, LLSD> cache_t; - - typedef std::set<LLUUID> RequestQueue_t; + typedef std::shared_ptr<callback_signal_t> signal_ptr; + // May have multiple callbacks for a single ID, which are + // represented as multiple slots bound to the signal. + // Avoid copying signals via pointers. + typedef std::map<LLUUID, signal_ptr> signal_map_t; + typedef std::map<LLUUID, LLSD> cache_t; + + typedef std::set<LLUUID> RequestQueue_t; typedef std::map<LLUUID, F64> PendingQueue_t; - //-------------------------------------------- - static const std::string PRIVATE_KEY; // "private_id" - - // default values - static const F64 DEFAULT_EXPIRATION; // 600.0 - static const S32 DEFAULT_QUOTA; // 128 this is megabytes + //-------------------------------------------- + static const std::string PRIVATE_KEY; // "private_id" + + // 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); //-------------------------------------------- - cache_t mCache; - signal_map_t mSignalMap; - RequestQueue_t mRequestQueue; + cache_t mCache; + signal_map_t mSignalMap; + RequestQueue_t mRequestQueue; PendingQueue_t mPendingQueue; LLFrameTimer mEraseExpiredTimer; // Periodically clean out expired entries from the cache @@ -145,7 +145,7 @@ private: static bool sShutdown; // control for coroutines, they exist out of LLExperienceCache's scope, so they need a static control void idleCoro(); - void eraseExpired(); + void eraseExpired(); void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t); void requestExperiences(); @@ -161,11 +161,11 @@ private: void exportFile(std::ostream& ostr) const; void importFile(std::istream& istr); - // - const cache_t& getCached(); + // + const cache_t& getCached(); - // maps an experience private key to the experience id - LLUUID getExperienceId(const LLUUID& private_key, bool null_if_not_found=false); + // maps an experience private key to the experience id + LLUUID getExperienceId(const LLUUID& private_key, bool null_if_not_found=false); //===================================================================== inline friend std::ostream &operator << (std::ostream &os, const LLExperienceCache &cache) |