00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef INCL_UPDATE_MANAGER
00037 #define INCL_UPDATE_MANAGER
00038
00039 #include <string>
00040 #include <list>
00041 #include "updater/UpdaterConfig.h"
00042 #include "updater/Updater.h"
00043 #include "updater/UpdaterUI.h"
00044 #include "customization.h"
00045 #include "OutlookConfig.h"
00046
00047 using namespace std;
00048
00049
00057 class UpdateManager : public UpdaterUI {
00058
00059 private:
00060
00062 static UpdateManager* pInstance;
00063
00065 Updater updater;
00066
00068 HWND uiHwnd;
00069
00070 int showMessage();
00071 int getBuildNumberFromVersion(const char* swv);
00072 bool isRecommended();
00073
00074
00075 protected:
00076
00077 UpdateManager(const char* comp, HWND hwnd, OutlookConfig* cs);
00078 ~UpdateManager();
00079
00080
00081 public:
00082
00086 static UpdateManager* getInstance(const char* comp, HWND hwnd);
00087
00088
00090 void setHwnd(HWND hwnd);
00091
00097 int checkIsToUpdate();
00098
00106 void checkForUpdates();
00107
00113 void manualCheckForUpdates();
00114
00120 bool isNewVersionAvailable();
00121
00127 void setURLCheck(const StringBuffer& syncURL);
00128
00130 static void dispose();
00131
00135 bool checkForMandatoryUpdateBeforeStarting();
00136
00137
00138 int32_t askConfirmationForRecommendedUpgrade(const UpdaterConfig& config);
00139 int32_t askConfirmationForMandatoryUpgrade(const UpdaterConfig& config);
00140 int32_t askConfirmationForUpgrade(const UpdaterConfig& config);
00141
00143 void startUpgrade(const UpdaterConfig& config);
00144
00146 void doExitAction(const UpdaterConfig& config);
00147
00148
00149 };
00150
00152 UpdateManager* getUpdateManager(const char* comp, HWND hwnd);
00153
00154 #endif