| #include <sdbusplus/bus.hpp> |
| /** An example dbus client application. |
| * Calls org.freedesktop.login1's ListUsers interface to find all active |
| * users in the system and displays their username. |
| using namespace sdbusplus; |
| auto b = bus::new_default_system(); |
| auto m = b.new_method_call("org.freedesktop.login1", |
| "/org/freedesktop/login1", |
| "org.freedesktop.login1.Manager", "ListUsers"); |
| std::vector<std::tuple<uint32_t, std::string, message::object_path>>; |
| auto users = reply.unpack<return_type>(); |
| std::cout << std::get<std::string>(user) << "\n"; |