ddnet/src/engine/client/serverbrowser_http.h
heinrich5991 6600024f24 Allow multiple addresses per server in the serverbrowser
Support is incomplete for `leak_ip_address_to_all_servers` (will only
ping the first address of each server) and for the `leak_ip` setting
(which will also only ping the first address of each server).
2022-07-10 16:52:07 +02:00

30 lines
780 B
C++

#ifndef ENGINE_CLIENT_SERVERBROWSER_HTTP_H
#define ENGINE_CLIENT_SERVERBROWSER_HTTP_H
#include <base/system.h>
class CServerInfo;
class IConsole;
class IEngine;
class IStorage;
class IServerBrowserHttp
{
public:
virtual ~IServerBrowserHttp() {}
virtual void Update() = 0;
virtual bool IsRefreshing() = 0;
virtual void Refresh() = 0;
virtual bool GetBestUrl(const char **pBestUrl) const = 0;
virtual int NumServers() const = 0;
virtual const CServerInfo &Server(int Index) const = 0;
virtual int NumLegacyServers() const = 0;
virtual const NETADDR &LegacyServer(int Index) const = 0;
};
IServerBrowserHttp *CreateServerBrowserHttp(IEngine *pEngine, IConsole *pConsole, IStorage *pStorage, const char *pPreviousBestUrl);
#endif // ENGINE_CLIENT_SERVERBROWSER_HTTP_H