blob: a059175c352cf15a4a4e6af5f9a36c8b21f6f769 [file] [log] [blame]
Haoxiang Lid2454a52019-06-18 13:23:12 -07001/*
2 * Copyright (C) 2019 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 CAR_LIB_EVS_SUPPORT_UTILS_H
17#define CAR_LIB_EVS_SUPPORT_UTILS_H
18
19#include <string>
Haoxiang Li30aa0bc2019-08-30 13:24:59 -070020#include <vector>
Haoxiang Lid2454a52019-06-18 13:23:12 -070021
22namespace android {
23namespace automotive {
24namespace evs {
25namespace support {
26
Haoxiang Li30aa0bc2019-08-30 13:24:59 -070027using std::vector;
28using std::string;
29
Haoxiang Lid2454a52019-06-18 13:23:12 -070030class Utils {
Haoxiang Li30aa0bc2019-08-30 13:24:59 -070031public:
32 /**
33 * Gets camera ids for all the available rear view cameras. For
34 * now, we don't support dynamically adding/removing camera. In
35 * other words, the camera list won't be updated after the first
36 * time the camera list is obtained.
37 *
38 * An empty vector is returned if no rear view camera is found.
39 */
40 static vector<string> getRearViewCameraIds();
41
42 /**
43 * Gets camera id for the default rear view camera. For now, we
44 * always assume that the first element in rear view camera list
45 * is the default one.
46 *
47 * An empty string is returned if no rear view camera is found.
48 */
49 static string getDefaultRearViewCameraId();
50
51private:
52 static vector<string> sCameraIds;
Haoxiang Lid2454a52019-06-18 13:23:12 -070053};
54
55} // namespace support
56} // namespace evs
57} // namespace automotive
58} // namespace android
59
60#endif // CAR_LIB_EVS_SUPPORT_UTILS_H