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 #ifndef CPP_EVS_MANAGER_1_1_IENUMERATORMANAGER_H_
17 #define CPP_EVS_MANAGER_1_1_IENUMERATORMANAGER_H_
18 
19 #include <android/hardware/automotive/evs/1.1/IEvsEnumerator.h>
20 #include <android/hardware/automotive/evs/1.1/IEvsUltrasonicsArray.h>
21 #include <android/hardware/camera/device/3.2/ICameraDevice.h>
22 
23 #include <cstdint>
24 #include <memory>
25 #include <string_view>
26 #include <vector>
27 
28 namespace android::automotive::evs::V1_1::implementation {
29 
30 class IEnumeratorManager {
31 public:
32     virtual ~IEnumeratorManager() = default;
33 
34     virtual std::vector<::android::hardware::automotive::evs::V1_0::CameraDesc> getCameraList() = 0;
35     virtual std::unique_ptr<::android::hardware::automotive::evs::V1_0::IEvsCamera> openCamera(
36             std::string_view cameraId) = 0;
37     virtual void closeCamera(
38             const ::android::hardware::automotive::evs::V1_0::IEvsCamera& camera) = 0;
39 
40     virtual std::unique_ptr<::android::hardware::automotive::evs::V1_0::IEvsDisplay>
41     openDisplay() = 0;
42     virtual void closeDisplay(::android::hardware::automotive::evs::V1_0::IEvsDisplay* display) = 0;
43 
44     virtual ::android::hardware::automotive::evs::V1_0::DisplayState getDisplayState() = 0;
45     virtual std::vector<::android::hardware::automotive::evs::V1_1::CameraDesc>
46     getCameraList_1_1() = 0;
47 
48     virtual std::unique_ptr<::android::hardware::automotive::evs::V1_1::IEvsCamera> openCamera_1_1(
49             std::string cameraId, const hardware::camera::device::V3_2::Stream& streamCfg) = 0;
50     virtual bool isHardware() = 0;
51     virtual std::vector<std::uint8_t> getDisplayIdList() = 0;
52     virtual std::unique_ptr<::android::hardware::automotive::evs::V1_1::IEvsDisplay>
53     openDisplay_1_1(std::uint8_t id) = 0;
54 
55     virtual std::vector<::android::hardware::automotive::evs::V1_1::UltrasonicsArrayDesc>
56     getUltrasonicsArrayList() = 0;
57     virtual std::unique_ptr<::android::hardware::automotive::evs::V1_1::IEvsUltrasonicsArray>
58     openUltrasonicsArray(std::string id) = 0;
59     virtual void closeUltrasonicsArray(
60             const ::android::hardware::automotive::evs::V1_1::IEvsUltrasonicsArray&
61                     ultrasonicsArray) = 0;
62 
63     virtual std::string debug(::android::hardware::hidl_handle fileDescriptor,
64                               std::vector<std::string> options) = 0;
65 };
66 
67 }  // namespace android::automotive::evs::V1_1::implementation
68 
69 #endif  // CPP_EVS_MANAGER_1_1_IENUMERATORMANAGER_H_
70