diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-01-27 02:09:50 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:38:23 +0200 |
commit | 6778e3b87cc9a6f5d195a2c80e5b499e3d94558b (patch) | |
tree | d37e25d48168465bdf0fb29559fe6e186a15e1d7 /include/dchat/Cache.hpp | |
parent | 2446736bc775b22cf5aaae88c2c69c9504e5eb17 (diff) |
Add binds to emoji parsing, refactor
Diffstat (limited to 'include/dchat/Cache.hpp')
-rw-r--r-- | include/dchat/Cache.hpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/include/dchat/Cache.hpp b/include/dchat/Cache.hpp index 4d37b54..8d3f28e 100644 --- a/include/dchat/Cache.hpp +++ b/include/dchat/Cache.hpp @@ -59,12 +59,11 @@ namespace dchat i64 lastAccessed; }; - using LoadBindsCallbackFunc = std::function<void(const std::string &key, const std::string &value)>; // @fileContent contains data allocated with new[], deallocate it with delete[] fileContent.data; // Returned gif should be allocated with @new using CreateGifFunc = std::function<Gif*(StringView fileContent)>; using CreateStaticImageFunc = std::function<StaticImage*(const boost::filesystem::path &filepath)>; - + class Cache { DISABLE_COPY(Cache) @@ -74,16 +73,6 @@ namespace dchat Cache(CreateGifFunc createGifFunc, CreateStaticImageFunc createStaticImageFunc); ~Cache(); - // Creates directory if it doesn't exist (recursively). Throws boost exception on failure - static boost::filesystem::path getDchatDir(); - - // Creates directory if it doesn't exist (recursively). Throws boost exception on failure - static boost::filesystem::path getImagesDir(); - - // @callbackFunc can't be nullptr - static void loadBindsFromFile(LoadBindsCallbackFunc callbackFunc); - static void replaceBindsInFile(const std::unordered_map<std::string, std::string> &binds); - // Get cached content or download it. // Default download file limit is 12MB // Returns ContentByUrlResult describing texture status. |