2010-11-20 10:37:14 +00:00
|
|
|
/* (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. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef ENGINE_MASTERSERVER_H
|
|
|
|
#define ENGINE_MASTERSERVER_H
|
|
|
|
|
|
|
|
#include "kernel.h"
|
|
|
|
|
|
|
|
class IMasterServer : public IInterface
|
|
|
|
{
|
|
|
|
MACRO_INTERFACE("masterserver", 0)
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
MAX_MASTERSERVERS=4
|
|
|
|
};
|
|
|
|
|
2011-02-27 14:03:57 +00:00
|
|
|
virtual void Init() = 0;
|
2010-05-29 07:25:38 +00:00
|
|
|
virtual void SetDefault() = 0;
|
|
|
|
virtual int Load() = 0;
|
|
|
|
virtual int Save() = 0;
|
|
|
|
|
2011-04-04 16:20:05 +00:00
|
|
|
virtual int RefreshAddresses(int Nettype) = 0;
|
2010-05-29 07:25:38 +00:00
|
|
|
virtual void Update() = 0;
|
|
|
|
virtual int IsRefreshing() = 0;
|
|
|
|
virtual NETADDR GetAddr(int Index) = 0;
|
2013-12-31 02:18:37 +00:00
|
|
|
virtual void SetCount(int Index, int Count) = 0;
|
2013-12-31 01:34:33 +00:00
|
|
|
virtual int GetCount(int Index) = 0;
|
2010-05-29 07:25:38 +00:00
|
|
|
virtual const char *GetName(int Index) = 0;
|
2011-03-30 10:08:33 +00:00
|
|
|
virtual bool IsValid(int Index) = 0;
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class IEngineMasterServer : public IMasterServer
|
|
|
|
{
|
|
|
|
MACRO_INTERFACE("enginemasterserver", 0)
|
|
|
|
public:
|
|
|
|
};
|
|
|
|
|
|
|
|
extern IEngineMasterServer *CreateEngineMasterServer();
|
|
|
|
|
|
|
|
#endif
|