log_manager: Cleanup main function
The design direction changed after the commit that added the
log_manager main function, so updating it to the correct usage.
Change-Id: I88459fb65ba6b8272f0f9f85b55f9f837487ffea
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/log_manager.hpp b/log_manager.hpp
index 2b4281d..13e38d9 100644
--- a/log_manager.hpp
+++ b/log_manager.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <sdbusplus/server.hpp>
+#include <sdbusplus/bus.hpp>
#include "xyz/openbmc_project/Logging/Internal/Manager/server.hpp"
namespace phosphor
@@ -23,28 +23,22 @@
* @details A concrete implementation for the
* xyz.openbmc_project.Logging.Internal.Manager DBus API.
*/
-class Manager final :
- public details::ServerObject<details::ManagerIface>
+class Manager : public details::ServerObject<details::ManagerIface>
{
public:
Manager() = delete;
Manager(const Manager&) = delete;
Manager& operator=(const Manager&) = delete;
- Manager(Manager&&) = default;
- Manager& operator=(Manager&&) = default;
- ~Manager() = default;
+ Manager(Manager&&) = delete;
+ Manager& operator=(Manager&&) = delete;
+ virtual ~Manager() = default;
- /** @brief Constructor for the Log Manager object
- * @param[in] bus - DBus bus to attach to.
- * @param[in] busname - Name of DBus bus to own.
- * @param[in] obj - Object path to attach to.
+ /** @brief Constructor to put object onto bus at a dbus path.
+ * @param[in] bus - Bus to attach to.
+ * @param[in] path - Path to attach at.
*/
- Manager(sdbusplus::bus::bus&& bus,
- const char* busname,
- const char* obj);
-
- /** @brief Start processing DBus messages. */
- void run() noexcept;
+ Manager(sdbusplus::bus::bus& bus, const char* path) :
+ details::ServerObject<details::ManagerIface>(bus, path) {};
/*
* @fn commit()
@@ -57,13 +51,6 @@
* error log to be committed.
*/
void commit(uint64_t transactionId, std::string errMsg) override;
-
- private:
- /** @brief Persistent sdbusplus DBus bus connection. */
- sdbusplus::bus::bus _bus;
-
- /** @brief sdbusplus org.freedesktop.DBus.ObjectManager reference. */
- sdbusplus::server::manager::manager _manager;
};
} // namespace logging