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.

51 lines
1.8 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //===========================================================================//
  9. #ifndef IPRECACHESYSTEM_H
  10. #define IPRECACHESYSTEM_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "tier0/dbg.h"
  15. #include "tier2/tier2.h"
  16. #include "tier2/resourceprecacher.h"
  17. #include "appframework/iappsystem.h"
  18. //-----------------------------------------------------------------------------
  19. // Resource access control API
  20. //-----------------------------------------------------------------------------
  21. //-----------------------------------------------------------------------------
  22. // IResourceAccessControl
  23. // Purpose: Maintains lists of resources to use them as filters to prevent access
  24. // to ensure proper precache behavior in game code
  25. //-----------------------------------------------------------------------------
  26. abstract_class IPrecacheSystem : public IAppSystem
  27. {
  28. public:
  29. // Precaches/uncaches all resources used by a particular system
  30. virtual void Cache( IPrecacheHandler *pPrecacheHandler, PrecacheSystem_t nSystem,
  31. const char *pName, bool bPrecache, ResourceList_t hResourceList, bool bBuildResourceList ) = 0;
  32. virtual void UncacheAll( IPrecacheHandler *pPrecacheHandler ) = 0 ;
  33. virtual void Register( IResourcePrecacher *pResourcePrecacherFirst, PrecacheSystem_t nSystem ) = 0;
  34. // Limits resource access to only resources used by this particular system
  35. // Use GLOBAL system, and NULL name to disable limited resource access
  36. virtual void LimitResourceAccess( PrecacheSystem_t nSystem, const char *pName ) = 0;
  37. virtual void EndLimitedResourceAccess() = 0;
  38. };
  39. DECLARE_TIER2_INTERFACE( IPrecacheSystem, g_pPrecacheSystem );
  40. #endif // IPRECACHESYSTEM_H