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.

89 lines
2.3 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. // Describe title settings using a bitwise combination of flags
  28. virtual uint64 GetTitleSettingsFlags();
  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 DLC description
  42. virtual TitleDlcDescription_t const * DescribeTitleDlcs();
  43. // Run every frame
  44. virtual void RunFrame() {}
  45. // Title leaderboards
  46. virtual KeyValues * DescribeTitleLeaderboard( char const *szLeaderboardView );
  47. // Sets up all necessary client-side convars and user info before
  48. // connecting to server
  49. virtual void PrepareClientForConnect( KeyValues *pSettings );
  50. // Start up a listen server with the given settings
  51. virtual bool StartServerMap( KeyValues *pSettings );
  52. // Methods of IMatchEventsSink
  53. public:
  54. virtual void OnEvent( KeyValues *pEvent );
  55. // Methods of IGameEventListener2
  56. public:
  57. // FireEvent is called by EventManager if event just occured
  58. // KeyValue memory will be freed by manager if not needed anymore
  59. virtual void FireGameEvent( IGameEvent *event );
  60. virtual int GetEventDebugID( void );
  61. public:
  62. CMatchTitle();
  63. ~CMatchTitle();
  64. };
  65. // Match title singleton
  66. extern CMatchTitle *g_pMatchTitle;
  67. #endif // MM_TITLE_H