Team Fortress 2 Source Code as on 22/4/2020
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.

59 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #ifndef IREPLAYSYSTEM_H
  5. #define IREPLAYSYSTEM_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. //----------------------------------------------------------------------------------------
  10. #include "appframework/IAppSystem.h"
  11. //----------------------------------------------------------------------------------------
  12. class IClientReplayContext;
  13. class IServerReplayContext;
  14. class IGameEvent;
  15. //----------------------------------------------------------------------------------------
  16. abstract_class IReplaySystem : public IAppSystem
  17. {
  18. public:
  19. // IAppSystem:
  20. virtual bool Connect( CreateInterfaceFn fnFactory ) = 0;
  21. virtual void Disconnect() = 0;
  22. virtual InitReturnVal_t Init() = 0;
  23. virtual void Shutdown() = 0;
  24. // To be called client- & server-side
  25. virtual void Think() = 0;
  26. virtual bool IsReplayEnabled() = 0;
  27. virtual bool IsRecording() = 0;
  28. // To be called client-side only - on dedicated servers, only subs defined
  29. virtual bool CL_Init( CreateInterfaceFn fnClientFactory ) = 0;
  30. virtual void CL_Shutdown() = 0;
  31. virtual void CL_Render() = 0;
  32. virtual IClientReplayContext *CL_GetContext() = 0;
  33. // To be called server-side only
  34. virtual bool SV_Init( CreateInterfaceFn fnFactory ) = 0;
  35. virtual void SV_Shutdown() = 0;
  36. virtual void SV_EndRecordingSession( bool bForceSynchronousPublish = false ) = 0;
  37. virtual void SV_SendReplayEvent( const char *pEventName, int nClientSlot ) = 0;
  38. virtual void SV_SendReplayEvent( IGameEvent *pEvent, int nClientSlot ) = 0;
  39. virtual bool SV_ShouldBeginRecording( bool bIsInWaitingForPlayers ) = 0;
  40. virtual void SV_NotifyReplayRequested() = 0;
  41. virtual IServerReplayContext *SV_GetContext() = 0;
  42. };
  43. //----------------------------------------------------------------------------------------
  44. #define REPLAY_INTERFACE_VERSION "ReplaySystem001"
  45. //----------------------------------------------------------------------------------------
  46. #endif // IREPLAYSYSTEM_H