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.

62 lines
1.3 KiB

  1. #ifndef _ISEARCHMANAGER_H_
  2. #define _ISEARCHMANAGER_H_
  3. class IMatchSearchResult;
  4. class ISearchManager;
  5. #include "imatchsystem.h"
  6. abstract_class IMatchSearchResult
  7. {
  8. public:
  9. //
  10. // GetOnlineId
  11. // returns result online id to store as reference
  12. //
  13. virtual XUID GetOnlineId() = 0;
  14. //
  15. // GetGameDetails
  16. // returns result game details
  17. //
  18. virtual KeyValues *GetGameDetails() = 0;
  19. //
  20. // IsJoinable and Join
  21. // returns whether result is joinable and initiates join to the result
  22. //
  23. virtual bool IsJoinable() = 0;
  24. virtual void Join() = 0;
  25. };
  26. abstract_class ISearchManager
  27. {
  28. public:
  29. //
  30. // EnableResultsUpdate
  31. // controls whether server data is being updated in the background
  32. //
  33. virtual void EnableResultsUpdate( bool bEnable, KeyValues *pSearchParams = NULL ) = 0;
  34. //
  35. // GetNumResults
  36. // returns number of results discovered and for which data is available
  37. //
  38. virtual int GetNumResults() = 0;
  39. //
  40. // GetResultByIndex / GetResultByOnlineId
  41. // returns result interface to the given result or NULL if result not found or not available
  42. //
  43. virtual IMatchSearchResult* GetResultByIndex( int iResultIdx ) = 0;
  44. virtual IMatchSearchResult* GetResultByOnlineId( XUID xuidResultOnline ) = 0;
  45. //
  46. // Destroy
  47. // destroys the search manager and all its results
  48. //
  49. virtual void Destroy() = 0;
  50. };
  51. #endif // _ISEARCHMANAGER_H_