shill: Propagate Cellular errors to the DBus caller.
BUG=chromium-os:19547
TEST=unit tests
Change-Id: Ieda54d89d977a48718302c6e1e1c7927e3cf2dba
Reviewed-on: http://gerrit.chromium.org/gerrit/6603
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/cellular.h b/cellular.h
index 0e7db86..ee226e2 100644
--- a/cellular.h
+++ b/cellular.h
@@ -20,6 +20,7 @@
namespace shill {
+class Error;
class ModemSimpleProxyInterface;
class Cellular : public Device,
@@ -150,8 +151,9 @@
const std::string &path);
virtual ~Cellular();
- // Asynchronously connects the modem to the network.
- void Connect();
+ // Asynchronously connects the modem to the network. Populates |error| on
+ // failure, leaves it unchanged otherwise.
+ void Connect(Error *error);
// Asynchronously activates the modem.
void Activate(const std::string &carrier);