blob: 53e2608a819dfbb3e661a69a0ac7fa480429a210 [file] [log] [blame]
Paul Stewart75897df2011-04-27 09:05:53 -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_DEVICE_
6#define SHILL_DEVICE_
7
Paul Stewartd5843772011-05-11 15:40:42 -07008#include <base/ref_counted.h>
9
Paul Stewart75897df2011-04-27 09:05:53 -070010#include "shill/shill_event.h"
11
12namespace shill {
13
14// Device superclass. Individual network interfaces types will inherit from
15// this class.
Paul Stewartd5843772011-05-11 15:40:42 -070016class Device : public base::RefCounted<Device> {
Paul Stewart75897df2011-04-27 09:05:53 -070017 public:
18 // A constructor for the Device object
19 explicit Device(ControlInterface *control_interface,
20 EventDispatcher *dispatcher);
Paul Stewart75897df2011-04-27 09:05:53 -070021 void Start();
22 void Stop();
23
Paul Stewartd5843772011-05-11 15:40:42 -070024 protected:
25 ~Device();
26
Paul Stewart75897df2011-04-27 09:05:53 -070027 private:
Chris Masone413a3192011-05-09 17:10:05 -070028 DeviceAdaptorInterface *adaptor_;
Paul Stewart75897df2011-04-27 09:05:53 -070029 bool running_;
Chris Masone413a3192011-05-09 17:10:05 -070030 friend class DeviceAdaptorInterface;
Paul Stewart75897df2011-04-27 09:05:53 -070031};
32
33} // namespace shill
34
35#endif // SHILL_DEVICE_