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.1 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef XBOXINSTALLER_H
  7. #define XBOXINSTALLER_H
  8. #include "tier0/platform.h"
  9. #if defined( PLATFORM_X360 )
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "appframework/iappsystem.h"
  14. #define SOURCE_SECTOR_SIZE 2048 // DVD Sector Size
  15. #define TARGET_SECTOR_SIZE 512 // HDD Sector Size
  16. // all CStrike15 cached files relative to this, having a parent dir is critical
  17. // the cache is a shared resource among titles, using the simple root would be VERY bad
  18. #define CACHE_PATH_CSTIKRE15 "cache:/cs1501"
  19. struct CopyStats_t
  20. {
  21. DWORD m_InstallStartTime;
  22. DWORD m_InstallStopTime;
  23. char m_srcFilename[MAX_PATH];
  24. char m_dstFilename[MAX_PATH];
  25. DWORD m_ReadSize;
  26. DWORD m_WriteSize;
  27. DWORD m_BytesCopied;
  28. DWORD m_TotalReadTime;
  29. DWORD m_TotalWriteTime;
  30. DWORD m_TotalReadSize;
  31. DWORD m_TotalWriteSize;
  32. DWORD m_BufferReadSize;
  33. DWORD m_BufferWriteSize;
  34. DWORD m_BufferReadTime;
  35. DWORD m_BufferWriteTime;
  36. DWORD m_CopyTime;
  37. DWORD m_CopyErrors;
  38. DWORD m_NumReadBuffers;
  39. DWORD m_NumWriteBuffers;
  40. };
  41. abstract_class IXboxInstaller : public IAppSystem
  42. {
  43. public:
  44. virtual bool Setup( bool bForceInstall = false ) = 0;
  45. virtual void ResetSetup() = 0;
  46. virtual bool Start() = 0;
  47. virtual void Stop() = 0;
  48. virtual bool IsStopped( bool bForceStop ) = 0;
  49. virtual DWORD GetTotalSize() = 0;
  50. virtual DWORD GetVersion() = 0;
  51. virtual const CopyStats_t *GetCopyStats() = 0;
  52. virtual bool IsInstallEnabled() = 0;
  53. virtual bool IsFullyInstalled() = 0;
  54. // hint to the other systems that may allow a restart
  55. virtual bool ShouldRestart() = 0;
  56. // prefer a restart, but until that happens...
  57. // called by other systems when safe to alter search paths
  58. virtual bool ForceCachePaths() = 0;
  59. virtual void SpewStatus() = 0;
  60. };
  61. DECLARE_TIER1_INTERFACE( IXboxInstaller, g_pXboxInstaller );
  62. extern bool IsAlreadyInstalledToXboxHDDCache();
  63. #endif // _X360
  64. #endif // XBOXINSTALLER_H