From ca9594af28ce2e1cc8bb333a0fa7384dae718a9a Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 28 Oct 2010 16:47:05 -0700 Subject: shell of the update checker; it will just print a message to the log depending on the result of the check one time. --- .../viewer_components/updater/llupdaterservice.cpp | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'indra/viewer_components/updater/llupdaterservice.cpp') 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 @@ -33,7 +34,9 @@ boost::weak_ptr 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 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() -- cgit v1.2.3