Move ParseConnection*() to connection_utils.
We don't need real_shill_provider if USE_DBUS is 0, but we still need
these functions, and they have a duplicate copy in connection_manager,
so put them in utils and deduplicate.
Also moved StringForConnectionType() to connection_utils.
Bug: 28800946
Test: mma
Change-Id: If535fdc52bc8fb267921bea02b31d8d6580d5d54
diff --git a/update_manager/shill_provider.h b/update_manager/shill_provider.h
index b40f255..e6f4628 100644
--- a/update_manager/shill_provider.h
+++ b/update_manager/shill_provider.h
@@ -19,27 +19,12 @@
#include <base/time/time.h>
+#include "update_engine/connection_utils.h"
#include "update_engine/update_manager/provider.h"
#include "update_engine/update_manager/variable.h"
namespace chromeos_update_manager {
-enum class ConnectionType {
- kEthernet,
- kWifi,
- kWimax,
- kBluetooth,
- kCellular,
- kUnknown
-};
-
-enum class ConnectionTethering {
- kNotDetected,
- kSuspected,
- kConfirmed,
- kUnknown,
-};
-
// Provider for networking related information.
class ShillProvider : public Provider {
public:
@@ -50,11 +35,12 @@
// A variable returning the current network connection type. Unknown if not
// connected.
- virtual Variable<ConnectionType>* var_conn_type() = 0;
+ virtual Variable<chromeos_update_engine::ConnectionType>* var_conn_type() = 0;
// A variable returning the tethering mode of a network connection. Unknown if
// not connected.
- virtual Variable<ConnectionTethering>* var_conn_tethering() = 0;
+ virtual Variable<chromeos_update_engine::ConnectionTethering>*
+ var_conn_tethering() = 0;
// A variable returning the time when network connection last changed.
// Initialized to current time.