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.

41 lines
1.1 KiB

  1. //========= Copyright (c), Valve Corporation, All rights reserved. ============//
  2. #ifndef DEMO_STREAM_HDR
  3. #define DEMO_STREAM_HDR
  4. class CDemoFile;
  5. // this is both an interface and a default, empty implementation of a demo stream
  6. // The empty implementation is needed to avoid having NULL demostream - all the legacy d
  7. class IDemoStream
  8. {
  9. public:
  10. virtual ~IDemoStream() {}
  11. virtual bool IsOpen() { return false; }
  12. virtual CDemoFile *IsDemoFile() { return NULL; } // by default, it is NOT a demofile
  13. virtual void Close() {}
  14. virtual const char* GetUrl( void ) { return ""; }
  15. virtual float GetTicksPerSecond( void ) { return 64; }
  16. virtual float GetTicksPerFrame( void ) { return 1; }
  17. virtual int GetTotalTicks( void ) { return 0; }
  18. };
  19. class IDemoStreamClient
  20. {
  21. public:
  22. struct DemoStreamReference_t
  23. {
  24. int nTick;
  25. int nSkipTicks;
  26. int nFragment;
  27. };
  28. virtual void OnDemoStreamStart( const DemoStreamReference_t &start, int nResync ) {}
  29. virtual bool OnDemoStreamRestarting(){ return false; }
  30. virtual void OnDemoStreamStop() {}
  31. virtual void OnDemoStreamDelta() {}
  32. };
  33. #endif // DEMO_STREAM_HDR