Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -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_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" |
| 14 | #include "shill/service.h" |
| 15 | #include "shill/shill_event.h" |
| 16 | |
| 17 | namespace shill { |
| 18 | |
| 19 | class ControlInterface; |
| 20 | class DeviceAdaptorInterface; |
| 21 | class EventDispatcher; |
| 22 | class Endpoint; |
| 23 | class DeviceInfo; |
| 24 | class Manager; |
| 25 | |
| 26 | // Non-functional Device subclass used for non-operable or blacklisted devices |
| 27 | class DeviceStub : public Device { |
| 28 | public: |
| 29 | DeviceStub(ControlInterface *control_interface, |
| 30 | EventDispatcher *dispatcher, |
| 31 | Manager *manager, |
| 32 | const std::string& link_name, |
| 33 | int interface_index, |
| 34 | Technology technology) |
| 35 | : Device(control_interface, dispatcher, manager, link_name, |
| 36 | interface_index), |
| 37 | technology_(technology) {} |
| 38 | void Start() {} |
| 39 | void Stop() {} |
| 40 | bool TechnologyIs(const Technology type) { return type == technology_; } |
| 41 | |
| 42 | private: |
| 43 | Technology technology_; |
| 44 | DISALLOW_COPY_AND_ASSIGN(DeviceStub); |
| 45 | }; |
| 46 | |
| 47 | } // namespace shill |
| 48 | |
| 49 | #endif // SHILL_STUB_DEVICE_ |