1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* MasterServerList.h
*
* Created on: Jan 2, 2013
* Author: jasonw
*/
#ifndef MASTERSERVERLIST_H_
#define MASTERSERVERLIST_H_
/*
*
*/
class MasterServerItem {
public:
MasterServerItem();
MasterServerItem(int SrvID, int CurrPlayers, int MaxPlayers, int PMajor, int PMinor, char ServerName[ MAX_SERVER_NAME + 1 ], char OS[MAX_OSNAME_LEN + 1 ], node_t *node);
MasterServerItem(const MasterServerItem& msi_copy);
virtual ~MasterServerItem();
bool update(int SrvID, int CurrPlayers, int MaxPlayers, int PMajor, int PMinor, char ServerName[ MAX_SERVER_NAME + 1 ], char OS[MAX_OSNAME_LEN + 1 ], node_t *node);
bool remove();
bool operator < (const MasterServerItem &msl) const;
bool operator == (const MasterServerItem &msl) const;
bool operator != (const MasterServerItem &msl) const;
bool isValid() const;
int GetSrvID();
int GetCurrPlayers();
int GetMaxPlayers();
int GetPMajor();
int GetPMinor();
int GetServerName(char *buffer, int buffer_sz);
int GetOS(char *buffer, int buffer_sz);
int GetNode(node_t *node);
private:
int _SrvID;
int _CurrPlayers;
int _MaxPlayers;
int _PMajor;
int _PMinor;
char _ServerName[ MAX_SERVER_NAME + 1 ];
char _OS[MAX_OSNAME_LEN + 1 ];
node_t _Node;
};
#endif /* MASTERSERVERLIST_H_ */
|