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(metadata)): 59 % for idx,entry in enumerate(remove_synthetic(find_unique_entries(sec))): 60 % if entry.visibility in ('fwk_only', 'fwk_java_public'): 61<% gap = True %>\ 62<% curIdx += 1 %>\ 63<% continue %>\ 64 % endif 65 /** 66 * ${entry.name} [${entry.kind}, ${annotated_type(entry)}, ${entry.applied_visibility}] 67 % if entry.description: 68 * 69${entry.description | hidldoc(metadata)}\ 70 % endif 71 */ 72 % if idx == 0: 73<% gap = False %>\ 74<% curIdx = sec_idx << 16 %>\ 75 ${entry.name + " =" | csym} CameraMetadataSectionStart.${path_name(find_parent_section(entry)) | csym}_START, 76 % elif gap: 77<% gap = False %>\ 78<% curIdx += 1 %>\ 79 ${entry.name | csym} = ${curIdx}, 80 % else: 81<% curIdx += 1 %>\ 82 ${entry.name + "," | csym} 83 % endif 84 % endfor 85%endfor 86} 87