shill: wimax: Autoconnect only one service per WiMAX device.

BUG=chrome-os-partner:11162
TEST=unit tests

Change-Id: Ie7a67035f2410f13c25991c57a955b76b71d791e
Reviewed-on: https://gerrit.chromium.org/gerrit/27169
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/wimax.h b/wimax.h
index b1701d5..7cef745 100644
--- a/wimax.h
+++ b/wimax.h
@@ -47,6 +47,9 @@
   // deregister and destroy the device after invoking this method.
   virtual void OnDeviceVanished();
 
+  // Returns true if this device is not connecting or connected to a service.
+  virtual bool IsIdle() const;
+
   const RpcIdentifier &path() const { return path_; }
   bool scanning() const { return scanning_; }
   const std::set<RpcIdentifier> &networks() const { return networks_; }
@@ -57,6 +60,7 @@
   FRIEND_TEST(WiMaxTest, ConnectTimeout);
   FRIEND_TEST(WiMaxTest, ConnectTo);
   FRIEND_TEST(WiMaxTest, DropService);
+  FRIEND_TEST(WiMaxTest, IsIdle);
   FRIEND_TEST(WiMaxTest, OnConnectComplete);
   FRIEND_TEST(WiMaxTest, OnDeviceVanished);
   FRIEND_TEST(WiMaxTest, OnEnableComplete);