| #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); |
| } |