[shill] Enable IPConfig to Store/Load itself
BUG=chromium-os:17256
TEST=unit
Change-Id: I7792156f95ecb2e17afaf4e3250ff3dbc0e3dac9
Reviewed-on: http://gerrit.chromium.org/gerrit/4602
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
diff --git a/ipconfig.h b/ipconfig.h
index 7a930ba..8feee05 100644
--- a/ipconfig.h
+++ b/ipconfig.h
@@ -22,6 +22,7 @@
class ControlInterface;
class Error;
class IPConfigAdaptorInterface;
+class StoreInterface;
// IPConfig superclass. Individual IP configuration types will inherit from this
// class.
@@ -78,6 +79,9 @@
PropertyStore *store() { return &store_; }
+ bool Load(StoreInterface *storage);
+ bool Save(StoreInterface *storage);
+
protected:
// Updates the IP configuration properties and notifies registered listeners
// about the event. |success| is set to false if the IP configuration failed.
@@ -93,6 +97,7 @@
FRIEND_TEST(IPConfigTest, UpdateCallback);
FRIEND_TEST(IPConfigTest, UpdateProperties);
+ static const char kStorageType[];
static const char kType[];
static uint global_serial_;
@@ -104,6 +109,7 @@
scoped_ptr<Callback2<const IPConfigRefPtr&, bool>::Type> update_callback_;
void Init();
+ std::string GetStorageIdentifier();
DISALLOW_COPY_AND_ASSIGN(IPConfig);
};