shill: Implement service sorting
Sort the list of Services for presentation to
RPC callers, essentially copying the current flimflam
sorting criteria. Introduce the TechnologyOrder to
the Manager.
BUG=chromium-os:20114
TEST=New unit tests
Change-Id: I766b2297ba3170a7a6ab5adfe68425a8011be4fb
Reviewed-on: http://gerrit.chromium.org/gerrit/8205
Tested-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
diff --git a/manager_dbus_adaptor.cc b/manager_dbus_adaptor.cc
index 9318401..7c071cf 100644
--- a/manager_dbus_adaptor.cc
+++ b/manager_dbus_adaptor.cc
@@ -194,11 +194,14 @@
}
string ManagerDBusAdaptor::GetServiceOrder(::DBus::Error &error) {
- return string();
+ return manager_->GetTechnologyOrder();
}
-void ManagerDBusAdaptor::SetServiceOrder(const string &,
+void ManagerDBusAdaptor::SetServiceOrder(const string &order,
::DBus::Error &error) {
+ Error e;
+ manager_->SetTechnologyOrder(order, &e);
+ e.ToDBusError(&error);
}
} // namespace shill