173da6906SKrzysztof Grobelny #pragma once 273da6906SKrzysztof Grobelny 373da6906SKrzysztof Grobelny #include <boost/serialization/strong_typedef.hpp> 473da6906SKrzysztof Grobelny #include <nlohmann/json.hpp> 573da6906SKrzysztof Grobelny 673da6906SKrzysztof Grobelny #include <filesystem> 773da6906SKrzysztof Grobelny #include <optional> 873da6906SKrzysztof Grobelny #include <string> 973da6906SKrzysztof Grobelny 1073da6906SKrzysztof Grobelny namespace interfaces 1173da6906SKrzysztof Grobelny { 1273da6906SKrzysztof Grobelny 1373da6906SKrzysztof Grobelny class JsonStorage 1473da6906SKrzysztof Grobelny { 1573da6906SKrzysztof Grobelny public: 1673da6906SKrzysztof Grobelny BOOST_STRONG_TYPEDEF(std::filesystem::path, FilePath) 1773da6906SKrzysztof Grobelny BOOST_STRONG_TYPEDEF(std::filesystem::path, DirectoryPath) 1873da6906SKrzysztof Grobelny 1973da6906SKrzysztof Grobelny virtual ~JsonStorage() = default; 2073da6906SKrzysztof Grobelny 2173da6906SKrzysztof Grobelny virtual void store(const FilePath& subPath, const nlohmann::json& data) = 0; 2273da6906SKrzysztof Grobelny virtual bool remove(const FilePath& subPath) = 0; 23e2362796SWludzik, Jozef virtual bool exist(const FilePath& path) const = 0; 24*583ba441SPatrick Williams virtual std::optional<nlohmann::json> load( 25*583ba441SPatrick Williams const FilePath& subPath) const = 0; 26e2362796SWludzik, Jozef virtual std::vector<FilePath> list() const = 0; 2773da6906SKrzysztof Grobelny }; 2873da6906SKrzysztof Grobelny 2973da6906SKrzysztof Grobelny } // namespace interfaces 30