Skip to content

Commit c4b93b3

Browse files
committed
WIP(serverbrowser): update IServersInfo interface
1 parent 41aa50e commit c4b93b3

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

public/engine/iserversinfo.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,23 @@
1313
#define MAX_GAME_DESCRIPTION 8192
1414
#define MAX_SERVER_NAME 2048
1515

16-
enum ServerResponse
16+
enum NServerResponse
1717
{
18-
ServerResponded = 0,
19-
ServerFailedToRespond,
20-
NoServersListedOnMasterServer,
18+
nServerResponded = 0,
19+
nServerFailedToRespond,
20+
nNoServersListedOnMasterServer,
2121
};
2222

2323
class newgameserver_t
2424
{
2525
public:
2626
newgameserver_t() = default;
2727

28-
const char* GetName() const;
29-
void SetName( const char *pName );
28+
const char* GetName() const { return m_szServerName; }
29+
void SetName( const char *pName )
30+
{
31+
strncpy( m_szServerName, pName, sizeof(m_szServerName) );
32+
}
3033

3134
netadr_t m_NetAdr; ///< IP/Query Port/Connection Port for this server
3235
int m_nPing; ///< current ping time in milliseconds
@@ -50,6 +53,7 @@ class IServerListResponse
5053
public:
5154
// Server has responded ok with updated data
5255
virtual void ServerResponded( newgameserver_t &server ) = 0;
56+
virtual void RefreshComplete( NServerResponse response ) = 0;
5357
};
5458

5559
//-----------------------------------------------------------------------------
@@ -94,4 +98,6 @@ class IServersInfo
9498
};
9599
#define SERVERLIST_INTERFACE_VERSION "ServerList001"
96100

101+
extern IServersInfo *g_pServersInfo;
102+
97103
#endif // ISERVERSINFO_H

0 commit comments

Comments
 (0)