diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
| commit | c068f22329d5cc722622a2183bbb22eef2093df7 (patch) | |
| tree | 12d56c1aede67988a55e241364606bfbb4dba933 /src/parsec_server/include/MasterServerItem.h | |
| download | openparsec-main.tar.xz openparsec-main.zip | |
Diffstat (limited to 'src/parsec_server/include/MasterServerItem.h')
| -rw-r--r-- | src/parsec_server/include/MasterServerItem.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/parsec_server/include/MasterServerItem.h b/src/parsec_server/include/MasterServerItem.h new file mode 100644 index 0000000..de7419e --- /dev/null +++ b/src/parsec_server/include/MasterServerItem.h @@ -0,0 +1,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_ */ |
