blob: fbcacd9bf1197c2f1618e9f3df6dbe65822aef30 [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:
Darin Petkovafa6fc42011-06-21 16:21:08 -070018 Ethernet(ControlInterface *control_interface,
19 EventDispatcher *dispatcher,
20 Manager *manager,
21 const std::string& link_name,
22 int interface_index);
Paul Stewartb50f0b92011-05-16 16:31:42 -070023 ~Ethernet();
Darin Petkovafa6fc42011-06-21 16:21:08 -070024
Paul Stewartf1ce5d22011-05-19 13:10:20 -070025 void Start();
26 void Stop();
Paul Stewartb50f0b92011-05-16 16:31:42 -070027 bool TechnologyIs(Device::Technology type);
Darin Petkovafa6fc42011-06-21 16:21:08 -070028 void LinkEvent(unsigned int flags, unsigned int change);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070029
Paul Stewartb50f0b92011-05-16 16:31:42 -070030 private:
Paul Stewartf1ce5d22011-05-19 13:10:20 -070031 bool service_registered_;
Chris Masonec1e50412011-06-07 13:04:53 -070032 ServiceRefPtr service_;
Darin Petkovafa6fc42011-06-21 16:21:08 -070033 bool link_up_;
34
Paul Stewartb50f0b92011-05-16 16:31:42 -070035 DISALLOW_COPY_AND_ASSIGN(Ethernet);
36};
37
38} // namespace shill
39
40#endif // SHILL_ETHERNET_