summaryrefslogtreecommitdiffstats
path: root/phosphor-ldap-config/ldap_configuration.hpp
diff options
context:
space:
mode:
authorNagaraju Goruganti <ngorugan@in.ibm.com>2018-09-18 09:55:09 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-04 15:14:12 -0400
commit24194bd9672083de9eb4a33ff8e8369b46f823bf (patch)
tree179ae467f074375e062bed872073e22b398ea85b /phosphor-ldap-config/ldap_configuration.hpp
parentf1940d9e431eecfd900b2532d1255709fa416814 (diff)
downloadphosphor-user-manager-24194bd9672083de9eb4a33ff8e8369b46f823bf.tar.gz
phosphor-user-manager-24194bd9672083de9eb4a33ff8e8369b46f823bf.zip
phosphor-ldap-conf: Implement the Delete interface
Implement the xyz.openbmc_project.Object.Delete interface to delete LDAP config object. Change-Id: Ia7413fd10c91ad5c79286fbe4a00740ced42aad6 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Diffstat (limited to 'phosphor-ldap-config/ldap_configuration.hpp')
-rw-r--r--phosphor-ldap-config/ldap_configuration.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/phosphor-ldap-config/ldap_configuration.hpp b/phosphor-ldap-config/ldap_configuration.hpp
index a0324c1..58e9930 100644
--- a/phosphor-ldap-config/ldap_configuration.hpp
+++ b/phosphor-ldap-config/ldap_configuration.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "config.h"
+#include <xyz/openbmc_project/Object/Delete/server.hpp>
#include <xyz/openbmc_project/User/Ldap/Config/server.hpp>
#include <xyz/openbmc_project/User/Ldap/Create/server.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
@@ -23,7 +24,8 @@ static constexpr auto linuxNsSwitchFile = "/etc/nsswitch_linux.conf";
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
namespace ldap_base = sdbusplus::xyz::openbmc_project::User::Ldap::server;
-using ConfigIface = sdbusplus::server::object::object<ldap_base::Config>;
+using ConfigIface = sdbusplus::server::object::object<
+ ldap_base::Config, sdbusplus::xyz::openbmc_project::Object::server::Delete>;
using CreateIface = sdbusplus::server::object::object<ldap_base::Create>;
class ConfigMgr;
@@ -116,6 +118,10 @@ class Config : public ConfigIface
*/
ldap_base::Config::Type lDAPType(ldap_base::Config::Type value) override;
+ /** @brief Delete this D-bus object.
+ */
+ void delete_() override;
+
private:
std::string configFilePath{};
@@ -190,6 +196,10 @@ class ConfigMgr : public CreateIface
*/
virtual void restartService(const std::string& service);
+ /** @brief delete the config D-Bus object.
+ */
+ void deleteObject();
+
private:
/** @brief Persistent sdbusplus D-Bus bus connection. */
sdbusplus::bus::bus& bus;
OpenPOWER on IntegriCloud