Peter Qiu | c0beca5 | 2015-09-03 11:25:46 -0700 | [diff] [blame^] | 1 | // |
| 2 | // Copyright (C) 2012 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 16 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 17 | #ifndef SHILL_DEVICE_STUB_H_ |
| 18 | #define SHILL_DEVICE_STUB_H_ |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 19 | |
| 20 | #include <base/memory/ref_counted.h> |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 21 | |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 22 | #include <string> |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 23 | #include <vector> |
| 24 | |
| 25 | #include "shill/device.h" |
Paul Stewart | 26b327e | 2011-10-19 11:38:09 -0700 | [diff] [blame] | 26 | #include "shill/event_dispatcher.h" |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 27 | #include "shill/service.h" |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 28 | |
| 29 | namespace shill { |
| 30 | |
| 31 | class ControlInterface; |
| 32 | class DeviceAdaptorInterface; |
| 33 | class EventDispatcher; |
| 34 | class Endpoint; |
| 35 | class DeviceInfo; |
| 36 | class Manager; |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 37 | class Metrics; |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 38 | |
| 39 | // Non-functional Device subclass used for non-operable or blacklisted devices |
| 40 | class DeviceStub : public Device { |
| 41 | public: |
Paul Stewart | a794cd6 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 42 | DeviceStub(ControlInterface* control_interface, |
| 43 | EventDispatcher* dispatcher, |
| 44 | Metrics* metrics, |
| 45 | Manager* manager, |
| 46 | const std::string& link_name, |
| 47 | const std::string& address, |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 48 | int interface_index, |
Paul Stewart | fdd1607 | 2011-09-16 12:41:35 -0700 | [diff] [blame] | 49 | Technology::Identifier technology) |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 50 | : Device(control_interface, dispatcher, metrics, manager, link_name, |
| 51 | address, interface_index, technology) {} |
Paul Stewart | a794cd6 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 52 | void Start(Error* /*error*/, |
| 53 | const EnabledStateChangedCallback& /*callback*/) {} |
| 54 | void Stop(Error* /*error*/, |
| 55 | const EnabledStateChangedCallback& /*callback*/) {} |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 56 | |
| 57 | private: |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 58 | DISALLOW_COPY_AND_ASSIGN(DeviceStub); |
| 59 | }; |
| 60 | |
| 61 | } // namespace shill |
| 62 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 63 | #endif // SHILL_DEVICE_STUB_H_ |