Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 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_STUB_DEVICE_ |
| 6 | #define SHILL_STUB_DEVICE_ |
| 7 | |
| 8 | #include <base/memory/ref_counted.h> |
| 9 | #include <base/memory/scoped_ptr.h> |
| 10 | |
| 11 | #include <vector> |
| 12 | |
| 13 | #include "shill/device.h" |
Paul Stewart | 26b327e | 2011-10-19 11:38:09 -0700 | [diff] [blame] | 14 | #include "shill/event_dispatcher.h" |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 15 | #include "shill/service.h" |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 16 | |
| 17 | namespace shill { |
| 18 | |
| 19 | class ControlInterface; |
| 20 | class DeviceAdaptorInterface; |
| 21 | class EventDispatcher; |
| 22 | class Endpoint; |
| 23 | class DeviceInfo; |
| 24 | class Manager; |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 25 | class Metrics; |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 26 | |
| 27 | // Non-functional Device subclass used for non-operable or blacklisted devices |
| 28 | class DeviceStub : public Device { |
| 29 | public: |
| 30 | DeviceStub(ControlInterface *control_interface, |
| 31 | EventDispatcher *dispatcher, |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 32 | Metrics *metrics, |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 33 | Manager *manager, |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 34 | const std::string &link_name, |
| 35 | const std::string &address, |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 36 | int interface_index, |
Paul Stewart | fdd1607 | 2011-09-16 12:41:35 -0700 | [diff] [blame] | 37 | Technology::Identifier technology) |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 38 | : Device(control_interface, dispatcher, metrics, manager, link_name, |
| 39 | address, interface_index, technology) {} |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 40 | void Start(Error */*error*/, |
| 41 | const EnabledStateChangedCallback &/*callback*/) {} |
| 42 | void Stop(Error */*error*/, |
| 43 | const EnabledStateChangedCallback &/*callback*/) {} |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 44 | |
| 45 | private: |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 46 | DISALLOW_COPY_AND_ASSIGN(DeviceStub); |
| 47 | }; |
| 48 | |
| 49 | } // namespace shill |
| 50 | |
| 51 | #endif // SHILL_STUB_DEVICE_ |