blob: 60ea5db6471aed4429ee37bddb3afede9f39249a [file] [log] [blame]
Paul Stewartb50f0b92011-05-16 16:31:42 -07001// Copyright (c) 2011 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#ifndef SHILL_ETHERNET_
6#define SHILL_ETHERNET_
7
Chris Masone46eaaf52011-05-24 13:08:30 -07008#include <string>
9
Paul Stewartb50f0b92011-05-16 16:31:42 -070010#include "shill/device.h"
11#include "shill/shill_event.h"
Paul Stewartf1ce5d22011-05-19 13:10:20 -070012#include "shill/ethernet_service.h"
Paul Stewartb50f0b92011-05-16 16:31:42 -070013
14namespace shill {
15
Paul Stewartb50f0b92011-05-16 16:31:42 -070016class Ethernet : public Device {
17 public:
18 explicit Ethernet(ControlInterface *control_interface,
19 EventDispatcher *dispatcher,
Paul Stewartf1ce5d22011-05-19 13:10:20 -070020 Manager *manager,
Chris Masone46eaaf52011-05-24 13:08:30 -070021 const std::string& link_name,
Paul Stewartb50f0b92011-05-16 16:31:42 -070022 int interface_index);
23 ~Ethernet();
Paul Stewartf1ce5d22011-05-19 13:10:20 -070024 void Start();
25 void Stop();
Paul Stewartb50f0b92011-05-16 16:31:42 -070026 bool TechnologyIs(Device::Technology type);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070027 void LinkEvent(unsigned flags, unsigned change);
28 bool link_up_;
29
Paul Stewartb50f0b92011-05-16 16:31:42 -070030 private:
Paul Stewartf1ce5d22011-05-19 13:10:20 -070031 bool service_registered_;
32 scoped_refptr<EthernetService> service_;
Paul Stewartb50f0b92011-05-16 16:31:42 -070033 DISALLOW_COPY_AND_ASSIGN(Ethernet);
34};
35
36} // namespace shill
37
38#endif // SHILL_ETHERNET_