Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.2 KiB

  1. #ifndef _ISERVERMANAGER_H_
  2. #define _ISERVERMANAGER_H_
  3. class IServer;
  4. class IServerManager;
  5. #include "imatchsystem.h"
  6. abstract_class IMatchServer
  7. {
  8. public:
  9. //
  10. // GetOnlineId
  11. // returns server online id to store as reference
  12. //
  13. virtual XUID GetOnlineId() = 0;
  14. //
  15. // GetGameDetails
  16. // returns server game details
  17. //
  18. virtual KeyValues *GetGameDetails() = 0;
  19. //
  20. // IsJoinable and Join
  21. // returns whether server is joinable and initiates join to the server
  22. //
  23. virtual bool IsJoinable() = 0;
  24. virtual void Join() = 0;
  25. };
  26. abstract_class IServerManager
  27. {
  28. public:
  29. //
  30. // EnableServersUpdate
  31. // controls whether server data is being updated in the background
  32. //
  33. virtual void EnableServersUpdate( bool bEnable ) = 0;
  34. //
  35. // GetNumServers
  36. // returns number of servers discovered and for which data is available
  37. //
  38. virtual int GetNumServers() = 0;
  39. //
  40. // GetServerByIndex / GetServerByOnlineId
  41. // returns server interface to the given server or NULL if server not found or not available
  42. //
  43. virtual IMatchServer* GetServerByIndex( int iServerIdx ) = 0;
  44. virtual IMatchServer* GetServerByOnlineId( XUID xuidServerOnline ) = 0;
  45. };
  46. #endif // _ISERVERMANAGER_H_