resetting manifest requested domain to floor
[platform/upstream/libexif.git] / libexif / samsung / mnote-samsung-tag.c
1 /*
2  * libexif
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Sangchul Lee <sc11.lee@samsung.com>
7  *
8  * This library is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU Lesser General Public License as published by the
10  * Free Software Foundation; either version 2.1 of the License, or (at your option)
11  * any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
14  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
15  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; if not, write to the Free Software Foundation, Inc., 51
20  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23
24 #include <config.h>
25 #include "mnote-samsung-tag.h"
26
27 #include <stdlib.h>
28
29 #include <libexif/i18n.h>
30
31 static const struct {
32         MnoteSamsungTag tag;
33         const char *name;
34         const char *title;
35         const char *description;
36 } table[] = {
37 #ifndef NO_VERBOSE_TAG_STRINGS
38         {MNOTE_SAMSUNG_TAG_MNOTE_VERSION, "MakerNoteVersion", N_("Maker Note Version"), "1.0.0"},
39         {MNOTE_SAMSUNG_TAG_DEVICE_ID, "SamsungDeviceID", N_("Samsung Device ID"), ""},
40         {MNOTE_SAMSUNG_TAG_MODEL_ID, "SamsungModelID", N_("Samsung Model ID"), ""},
41         {MNOTE_SAMSUNG_TAG_COLOR_INFO, "ColorInfo", N_("Color Info"), ""},
42         {MNOTE_SAMSUNG_TAG_SERIAL_NUM, "ModelSerialNumber", N_("Model Serial Number"), ""},
43         {MNOTE_SAMSUNG_TAG_IMAGE_COUNT, "ImageCount", N_("Image Count"), ""},
44         {MNOTE_SAMSUNG_TAG_GPS_INFO01, "GPSInfo01", N_("GPS Infomation 01"), ""},
45         {MNOTE_SAMSUNG_TAG_GPS_INFO02, "GPSInfo02", N_("GPS Infomation 02"), ""},
46         {MNOTE_SAMSUNG_TAG_PREVIEW_IMAGE, "PreviewImageInfo", N_("Preview Image IFD Offset"), ""},
47         {MNOTE_SAMSUNG_TAG_FAVOR_TAGGING, "FavoriteTagging", N_("Favorite Tagging"), ""},
48         {MNOTE_SAMSUNG_TAG_SRW_COMPRESS, "SRWCompressionMode", N_("SRW Compression Mode"), ""},
49         {MNOTE_SAMSUNG_TAG_COLOR_SPACE, "ColorSpace", N_("Color Space"), ""},
50         {MNOTE_SAMSUNG_TAG_AE, "AE", N_("Auto Exposure"), ""},
51         {MNOTE_SAMSUNG_TAG_AF, "AF", N_("Auto Focus"), ""},
52         {MNOTE_SAMSUNG_TAG_AWB01, "AWB01", N_("Auto White Balance 01(Capture)"), ""},
53         {MNOTE_SAMSUNG_TAG_AWB02, "AWB02", N_("Auto White Balance 02(Preview)"), ""},
54         {MNOTE_SAMSUNG_TAG_IPC, "IPC", N_("Image Processing Chain"), ""},
55         {MNOTE_SAMSUNG_TAG_SCENE_RESULT, "SceneResult", N_("Scene Recognition"), ""},
56         {MNOTE_SAMSUNG_TAG_SADEBUG_INFO01, "SADebugInfo01", N_("Scene Recognition Debug Info 01"), ""},
57         {MNOTE_SAMSUNG_TAG_SADEBUG_INFO02, "SADebugInfo02", N_("Scene Recognition Debug Info 02"), ""},
58         {MNOTE_SAMSUNG_TAG_FACE_DETECTION, "FaceDetection", N_("Face Detection"), ""},
59         {MNOTE_SAMSUNG_TAG_FACE_FEAT01, "FaceFeature01", N_("Face Feature 01"), ""},
60         {MNOTE_SAMSUNG_TAG_FACE_FEAT02, "FaceFeature02", N_("Face Feature 02"), ""},
61         {MNOTE_SAMSUNG_TAG_FACE_RECOG, "FaceRecognition", N_("Face Recognition"), ""},
62         {MNOTE_SAMSUNG_TAG_LENS_INFO, "LensInfo", N_("Lens Infomation"), ""},
63         {MNOTE_SAMSUNG_TAG_THIRDPARTY, "ThirdParty", N_("Ichikawa S/W"), ""},
64
65 #endif
66         {0, NULL, NULL, NULL}
67 };
68
69
70 const char *mnote_samsung_tag_get_name (MnoteSamsungTag t)
71 {
72         unsigned int i;
73
74         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
75                 if (table[i].tag == t) return (table[i].name);
76         return NULL;
77 }
78
79 const char *mnote_samsung_tag_get_title (MnoteSamsungTag t)
80 {
81         unsigned int i;
82
83         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
84         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
85                 if (table[i].tag == t) return (_(table[i].title));
86         return NULL;
87 }
88
89 const char *mnote_samsung_tag_get_description (MnoteSamsungTag t)
90 {
91         unsigned int i;
92
93         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
94         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
95                 if (table[i].tag == t) {
96                         if (!*table[i].description)
97                                 return "";
98                         return (_(table[i].description));
99                 }
100         return NULL;
101 }
102