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 
17 #ifndef HARDWARE_GOOGLE_CAMERA_HAL_UTILS_HAL_VENDOR_TAG_INTERFACE_H
18 #define HARDWARE_GOOGLE_CAMERA_HAL_UTILS_HAL_VENDOR_TAG_INTERFACE_H
19 
20 #include "hal_types.h"
21 
22 #include <utils/Errors.h>
23 #include <vector>
24 
25 namespace android {
26 namespace google_camera_hal {
27 
28 struct VendorTagInfo {
29   uint32_t tag_id = 0;
30   int tag_type = TYPE_BYTE;
31   std::string section_name;
32   std::string tag_name;
33 };
34 
35 // This is an interface for accessing vendor tags in HAL
36 class VendorTagInterface {
37  public:
38   // Get Tag info for the give tag id
39   virtual status_t GetTagInfo(uint32_t tag_id, VendorTagInfo* tag_info) = 0;
40 
41   // Get the tag id for the given section/name
42   virtual status_t GetTag(const std::string section_name,
43                           const std::string tag_name, uint32_t* tag_id);
44 
45  protected:
~VendorTagInterface()46   virtual ~VendorTagInterface(){};
47 };
48 
49 }  // namespace google_camera_hal
50 }  // namespace android
51 
52 #endif  // HARDWARE_GOOGLE_CAMERA_HAL_UTILS_HAL_VENDOR_TAG_INTERFACE_H
53