diff options
Diffstat (limited to 'plugins/PluginUpdater/src/stdafx.h')
-rw-r--r-- | plugins/PluginUpdater/src/stdafx.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index 41c5d38590..190fb1ee17 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -56,7 +56,6 @@ extern "C" #include <m_autobackups.h>
#define MS_PU_SHOWLIST "PluginUpdater/ShowList"
-#define MS_PU_CHECKUPDATES "PluginUpdater/CheckUpdates"
#include "Notifications.h"
@@ -135,7 +134,6 @@ enum #define DB_SETTING_UPDATE_MODE "UpdateMode"
#define DB_SETTING_UPDATE_URL "UpdateURL"
#define DB_SETTING_NEED_RESTART "NeedRestart"
-#define DB_SETTING_LAST_UPDATE "LastUpdate"
#define DB_SETTING_DONT_SWITCH_TO_STABLE "DontSwitchToStable"
#define DB_SETTING_CHANGEPLATFORM "ChangePlatform"
@@ -158,27 +156,44 @@ extern IconItem iconList[]; struct CMPlugin : public PLUGIN<CMPlugin>
{
+ struct Impl
+ {
+ Impl() :
+ m_timer(Miranda_GetSystemWindow(), LPARAM(this))
+ {
+ m_timer.OnEvent = Callback(this, &Impl::onTimer);
+ }
+
+ CTimer m_timer;
+ void onTimer(CTimer *);
+ }
+ m_impl;
+
CMPlugin();
int Load() override;
int Unload() override;
+ void InitTimer(int mode);
+
+ // variables
+ time_t iNextCheck = 0;
bool bForceRedownload = false, bSilent; // not a db options
// common options
CMOption<bool> bUpdateOnStartup, bUpdateOnPeriod, bOnlyOnceADay, bSilentMode, bBackup, bChangePlatform, bUseHttps, bAutoRestart;
CMOption<int> iPeriod, iPeriodMeasure, iNumberBackups;
+ CMOption<DWORD> dwLastUpdate;
// popup options
CMOption<BYTE> PopupDefColors, PopupLeftClickAction, PopupRightClickAction;
CMOption<DWORD> PopupTimeout;
};
+void DoCheck(bool bSilent = true);
void UninitCheck(void);
void UninitListNew(void);
-int OptInit(WPARAM, LPARAM);
-
class ThreadWatch
{
DWORD &pId;
@@ -226,8 +241,6 @@ void InitNetlib(); void InitIcoLib();
void InitEvents();
void InitListNew();
-void InitCheck();
-void CreateTimer();
void UnloadListNew();
void UnloadNetlib();
@@ -244,7 +257,6 @@ wchar_t* GetDefaultUrl(); bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc);
void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number);
-void __stdcall InitTimer(void *type);
int unzip(const wchar_t *pwszZipFile, wchar_t *pwszDestPath, wchar_t *pwszBackPath, bool ch);
|