shill: Hook up Create/Pop/PushProfile to dbus
Have the manager profile methods written so far link up
with the RPC Manager Adaptor code.
BUG=chromium-os:24326
TEST=Unit tests for regression. Also used flimflam's Python
create-profile/push-profile as well as logging out/in on a
shill instance running with --use-flimflam-profiles
Change-Id: I69f3a94e6cb3acda5ae37ec005b2345566e5e700
Reviewed-on: https://gerrit.chromium.org/gerrit/13070
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/manager_dbus_adaptor.cc b/manager_dbus_adaptor.cc
index 0bf611c..249b5c7 100644
--- a/manager_dbus_adaptor.cc
+++ b/manager_dbus_adaptor.cc
@@ -101,10 +101,12 @@
}
::DBus::Path ManagerDBusAdaptor::CreateProfile(const string &name,
- ::DBus::Error &/*error*/) {
- NOTIMPLEMENTED();
- // TODO(quiche): implement this
- return ::DBus::Path("/" + name);
+ ::DBus::Error &error) {
+ Error e;
+ string path;
+ manager_->CreateProfile(name, &path, &e);
+ e.ToDBusError(&error);
+ return ::DBus::Path(path);
}
void ManagerDBusAdaptor::RemoveProfile(const string &/*name*/,
@@ -112,17 +114,25 @@
}
::DBus::Path ManagerDBusAdaptor::PushProfile(const std::string &name,
- ::DBus::Error &/*error*/) {
- NOTIMPLEMENTED();
- // TODO(quiche): implement this
- return ::DBus::Path("/" + name);
+ ::DBus::Error &error) {
+ Error e;
+ string path;
+ manager_->PushProfile(name, &path, &e);
+ e.ToDBusError(&error);
+ return ::DBus::Path(path);
}
-void ManagerDBusAdaptor::PopProfile(const std::string &,
- ::DBus::Error &/*error*/) {
+void ManagerDBusAdaptor::PopProfile(const std::string &name,
+ ::DBus::Error &error) {
+ Error e;
+ manager_->PopProfile(name, &e);
+ e.ToDBusError(&error);
}
-void ManagerDBusAdaptor::PopAnyProfile(::DBus::Error &/*error*/) {
+void ManagerDBusAdaptor::PopAnyProfile(::DBus::Error &error) {
+ Error e;
+ manager_->PopAnyProfile(&e);
+ e.ToDBusError(&error);
}
void ManagerDBusAdaptor::RequestScan(const string &technology,