camera_metadata_tag_info.mako revision da1c314e080d33eb6b93a1d3da070c99b41e7b22
1## -*- coding: utf-8 -*-
2/*
3 * Copyright (C) 2012 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/**
19 * !! Do not reference this file directly !!
20 *
21 * It is logically a part of camera_metadata.c.  It is broken out for ease of
22 * maintaining the tag info.
23 *
24 * Array assignments are done using specified-index syntax to keep things in
25 * sync with camera_metadata_tags.h
26 */
27
28/**
29 * ! Do not edit this file directly !
30 *
31 * Generated automatically from camera_metadata_tag_info.mako
32 */
33
34const char *camera_metadata_section_names[ANDROID_SECTION_COUNT] = {
35  % for i in find_all_sections(metadata):
36    ${"[%s]" %(path_name(i)) | csym,pad(36)} = "${path_name(i)}",
37  % endfor
38};
39
40unsigned int camera_metadata_section_bounds[ANDROID_SECTION_COUNT][2] = {
41  % for i in find_all_sections(metadata):
42    ${"[%s]" %(path_name(i)) | csym,pad(36)} = { ${path_name(i) | csym}_START,
43                                       ${path_name(i) | csym}_END },
44  % endfor
45};
46
47% for sec in find_all_sections(metadata):
48static tag_info_t ${path_name(sec) | csyml}[${path_name(sec) | csym}_END -
49        ${path_name(sec) | csym}_START] = {
50  % for entry in find_unique_entries(sec):
51    [ ${entry.name | csym} - ${path_name(sec) | csym}_START ] =
52    { ${'"%s",' %(entry.name_short) | pad(40)} ${entry.type | ctype_enum,ljust(11)} },
53  % endfor
54};
55
56% endfor
57
58tag_info_t *tag_info[ANDROID_SECTION_COUNT] = {
59  % for i in find_all_sections(metadata):
60    ${path_name(i) | csyml},
61  % endfor
62};
63