Implement Report persistency
Now Report properties are stored in non-volatile memory. It allows
to restore Report after system restart. Persistency of a report is
controlled by Persistency property in Report interface.
Tested:
- Passed unit tests
- Verified that report is stored in /var/lib/telemetry dir
- Verified that report is restored from storage after telemetry
service start
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Change-Id: Iccfe21603eecffc4e174a4403f699b03de320db9
diff --git a/src/persistent_json_storage.hpp b/src/persistent_json_storage.hpp
index 4b18aa1..2b0f365 100644
--- a/src/persistent_json_storage.hpp
+++ b/src/persistent_json_storage.hpp
@@ -9,9 +9,9 @@
void store(const FilePath& subPath, const nlohmann::json& data) override;
bool remove(const FilePath& subPath) override;
+ bool exist(const FilePath& path) const override;
std::optional<nlohmann::json> load(const FilePath& subPath) const override;
- std::vector<FilePath>
- list(const DirectoryPath& subDirectory) const override;
+ std::vector<FilePath> list() const override;
private:
DirectoryPath directory;