xref: /openbmc/phosphor-user-manager/mainapp.cpp (revision 23f82c1ef8c190d0814075fdf791787f2a2329d5)
1 #include "config.h"
2 
3 #include "user_mgr.hpp"
4 
5 #include <sdbusplus/bus.hpp>
6 #include <sdbusplus/server/manager.hpp>
7 
8 // D-Bus root for user manager
9 constexpr auto userManagerRoot = "/xyz/openbmc_project/user";
10 
11 int main(int /*argc*/, char** /*argv*/)
12 {
13     auto bus = sdbusplus::bus::new_default();
14     sdbusplus::server::manager_t objManager(bus, userManagerRoot);
15 
16     phosphor::user::UserMgr userMgr(bus, userManagerRoot);
17 
18     // Claim the bus now
19     bus.request_name(USER_MANAGER_BUSNAME);
20 
21     // Wait for client request
22     bus.process_loop();
23 }
24