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.0/IEvsDisplay.h>
20 #include <android/hardware/automotive/evs/1.0/IEvsEnumerator.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 MockHidlEvsEnumerator_1_0 : public hidlevs::V1_0::IEvsEnumerator {
29 public:
30     MockHidlEvsEnumerator_1_0() = default;
31     virtual ~MockHidlEvsEnumerator_1_0() = default;
32 
33     // Methods from hardware::automotive::evs::V1_0::IEvsEnumerator follow.
34     MOCK_METHOD(::android::hardware::Return<void>, getCameraList, (getCameraList_cb), (override));
35     MOCK_METHOD(::android::hardware::Return<::android::sp<hidlevs::V1_0::IEvsCamera>>, openCamera,
36                 (const ::android::hardware::hidl_string&), (override));
37     MOCK_METHOD(::android::hardware::Return<void>, closeCamera,
38                 (const ::android::sp<hidlevs::V1_0::IEvsCamera>&), (override));
39     MOCK_METHOD(::android::hardware::Return<::android::sp<hidlevs::V1_0::IEvsDisplay>>, openDisplay,
40                 (), (override));
41     MOCK_METHOD(::android::hardware::Return<void>, closeDisplay,
42                 (const ::android::sp<hidlevs::V1_0::IEvsDisplay>&), (override));
43     MOCK_METHOD(::android::hardware::Return<hidlevs::V1_0::DisplayState>, getDisplayState, (),
44                 (override));
45 };
46 
47 using NiceMockHidlEvsEnumerator_1_0 = ::testing::NiceMock<MockHidlEvsEnumerator_1_0>;
48 
49 }  // namespace aidl::android::automotive::evs::implementation
50