Add a class to handle ExternalStorer file writes.
Signed-off-by: Kasun Athukorala <kasunath@google.com>
Change-Id: Ic1092a6a1da3375f595774018abfecd08a3cb7d8
diff --git a/include/rde/external_storer_interface.hpp b/include/rde/external_storer_interface.hpp
new file mode 100644
index 0000000..05a8616
--- /dev/null
+++ b/include/rde/external_storer_interface.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <string_view>
+
+namespace bios_bmc_smm_error_logger
+{
+namespace rde
+{
+
+/**
+ * @brief Base class for publishing data to ExternalStorer.
+ */
+class ExternalStorerInterface
+{
+ public:
+ virtual ~ExternalStorerInterface() = default;
+
+ /**
+ * @brief Publish JSON string to ExternalStorer.
+ *
+ * @param[in] jsonStr - a valid JSON string.
+ * @return true if successful.
+ */
+ virtual bool publishJson(std::string_view jsonStr) = 0;
+};
+
+} // namespace rde
+} // namespace bios_bmc_smm_error_logger