Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 1 | // 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 Stewart | d584377 | 2011-05-11 15:40:42 -0700 | [diff] [blame^] | 8 | #include <base/ref_counted.h> |
| 9 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 10 | #include "shill/shill_event.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | // Device superclass. Individual network interfaces types will inherit from |
| 15 | // this class. |
Paul Stewart | d584377 | 2011-05-11 15:40:42 -0700 | [diff] [blame^] | 16 | class Device : public base::RefCounted<Device> { |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 17 | public: |
| 18 | // A constructor for the Device object |
| 19 | explicit Device(ControlInterface *control_interface, |
| 20 | EventDispatcher *dispatcher); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 21 | void Start(); |
| 22 | void Stop(); |
| 23 | |
Paul Stewart | d584377 | 2011-05-11 15:40:42 -0700 | [diff] [blame^] | 24 | protected: |
| 25 | ~Device(); |
| 26 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 27 | private: |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame] | 28 | DeviceAdaptorInterface *adaptor_; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 29 | bool running_; |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame] | 30 | friend class DeviceAdaptorInterface; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | } // namespace shill |
| 34 | |
| 35 | #endif // SHILL_DEVICE_ |