From f801e16b787f033cea4e473d69b54fe65248a439 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 25 Mar 2012 11:50:29 +0300 Subject: Texture cache -> Media cache WIP --- src/filecache.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/filecache.h') diff --git a/src/filecache.h b/src/filecache.h index 35ae9aa7d..ae3fbc602 100644 --- a/src/filecache.h +++ b/src/filecache.h @@ -52,28 +52,21 @@ public: Loads a file based on a check sum, which may be any kind of rather unique byte sequence. Returns true, if the file could be written into os, false otherwise. - A file name is required to give the disk file a name that - has the right file name extension (e.g. ".png"). */ - bool loadByChecksum(const std::string &name, std::ostream &os, - const std::string &checksum); + bool loadByChecksum(const std::string &checksum, std::ostream &os); /* Stores a file in the cache based on its checksum. Returns true on success, false otherwise. */ - bool updateByChecksum(const std::string &name, const std::string &data, - const std::string &checksum); + bool updateByChecksum(const std::string &checksum, const std::string &data); private: std::string m_dir; - bool loadByPath(const std::string &name, std::ostream &os, - const std::string &path); - bool updateByPath(const std::string &name, const std::string &data, - const std::string &path); - std::string getPathFromChecksum(const std::string &name, - const std::string &checksum); + bool loadByPath(const std::string &path, std::ostream &os); + bool updateByPath(const std::string &path, const std::string &data); + std::string getPathFromChecksum(const std::string &checksum); }; #endif -- cgit v1.2.3