[shill] Begin wiring SetProperty
Create a PropertyStoreInterface that can be implemented by Device,
Service, Manager, etc to handle getting/setting of properties. The
various DBusAdaptor subclasses can dispatch incoming calls to their
associated implementation object based on the names of the properties
and/or the types of the arguments.
BUG=chromium-os:16343
TEST=unit tests
Change-Id: If7abb0ffa623e59288943b4ed1f49832a92524ea
Reviewed-on: http://gerrit.chromium.org/gerrit/2408
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/manager.h b/manager.h
index 2ad0d72..58d4407 100644
--- a/manager.h
+++ b/manager.h
@@ -13,16 +13,18 @@
#include "shill/device.h"
#include "shill/device_info.h"
+#include "shill/property_store_interface.h"
#include "shill/service.h"
#include "shill/shill_event.h"
namespace shill {
class ControlInterface;
-class ManagerAdaptorInterface;
+class Error;
class EventDispatcher;
+class ManagerAdaptorInterface;
-class Manager {
+class Manager : public PropertyStoreInterface {
public:
// A constructor for the Manager object
Manager(ControlInterface *control_interface,
@@ -42,6 +44,13 @@
ServiceRefPtr FindService(const std::string& name);
+ // Implementation of PropertyStoreInterface
+ bool SetBoolProperty(const std::string& name, bool value, Error *error);
+
+ bool SetStringProperty(const std::string& name,
+ const std::string& value,
+ Error *error);
+
private:
scoped_ptr<ManagerAdaptorInterface> adaptor_;
DeviceInfo device_info_;