diff options
author | elupus <elupus@xbmc.org> | 2011-03-25 19:36:26 +0100 |
---|---|---|
committer | elupus <elupus@xbmc.org> | 2011-03-25 20:04:38 +0100 |
commit | 51edee5aa527f9567d5aa99cfcda67810a1b534b (patch) | |
tree | 1664023717bd271ce9b1a1dab3987f2cb29d9c18 | |
parent | 02525caec30404b74b54e5a59f59c4e19168667c (diff) |
changed: since nothing implemented ICacheInterface, let's drop it.
This functionality is better served using IoControl() calls into the file system
-rw-r--r-- | xbmc/cores/paplayer/CachingCodec.h | 3 | ||||
-rw-r--r-- | xbmc/filesystem/CacheStrategy.h | 16 | ||||
-rw-r--r-- | xbmc/filesystem/File.h | 2 | ||||
-rw-r--r-- | xbmc/filesystem/FileCache.cpp | 7 | ||||
-rw-r--r-- | xbmc/filesystem/FileCache.h | 1 | ||||
-rw-r--r-- | xbmc/filesystem/IFile.h | 3 |
6 files changed, 2 insertions, 30 deletions
diff --git a/xbmc/cores/paplayer/CachingCodec.h b/xbmc/cores/paplayer/CachingCodec.h index 79ecd82235..7c0f65e2cd 100644 --- a/xbmc/cores/paplayer/CachingCodec.h +++ b/xbmc/cores/paplayer/CachingCodec.h @@ -23,13 +23,12 @@ #include "ICodec.h" #include "filesystem/File.h" -#include "filesystem/CacheStrategy.h" class CachingCodec : public ICodec { public: virtual ~CachingCodec() {} - virtual int GetCacheLevel(){ if(m_file.GetCache()) return m_file.GetCache()->GetCacheLevel(); return -1; } + virtual int GetCacheLevel() { return -1; } protected: XFILE::CFile m_file; diff --git a/xbmc/filesystem/CacheStrategy.h b/xbmc/filesystem/CacheStrategy.h index 0d8cef789c..38628aee4b 100644 --- a/xbmc/filesystem/CacheStrategy.h +++ b/xbmc/filesystem/CacheStrategy.h @@ -39,17 +39,6 @@ namespace XFILE { #define CACHE_RC_WOULD_BLOCK -2 #define CACHE_RC_TIMEOUT -3 -/** -*/ -class ICacheInterface -{ -public: - ICacheInterface() { } - virtual ~ICacheInterface() { } - virtual int GetCacheLevel() { return -1; } - -}; - class CCacheStrategy{ public: CCacheStrategy(); @@ -69,8 +58,6 @@ public: virtual bool IsEndOfInput(); virtual void ClearEndOfInput(); - virtual ICacheInterface* GetInterface() { return NULL; } - CEvent m_space; protected: bool m_bEndOfInput; @@ -78,7 +65,7 @@ protected: /** */ -class CSimpleFileCache : public CCacheStrategy, ICacheInterface { +class CSimpleFileCache : public CCacheStrategy { public: CSimpleFileCache(); virtual ~CSimpleFileCache(); @@ -93,7 +80,6 @@ public: virtual int64_t Seek(int64_t iFilePosition); virtual void Reset(int64_t iSourcePosition); virtual void EndOfInput(); - virtual ICacheInterface* GetInterface() { return (ICacheInterface*)this; } int64_t GetAvailableRead(); diff --git a/xbmc/filesystem/File.h b/xbmc/filesystem/File.h index 0ad0dd8caf..c76906d041 100644 --- a/xbmc/filesystem/File.h +++ b/xbmc/filesystem/File.h @@ -61,7 +61,6 @@ public: #define READ_BITRATE 0x10 class CFileStreamBuffer; -class ICacheInterface; class CFile { @@ -94,7 +93,6 @@ public: bool SkipNext(){if (m_pFile) return m_pFile->SkipNext(); return false;} BitstreamStats* GetBitstreamStats() { return m_bitStreamStats; } - ICacheInterface* GetCache() {if (m_pFile) return m_pFile->GetCache(); return NULL;} int IoControl(int request, void* param) { if (m_pFile) return m_pFile->IoControl(request, param); return -1; } IFile *GetImplemenation() { return m_pFile; } diff --git a/xbmc/filesystem/FileCache.cpp b/xbmc/filesystem/FileCache.cpp index d19d58ce9b..596e2c262c 100644 --- a/xbmc/filesystem/FileCache.cpp +++ b/xbmc/filesystem/FileCache.cpp @@ -335,13 +335,6 @@ int64_t CFileCache::GetLength() return m_source.GetLength(); } -ICacheInterface* CFileCache::GetCache() -{ - if(m_pCache) - return m_pCache->GetInterface(); - return NULL; -} - void CFileCache::StopThread(bool bWait /*= true*/) { m_bStop = true; diff --git a/xbmc/filesystem/FileCache.h b/xbmc/filesystem/FileCache.h index 8e00e7cf2f..b928a75393 100644 --- a/xbmc/filesystem/FileCache.h +++ b/xbmc/filesystem/FileCache.h @@ -55,7 +55,6 @@ namespace XFILE virtual int64_t GetPosition(); virtual int64_t GetLength(); - virtual ICacheInterface* GetCache(); IFile *GetFileImp(); virtual CStdString GetContent(); diff --git a/xbmc/filesystem/IFile.h b/xbmc/filesystem/IFile.h index 1dd953d1cc..e23afcd047 100644 --- a/xbmc/filesystem/IFile.h +++ b/xbmc/filesystem/IFile.h @@ -44,8 +44,6 @@ namespace XFILE { -class ICacheInterface; - class IFile { public: @@ -80,7 +78,6 @@ public: virtual bool Rename(const CURL& url, const CURL& urlnew) { return false; } virtual bool SetHidden(const CURL& url, bool hidden) { return false; } - virtual ICacheInterface* GetCache() {return NULL;} virtual int IoControl(int request, void* param) { return -1; } virtual CStdString GetContent() { return "application/octet-stream"; } |