1 /* 2 * Copyright 2023 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 "MockEvsHal.h" 20 21 #include <cstdlib> 22 23 namespace { 24 25 #define EVS_FUZZ_BASE_ENUM \ 26 EVS_FUZZ_NOTIFY, /* verify notify*/ \ 27 EVS_FUZZ_GET_HW_CAMERA, /* verify getHalCameras*/ \ 28 EVS_FUZZ_DELIVER_FRAME, /* verify deliverFrame */ \ 29 EVS_FUZZ_DONE_WITH_FRAME, /* verify doneWithFrame */ \ 30 EVS_FUZZ_SET_PRIMARY, /* verify setPrimary */ \ 31 EVS_FUZZ_FORCE_PRIMARY, /* verify forcePrimary */ \ 32 EVS_FUZZ_UNSET_PRIMARY, /* verify unsetPrimary */ \ 33 EVS_FUZZ_SET_PARAMETER, /* verify setIntParameter */ \ 34 EVS_FUZZ_GET_PARAMETER, /* verify getIntParameter */ \ 35 EVS_FUZZ_API_SUM 36 37 inline const char* kMockHWEnumeratorName = "hw/fuzzEVSMock"; 38 inline constexpr uint64_t startMockHWCameraId = 1024; 39 inline constexpr uint64_t endMockHWCameraId = 1028; 40 inline constexpr uint64_t startMockHWDisplayId = 256; 41 inline constexpr uint64_t endMockHWDisplayId = 258; 42 43 } // namespace 44 45 namespace aidl::android::automotive::evs::implementation { 46 47 std::shared_ptr<MockEvsHal> initializeMockEvsHal(); 48 std::shared_ptr<aidl::android::hardware::automotive::evs::IEvsCamera> openFirstCamera( 49 const std::shared_ptr<MockEvsHal>& handle); 50 51 } // namespace aidl::android::automotive::evs::implementation 52