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 #include "shill/mock_control.h" 18 19 #include "shill/mock_adaptors.h" 20 21 namespace shill { 22 23 MockControl::MockControl() {} 24 25 MockControl::~MockControl() {} 26 27 DeviceAdaptorInterface* MockControl::CreateDeviceAdaptor(Device* /*device*/) { 28 return new DeviceMockAdaptor(); 29 } 30 31 IPConfigAdaptorInterface* MockControl::CreateIPConfigAdaptor( 32 IPConfig* /*config*/) { 33 return new IPConfigMockAdaptor(); 34 } 35 36 ManagerAdaptorInterface* MockControl::CreateManagerAdaptor( 37 Manager* /*manager*/) { 38 return new ManagerMockAdaptor(); 39 } 40 41 ProfileAdaptorInterface* MockControl::CreateProfileAdaptor( 42 Profile* /*profile*/) { 43 return new ProfileMockAdaptor(); 44 } 45 46 RPCTaskAdaptorInterface* MockControl::CreateRPCTaskAdaptor(RPCTask* /*task*/) { 47 return new RPCTaskMockAdaptor(); 48 } 49 50 ServiceAdaptorInterface* MockControl::CreateServiceAdaptor( 51 Service* /*service*/) { 52 return new ServiceMockAdaptor(); 53 } 54 55 #ifndef DISABLE_VPN 56 ThirdPartyVpnAdaptorInterface* MockControl::CreateThirdPartyVpnAdaptor( 57 ThirdPartyVpnDriver* /*driver*/) { 58 return new ThirdPartyVpnMockAdaptor(); 59 } 60 #endif 61 62 const std::string& MockControl::NullRPCIdentifier() { 63 return null_identifier_; 64 } 65 66 } // namespace shill 67