1 | #ifndef ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H |
2 | #define ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H |
3 | #include <base/types.h> |
4 | |
5 | class IConsole; |
6 | class IStorage; |
7 | |
8 | class IServerBrowserPingCache |
9 | { |
10 | public: |
11 | virtual ~IServerBrowserPingCache() {} |
12 | |
13 | virtual void Load() = 0; |
14 | |
15 | virtual int NumEntries() const = 0; |
16 | virtual void CachePing(const NETADDR &Addr, int Ping) = 0; |
17 | // Returns -1 if the ping isn't cached. |
18 | virtual int GetPing(const NETADDR *pAddrs, int NumAddrs) const = 0; |
19 | }; |
20 | |
21 | IServerBrowserPingCache *CreateServerBrowserPingCache(IConsole *pConsole, IStorage *pStorage); |
22 | #endif // ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H |
23 | |