shill: Framework for asynchronous service side RPC calls.
Use the framework to switch EnterPIN to return asynchronously.
Also, added a few try/catch clauses around DBus proxy calls to ease testing and
debugging. They should go away as we transition to asynchronous proxy calls.
BUG=chromium-os:17263
TEST=unit tests, tested on device
Change-Id: I4177c5b91e23c31838b03689de729932c859a936
Reviewed-on: https://gerrit.chromium.org/gerrit/12541
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/error.cc b/error.cc
index 5fd4ec4..b1d5dea 100644
--- a/error.cc
+++ b/error.cc
@@ -69,6 +69,10 @@
Populate(kSuccess);
}
+void Error::CopyFrom(const Error &error) {
+ Populate(error.type_, error.message_);
+}
+
bool Error::ToDBusError(::DBus::Error *error) const {
if (IsFailure()) {
error->set(GetName(type_).c_str(), message_.c_str());