diff options
author | Andrew A. de Laix <alain@lindenlab.com> | 2010-10-28 16:47:05 -0700 |
---|---|---|
committer | Andrew A. de Laix <alain@lindenlab.com> | 2010-10-28 16:47:05 -0700 |
commit | ca9594af28ce2e1cc8bb333a0fa7384dae718a9a (patch) | |
tree | 891efdede6e6f46f6f0d3999f4b7c692431c328c /indra/viewer_components/updater/llupdaterservice.cpp | |
parent | be8c9fc21758bcbc1d9f3d565b221310344231bd (diff) |
shell of the update checker; it will just print a message to the log depending on the result of the check one time.
Diffstat (limited to 'indra/viewer_components/updater/llupdaterservice.cpp')
-rw-r--r-- | indra/viewer_components/updater/llupdaterservice.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index 28c942b5f2..e0f23722dd 100644 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -26,6 +26,7 @@ #include "linden_common.h" #include "llupdaterservice.h" +#include "llupdatechecker.h" #include "llpluginprocessparent.h" #include <boost/scoped_ptr.hpp> @@ -33,7 +34,9 @@ boost::weak_ptr<LLUpdaterServiceImpl> gUpdater; -class LLUpdaterServiceImpl : public LLPluginProcessParentOwner +class LLUpdaterServiceImpl : + public LLPluginProcessParentOwner, + public LLUpdateChecker::Client { std::string mUrl; std::string mChannel; @@ -42,7 +45,9 @@ class LLUpdaterServiceImpl : public LLPluginProcessParentOwner unsigned int mCheckPeriod; bool mIsChecking; boost::scoped_ptr<LLPluginProcessParent> mPlugin; - + + LLUpdateChecker mUpdateChecker; + public: LLUpdaterServiceImpl(); virtual ~LLUpdaterServiceImpl() {} @@ -62,12 +67,21 @@ public: void startChecking(); void stopChecking(); bool isChecking(); + + // LLUpdateChecker::Client: + virtual void error(std::string const & message); + virtual void optionalUpdate(std::string const & newVersion); + virtual void requiredUpdate(std::string const & newVersion); + virtual void upToDate(void); + }; + LLUpdaterServiceImpl::LLUpdaterServiceImpl() : mIsChecking(false), mCheckPeriod(0), - mPlugin(0) + mPlugin(0), + mUpdateChecker(*this) { // Create the plugin parent, this is the owner. mPlugin.reset(new LLPluginProcessParent(this)); @@ -121,6 +135,8 @@ void LLUpdaterServiceImpl::startChecking() "LLUpdaterService::startCheck()."); } mIsChecking = true; + + mUpdateChecker.check(mUrl, mChannel, mVersion); } } @@ -137,6 +153,15 @@ bool LLUpdaterServiceImpl::isChecking() return mIsChecking; } +void LLUpdaterServiceImpl::error(std::string const & message) {} + +void LLUpdaterServiceImpl::optionalUpdate(std::string const & newVersion) {} + +void LLUpdaterServiceImpl::requiredUpdate(std::string const & newVersion) {} + +void LLUpdaterServiceImpl::upToDate(void) {} + + //----------------------------------------------------------------------- // Facade interface LLUpdaterService::LLUpdaterService() |