• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 MOCK_WIFI_IFACE_UTIL_H_
18 #define MOCK_WIFI_IFACE_UTIL_H_
19 
20 #include <gmock/gmock.h>
21 
22 #include "wifi_iface_util.h"
23 
24 namespace aidl {
25 namespace android {
26 namespace hardware {
27 namespace wifi {
28 namespace iface_util {
29 
30 class MockWifiIfaceUtil : public iface_util::WifiIfaceUtil {
31   public:
32     MockWifiIfaceUtil(const std::weak_ptr<::android::wifi_system::InterfaceTool> iface_tool,
33                       const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal);
34     MOCK_METHOD1(getFactoryMacAddress, std::array<uint8_t, 6>(const std::string&));
35     MOCK_METHOD2(setMacAddress, bool(const std::string&, const std::array<uint8_t, 6>&));
36     MOCK_METHOD0(getOrCreateRandomMacAddress, std::array<uint8_t, 6>());
37     MOCK_METHOD2(registerIfaceEventHandlers,
38                  void(const std::string&, iface_util::IfaceEventHandlers));
39     MOCK_METHOD1(unregisterIfaceEventHandlers, void(const std::string&));
40     MOCK_METHOD2(setUpState, bool(const std::string&, bool));
41     MOCK_METHOD1(ifNameToIndex, unsigned(const std::string&));
42 };
43 
44 }  // namespace iface_util
45 }  // namespace wifi
46 }  // namespace hardware
47 }  // namespace android
48 }  // namespace aidl
49 
50 #endif  // MOCK_WIFI_IFACE_UTIL_H_
51