• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 WIFI_OFFLOAD_MOCK_CHRE_INTERFACE_H_
18 #define WIFI_OFFLOAD_MOCK_CHRE_INTERFACE_H_
19 
20 #include <gmock/gmock.h>
21 #include <gtest/gtest.h>
22 
23 #include "chre_interface.h"
24 #include "chre_interface_callbacks.h"
25 
26 namespace android {
27 namespace hardware {
28 namespace wifi {
29 namespace offload {
30 namespace V1_0 {
31 namespace implementation {
32 
33 class MockChreInterface : public ChreInterface {
34   public:
35     MockChreInterface(ChreInterfaceCallbacks* callback);
36     ~MockChreInterface() = default;
37 
38     MOCK_METHOD0(isConnected, bool());
39     MOCK_METHOD2(sendCommandToApp, bool(uint32_t messageType, const std::vector<uint8_t>& message));
40     MOCK_METHOD1(reportConnectionEvent, void(ChreInterfaceCallbacks::ConnectionEvent event));
41     MOCK_METHOD0(getHubInfo, bool());
42     MOCK_METHOD0(getNanoAppList, bool());
43     MOCK_METHOD3(handleMessage,
44                  void(uint32_t messageType, const void* messageData, size_t messageDataLen));
45 };
46 
47 }  // namespace implementation
48 }  // namespace V1_0
49 }  // namespace offload
50 }  // namespace wifi
51 }  // namespace hardware
52 }  // namespace android
53 
54 #endif  // WIFI_OFFLOAD_MOCK_CHRE_INTERFACE_H_
55