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/interfaces/json_storage.hpp b/src/interfaces/json_storage.hpp
index badd938..491d4d9 100644
--- a/src/interfaces/json_storage.hpp
+++ b/src/interfaces/json_storage.hpp
@@ -20,10 +20,10 @@
virtual void store(const FilePath& subPath, const nlohmann::json& data) = 0;
virtual bool remove(const FilePath& subPath) = 0;
+ virtual bool exist(const FilePath& path) const = 0;
virtual std::optional<nlohmann::json>
load(const FilePath& subPath) const = 0;
- virtual std::vector<FilePath>
- list(const DirectoryPath& subDirectory) const = 0;
+ virtual std::vector<FilePath> list() const = 0;
};
} // namespace interfaces