blob: bf8c0d97f83e4e37b1790c1d2e68d2165d45b5c6 [file] [log] [blame]
#include "config.h"
#include "manager.hpp"
#include <sdbusplus/asio/connection.hpp>
int main(int /*argc*/, char** /*argv*/)
{
try
{
auto io_con = std::make_shared<boost::asio::io_context>();
auto connection =
std::make_shared<sdbusplus::asio::connection>(*io_con);
connection->request_name(BUSNAME);
auto server = sdbusplus::asio::object_server(connection);
std::shared_ptr<sdbusplus::asio::dbus_interface> interface =
server.add_interface(OBJPATH, IFACE);
auto vpdManager = std::make_shared<openpower::vpd::manager::Manager>(
io_con, interface, connection);
interface->initialize();
// Start event loop.
io_con->run();
exit(EXIT_SUCCESS);
}
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
}
exit(EXIT_FAILURE);
}