Paul Stewart | 35eff13 | 2013-04-12 12:08:40 -0700 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "shill/ethernet_eap_service.h" |
| 6 | |
| 7 | #include <string> |
| 8 | |
| 9 | #include <base/stringprintf.h> |
| 10 | |
| 11 | #include "shill/eap_credentials.h" |
| 12 | #include "shill/ethernet_eap_provider.h" |
| 13 | #include "shill/manager.h" |
| 14 | #include "shill/technology.h" |
| 15 | |
| 16 | using std::string; |
| 17 | |
| 18 | namespace shill { |
| 19 | |
| 20 | EthernetEapService::EthernetEapService(ControlInterface *control_interface, |
| 21 | EventDispatcher *dispatcher, |
| 22 | Metrics *metrics, |
| 23 | Manager *manager) |
| 24 | : Service(control_interface, dispatcher, metrics, manager, |
| 25 | Technology::kEthernetEap) { |
| 26 | SetEapCredentials(new EapCredentials()); |
| 27 | set_friendly_name("Ethernet EAP Parameters"); |
| 28 | } |
| 29 | |
| 30 | EthernetEapService::~EthernetEapService() {} |
| 31 | |
| 32 | string EthernetEapService::GetStorageIdentifier() const { |
| 33 | return StringPrintf("%s_all", |
| 34 | Technology::NameFromIdentifier(technology()).c_str()); |
| 35 | } |
| 36 | |
| 37 | string EthernetEapService::GetDeviceRpcId(Error */*error*/) { |
| 38 | return "/"; |
| 39 | } |
| 40 | |
| 41 | void EthernetEapService::OnEapCredentialsChanged() { |
| 42 | manager()->ethernet_eap_provider()->OnCredentialsChanged(); |
| 43 | } |
| 44 | |
Paul Stewart | be9abfd | 2013-04-22 12:18:48 -0700 | [diff] [blame] | 45 | bool EthernetEapService::Unload() { |
| 46 | Service::Unload(); |
| 47 | manager()->ethernet_eap_provider()->OnCredentialsChanged(); |
| 48 | return false; |
| 49 | } |
| 50 | |
Paul Stewart | 35eff13 | 2013-04-12 12:08:40 -0700 | [diff] [blame] | 51 | } // namespace shill |