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.

123 lines
3.1 KiB

  1. //===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef IMATCHFRAMEWORK_H
  8. #define IMATCHFRAMEWORK_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #define CONTEAMMATCH
  13. class IMatchFramework;
  14. class IMatchSession;
  15. #include "appframework/iappsystem.h"
  16. #include "tier1/interface.h"
  17. #include "keyvalues.h"
  18. #if !defined( _X360 )
  19. #include "xbox/xboxstubs.h"
  20. #endif
  21. #include "inetchannel.h"
  22. #include "imatchasync.h"
  23. #include "imatchtitle.h"
  24. #include "imatchnetworkmsg.h"
  25. #include "imatchextensions.h"
  26. #include "imatchevents.h"
  27. #include "imatchsystem.h"
  28. #include "iplayermanager.h"
  29. #include "iplayer.h"
  30. #include "iservermanager.h"
  31. #include "imatchvoice.h"
  32. #include "isearchmanager.h"
  33. #include "idatacenter.h"
  34. #include "idlcmanager.h"
  35. typedef void (*RankedMatchStartCallback)( KeyValues *pSettings, uint32 volatile *pResult );
  36. abstract_class IMatchFramework : public IAppSystem
  37. {
  38. public:
  39. // Run frame of the matchmaking framework
  40. virtual void RunFrame() = 0;
  41. // Get matchmaking extensions
  42. virtual IMatchExtensions * GetMatchExtensions() = 0;
  43. // Get events container
  44. virtual IMatchEventsSubscription * GetEventsSubscription() = 0;
  45. // Get the matchmaking title interface
  46. virtual IMatchTitle * GetMatchTitle() = 0;
  47. // Get the match session interface of the current match framework type
  48. virtual IMatchSession * GetMatchSession() = 0;
  49. // Get the network msg encode/decode factory
  50. virtual IMatchNetworkMsgController * GetMatchNetworkMsgController() = 0;
  51. // Get the match system
  52. virtual IMatchSystem * GetMatchSystem() = 0;
  53. // Send the key values back to the server
  54. virtual void ApplySettings( KeyValues* keyValues ) = 0;
  55. // Entry point to create session
  56. virtual void CreateSession( KeyValues *pSettings ) = 0;
  57. // Entry point to match into a session
  58. virtual void MatchSession( KeyValues *pSettings ) = 0;
  59. // Accept invite
  60. virtual void AcceptInvite( int iController ) = 0;
  61. // Close the session
  62. virtual void CloseSession() = 0;
  63. // Checks to see if the current game is being played online ( as opposed to locally against bots )
  64. virtual bool IsOnlineGame( void ) = 0;
  65. // Called by the client to notify matchmaking that it should update matchmaking properties based
  66. // on player distribution among the teams.
  67. virtual void UpdateTeamProperties( KeyValues *pTeamProperties ) = 0;
  68. };
  69. #define IMATCHFRAMEWORK_VERSION_STRING "MATCHFRAMEWORK_001"
  70. abstract_class IMatchSession
  71. {
  72. public:
  73. // Get an internal pointer to session system-specific data
  74. virtual KeyValues * GetSessionSystemData() = 0;
  75. // Get an internal pointer to session settings
  76. virtual KeyValues * GetSessionSettings() = 0;
  77. // Update session settings, only changing keys and values need
  78. // to be passed and they will be updated
  79. virtual void UpdateSessionSettings( KeyValues *pSettings ) = 0;
  80. // Issue a session command
  81. virtual void Command( KeyValues *pCommand ) = 0;
  82. // Get the lobby or XSession ID
  83. virtual uint64 GetSessionID() = 0;
  84. // Callback when team changes
  85. virtual void UpdateTeamProperties( KeyValues *pTeamProperties ) = 0;
  86. };
  87. #endif // IMATCHFRAMEWORK_H