1 /*
2  * Copyright 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 #pragma once
18 
19 #include <android/hardware/automotive/evs/1.1/IEvsDisplay.h>
20 #include <android/hardware/automotive/evs/1.1/types.h>
21 #include <gmock/gmock.h>
22 #include <gtest/gtest.h>
23 
24 namespace aidl::android::automotive::evs::implementation {
25 
26 namespace hidlevs = ::android::hardware::automotive::evs;
27 
28 class MockHidlEvsDisplay : public hidlevs::V1_1::IEvsDisplay {
29 public:
30     MockHidlEvsDisplay() = default;
31     virtual ~MockHidlEvsDisplay() = default;
32 
33     // Methods from ::android::hardware::automotive::evs::V1_0::IEvsDisplay follow.
34     MOCK_METHOD(::android::hardware::Return<void>, getDisplayInfo, (getDisplayInfo_cb), (override));
35     MOCK_METHOD(::android::hardware::Return<hidlevs::V1_0::EvsResult>, setDisplayState,
36                 (hidlevs::V1_0::DisplayState), (override));
37     MOCK_METHOD(::android::hardware::Return<hidlevs::V1_0::DisplayState>, getDisplayState, (),
38                 (override));
39     MOCK_METHOD(::android::hardware::Return<void>, getTargetBuffer, (getTargetBuffer_cb),
40                 (override));
41     MOCK_METHOD(::android::hardware::Return<hidlevs::V1_0::EvsResult>, returnTargetBufferForDisplay,
42                 (const hidlevs::V1_0::BufferDesc&), (override));
43 
44     // Methods from ::android::hardware::automotive::evs::V1_1::IEvsDisplay follow.
45     MOCK_METHOD(::android::hardware::Return<void>, getDisplayInfo_1_1, (getDisplayInfo_1_1_cb),
46                 (override));
47 };
48 
49 using NiceMockHidlEvsDisplay = ::testing::NiceMock<MockHidlEvsDisplay>;
50 
51 }  // namespace aidl::android::automotive::evs::implementation
52