diff options
author | Logan Chien <loganchien@google.com> | 2017-04-21 11:28:41 +0800 |
---|---|---|
committer | Logan Chien <loganchien@google.com> | 2017-04-26 15:57:15 +0800 |
commit | 929c0d1d2abb1df2c9997c60da7941d6c44cdb2d (patch) | |
tree | 6f32823b88a9bd1b364542c8fa9e17c74d2de31a /libwifi_system_iface/testlib/include/wifi_system_test/mock_interface_tool.h | |
parent | de086d4e039df96b64b60a2e7d43378537ac3a7a (diff) | |
download | android_frameworks_opt_net_wifi-929c0d1d2abb1df2c9997c60da7941d6c44cdb2d.tar.gz android_frameworks_opt_net_wifi-929c0d1d2abb1df2c9997c60da7941d6c44cdb2d.tar.bz2 android_frameworks_opt_net_wifi-929c0d1d2abb1df2c9997c60da7941d6c44cdb2d.zip |
Split InterfaceTool from libwifi-system.so
This commit extracts InterfaceTool from libwifi-system.so into a new
library named libwifi-system-iface.so. libwifi-system-iface.so will be
vendor_available because it will be used by both wificond and
android.hardware.wifi@1.0-service.
Bug: 37429084
Test: Sailfish builds, boots, and wifi works.
Change-Id: Iad93c6d258507df3bbb97228814ff5ce5cc2a2f9
Diffstat (limited to 'libwifi_system_iface/testlib/include/wifi_system_test/mock_interface_tool.h')
-rw-r--r-- | libwifi_system_iface/testlib/include/wifi_system_test/mock_interface_tool.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libwifi_system_iface/testlib/include/wifi_system_test/mock_interface_tool.h b/libwifi_system_iface/testlib/include/wifi_system_test/mock_interface_tool.h new file mode 100644 index 000000000..b9926c938 --- /dev/null +++ b/libwifi_system_iface/testlib/include/wifi_system_test/mock_interface_tool.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ANDROID_WIFI_SYSTEM_TEST_MOCK_INTERFACE_TOOL_H +#define ANDROID_WIFI_SYSTEM_TEST_MOCK_INTERFACE_TOOL_H + +#include <wifi_system/interface_tool.h> + +namespace android { +namespace wifi_system { + +class MockInterfaceTool : public InterfaceTool { + public: + ~MockInterfaceTool() override = default; + + MOCK_METHOD1(GetUpState, bool(const char* if_name)); + MOCK_METHOD2(SetUpState, bool(const char* if_name, bool request_up)); + MOCK_METHOD1(SetWifiUpState, bool(bool request_up)); + +}; // class MockInterfaceTool + +} // namespace wifi_system +} // namespace android + +#endif // ANDROID_WIFI_SYSTEM_TEST_MOCK_INTERFACE_TOOL_H |