diff options
author | Ima Mechanique <ima.mechanique@secondlife.com> | 2014-03-06 13:11:48 +0000 |
---|---|---|
committer | Ima Mechanique <ima.mechanique@secondlife.com> | 2014-03-06 13:11:48 +0000 |
commit | 5067f1eed9f00e93bf287bf0fce69c8212a51ff2 (patch) | |
tree | a5ff315817b103160e112f07ba96b034bc9ce39c /indra/newview/llsyntaxid.h | |
parent | acc71d628dd024059bb221ef260c9d6d12a0cbd2 (diff) |
storm-1831 Converting LLSyntaxIdLSL to a singleton. Adding callback for signalling arrival of Syntax file from capability.
Diffstat (limited to 'indra/newview/llsyntaxid.h')
-rw-r--r-- | indra/newview/llsyntaxid.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 226f1f4941..1b6903f2a2 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -35,6 +35,7 @@ #include "llagent.h" #include "llenvmanager.h" #include "llhttpclient.h" +#include "llsingleton.h" #include "llviewerregion.h" @@ -42,14 +43,15 @@ * @file llsyntaxid.h * @brief Tracks the file needed to decorate the current sim's version of LSL. */ -class LLSyntaxIdLSL +class LLSyntaxIdLSL: public LLSingleton<LLSyntaxIdLSL> { friend class fetchKeywordsFileResponder; public: + typedef boost::signals2::signal<void()> file_fetched_signal_t; -static const std::string CAPABILITY_NAME; -static const std::string FILENAME_DEFAULT; -static const std::string SIMULATOR_FEATURE; + static const std::string CAPABILITY_NAME; + static const std::string FILENAME_DEFAULT; + static const std::string SIMULATOR_FEATURE; protected: //LLViewerRegion* region; @@ -59,6 +61,7 @@ protected: static bool sLoaded; static bool sLoadFailed; static bool sVersionChanged; + static file_fetched_signal_t sFileFetchedSignal; private: std::string mCapabilityName; @@ -73,6 +76,7 @@ private: LLUUID mSyntaxIdNew; + public: LLSyntaxIdLSL(); LLSyntaxIdLSL(std::string filenameDefault, std::string simFeatureName, std::string capabilityName); @@ -93,6 +97,9 @@ public: static bool isSupportedVersion(const LLSD& content); static void setKeywordsXml(const LLSD& content) { sKeywordsXml = content; } + boost::signals2::connection addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb); + void removeFileFetchedCallback(boost::signals2::connection callback); + protected: std::string buildFileNameNew(); @@ -139,5 +146,4 @@ public: * @param content_ref The LSL syntax file for the sim. */ void cacheFile(const LLSD& content_ref); - }; |