blob: b2049a95dd6febaf48faba251fefef18fcf1be74 [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
Chris Masone487b8bf2011-05-13 16:27:57 -07008#include <base/memory/ref_counted.h>
Paul Stewartd5843772011-05-11 15:40:42 -07009
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);
Chris Masone0e1d1042011-05-09 18:07:03 -070021
Paul Stewart75897df2011-04-27 09:05:53 -070022 void Start();
23 void Stop();
24
Paul Stewartd5843772011-05-11 15:40:42 -070025 protected:
Chris Masone0e1d1042011-05-09 18:07:03 -070026 virtual ~Device();
Paul Stewartd5843772011-05-11 15:40:42 -070027
Paul Stewart75897df2011-04-27 09:05:53 -070028 private:
Chris Masone413a3192011-05-09 17:10:05 -070029 DeviceAdaptorInterface *adaptor_;
Paul Stewart75897df2011-04-27 09:05:53 -070030 bool running_;
Chris Masone413a3192011-05-09 17:10:05 -070031 friend class DeviceAdaptorInterface;
Paul Stewart75897df2011-04-27 09:05:53 -070032};
33
34} // namespace shill
35
36#endif // SHILL_DEVICE_