mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 02:28:18 +00:00
41 lines
729 B
C
41 lines
729 B
C
|
#ifndef ENGINE_MASTERSERVER_H
|
||
|
#define ENGINE_MASTERSERVER_H
|
||
|
|
||
|
#include "kernel.h"
|
||
|
|
||
|
class IMasterServer : public IInterface
|
||
|
{
|
||
|
MACRO_INTERFACE("masterserver", 0)
|
||
|
public:
|
||
|
|
||
|
enum
|
||
|
{
|
||
|
MAX_MASTERSERVERS=4
|
||
|
};
|
||
|
|
||
|
virtual void Init(class CEngine *pEngine) = 0;
|
||
|
virtual void SetDefault() = 0;
|
||
|
virtual int Load() = 0;
|
||
|
virtual int Save() = 0;
|
||
|
|
||
|
virtual int RefreshAddresses() = 0;
|
||
|
virtual void Update() = 0;
|
||
|
virtual int IsRefreshing() = 0;
|
||
|
virtual void DumpServers() = 0;
|
||
|
virtual NETADDR GetAddr(int Index) = 0;
|
||
|
virtual const char *GetName(int Index) = 0;
|
||
|
};
|
||
|
|
||
|
class IEngineMasterServer : public IMasterServer
|
||
|
{
|
||
|
MACRO_INTERFACE("enginemasterserver", 0)
|
||
|
public:
|
||
|
};
|
||
|
|
||
|
extern IEngineMasterServer *CreateEngineMasterServer();
|
||
|
|
||
|
#endif
|
||
|
|
||
|
|
||
|
|