diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/panorama/iuifilesystem.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/panorama/iuifilesystem.h')
| -rw-r--r-- | public/panorama/iuifilesystem.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/public/panorama/iuifilesystem.h b/public/panorama/iuifilesystem.h new file mode 100644 index 0000000..10aaf42 --- /dev/null +++ b/public/panorama/iuifilesystem.h @@ -0,0 +1,51 @@ +//=========== Copyright Valve Corporation, All rights reserved. ===============// +// +// Purpose: +//=============================================================================// + +#ifndef IUIFILESYSTEM_H +#define IUIFILESYSTEM_H + +#ifdef _WIN32 +#pragma once +#endif + + +#include "panoramatypes.h" +#include "utlbuffer.h" + +namespace panorama +{ + +typedef void( __cdecl *FileChangeCallback_t )( const char *pFullPath ); + +//----------------------------------------------------------------------------- +// Purpose: FileSystem support +//----------------------------------------------------------------------------- + +typedef void (LoadFileIntoBufferCallback_t)( const char * pchFile, CUtlBuffer &buf, bool bSuccess ); + +class IUIFileSystem +{ +public: + // fully load the file into the buffer object + virtual bool LoadFileIntoBuffer( const char *pchFile, CUtlBuffer &buf, bool bText, FileChangeCallback_t fileChangeCallback = NULL ) = 0; + + virtual void LoadFileIntoBufferAsync( const char *pchFile, CUtlBuffer &buf, bool bText, CUtlDelegate< LoadFileIntoBufferCallback_t > del ) = 0; + + // replace this file with the contents of the buffer object + virtual bool SaveBufferToFile( CUtlBuffer &buf, const char *pchFile ) = 0; + + // return true if this file is on disk (or in a resource file) + virtual bool FileExists( const char *pchFile ) = 0; + + virtual bool RestoreContentFilename( const char *pchFile, CUtlString &fixedFilename ) { return false; } + virtual bool RestoreResourceFilename( const char *pchFile, CUtlString &fixedFilename ) { return false; } + + // Run frame on main thread + virtual void RunFrame() = 0; +}; + + +} +#endif // IUIFILESYSTEM_H |