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 // 16 17 #ifndef SHILL_DEVICE_STUB_H_ 18 #define SHILL_DEVICE_STUB_H_ 19 20 #include <base/memory/ref_counted.h> 21 22 #include <string> 23 #include <vector> 24 25 #include "shill/device.h" 26 #include "shill/event_dispatcher.h" 27 #include "shill/service.h" 28 29 namespace shill { 30 31 class ControlInterface; 32 class DeviceAdaptorInterface; 33 class EventDispatcher; 34 class Endpoint; 35 class DeviceInfo; 36 class Manager; 37 class Metrics; 38 39 // Non-functional Device subclass used for non-operable or blacklisted devices 40 class DeviceStub : public Device { 41 public: 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, 48 int interface_index, 49 Technology::Identifier technology) 50 : Device(control_interface, dispatcher, metrics, manager, link_name, 51 address, interface_index, technology) {} 52 void Start(Error* /*error*/, 53 const EnabledStateChangedCallback& /*callback*/) override {} 54 void Stop(Error* /*error*/, 55 const EnabledStateChangedCallback& /*callback*/) override {} 56 void Initialize() override {} 57 58 private: 59 DISALLOW_COPY_AND_ASSIGN(DeviceStub); 60 }; 61 62 } // namespace shill 63 64 #endif // SHILL_DEVICE_STUB_H_ 65