mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
94acac91a0
The engine now takes `std::shared_ptr<IJob>`, this will ensure the appropriate lifetime of the given parameters, it also allows for proper destruction. Remove the now obsolete `IFetcher` interface and `CFetcher` class. Also adds some locks to `CUpdater`, previously it didn't have any locks at all.
31 lines
491 B
C++
31 lines
491 B
C++
#ifndef ENGINE_UPDATER_H
|
|
#define ENGINE_UPDATER_H
|
|
|
|
#include "kernel.h"
|
|
|
|
class IUpdater : public IInterface
|
|
{
|
|
MACRO_INTERFACE("updater", 0)
|
|
public:
|
|
enum
|
|
{
|
|
CLEAN = 0,
|
|
GETTING_MANIFEST,
|
|
GOT_MANIFEST,
|
|
PARSING_UPDATE,
|
|
DOWNLOADING,
|
|
MOVE_FILES,
|
|
NEED_RESTART,
|
|
FAIL,
|
|
};
|
|
|
|
virtual void Update() = 0;
|
|
virtual void InitiateUpdate() = 0;
|
|
|
|
virtual int GetCurrentState() = 0;
|
|
virtual void GetCurrentFile(char *pBuf, int BufSize) = 0;
|
|
virtual int GetCurrentPercent() = 0;
|
|
};
|
|
|
|
#endif
|