summaryrefslogtreecommitdiff
path: root/src/filecache.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-25 11:50:29 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-03-25 11:51:33 +0300
commitf801e16b787f033cea4e473d69b54fe65248a439 (patch)
tree25cd83a122fd4a1cb74d605aecaa65caa1b5f8a7 /src/filecache.h
parent4bf5065a9cdaf55a6915e647e9b5de5281d6622f (diff)
downloadminetest-f801e16b787f033cea4e473d69b54fe65248a439.tar.gz
minetest-f801e16b787f033cea4e473d69b54fe65248a439.tar.bz2
minetest-f801e16b787f033cea4e473d69b54fe65248a439.zip
Texture cache -> Media cache WIP
Diffstat (limited to 'src/filecache.h')
-rw-r--r--src/filecache.h17
1 files changed, 5 insertions, 12 deletions
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