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 | |
Chris Masone | 487b8bf | 2011-05-13 16:27:57 -0700 | [diff] [blame^] | 8 | #include <base/memory/ref_counted.h> |
Paul Stewart | d584377 | 2011-05-11 15:40:42 -0700 | [diff] [blame] | 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); |
Chris Masone | 0e1d104 | 2011-05-09 18:07:03 -0700 | [diff] [blame] | 21 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 22 | void Start(); |
| 23 | void Stop(); |
| 24 | |
Paul Stewart | d584377 | 2011-05-11 15:40:42 -0700 | [diff] [blame] | 25 | protected: |
Chris Masone | 0e1d104 | 2011-05-09 18:07:03 -0700 | [diff] [blame] | 26 | virtual ~Device(); |
Paul Stewart | d584377 | 2011-05-11 15:40:42 -0700 | [diff] [blame] | 27 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 28 | private: |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame] | 29 | DeviceAdaptorInterface *adaptor_; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 30 | bool running_; |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame] | 31 | friend class DeviceAdaptorInterface; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_DEVICE_ |