Home | History | Annotate | Download | only in apmanager
      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 #ifndef APMANAGER_FAKE_CONFIG_ADAPTOR_H_
     18 #define APMANAGER_FAKE_CONFIG_ADAPTOR_H_
     19 
     20 #include <string>
     21 
     22 #include <base/macros.h>
     23 
     24 #include "apmanager/config_adaptor_interface.h"
     25 
     26 namespace apmanager {
     27 
     28 class FakeConfigAdaptor : public ConfigAdaptorInterface {
     29  public:
     30   FakeConfigAdaptor();
     31   ~FakeConfigAdaptor() override;
     32 
     33   RPCObjectIdentifier GetRpcObjectIdentifier() override;
     34   void SetSsid(const std::string& ssid) override;
     35   std::string GetSsid() override;
     36   void SetInterfaceName(const std::string& interface_name) override;
     37   std::string GetInterfaceName() override;
     38   void SetSecurityMode(const std::string& security_mode) override;
     39   std::string GetSecurityMode() override;
     40   void SetPassphrase(const std::string& passphrase) override;
     41   std::string GetPassphrase() override;
     42   void SetHwMode(const std::string& hw_mode) override;
     43   std::string GetHwMode() override;
     44   void SetOperationMode(const std::string& op_mode) override;
     45   std::string GetOperationMode() override;
     46   void SetChannel(uint16_t channel) override;
     47   uint16_t GetChannel() override;
     48   void SetHiddenNetwork(bool hidden) override;
     49   bool GetHiddenNetwork() override;
     50   void SetBridgeInterface(const std::string& interface_name) override;
     51   std::string GetBridgeInterface() override;
     52   void SetServerAddressIndex(uint16_t) override;
     53   uint16_t GetServerAddressIndex() override;
     54   void SetFullDeviceControl(bool full_control) override;
     55   bool GetFullDeviceControl() override;
     56 
     57  private:
     58   std::string ssid_;
     59   std::string interface_name_;
     60   std::string security_mode_;
     61   std::string passphrase_;
     62   std::string hw_mode_;
     63   std::string op_mode_;
     64   std::string bridge_interface_;
     65   bool hidden_network_;
     66   bool full_device_control_;
     67   uint16_t channel_;
     68   uint16_t server_address_index_;
     69 
     70   DISALLOW_COPY_AND_ASSIGN(FakeConfigAdaptor);
     71 };
     72 
     73 }  // namespace apmanager
     74 
     75 #endif  // APMANAGER_FAKE_CONFIG_ADAPTOR_H_
     76