sdbusplus: better mirror bus aquisition methods
This adds new functions:
* new_default_user() -> return default user bus connection
* new_default_system() -> returns default system connection
And changes new_default() to return the default type of connection for
the user as per the man page:
https://www.freedesktop.org/software/systemd/man/sd_bus_default.html
Also, update the example and the README to use the default bus calls.
Change-Id: I13cd77dda847c4f6018da38e0019816da07710d1
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/example/list-users.cpp b/example/list-users.cpp
index 7b5a1a6..3995f5c 100644
--- a/example/list-users.cpp
+++ b/example/list-users.cpp
@@ -11,7 +11,7 @@
{
using namespace sdbusplus;
- auto b = bus::new_system();
+ auto b = bus::new_default_system();
auto m =
b.new_method_call("org.freedesktop.login1", "/org/freedesktop/login1",
"org.freedesktop.login1.Manager", "ListUsers");