Further updates to IFileSystem.

--HG--
branch : tf2beta
This commit is contained in:
Nicholas Hastings 2013-03-26 08:31:23 -04:00
parent 7f38fa2e9b
commit 5ca391edb8
2 changed files with 26 additions and 11 deletions

View File

@ -378,6 +378,16 @@ public:
#define WHITELIST_SPEW_RELOAD_FILES 0x0002 // show files the filesystem is telling the engine to reload
#define WHITELIST_SPEW_DONT_RELOAD_FILES 0x0004 // show files the filesystem is NOT telling the engine to reload
abstract_class IPureServerWhitelist
{
public:
virtual void AddRef() = 0;
virtual void Release() = 0;
virtual const char *GetFileClass( const char * ) = 0;
virtual int GetTrustedKeyCount() const = 0;
virtual void GetTrustedKey( int keyIndex, int *pBuffer ) = 0;
};
//-----------------------------------------------------------------------------
// Base file system interface
@ -738,7 +748,7 @@ public:
// and the engine should reload it so it can come from Steam.
//
// Be sure to call Release() on pFilesToReload.
virtual void RegisterFileWhitelist( IFileList *pWantCRCList, IFileList *pAllowFromDiskList, IFileList **pFilesToReload ) = 0;
virtual void RegisterFileWhitelist( IPureServerWhitelist *pPureList, IFileList **pFilesToReload ) = 0;
// Called when the client logs onto a server. Any files that came off disk should be marked as
// unverified because this server may have a different set of files it wants to guarantee.
@ -774,11 +784,13 @@ public:
virtual bool IsFileCacheLoaded( void *pFileCache ) = 0;
virtual void DestroyFileCache( void *pFileCache ) = 0;
virtual bool RegisterMemoryFile( void *pFile, void **ppExistingFileWithRef ) = 0;
virtual void UnregisterMemoryFile( void *pFile ) = 0;
virtual bool RegisterMemoryFile( void *pFile, void **ppExistingFileWithRef ) = 0;
virtual void UnregisterMemoryFile( void *pFile ) = 0;
virtual void CacheAllVPKFileHashes(bool bCacheAllVPKHashes, bool bRecalculateAndCheckHashes) = 0;
virtual bool CheckVPKFileHash(int PackFileID, int nPackFileNumber, int nFileFraction, MD5Value_t &md5Value) = 0;
virtual void CacheAllVPKFileHashes( bool bCacheAllVPKHashes, bool bRecalculateAndCheckHashes ) = 0;
virtual bool CheckVPKFileHash( int PackFileID, int nPackFileNumber, int nFileFraction, MD5Value_t &md5Value ) = 0;
virtual void NotifyFileUnloaded( const char *pFileName, const char *pPathId ) = 0;
};
//-----------------------------------------------------------------------------

View File

@ -217,8 +217,8 @@ public:
virtual void EnableWhitelistFileTracking( bool bEnable, bool bCacheAllVPKHashes, bool bRecalculateAndCheckHashes )
{ m_pFileSystemPassThru->EnableWhitelistFileTracking( bEnable, bCacheAllVPKHashes, bRecalculateAndCheckHashes ); }
virtual void RegisterFileWhitelist( IFileList *pForceMatchList, IFileList *pAllowFromDiskList, IFileList **pFilesToReload )
{ m_pFileSystemPassThru->RegisterFileWhitelist( pForceMatchList, pAllowFromDiskList, pFilesToReload ); }
virtual void RegisterFileWhitelist( IPureServerWhitelist *pPureList, IFileList **pFilesToReload )
{ m_pFileSystemPassThru->RegisterFileWhitelist( pPureList, pFilesToReload ); }
virtual void MarkAllCRCsUnverified()
{ m_pFileSystemPassThru->MarkAllCRCsUnverified(); }
virtual void CacheFileCRCs( const char *pPathname, ECacheCRCType eType, IFileList *pFilter )
@ -252,10 +252,13 @@ public:
virtual void UnregisterMemoryFile( void *pFile )
{ m_pFileSystemPassThru->UnregisterMemoryFile( pFile ); }
virtual void CacheAllVPKFileHashes(bool bCacheAllVPKHashes, bool bRecalculateAndCheckHashes)
{ m_pFileSystemPassThru->CacheAllVPKFileHashes(bCacheAllVPKHashes, bRecalculateAndCheckHashes); }
virtual bool CheckVPKFileHash(int PackFileID, int nPackFileNumber, int nFileFraction, MD5Value_t &md5Value)
{ m_pFileSystemPassThru->CheckVPKFileHash(PackFileID, nPackFileNumber, nFileFraction, md5Value); }
virtual void CacheAllVPKFileHashes( bool bCacheAllVPKHashes, bool bRecalculateAndCheckHashes )
{ m_pFileSystemPassThru->CacheAllVPKFileHashes( bCacheAllVPKHashes, bRecalculateAndCheckHashes ); }
virtual bool CheckVPKFileHash( int PackFileID, int nPackFileNumber, int nFileFraction, MD5Value_t &md5Value )
{ return m_pFileSystemPassThru->CheckVPKFileHash( PackFileID, nPackFileNumber, nFileFraction, md5Value ); }
virtual void NotifyFileUnloaded( const char *pFileName, const char *pPathId )
{ m_pFileSystemPassThru->NotifyFileUnloaded( pFileName, pPathId ); }
protected:
IFileSystem *m_pFileSystemPassThru;