1 //
2 // Copyright (C) 2013 The Android Open Source Project
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef SHILL_ETHERNET_ETHERNET_EAP_SERVICE_H_
18 #define SHILL_ETHERNET_ETHERNET_EAP_SERVICE_H_
19 
20 #include <string>
21 
22 #include "shill/service.h"
23 
24 namespace shill {
25 
26 // The EthernetEapService contains configuraton for any Ethernet interface
27 // while authenticating or authenticated to a wired 802.1x endpoint.  This
28 // includes EAP credentials and Static IP configuration.  This service in
29 // itself is not connectable, but can be used by any Ethernet device during
30 // authentication.
31 class EthernetEapService : public Service {
32  public:
33   EthernetEapService(ControlInterface* control_interface,
34                      EventDispatcher* dispatcher,
35                      Metrics* metrics,
36                      Manager* manager);
37   ~EthernetEapService() override;
38 
39   // Inherited from Service.
40   std::string GetDeviceRpcId(Error* error) const override;
41   std::string GetStorageIdentifier() const override;
Is8021x()42   bool Is8021x() const override { return true; }
IsVisible()43   bool IsVisible() const override { return false; }
44   void OnEapCredentialsChanged(
45       Service::UpdateCredentialsReason reason) override;
46   bool Unload() override;
47 };
48 
49 }  // namespace shill
50 
51 #endif  // SHILL_ETHERNET_ETHERNET_EAP_SERVICE_H_
52