2015-04-18 19:17:27 +00:00
|
|
|
#ifndef ENGINE_UPDATER_H
|
|
|
|
#define ENGINE_UPDATER_H
|
2014-12-31 14:29:34 +00:00
|
|
|
|
|
|
|
#include "kernel.h"
|
|
|
|
|
2015-04-18 19:17:27 +00:00
|
|
|
class IUpdater : public IInterface
|
2014-12-31 14:29:34 +00:00
|
|
|
{
|
2023-11-28 20:46:03 +00:00
|
|
|
MACRO_INTERFACE("updater")
|
2014-12-31 14:29:34 +00:00
|
|
|
public:
|
2024-06-23 11:46:22 +00:00
|
|
|
enum EUpdaterState
|
2015-07-09 00:08:14 +00:00
|
|
|
{
|
2024-06-23 11:46:22 +00:00
|
|
|
CLEAN,
|
2015-07-09 00:08:14 +00:00
|
|
|
GETTING_MANIFEST,
|
|
|
|
GOT_MANIFEST,
|
|
|
|
PARSING_UPDATE,
|
|
|
|
DOWNLOADING,
|
2015-08-29 20:41:29 +00:00
|
|
|
MOVE_FILES,
|
2015-07-09 00:08:14 +00:00
|
|
|
NEED_RESTART,
|
|
|
|
FAIL,
|
|
|
|
};
|
2014-12-31 14:29:34 +00:00
|
|
|
|
2015-07-09 00:08:14 +00:00
|
|
|
virtual void Update() = 0;
|
|
|
|
virtual void InitiateUpdate() = 0;
|
2014-12-31 14:29:34 +00:00
|
|
|
|
2024-06-23 11:46:22 +00:00
|
|
|
virtual EUpdaterState GetCurrentState() = 0;
|
2017-11-23 14:47:38 +00:00
|
|
|
virtual void GetCurrentFile(char *pBuf, int BufSize) = 0;
|
2015-07-09 00:08:14 +00:00
|
|
|
virtual int GetCurrentPercent() = 0;
|
2014-12-31 14:29:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|