WIP(serverbrowser): update IServersInfo interface
This commit is contained in:
parent
e194f6ca2c
commit
ad63a53fd3
1 changed files with 12 additions and 6 deletions
|
@ -13,11 +13,11 @@
|
||||||
#define MAX_GAME_DESCRIPTION 8192
|
#define MAX_GAME_DESCRIPTION 8192
|
||||||
#define MAX_SERVER_NAME 2048
|
#define MAX_SERVER_NAME 2048
|
||||||
|
|
||||||
enum ServerResponse
|
enum NServerResponse
|
||||||
{
|
{
|
||||||
ServerResponded = 0,
|
nServerResponded = 0,
|
||||||
ServerFailedToRespond,
|
nServerFailedToRespond,
|
||||||
NoServersListedOnMasterServer,
|
nNoServersListedOnMasterServer,
|
||||||
};
|
};
|
||||||
|
|
||||||
class newgameserver_t
|
class newgameserver_t
|
||||||
|
@ -25,8 +25,11 @@ class newgameserver_t
|
||||||
public:
|
public:
|
||||||
newgameserver_t() = default;
|
newgameserver_t() = default;
|
||||||
|
|
||||||
const char* GetName() const;
|
const char* GetName() const { return m_szServerName; }
|
||||||
void SetName( const char *pName );
|
void SetName( const char *pName )
|
||||||
|
{
|
||||||
|
strncpy( m_szServerName, pName, sizeof(m_szServerName) );
|
||||||
|
}
|
||||||
|
|
||||||
netadr_t m_NetAdr; ///< IP/Query Port/Connection Port for this server
|
netadr_t m_NetAdr; ///< IP/Query Port/Connection Port for this server
|
||||||
int m_nPing; ///< current ping time in milliseconds
|
int m_nPing; ///< current ping time in milliseconds
|
||||||
|
@ -50,6 +53,7 @@ class IServerListResponse
|
||||||
public:
|
public:
|
||||||
// Server has responded ok with updated data
|
// Server has responded ok with updated data
|
||||||
virtual void ServerResponded( newgameserver_t &server ) = 0;
|
virtual void ServerResponded( newgameserver_t &server ) = 0;
|
||||||
|
virtual void RefreshComplete( NServerResponse response ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -94,4 +98,6 @@ public:
|
||||||
};
|
};
|
||||||
#define SERVERLIST_INTERFACE_VERSION "ServerList001"
|
#define SERVERLIST_INTERFACE_VERSION "ServerList001"
|
||||||
|
|
||||||
|
extern IServersInfo *g_pServersInfo;
|
||||||
|
|
||||||
#endif // ISERVERSINFO_H
|
#endif // ISERVERSINFO_H
|
||||||
|
|
Loading…
Add table
Reference in a new issue