[shill] Use flimflam-esque storage ids
Devices:
device_<MAC>
IPConfig:
ipconfig_<MAC of associated device>_0
Services:
ethernet_<MAC of associated device>
wifi_<MAC of associated device>_<SSID>_<mode>_<security>
cellular_<MAC of associated device>_<Network_name>
BUG=chromium-os:17744
TEST=unit
Change-Id: Ibf061f9c184e7c86f5afcf97d48e321fc74bde1c
Reviewed-on: http://gerrit.chromium.org/gerrit/6412
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/ethernet_service.cc b/ethernet_service.cc
index c7823d8..4193cb0 100644
--- a/ethernet_service.cc
+++ b/ethernet_service.cc
@@ -12,6 +12,7 @@
#include <string>
#include <base/logging.h>
+#include <base/stringprintf.h>
#include <chromeos/dbus/service_constants.h>
#include "shill/control_interface.h"
@@ -26,6 +27,9 @@
namespace shill {
+// static
+const char EthernetService::kServiceType[] = "ethernet";
+
EthernetService::EthernetService(ControlInterface *control_interface,
EventDispatcher *dispatcher,
Manager *manager,
@@ -48,4 +52,8 @@
return ethernet_->GetRpcIdentifier();
}
+string EthernetService::GetStorageIdentifier(const string &mac) {
+ return base::StringPrintf("%s_%s", kServiceType, mac.c_str());
+}
+
} // namespace shill