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.

48 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef IHLTV_H
  9. #define IHLTV_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "interface.h"
  14. class IServer;
  15. class IHLTVDirector;
  16. class IGameEvent;
  17. struct netadr_s;
  18. //-----------------------------------------------------------------------------
  19. // Interface the HLTV module exposes to the engine
  20. //-----------------------------------------------------------------------------
  21. #define INTERFACEVERSION_HLTVSERVER "HLTVServer001"
  22. class IHLTVServer : public IBaseInterface
  23. {
  24. public:
  25. virtual ~IHLTVServer() {}
  26. virtual IServer *GetBaseServer( void ) = 0; // get HLTV base server interface
  27. virtual IHLTVDirector *GetDirector( void ) = 0; // get director interface
  28. virtual int GetHLTVSlot( void ) = 0; // return entity index-1 of HLTV in game
  29. virtual float GetOnlineTime( void ) = 0; // seconds since broadcast started
  30. virtual void GetLocalStats( int &proxies, int &slots, int &specs ) = 0;
  31. virtual void GetGlobalStats( int &proxies, int &slots, int &specs ) = 0;
  32. virtual const netadr_s *GetRelayAddress( void ) = 0; // returns relay address
  33. virtual bool IsMasterProxy( void ) = 0; // true, if this is the HLTV master proxy
  34. virtual bool IsDemoPlayback( void ) = 0; // true if this is a HLTV demo
  35. virtual void BroadcastEvent(IGameEvent *event) = 0; // send a director command to all specs
  36. };
  37. #endif