From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- src/parsec_server/include/MasterServerItem.h | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/parsec_server/include/MasterServerItem.h (limited to 'src/parsec_server/include/MasterServerItem.h') 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_ */ -- cgit v1.2.3