summaryrefslogtreecommitdiff
path: root/indra/viewer_components
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-12-10 09:43:01 -0800
committerAndrew A. de Laix <alain@lindenlab.com>2010-12-10 09:43:01 -0800
commitb89b41991e49e24b826d1b44ebfe3587a8b248ab (patch)
tree37536640360038142ba0199ff8f7d2e80c26a7c2 /indra/viewer_components
parent9a3f6c1e0cb690201f91f21e3be393bace827604 (diff)
ui improvements to more closely match UX design.
Diffstat (limited to 'indra/viewer_components')
-rw-r--r--indra/viewer_components/updater/llupdaterservice.cpp17
-rw-r--r--indra/viewer_components/updater/llupdaterservice.h5
2 files changed, 22 insertions, 0 deletions
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp
index b29356b968..78f768facf 100644
--- a/indra/viewer_components/updater/llupdaterservice.cpp
+++ b/indra/viewer_components/updater/llupdaterservice.cpp
@@ -122,6 +122,7 @@ public:
LLUpdaterService::eUpdaterState getState();
void setAppExitCallback(LLUpdaterService::app_exit_callback_t aecb) { mAppExitCallback = aecb;}
+ std::string updatedVersion(void);
bool checkForInstall(bool launchInstaller); // Test if a local install is ready.
bool checkForResume(); // Test for resumeable d/l.
@@ -143,6 +144,8 @@ public:
bool onMainLoop(LLSD const & event);
private:
+ std::string mNewVersion;
+
void restartTimer(unsigned int seconds);
void setState(LLUpdaterService::eUpdaterState state);
void stopTimer();
@@ -254,6 +257,11 @@ LLUpdaterService::eUpdaterState LLUpdaterServiceImpl::getState()
return mState;
}
+std::string LLUpdaterServiceImpl::updatedVersion(void)
+{
+ return mNewVersion;
+}
+
bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
{
bool foundInstall = false; // return true if install is found.
@@ -360,6 +368,7 @@ void LLUpdaterServiceImpl::optionalUpdate(std::string const & newVersion,
std::string const & hash)
{
stopTimer();
+ mNewVersion = newVersion;
mIsDownloading = true;
mUpdateDownloader.download(uri, hash, false);
@@ -371,6 +380,7 @@ void LLUpdaterServiceImpl::requiredUpdate(std::string const & newVersion,
std::string const & hash)
{
stopTimer();
+ mNewVersion = newVersion;
mIsDownloading = true;
mUpdateDownloader.download(uri, hash, true);
@@ -400,6 +410,8 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
event["pump"] = LLUpdaterService::pumpName();
LLSD payload;
payload["type"] = LLSD(LLUpdaterService::DOWNLOAD_COMPLETE);
+ payload["required"] = data["required"];
+ payload["version"] = mNewVersion;
event["payload"] = payload;
LLEventPumps::instance().obtain("mainlooprepeater").post(event);
@@ -578,6 +590,11 @@ void LLUpdaterService::setImplAppExitCallback(LLUpdaterService::app_exit_callbac
return mImpl->setAppExitCallback(aecb);
}
+std::string LLUpdaterService::updatedVersion(void)
+{
+ return mImpl->updatedVersion();
+}
+
std::string const & ll_get_version(void) {
static std::string version("");
diff --git a/indra/viewer_components/updater/llupdaterservice.h b/indra/viewer_components/updater/llupdaterservice.h
index 1ffa609019..421481bc43 100644
--- a/indra/viewer_components/updater/llupdaterservice.h
+++ b/indra/viewer_components/updater/llupdaterservice.h
@@ -90,6 +90,11 @@ public:
app_exit_callback_t aecb = callable;
setImplAppExitCallback(aecb);
}
+
+ // If an update is or has been downloaded, this method will return the
+ // version string for that update. An empty string will be returned
+ // otherwise.
+ std::string updatedVersion(void);
private:
boost::shared_ptr<LLUpdaterServiceImpl> mImpl;