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/README.md b/README.md
index d49159b..61897e4 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@
 
 Consider the following code:
 ```
-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",
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");
diff --git a/sdbusplus/bus.hpp.in b/sdbusplus/bus.hpp.in
index e80d5ed..5e1ee8a 100644
--- a/sdbusplus/bus.hpp.in
+++ b/sdbusplus/bus.hpp.in
@@ -490,13 +490,31 @@
 #endif
 }
 
+/* Create a new default connection: system bus if root, session bus if user */
 inline bus new_default()
 {
     sd_bus* b = nullptr;
-    sd_bus_open(&b);
+    sd_bus_default(&b);
     return bus(b, std::false_type());
 }
 
+/* Create a new default connection to the session bus */
+inline bus new_default_user()
+{
+    sd_bus* b = nullptr;
+    sd_bus_default_user(&b);
+    return bus(b, std::false_type());
+}
+
+/* Create a new default connection to the system bus */
+inline bus new_default_system()
+{
+    sd_bus* b = nullptr;
+    sd_bus_default_system(&b);
+    return bus(b, std::false_type());
+}
+
+/* WARNING: THESE ARE NOT THE FUNCTIONS YOU ARE LOOKING FOR! */
 inline bus new_user()
 {
     sd_bus* b = nullptr;