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
|
|
|
{
|
2015-07-09 00:08:14 +00:00
|
|
|
MACRO_INTERFACE("updater", 0)
|
2014-12-31 14:29:34 +00:00
|
|
|
public:
|
2015-07-09 00:08:14 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
CLEAN = 0,
|
|
|
|
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
|
|
|
|
2015-07-09 00:08:14 +00:00
|
|
|
virtual int 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
|