From 6778e3b87cc9a6f5d195a2c80e5b499e3d94558b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 27 Jan 2019 02:09:50 +0100 Subject: Add binds to emoji parsing, refactor --- include/dchat/Storage.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/dchat/Storage.hpp (limited to 'include/dchat/Storage.hpp') diff --git a/include/dchat/Storage.hpp b/include/dchat/Storage.hpp new file mode 100644 index 0000000..4f3dfa2 --- /dev/null +++ b/include/dchat/Storage.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include +#include + +namespace dchat +{ + // Throws runtime exception on failure + boost::filesystem::path getHomeDir(); + + // Creates directory if it doesn't exist (recursively). Throws boost exception on failure + boost::filesystem::path getDchatDir(); + + // Creates directory if it doesn't exist (recursively). Throws boost exception on failure + boost::filesystem::path getImagesDir(); + + using LoadBindsCallbackFunc = std::function; + + // @callbackFunc can't be nullptr + void loadBindsFromFile(LoadBindsCallbackFunc callbackFunc); + void replaceBindsInFile(const std::unordered_map &binds); +} \ No newline at end of file -- cgit v1.2.3