shill: Complete interaction between DeviceInfo and WiMaxProvider.
WiMaxProvider now creates/registers and destroys/deregisters devices
based on DeviceInfo and RPC callbacks. Also, add missing DeviceInfo
WiMax unit tests, and implement WiMaxService's GetDeviceRpcIdentifier
and GetStorageIdentifier.
BUG=chrome-os-partner:9735
TEST=unit tests
Change-Id: I9dbf8f785ef824ca5628b96a2e22ec0ef6336b97
Reviewed-on: https://gerrit.chromium.org/gerrit/22807
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
diff --git a/device_info.cc b/device_info.cc
index f3c9263..fce8104 100644
--- a/device_info.cc
+++ b/device_info.cc
@@ -42,7 +42,6 @@
#include "shill/service.h"
#include "shill/virtio_ethernet.h"
#include "shill/wifi.h"
-#include "shill/wimax.h"
using base::Bind;
using base::StringPrintf;
@@ -121,7 +120,8 @@
infos_[device->interface_index()].device = device;
if (device->TechnologyIs(Technology::kCellular) ||
device->TechnologyIs(Technology::kEthernet) ||
- device->TechnologyIs(Technology::kWifi)) {
+ device->TechnologyIs(Technology::kWifi) ||
+ device->TechnologyIs(Technology::kWiMax)) {
manager_->RegisterDevice(device);
}
}
@@ -131,7 +131,8 @@
SLOG(Device, 2) << __func__ << "(" << device->link_name() << ", "
<< interface_index << ")";
- CHECK(device->TechnologyIs(Technology::kCellular));
+ CHECK(device->TechnologyIs(Technology::kCellular) ||
+ device->TechnologyIs(Technology::kWiMax));
// Release reference to the device
map<int, Info>::iterator iter = infos_.find(interface_index);
@@ -365,10 +366,11 @@
device->EnableIPv6Privacy();
break;
case Technology::kWiMax:
- // TODO(benchan): Identify the object path.
- // device = new WiMax(control_interface_, dispatcher_, metrics_, manager_,
- // link_name, address, interface_index,
- // /* object_path */);
+ // WiMax devices are managed by WiMaxProvider.
+ SLOG(Device, 2) << "WiMax link " << link_name
+ << " at index " << interface_index
+ << " -- notifying WiMaxProvider.";
+ manager_->wimax_provider()->OnDeviceInfoAvailable(link_name);
break;
case Technology::kPPP:
case Technology::kTunnel: