#include <UpdateManager.h>
Inherits UpdaterUI.
Public Member Functions | |
void | setHwnd (HWND hwnd) |
Sets the HWND window, used in case of display msgbox. | |
int | checkIsToUpdate () |
check the update on the server. | |
void | checkForUpdates () |
Starts the update check progress. | |
void | manualCheckForUpdates () |
Like checkForUpdates(), but starts directly the upgrade without checking the time. | |
bool | isNewVersionAvailable () |
Returns true if a new version is known to be available for upgrade. | |
void | setURLCheck (const StringBuffer &syncURL) |
Sets the "url-check" value in the updater configuration, given the syncURL. | |
bool | checkForMandatoryUpdateBeforeStarting () |
int32_t | askConfirmationForRecommendedUpgrade (const UpdaterConfig &config) |
int32_t | askConfirmationForMandatoryUpgrade (const UpdaterConfig &config) |
int32_t | askConfirmationForUpgrade (const UpdaterConfig &config) |
void | startUpgrade (const UpdaterConfig &config) |
Starts effectively the upgrade (opens the browser). | |
void | doExitAction (const UpdaterConfig &config) |
Starts effectively the upgrade (opens the browser). | |
Static Public Member Functions | |
static UpdateManager * | getInstance (const char *comp, HWND hwnd) |
Method to get the sole instance. | |
static void | dispose () |
Dispose the static pointer. | |
Protected Member Functions | |
UpdateManager (const char *comp, HWND hwnd, OutlookConfig *cs) | |
Private Member Functions | |
int | showMessage () |
int | getBuildNumberFromVersion (const char *swv) |
bool | isRecommended () |
Private Attributes | |
Updater | updater |
Used to check the update information, and store the config (UpdaterConfig). | |
HWND | uiHwnd |
the hwnd window: if not NULL, will be used to show the messagebox popups. | |
Static Private Attributes | |
static UpdateManager * | pInstance = NULL |
The sole instance. |
Uses the Updater class to handle the https requests to obtain update informations, and to store the configuration. Extends the UpdaterUI interface in order to implement the callbacks from the Updater: askConfirmationForUpgrade(), askConfirmationForRecommendedUpgrade(), startUpgrade().
bool UpdateManager::checkForMandatoryUpdateBeforeStarting | ( | ) |
References Updater::newVersionAvailable(), Updater::setUI(), and updater.
void UpdateManager::checkForUpdates | ( | ) |
Starts the update check progress.
This may result in connecting to the update server, check if a new version is available. If this is not required, we can still notify the user of a new version which was previously postponed (later option). The method returns true iff the check discovers a new version.
References Updater::setUI(), Updater::start(), and updater.
Referenced by updateProcedure().
int UpdateManager::checkIsToUpdate | ( | ) |
check the update on the server.
If it is necessary set a value to 1 return false if there is no action to do return true if there is something to download
References Updater::checkIsToUpdate(), and updater.
Referenced by checkUpdate().
bool UpdateManager::isNewVersionAvailable | ( | ) |
Returns true if a new version is known to be available for upgrade.
This method does not query the upgrade server, but it uses the information available in the config.
References Updater::isNewVersionAvailable(), and updater.
Referenced by isNewSwVersionAvailable(), and updateProcedure().
void UpdateManager::manualCheckForUpdates | ( | ) |
Like checkForUpdates(), but starts directly the upgrade without checking the time.
Also resets the "skipped", so the upgrade is done anyway. This method is called when a manual upgrade is requested (from UI menu).
References Updater::newVersionAvailable(), Updater::setUI(), and updater.
Referenced by updateProcedure().
void UpdateManager::setURLCheck | ( | const StringBuffer & | syncURL | ) |
Sets the "url-check" value in the updater configuration, given the syncURL.
The url-check is composed like: "http://<syncURL_host>/updateserver/update" It must be called everytime the syncURL is changed.
Referenced by OutlookConfig::save().