[shill] Enable Device objects to persist themselves to disk

BUG=chromium-os:17254
TEST=unit

Change-Id: Ia00bc2658e0fe03e13e399d7afab81cc09aa0195
Reviewed-on: http://gerrit.chromium.org/gerrit/5309
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/control_interface.h b/control_interface.h
index 680ac63..4e5204e 100644
--- a/control_interface.h
+++ b/control_interface.h
@@ -5,6 +5,11 @@
 #ifndef SHILL_CONTROL_INTERFACE_
 #define SHILL_CONTROL_INTERFACE_
 
+#include <algorithm>
+#include <string>
+
+#include <base/logging.h>
+
 namespace shill {
 
 class Device;
@@ -28,6 +33,11 @@
   virtual ManagerAdaptorInterface *CreateManagerAdaptor(Manager *manager) = 0;
   virtual ProfileAdaptorInterface *CreateProfileAdaptor(Profile *profile) = 0;
   virtual ServiceAdaptorInterface *CreateServiceAdaptor(Service *service) = 0;
+
+  static void RpcIdToStorageId(std::string *rpc_id) {
+    CHECK(rpc_id);
+    std::replace(rpc_id->begin(), rpc_id->end(), '/', '_');
+  }
 };
 
 }  // namespace shill