1## -*- coding: utf-8 -*- 2/* 3 * Copyright (C) ${copyright_year()} The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17<%! 18 def annotated_type(entry): 19 if entry.enum: 20 type = 'enum' 21 else: 22 type = entry.type 23 if entry.container == 'array': 24 type += '[]' 25 26 return type 27 28 def annotated_enum_type(entry): 29 if entry.type == 'int64' and entry.container == 'array': 30 type = ' int64_t' 31 else: 32 type = ' uint32_t' 33 34 return type 35%>\ 36 37/* 38 * Autogenerated from camera metadata definitions in 39 * /system/media/camera/docs/metadata_definitions.xml 40 * *** DO NOT EDIT BY HAND *** 41 */ 42 43package android.hardware.camera.metadata; 44 45import android.hardware.camera.metadata.CameraMetadataSectionStart; 46 47/** 48 * Main enumeration for defining camera metadata tags added in this revision 49 * 50 * <p>Partial documentation is included for each tag; for complete documentation, reference 51 * '/system/media/camera/docs/docs.html' in the corresponding Android source tree.</p> 52 */ 53@VintfStability 54@Backing(type="int") 55enum CameraMetadataTag { 56<% curIdx = 0 %>\ 57<% gap = False %>\ 58% for sec_idx,sec in enumerate(find_all_sections_filtered(metadata, ('extension'))): 59 % for idx,entry in enumerate(remove_synthetic(find_unique_entries(sec))): 60 % if idx == 0: 61<% gap = False %>\ 62<% curIdx = sec_idx << 16 %>\ 63 % endif 64 % if entry.visibility in ('fwk_only', 'fwk_java_public', 'fwk_public', 'fwk_system_public',\ 65 'fwk_ndk_public'): 66<% gap = True %>\ 67<% curIdx += 1 %>\ 68<% continue %>\ 69 % endif 70 /** 71 * ${entry.name} [${entry.kind}, ${annotated_type(entry)}, ${entry.applied_visibility}] 72 % if entry.description: 73 * 74${entry.description | hidldoc(metadata)}\ 75 % endif 76 */ 77 % if idx == 0: 78 ${entry.name + " =" | csym} CameraMetadataSectionStart.${path_name(find_parent_section(entry)) | csym}_START, 79 % elif gap: 80<% gap = False %>\ 81 ${entry.name | csym} = ${curIdx}, 82 % else: 83 ${entry.name + "," | csym} 84 % endif 85<% curIdx += 1 %>\ 86 % endfor 87%endfor 88} 89