blob: 59e410f6ea126db730485e0ac5402ab40f7ee422 [file] [log] [blame]
Paul Stewart35eff132013-04-12 12:08:40 -07001// 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
16using std::string;
17
18namespace shill {
19
20EthernetEapService::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
30EthernetEapService::~EthernetEapService() {}
31
32string EthernetEapService::GetStorageIdentifier() const {
33 return StringPrintf("%s_all",
34 Technology::NameFromIdentifier(technology()).c_str());
35}
36
37string EthernetEapService::GetDeviceRpcId(Error */*error*/) {
38 return "/";
39}
40
41void EthernetEapService::OnEapCredentialsChanged() {
42 manager()->ethernet_eap_provider()->OnCredentialsChanged();
43}
44
Paul Stewartbe9abfd2013-04-22 12:18:48 -070045bool EthernetEapService::Unload() {
46 Service::Unload();
47 manager()->ethernet_eap_provider()->OnCredentialsChanged();
48 return false;
49}
50
Paul Stewart35eff132013-04-12 12:08:40 -070051} // namespace shill