GSConfig.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: GSConfig.h ///////////////////////////////////////////////////////////
  24. // Author: Matthew D. Campbell, Sept 2002
  25. // Description: GameSpy online config
  26. ///////////////////////////////////////////////////////////////////////////////
  27. #pragma once
  28. #ifndef __GSCONFIG_H__
  29. #define __GSCONFIG_H__
  30. #include "Common/AsciiString.h"
  31. #include "Common/STLTypedefs.h"
  32. class GameSpyConfigInterface
  33. {
  34. public:
  35. virtual ~GameSpyConfigInterface() {}
  36. // Pings
  37. virtual std::list<AsciiString> getPingServers(void) = 0;
  38. virtual Int getNumPingRepetitions(void) = 0;
  39. virtual Int getPingTimeoutInMs(void) = 0;
  40. virtual Int getPingCutoffGood( void ) = 0;
  41. virtual Int getPingCutoffBad( void ) = 0; //Bryan sez, Maybe
  42. // QM
  43. virtual std::list<AsciiString> getQMMaps(void) = 0;
  44. virtual Int getQMBotID(void) = 0;
  45. virtual Int getQMChannel(void) = 0;
  46. virtual void setQMChannel(Int channel) = 0;
  47. // Player Info
  48. virtual Int getPointsForRank(Int rank) = 0;
  49. virtual Bool isPlayerVIP(Int id) = 0;
  50. // mangler Info
  51. virtual Bool getManglerLocation(Int index, AsciiString& host, UnsignedShort& port) = 0;
  52. // Ladder / Any other external parsing
  53. virtual AsciiString getLeftoverConfig(void) = 0;
  54. // Custom match
  55. virtual Bool restrictGamesToLobby() = 0;
  56. static GameSpyConfigInterface* create(AsciiString config);
  57. };
  58. extern GameSpyConfigInterface *TheGameSpyConfig;
  59. #endif // __GSCONFIG_H__