blob: c0ea433df00999f0704582376e7126a63a330d61 [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"
Chris Masone2b105542011-06-22 10:58:09 -070011#include "shill/refptr_types.h"
Paul Stewartb50f0b92011-05-16 16:31:42 -070012#include "shill/shill_event.h"
13
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,
Chris Masone626719f2011-08-18 16:58:48 -070022 const std::string &address,
Darin Petkovafa6fc42011-06-21 16:21:08 -070023 int interface_index);
Paul Stewartb50f0b92011-05-16 16:31:42 -070024 ~Ethernet();
Darin Petkovafa6fc42011-06-21 16:21:08 -070025
Paul Stewartf1ce5d22011-05-19 13:10:20 -070026 void Start();
27 void Stop();
Darin Petkov6f9eaa32011-08-09 15:26:44 -070028 bool TechnologyIs(Device::Technology type) const;
Darin Petkovafa6fc42011-06-21 16:21:08 -070029 void LinkEvent(unsigned int flags, unsigned int change);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070030
Paul Stewartb50f0b92011-05-16 16:31:42 -070031 private:
Paul Stewartf1ce5d22011-05-19 13:10:20 -070032 bool service_registered_;
Chris Masonec1e50412011-06-07 13:04:53 -070033 ServiceRefPtr service_;
Darin Petkovafa6fc42011-06-21 16:21:08 -070034 bool link_up_;
35
Paul Stewartb50f0b92011-05-16 16:31:42 -070036 DISALLOW_COPY_AND_ASSIGN(Ethernet);
37};
38
39} // namespace shill
40
41#endif // SHILL_ETHERNET_