summaryrefslogtreecommitdiff
path: root/indra/newview/llsyntaxid.cpp
diff options
context:
space:
mode:
authorIma Mechanique <ima.mechanique@secondlife.com>2014-03-06 13:11:48 +0000
committerIma Mechanique <ima.mechanique@secondlife.com>2014-03-06 13:11:48 +0000
commit5067f1eed9f00e93bf287bf0fce69c8212a51ff2 (patch)
treea5ff315817b103160e112f07ba96b034bc9ce39c /indra/newview/llsyntaxid.cpp
parentacc71d628dd024059bb221ef260c9d6d12a0cbd2 (diff)
storm-1831 Converting LLSyntaxIdLSL to a singleton. Adding callback for signalling arrival of Syntax file from capability.
Diffstat (limited to 'indra/newview/llsyntaxid.cpp')
-rw-r--r--indra/newview/llsyntaxid.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index 3d63ab93a0..7deb976c2a 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -91,6 +91,8 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref)
LL_ERRS("SyntaxLSL")
<< "Syntax file '" << mFileSpec << "' contains invalid LLSD!" << LL_ENDL;
}
+
+ LLSyntaxIdLSL::sFileFetchedSignal();
}
void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref)
@@ -108,7 +110,6 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref)
<< "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL;
}
-
//-----------------------------------------------------------------------------
// LLSyntaxIdLSL
//-----------------------------------------------------------------------------
@@ -121,6 +122,7 @@ LLSD LLSyntaxIdLSL::sKeywordsXml;
bool LLSyntaxIdLSL::sLoaded;
bool LLSyntaxIdLSL::sLoadFailed;
bool LLSyntaxIdLSL::sVersionChanged;
+LLSyntaxIdLSL::file_fetched_signal_t LLSyntaxIdLSL::sFileFetchedSignal;
/**
* @brief LLSyntaxIdLSL constructor
@@ -251,6 +253,7 @@ void LLSyntaxIdLSL::fetchKeywordsFile()
<< LL_ENDL;
}
+
//-----------------------------------------------------------------------------
// initialise
//-----------------------------------------------------------------------------
@@ -413,3 +416,13 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD()
}
sLoadFailed = !sLoaded;
}
+
+boost::signals2::connection LLSyntaxIdLSL::addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb)
+{
+ return sFileFetchedSignal.connect(cb);
+}
+
+void LLSyntaxIdLSL::removeFileFetchedCallback(boost::signals2::connection callback)
+{
+ sFileFetchedSignal.disconnect(callback);
+}