summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-03-31 06:28:44 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-04-11 10:57:48 +0000
commit36db46c210bcd8fabb5947a7bc7ca4933486cdad (patch)
tree80aa8c00c11b53a1071b801f27481f7f748e6788
parent99a8549ecc81017062f2973f90b013926ec89b93 (diff)
downloadphosphor-logging-36db46c210bcd8fabb5947a7bc7ca4933486cdad.tar.gz
phosphor-logging-36db46c210bcd8fabb5947a7bc7ca4933486cdad.zip
entry: implement xyz.openbmc_project.Object.Delete
Implement xyz.openbmc_project.Object.Delete to delete an entry object. Resolves openbmc/openbmc#1327. Change-Id: I265c26fb9434d0d4cb066fbfa85729782318bd8f Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
-rw-r--r--elog_entry.cpp7
-rw-r--r--elog_entry.hpp6
2 files changed, 12 insertions, 1 deletions
diff --git a/elog_entry.cpp b/elog_entry.cpp
index 1360887..07a2854 100644
--- a/elog_entry.cpp
+++ b/elog_entry.cpp
@@ -1,5 +1,5 @@
-#include <cstdio>
#include "elog_entry.hpp"
+#include "log_manager.hpp"
namespace phosphor
{
@@ -8,5 +8,10 @@ namespace logging
// TODO Add interfaces to handle the error log id numbering
+void Entry::delete_()
+{
+ parent.erase(id());
+}
+
} // namespace logging
} // namepsace phosphor
diff --git a/elog_entry.hpp b/elog_entry.hpp
index e23ba76..ac4949a 100644
--- a/elog_entry.hpp
+++ b/elog_entry.hpp
@@ -3,6 +3,7 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/object.hpp>
#include "xyz/openbmc_project/Logging/Entry/server.hpp"
+#include "xyz/openbmc_project/Object/Delete/server.hpp"
#include "org/openbmc/Associations/server.hpp"
namespace phosphor
@@ -12,6 +13,7 @@ namespace logging
using EntryIfaces = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Logging::server::Entry,
+ sdbusplus::xyz::openbmc_project::Object::server::Delete,
sdbusplus::org::openbmc::server::Associations>;
using AssociationList =
@@ -83,6 +85,10 @@ class Entry : public EntryIfaces
Logging::server::Entry::resolved(value);
}
+ /** @brief Delete this d-bus object.
+ */
+ void delete_() override;
+
private:
/** @brief This entry's associations */
AssociationList assocs = {};
OpenPOWER on IntegriCloud