shill: wimax: Connect to a specific WiMAX network with EAP credentials.
BUG=chrome-os-partner:9830
TEST=Build and run unit tests.
Change-Id: I429aff11a610bff93f7debc3f9bdc156fe83a15a
Reviewed-on: https://gerrit.chromium.org/gerrit/23096
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
diff --git a/wimax_service.cc b/wimax_service.cc
index 741c3f2..b34b5bc 100644
--- a/wimax_service.cc
+++ b/wimax_service.cc
@@ -27,10 +27,32 @@
const WiMaxRefPtr &wimax)
: Service(control, dispatcher, metrics, manager, Technology::kWiMax),
wimax_(wimax),
- network_identifier_(0) {}
+ network_identifier_(0),
+ need_passphrase_(true) {
+ PropertyStore *store = this->mutable_store();
+ // TODO(benchan): Support networks that require no user credentials or
+ // implicitly defined credentials.
+ store->RegisterBool(flimflam::kPassphraseRequiredProperty, &need_passphrase_);
+}
WiMaxService::~WiMaxService() {}
+void WiMaxService::GetConnectParameters(DBusPropertiesMap *parameters) const {
+ CHECK(parameters);
+
+ (*parameters)[wimax_manager::kEAPAnonymousIdentity].writer()
+ .append_string(eap().anonymous_identity.c_str());
+ (*parameters)[wimax_manager::kEAPUserIdentity].writer()
+ .append_string(eap().identity.c_str());
+ (*parameters)[wimax_manager::kEAPUserPassword].writer()
+ .append_string(eap().password.c_str());
+}
+
+DBus::Path WiMaxService::GetNetworkObjectPath() const {
+ CHECK(proxy_.get());
+ return proxy_->proxy_object_path();
+}
+
bool WiMaxService::Start(WiMaxNetworkProxyInterface *proxy) {
SLOG(WiMax, 2) << __func__;
proxy_.reset(proxy);