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_config_adaptor.h" 18 19 using std::string; 20 21 namespace apmanager { 22 23 FakeConfigAdaptor::FakeConfigAdaptor() {} 24 25 FakeConfigAdaptor::~FakeConfigAdaptor() {} 26 27 RPCObjectIdentifier FakeConfigAdaptor::GetRpcObjectIdentifier() { 28 return RPCObjectIdentifier(); 29 } 30 31 void FakeConfigAdaptor::SetSsid(const string& ssid) { 32 ssid_ = ssid; 33 } 34 35 string FakeConfigAdaptor::GetSsid() { 36 return ssid_; 37 } 38 39 void FakeConfigAdaptor::SetInterfaceName(const std::string& interface_name) { 40 interface_name_ = interface_name; 41 } 42 43 string FakeConfigAdaptor::GetInterfaceName() { 44 return interface_name_; 45 } 46 47 void FakeConfigAdaptor::SetSecurityMode(const std::string& mode) { 48 security_mode_ = mode; 49 } 50 51 string FakeConfigAdaptor::GetSecurityMode() { 52 return security_mode_; 53 } 54 55 void FakeConfigAdaptor::SetPassphrase(const std::string& passphrase) { 56 passphrase_ = passphrase; 57 } 58 59 string FakeConfigAdaptor::GetPassphrase() { 60 return passphrase_; 61 } 62 63 void FakeConfigAdaptor::SetHwMode(const std::string& hw_mode) { 64 hw_mode_ = hw_mode; 65 } 66 67 string FakeConfigAdaptor::GetHwMode() { 68 return hw_mode_; 69 } 70 71 void FakeConfigAdaptor::SetOperationMode(const std::string& op_mode) { 72 op_mode_ = op_mode; 73 } 74 75 string FakeConfigAdaptor::GetOperationMode() { 76 return op_mode_; 77 } 78 79 void FakeConfigAdaptor::SetChannel(uint16_t channel) { 80 channel_ = channel; 81 } 82 83 uint16_t FakeConfigAdaptor::GetChannel() { 84 return channel_; 85 } 86 87 void FakeConfigAdaptor::SetHiddenNetwork(bool hidden_network) { 88 hidden_network_ = hidden_network; 89 } 90 91 bool FakeConfigAdaptor::GetHiddenNetwork() { 92 return hidden_network_; 93 } 94 95 void FakeConfigAdaptor::SetBridgeInterface(const std::string& interface_name) { 96 bridge_interface_ = interface_name; 97 } 98 99 string FakeConfigAdaptor::GetBridgeInterface() { 100 return bridge_interface_; 101 } 102 103 void FakeConfigAdaptor::SetServerAddressIndex(uint16_t index) { 104 server_address_index_ = index; 105 } 106 107 uint16_t FakeConfigAdaptor::GetServerAddressIndex() { 108 return server_address_index_; 109 } 110 111 void FakeConfigAdaptor::SetFullDeviceControl(bool full_control) { 112 full_device_control_ = full_control; 113 } 114 115 bool FakeConfigAdaptor::GetFullDeviceControl() { 116 return full_device_control_; 117 } 118 119 } // namespace apmanager 120