ddnet/src/engine/updater.h

31 lines
491 B
C
Raw Normal View History

#ifndef ENGINE_UPDATER_H
#define ENGINE_UPDATER_H
2014-12-31 14:29:34 +00:00
#include "kernel.h"
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,
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;
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