shill: Update WiMAX DBus proxy interfaces and classes.
Adds WiMaxManager.Network proxy. Creates WiMaxService objects based on
the available WiMax networks thus adding initial support for multiple
active WiMAX services. Adds a "Scanning" property to the WiMax device,
similar to WiFi and Cellular.
BUG=chrome-os-partner:9782
TEST=Build and run unit tests.
CQ-DEPEND=I97ce1351436afb3aeac0d2a48a8f51e1501e7466
Change-Id: Ie3f919846114f63414788c5b970fa0dff2e2d06a
Reviewed-on: https://gerrit.chromium.org/gerrit/23008
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
diff --git a/wimax.h b/wimax.h
index 2beadb8..9479a45 100644
--- a/wimax.h
+++ b/wimax.h
@@ -27,22 +27,28 @@
virtual ~WiMax();
+ // Inherited from Device.
virtual void Start(Error *error, const EnabledStateChangedCallback &callback);
virtual void Stop(Error *error, const EnabledStateChangedCallback &callback);
-
virtual bool TechnologyIs(const Technology::Identifier type) const;
+ virtual void Scan(Error *error);
- virtual void Connect(Error *error);
- virtual void Disconnect(Error *error);
+ virtual void ConnectTo(const WiMaxServiceRefPtr &service, Error *error);
+ virtual void DisconnectFrom(const WiMaxServiceRefPtr &service, Error *error);
const RpcIdentifier &path() const { return path_; }
+ bool scanning() const { return scanning_; }
private:
friend class WiMaxTest;
+ FRIEND_TEST(WiMaxTest, CreateService);
+ FRIEND_TEST(WiMaxTest, DestroyDeadServices);
+ FRIEND_TEST(WiMaxTest, OnNetworksChanged);
FRIEND_TEST(WiMaxTest, StartStop);
static const int kTimeoutDefault;
+ void OnScanNetworksComplete(const Error &error);
void OnConnectComplete(const Error &error);
void OnDisconnectComplete(const Error &error);
void OnEnableComplete(const EnabledStateChangedCallback &callback,
@@ -50,10 +56,17 @@
void OnDisableComplete(const EnabledStateChangedCallback &callback,
const Error &error);
+ void OnNetworksChanged(const RpcIdentifiers &networks);
+
+ void CreateService(const RpcIdentifier &network);
+ void DestroyDeadServices(const RpcIdentifiers &live_networks);
+
const RpcIdentifier path_;
scoped_ptr<WiMaxDeviceProxyInterface> proxy_;
- WiMaxServiceRefPtr service_;
+ bool scanning_;
+ std::map<RpcIdentifier, WiMaxServiceRefPtr> services_;
+ WiMaxServiceRefPtr pending_service_;
ProxyFactory *proxy_factory_;