summaryrefslogtreecommitdiff
path: root/indra/viewer_components/updater/llupdaterservice.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/viewer_components/updater/llupdaterservice.h')
-rw-r--r--indra/viewer_components/updater/llupdaterservice.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/indra/viewer_components/updater/llupdaterservice.h b/indra/viewer_components/updater/llupdaterservice.h
index 752a6f834b..450f19c1c6 100644
--- a/indra/viewer_components/updater/llupdaterservice.h
+++ b/indra/viewer_components/updater/llupdaterservice.h
@@ -43,12 +43,28 @@ public:
// Name of the event pump through which update events will be delivered.
static std::string const & pumpName(void);
+ // Returns true if an update has been completely downloaded and is now ready to install.
+ static bool updateReadyToInstall(void);
+
// Type codes for events posted by this service. Stored the event's 'type' element.
- enum eUpdateEvent {
+ enum eUpdaterEvent {
INVALID,
DOWNLOAD_COMPLETE,
DOWNLOAD_ERROR,
- INSTALL_ERROR
+ INSTALL_ERROR,
+ PROGRESS,
+ STATE_CHANGE
+ };
+
+ enum eUpdaterState {
+ INITIAL,
+ CHECKING_FOR_UPDATE,
+ TEMPORARY_ERROR,
+ DOWNLOADING,
+ INSTALLING,
+ UP_TO_DATE,
+ TERMINAL,
+ FAILURE
};
LLUpdaterService();
@@ -61,10 +77,12 @@ public:
const std::string& version);
void setCheckPeriod(unsigned int seconds);
+ void setBandwidthLimit(U64 bytesPerSecond);
void startChecking(bool install_if_ready = false);
void stopChecking();
bool isChecking();
+ eUpdaterState getState();
typedef boost::function<void (void)> app_exit_callback_t;
template <typename F>
@@ -73,6 +91,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;