mirror of
https://github.com/ddnet/ddnet.git
synced 2024-10-19 23:38:19 +00:00
f8af7542c6
The host lookup job and the engine interface are independent so they are moved to separate files. The include of `engine.h` in `client.h` is therefore unnecessary and other includes also had to be adjusted because of this. The variable `m_VersionServeraddr` is unused and therefore removed. The host lookup job is currently not used on the client-side.
32 lines
859 B
C++
32 lines
859 B
C++
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
|
#ifndef ENGINE_ENGINE_H
|
|
#define ENGINE_ENGINE_H
|
|
|
|
#include "kernel.h"
|
|
#include <engine/shared/jobs.h>
|
|
|
|
class CFutureLogger;
|
|
class ILogger;
|
|
|
|
class IEngine : public IInterface
|
|
{
|
|
MACRO_INTERFACE("engine", 0)
|
|
|
|
protected:
|
|
class CJobPool m_JobPool;
|
|
|
|
public:
|
|
virtual ~IEngine() = default;
|
|
|
|
virtual void Init() = 0;
|
|
virtual void AddJob(std::shared_ptr<IJob> pJob) = 0;
|
|
virtual void SetAdditionalLogger(std::shared_ptr<ILogger> &&pLogger) = 0;
|
|
static void RunJobBlocking(IJob *pJob);
|
|
};
|
|
|
|
extern IEngine *CreateEngine(const char *pAppname, std::shared_ptr<CFutureLogger> pFutureLogger, int Jobs);
|
|
extern IEngine *CreateTestEngine(const char *pAppname, int Jobs);
|
|
|
|
#endif
|