Implement the DeleteAll interface

Implement the xyz.openbmc_project.Collection.DeleteAll
interface to delete all logging entries.

Change-Id: I007dd8408ebb4e30bf3d3a3c431d747248620aa4
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/delete_all.hpp b/delete_all.hpp
new file mode 100644
index 0000000..9cca2fd
--- /dev/null
+++ b/delete_all.hpp
@@ -0,0 +1,56 @@
+#pragma once
+
+#include "interfaces.hpp"
+#include "manager.hpp"
+
+namespace ibm
+{
+namespace logging
+{
+
+/**
+ *  @class Delete
+ *
+ *  Implements the xyz.openbmc_project.Collect.DeleteAll interface
+ *  that will delete all ibm-logging entries.
+ */
+class DeleteAll : public DeleteAllObject
+{
+  public:
+    DeleteAll() = delete;
+    DeleteAll(const DeleteAll&) = delete;
+    DeleteAll& operator=(const DeleteAll&) = delete;
+    DeleteAll(DeleteAll&&) = default;
+    DeleteAll& operator=(DeleteAll&&) = default;
+    virtual ~DeleteAll() = default;
+
+    /**
+     * Constructor
+     *
+     * @param[in] bus - the D-Bus bus object
+     * @param[in] path - the object path
+     * @param[in] manager - the Manager object
+     */
+    DeleteAll(sdbusplus::bus::bus& bus, const std::string& path,
+              Manager& manager) :
+        DeleteAllObject(bus, path.c_str()),
+        manager(manager)
+    {
+    }
+
+    /**
+     * The Delete D-Bus method
+     */
+    inline void deleteAll() override
+    {
+        manager.eraseAll();
+    }
+
+  private:
+    /**
+     * The Manager object
+     */
+    Manager& manager;
+};
+}
+}