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.

83 lines
2.2 KiB

  1. //===== Copyright � 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef MM_TITLE_H
  7. #define MM_TITLE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "../mm_framework.h"
  12. class CMatchTitle :
  13. public IMatchTitle,
  14. public IMatchEventsSink,
  15. public IGameEventListener2
  16. {
  17. // Methods exposed for the framework
  18. public:
  19. virtual InitReturnVal_t Init();
  20. virtual void Shutdown();
  21. // Methods of IMatchTitle
  22. public:
  23. // Title ID
  24. virtual uint64 GetTitleID();
  25. // Service ID for XLSP
  26. virtual uint64 GetTitleServiceID();
  27. // Whether we are a single-player title or multi-player title
  28. virtual bool IsMultiplayer();
  29. // Prepare network startup params for the title
  30. virtual void PrepareNetStartupParams( void *pNetStartupParams );
  31. // Get total number of players supported by the title
  32. virtual int GetTotalNumPlayersSupported();
  33. // Get a guest player name
  34. virtual char const * GetGuestPlayerName( int iUserIndex );
  35. // Decipher title data fields
  36. virtual TitleDataFieldsDescription_t const * DescribeTitleDataStorage();
  37. // Title achievements
  38. virtual TitleAchievementsDescription_t const * DescribeTitleAchievements();
  39. // Title avatar awards
  40. virtual TitleAvatarAwardsDescription_t const * DescribeTitleAvatarAwards();
  41. // Title leaderboards
  42. virtual KeyValues * DescribeTitleLeaderboard( char const *szLeaderboardView );
  43. // Sets up all necessary client-side convars and user info before
  44. // connecting to server
  45. virtual void PrepareClientForConnect( KeyValues *pSettings );
  46. // Start up a listen server with the given settings
  47. virtual bool StartServerMap( KeyValues *pSettings );
  48. // Methods of IMatchEventsSink
  49. public:
  50. virtual void OnEvent( KeyValues *pEvent );
  51. // Methods of IGameEventListener2
  52. public:
  53. // FireEvent is called by EventManager if event just occured
  54. // KeyValue memory will be freed by manager if not needed anymore
  55. virtual void FireGameEvent( IGameEvent *event );
  56. virtual int GetEventDebugID( void );
  57. public:
  58. CMatchTitle();
  59. ~CMatchTitle();
  60. };
  61. // Match title singleton
  62. extern CMatchTitle *g_pMatchTitle;
  63. #endif // MM_TITLE_H