diff options
| author | Oz Linden <oz@lindenlab.com> | 2010-12-24 07:41:41 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2010-12-24 07:41:41 -0500 |
| commit | 14d830ca43a7114140ebeb16a76829db4d21a95b (patch) | |
| tree | 169ab24a903d59c762259810de684f1dcb8c4186 /indra/viewer_components/updater/llupdaterservice.h | |
| parent | 551bfb88fce8a9cd6faac440e3d89d79213550ed (diff) | |
| parent | 5a4bb72b8d37ca51deb84e1490fdefe2908d2d59 (diff) | |
merge improved fix for STORM_785
Diffstat (limited to 'indra/viewer_components/updater/llupdaterservice.h')
| -rw-r--r-- | indra/viewer_components/updater/llupdaterservice.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/indra/viewer_components/updater/llupdaterservice.h b/indra/viewer_components/updater/llupdaterservice.h index 752a6f834b..421481bc43 100644 --- a/indra/viewer_components/updater/llupdaterservice.h +++ b/indra/viewer_components/updater/llupdaterservice.h @@ -43,12 +43,27 @@ 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, + DOWNLOADING, + INSTALLING, + UP_TO_DATE, + TERMINAL, + FAILURE }; LLUpdaterService(); @@ -61,10 +76,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 +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; |
