Haoxiang Li | d2454a5 | 2019-06-18 13:23:12 -0700 | [diff] [blame] | 1 | /* |
| 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 Li | 30aa0bc | 2019-08-30 13:24:59 -0700 | [diff] [blame] | 20 | #include <vector> |
Haoxiang Li | d2454a5 | 2019-06-18 13:23:12 -0700 | [diff] [blame] | 21 | |
| 22 | namespace android { |
| 23 | namespace automotive { |
| 24 | namespace evs { |
| 25 | namespace support { |
| 26 | |
Haoxiang Li | 30aa0bc | 2019-08-30 13:24:59 -0700 | [diff] [blame] | 27 | using std::vector; |
| 28 | using std::string; |
| 29 | |
Haoxiang Li | d2454a5 | 2019-06-18 13:23:12 -0700 | [diff] [blame] | 30 | class Utils { |
Haoxiang Li | 30aa0bc | 2019-08-30 13:24:59 -0700 | [diff] [blame] | 31 | public: |
| 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 | |
| 51 | private: |
| 52 | static vector<string> sCameraIds; |
Haoxiang Li | d2454a5 | 2019-06-18 13:23:12 -0700 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | } // namespace support |
| 56 | } // namespace evs |
| 57 | } // namespace automotive |
| 58 | } // namespace android |
| 59 | |
| 60 | #endif // CAR_LIB_EVS_SUPPORT_UTILS_H |