Further cleanup around DBus interface classes.
* Removed the "Glib" part from the various DbusGlib class name and added
"Wrapper" instead: only part of the methods here declared have
anything to do with Glib; in essence, this is an interface containing
wrappers for various DBus functions.
* Changed "Dbus" to "DBus", to comply with the rest of the world.
* Renamed the actual implementation "RealDBusWrapper" (instead of
"Concrete").
* Separated out RealDBusWrapper into its own header file. Client code,
which often only cares about the abstract class, does not need to pull
it unless specifically requiring it.
* Cleaned up the includes in these headers.
Aside from all that, also renamed system_state.cc into
real_system_state.cc, as this is what this file contains.
BUG=None
TEST=Unit tests.
Change-Id: I015c407cbc159aba8b5925eb0e916ba604c829cd
Reviewed-on: https://chromium-review.googlesource.com/189373
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/connection_manager.cc b/connection_manager.cc
index 1b436dc..97bc1bd 100644
--- a/connection_manager.cc
+++ b/connection_manager.cc
@@ -24,7 +24,7 @@
namespace {
// Gets the DbusGProxy for FlimFlam. Must be free'd with ProxyUnref()
-bool GetFlimFlamProxy(DbusGlibInterface* dbus_iface,
+bool GetFlimFlamProxy(DBusWrapperInterface* dbus_iface,
const char* path,
const char* interface,
DBusGProxy** out_proxy) {
@@ -45,7 +45,7 @@
// On success, caller owns the GHashTable at out_hash_table.
// Returns true on success.
-bool GetProperties(DbusGlibInterface* dbus_iface,
+bool GetProperties(DBusWrapperInterface* dbus_iface,
const char* path,
const char* interface,
GHashTable** out_hash_table) {
@@ -73,7 +73,7 @@
// Returns (via out_path) the default network path, or empty string if
// there's no network up.
// Returns true on success.
-bool GetDefaultServicePath(DbusGlibInterface* dbus_iface, string* out_path) {
+bool GetDefaultServicePath(DBusWrapperInterface* dbus_iface, string* out_path) {
GHashTable* hash_table = NULL;
TEST_AND_RETURN_FALSE(GetProperties(dbus_iface,
@@ -111,7 +111,7 @@
return kNetUnknown;
}
-bool GetServicePathType(DbusGlibInterface* dbus_iface,
+bool GetServicePathType(DBusWrapperInterface* dbus_iface,
const string& path,
NetworkConnectionType* out_type) {
GHashTable* hash_table = NULL;
@@ -228,7 +228,7 @@
}
bool ConnectionManager::GetConnectionType(
- DbusGlibInterface* dbus_iface,
+ DBusWrapperInterface* dbus_iface,
NetworkConnectionType* out_type) const {
string default_service_path;
TEST_AND_RETURN_FALSE(GetDefaultServicePath(dbus_iface,