1 //
2 // Copyright 2015 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 "apmanager/fake_device_adaptor.h"
18 
19 namespace apmanager {
20 
FakeDeviceAdaptor()21 FakeDeviceAdaptor::FakeDeviceAdaptor() : in_use_(false) {}
22 
~FakeDeviceAdaptor()23 FakeDeviceAdaptor::~FakeDeviceAdaptor() {}
24 
SetDeviceName(const std::string & device_name)25 void FakeDeviceAdaptor::SetDeviceName(const std::string& device_name) {
26   device_name_ = device_name;
27 }
28 
GetDeviceName()29 std::string FakeDeviceAdaptor::GetDeviceName() {
30   return device_name_;
31 }
32 
SetPreferredApInterface(const std::string & interface_name)33 void FakeDeviceAdaptor::SetPreferredApInterface(
34     const std::string& interface_name) {
35   preferred_ap_interface_ = interface_name;
36 }
37 
GetPreferredApInterface()38 std::string FakeDeviceAdaptor::GetPreferredApInterface() {
39   return preferred_ap_interface_;
40 }
41 
SetInUse(bool in_use)42 void FakeDeviceAdaptor::SetInUse(bool in_use) {
43   in_use_ = in_use;
44 }
45 
GetInUse()46 bool FakeDeviceAdaptor::GetInUse() {
47   return in_use_;
48 }
49 
50 }  // namespace apmanager
51