xref: /openbmc/phosphor-user-manager/mainapp.cpp (revision 5c028e17a79b62f75bb05658f65648a3d9218dff)
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 
main(int,char **)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