[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_dbus_adaptor.cc b/manager_dbus_adaptor.cc
index 9b6c839..b53dc5f 100644
--- a/manager_dbus_adaptor.cc
+++ b/manager_dbus_adaptor.cc
@@ -6,11 +6,17 @@
 
 #include <map>
 #include <string>
+#include <vector>
 
 #include <base/logging.h>
+#include <dbus-c++/dbus.h>
+
+#include "shill/error.h"
+#include "shill/manager.h"
 
 using std::map;
 using std::string;
+using std::vector;
 
 namespace shill {
 
@@ -30,25 +36,25 @@
 
 void ManagerDBusAdaptor::UpdateRunning() {}
 
-void ManagerDBusAdaptor::EmitBoolChanged(const std::string& name, bool value) {
+void ManagerDBusAdaptor::EmitBoolChanged(const string &name, bool value) {
   PropertyChanged(name, DBusAdaptor::BoolToVariant(value));
 }
 
-void ManagerDBusAdaptor::EmitUintChanged(const std::string& name,
+void ManagerDBusAdaptor::EmitUintChanged(const string &name,
                                          uint32 value) {
-  PropertyChanged(name, DBusAdaptor::UInt32ToVariant(value));
+  PropertyChanged(name, DBusAdaptor::Uint32ToVariant(value));
 }
 
-void ManagerDBusAdaptor::EmitIntChanged(const std::string& name, int value) {
-  PropertyChanged(name, DBusAdaptor::IntToVariant(value));
+void ManagerDBusAdaptor::EmitIntChanged(const string &name, int value) {
+  PropertyChanged(name, DBusAdaptor::Int32ToVariant(value));
 }
 
-void ManagerDBusAdaptor::EmitStringChanged(const std::string& name,
-                                           const std::string& value) {
+void ManagerDBusAdaptor::EmitStringChanged(const string &name,
+                                           const string &value) {
   PropertyChanged(name, DBusAdaptor::StringToVariant(value));
 }
 
-void ManagerDBusAdaptor::EmitStateChanged(const std::string& new_state) {
+void ManagerDBusAdaptor::EmitStateChanged(const string &new_state) {
   StateChanged(new_state);
 }
 
@@ -57,75 +63,76 @@
   return map<string, ::DBus::Variant>();
 }
 
-void ManagerDBusAdaptor::SetProperty(const string& name,
-                                     const ::DBus::Variant& value,
+void ManagerDBusAdaptor::SetProperty(const string &name,
+                                     const ::DBus::Variant &value,
                                      ::DBus::Error &error) {
+  DBusAdaptor::DispatchOnType(manager_, name, value, error);
 }
 
 string ManagerDBusAdaptor::GetState(::DBus::Error &error) {
   return string();
 }
 
-::DBus::Path ManagerDBusAdaptor::CreateProfile(const string& name,
+::DBus::Path ManagerDBusAdaptor::CreateProfile(const string &name,
                                                ::DBus::Error &error) {
   return ::DBus::Path();
 }
 
-void ManagerDBusAdaptor::RemoveProfile(const string& name,
+void ManagerDBusAdaptor::RemoveProfile(const string &name,
                                        ::DBus::Error &error) {
 }
 
-::DBus::Path ManagerDBusAdaptor::PushProfile(const std::string& ,
+::DBus::Path ManagerDBusAdaptor::PushProfile(const std::string &,
                                              ::DBus::Error &error) {
   return ::DBus::Path();
 }
 
-void ManagerDBusAdaptor::PopProfile(const std::string& , ::DBus::Error &error) {
+void ManagerDBusAdaptor::PopProfile(const std::string &, ::DBus::Error &error) {
 }
 
 void ManagerDBusAdaptor::PopAnyProfile(::DBus::Error &error) {
 }
 
-void ManagerDBusAdaptor::RequestScan(const string& ,
+void ManagerDBusAdaptor::RequestScan(const string &,
                                      ::DBus::Error &error) {
 }
 
-void ManagerDBusAdaptor::EnableTechnology(const string& ,
+void ManagerDBusAdaptor::EnableTechnology(const string &,
                                           ::DBus::Error &error) {
 }
 
-void ManagerDBusAdaptor::DisableTechnology(const string& ,
+void ManagerDBusAdaptor::DisableTechnology(const string &,
                                            ::DBus::Error &error) {
 }
 
 ::DBus::Path ManagerDBusAdaptor::GetService(
-    const map<string, ::DBus::Variant>& ,
+    const map<string, ::DBus::Variant> &,
     ::DBus::Error &error) {
   return ::DBus::Path();
 }
 
 ::DBus::Path ManagerDBusAdaptor::GetWifiService(
-    const map<string, ::DBus::Variant>& ,
+    const map<string, ::DBus::Variant> &,
     ::DBus::Error &error) {
   return ::DBus::Path();
 }
 
 void ManagerDBusAdaptor::ConfigureWifiService(
-    const map<string, ::DBus::Variant>& ,
+    const map<string, ::DBus::Variant> &,
     ::DBus::Error &error) {
 }
 
 ::DBus::Path ManagerDBusAdaptor::GetVPNService(
-    const map<string, ::DBus::Variant>& ,
+    const map<string, ::DBus::Variant> &,
     ::DBus::Error &error) {
   return ::DBus::Path();
 }
 
-void ManagerDBusAdaptor::RegisterAgent(const ::DBus::Path& ,
+void ManagerDBusAdaptor::RegisterAgent(const ::DBus::Path &,
                                        ::DBus::Error &error) {
 }
 
-void ManagerDBusAdaptor::UnregisterAgent(const ::DBus::Path& ,
+void ManagerDBusAdaptor::UnregisterAgent(const ::DBus::Path &,
                                          ::DBus::Error &error) {
 }
 
@@ -133,7 +140,7 @@
   return logging::GetMinLogLevel();
 }
 
-void ManagerDBusAdaptor::SetDebugLevel(const int32_t& level,
+void ManagerDBusAdaptor::SetDebugLevel(const int32_t &level,
                                       ::DBus::Error &error) {
   if (level < logging::LOG_NUM_SEVERITIES)
     logging::SetMinLogLevel(level);
@@ -145,7 +152,7 @@
   return string();
 }
 
-void ManagerDBusAdaptor::SetServiceOrder(const string& ,
+void ManagerDBusAdaptor::SetServiceOrder(const string &,
                                          ::DBus::Error &error) {
 }