EXIF library (libexif) Internals  0.6.24
mnote-pentax-tag.c
Go to the documentation of this file.
1 /* mnote-pentax-tag.c:
2  *
3  * Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301 USA.
19  */
20 
21 #include <config.h>
22 #include "mnote-pentax-tag.h"
23 
24 #include <stdlib.h>
25 
26 #include <libexif/i18n.h>
27 
28 static const struct {
30  const char *name;
31  const char *title;
32  const char *description;
33 } table[] = {
34 #ifndef NO_VERBOSE_TAG_STRINGS
35  {MNOTE_PENTAX_TAG_MODE, "Mode", N_("Capture Mode"), ""},
36  {MNOTE_PENTAX_TAG_QUALITY, "Quality", N_("Quality Level"), ""},
37  {MNOTE_PENTAX_TAG_FOCUS, "Focus", N_("Focus Mode"), ""},
38  {MNOTE_PENTAX_TAG_FLASH, "Flash", N_("Flash Mode"), ""},
39  {MNOTE_PENTAX_TAG_UNKNOWN_05, NULL, NULL, NULL},
40  {MNOTE_PENTAX_TAG_UNKNOWN_06, NULL, NULL, NULL},
41  {MNOTE_PENTAX_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"), ""},
42  {MNOTE_PENTAX_TAG_UNKNOWN_08, NULL, NULL, NULL},
43  {MNOTE_PENTAX_TAG_UNKNOWN_09, NULL, NULL, NULL},
44  {MNOTE_PENTAX_TAG_ZOOM, "Zoom", N_("Zoom"), NULL},
45  {MNOTE_PENTAX_TAG_SHARPNESS, "Sharpness", N_("Sharpness"), ""},
46  {MNOTE_PENTAX_TAG_CONTRAST, "Contrast", N_("Contrast"), ""},
47  {MNOTE_PENTAX_TAG_SATURATION, "Saturation", N_("Saturation"), ""},
48  {MNOTE_PENTAX_TAG_UNKNOWN_14, NULL, NULL, NULL},
49  {MNOTE_PENTAX_TAG_UNKNOWN_15, NULL, NULL, NULL},
50  {MNOTE_PENTAX_TAG_UNKNOWN_16, NULL, NULL, NULL},
51  {MNOTE_PENTAX_TAG_UNKNOWN_17, NULL, NULL, NULL},
52  {MNOTE_PENTAX_TAG_UNKNOWN_18, NULL, NULL, NULL},
53  {MNOTE_PENTAX_TAG_UNKNOWN_19, NULL, NULL, NULL},
54  {MNOTE_PENTAX_TAG_ISO_SPEED, "ISOSpeed", N_("ISO Speed"), ""},
55  {MNOTE_PENTAX_TAG_UNKNOWN_21, NULL, NULL, NULL},
56  {MNOTE_PENTAX_TAG_COLOR, "Color", N_("Colors"), ""},
57  {MNOTE_PENTAX_TAG_UNKNOWN_24, NULL, NULL, NULL},
58  {MNOTE_PENTAX_TAG_UNKNOWN_25, NULL, NULL, NULL},
59  {MNOTE_PENTAX_TAG_PRINTIM, "PrintIM", N_("PrintIM Settings"), ""},
60  {MNOTE_PENTAX_TAG_TZ_CITY, "TimeZone", N_("Time Zone"), ""},
61  {MNOTE_PENTAX_TAG_TZ_DST, "DaylightSavings", N_("Daylight Savings"), ""},
62 
63  {MNOTE_PENTAX2_TAG_MODE, "Mode", N_("Capture Mode"), ""},
64  {MNOTE_PENTAX2_TAG_PREVIEW_SIZE, "PentaxPreviewSize", N_("Preview Size"), ""},
65  {MNOTE_PENTAX2_TAG_PREVIEW_LENGTH, "PentaxPreviewLength", N_("Preview Length"), ""},
66  {MNOTE_PENTAX2_TAG_PREVIEW_START, "PentaxPreviewStart", N_("Preview Start"), ""},
67  {MNOTE_PENTAX2_TAG_MODEL_ID, "ModelID", N_("Model Identification"), ""},
68  {MNOTE_PENTAX2_TAG_DATE, "Date", N_("Date"), ""},
69  {MNOTE_PENTAX2_TAG_TIME, "Time", N_("Time"), ""},
70  {MNOTE_PENTAX2_TAG_QUALITY, "Quality", N_("Quality Level"), ""},
71  {MNOTE_PENTAX2_TAG_IMAGE_SIZE, "ImageSize", N_("Image Size"), ""},
72  {MNOTE_PENTAX2_TAG_PICTURE_MODE, "PictureMode", N_("Picture Mode"), ""},
73  {MNOTE_PENTAX2_TAG_FLASH_MODE, "FlashMode", N_("Flash Mode"), ""},
74  {MNOTE_PENTAX2_TAG_FOCUS_MODE, "FocusMode", N_("Focus Mode"), ""},
75  {MNOTE_PENTAX2_TAG_AFPOINT_SELECTED, "AFPointSelected", N_("AF Point Selected"), ""},
76  {MNOTE_PENTAX2_TAG_AUTO_AFPOINT, "AutoAFPoint", N_("Auto AF Point"), ""},
77  {MNOTE_PENTAX2_TAG_FOCUS_POSITION, "FocusPosition", N_("Focus Position"), ""},
78  {MNOTE_PENTAX2_TAG_EXPOSURE_TIME, "ExposureTime", N_("Exposure Time"), ""},
79  {MNOTE_PENTAX2_TAG_FNUMBER, "FNumber", N_("F-Number"), ""},
80  {MNOTE_PENTAX2_TAG_ISO, "ISO", N_("ISO Number"), ""},
81  {MNOTE_PENTAX2_TAG_EXPOSURE_COMPENSATION, "ExposureCompensation", N_("Exposure Compensation"), ""},
82  {MNOTE_PENTAX2_TAG_METERING_MODE, "MeteringMode", N_("Metering Mode"), ""},
83  {MNOTE_PENTAX2_TAG_AUTO_BRACKETING, "AutoBracketing", N_("Auto Bracketing"), ""},
84  {MNOTE_PENTAX2_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"), ""},
85  {MNOTE_PENTAX2_TAG_WHITE_BALANCE_MODE, "WhiteBalanceMode", N_("White Balance Mode"), ""},
86  {MNOTE_PENTAX2_TAG_BLUE_BALANCE, "BlueBalance", N_("Blue Balance"), ""},
87  {MNOTE_PENTAX2_TAG_RED_BALANCE, "RedBalance", N_("Red Balance"), ""},
88  {MNOTE_PENTAX2_TAG_FOCAL_LENGTH, "FocalLength", N_("Focal Length"), ""},
89  {MNOTE_PENTAX2_TAG_DIGITAL_ZOOM, "DigitalZoom", N_("Digital Zoom"), ""},
90  {MNOTE_PENTAX2_TAG_SATURATION, "Saturation", N_("Saturation"), ""},
91  {MNOTE_PENTAX2_TAG_CONTRAST, "Contrast", N_("Contrast"), ""},
92  {MNOTE_PENTAX2_TAG_SHARPNESS, "Sharpness", N_("Sharpness"), ""},
93  {MNOTE_PENTAX2_TAG_WORLDTIME_LOCATION, "WorldTimeLocation", N_("World Time Location"), ""},
94  {MNOTE_PENTAX2_TAG_HOMETOWN_CITY, "HometownCity", N_("Hometown City"), ""},
95  {MNOTE_PENTAX2_TAG_DESTINATION_CITY, "DestinationCity", N_("Destination City"), ""},
96  {MNOTE_PENTAX2_TAG_HOMETOWN_DST, "HometownDST,", N_("Hometown DST"), N_("Home Daylight Savings Time")},
97  {MNOTE_PENTAX2_TAG_DESTINATION_DST, "DestinationDST", N_("Destination DST"), N_("Destination Daylight Savings Time")},
98  {MNOTE_PENTAX2_TAG_FRAME_NUMBER, "FrameNumber", N_("Frame Number"), ""},
99  {MNOTE_PENTAX2_TAG_IMAGE_PROCESSING, "ImageProcessing", N_("Image Processing"), ""},
100  {MNOTE_PENTAX2_TAG_PICTURE_MODE2, "PictureMode2", N_("Picture Mode (2)"), ""},
101  {MNOTE_PENTAX2_TAG_DRIVE_MODE, "DriveMode", N_("Drive Mode"), ""},
102  {MNOTE_PENTAX2_TAG_COLOR_SPACE, "ColorSpace", N_("Color Space"), ""},
103  {MNOTE_PENTAX2_TAG_IMAGE_AREA_OFFSET, "ImageAreaOffset", N_("Image Area Offset"), ""},
104  {MNOTE_PENTAX2_TAG_RAW_IMAGE_SIZE, "RawImageSize", N_("Raw Image Size"), ""},
105  {MNOTE_PENTAX2_TAG_AFPOINTS_USED, "AfPointsUsed,", N_("Autofocus Points Used"), ""},
106  {MNOTE_PENTAX2_TAG_LENS_TYPE, "LensType", N_("Lens Type"), ""},
107  {MNOTE_PENTAX2_TAG_CAMERA_TEMPERATURE, "CameraTemperature", N_("Camera Temperature"), ""},
108  {MNOTE_PENTAX2_TAG_NOISE_REDUCTION, "NoiseReduction", N_("Noise Reduction"), ""},
109  {MNOTE_PENTAX2_TAG_FLASH_EXPOSURE_COMP, "FlashExposureComp", N_("Flash Exposure Compensation"), ""},
110  {MNOTE_PENTAX2_TAG_IMAGE_TONE, "ImageTone", N_("Image Tone"), ""},
111  {MNOTE_PENTAX2_TAG_SHAKE_REDUCTION_INFO, "ShakeReductionInfo,", N_("Shake Reduction Info"), ""},
112  {MNOTE_PENTAX2_TAG_BLACK_POINT, "BlackPoint", N_("Black Point"), ""},
113  {MNOTE_PENTAX2_TAG_WHITE_POINT, "WhitePoint", N_("White Point"), ""},
114  {MNOTE_PENTAX2_TAG_AE_INFO, "AEInfo", N_("AE Info"), ""},
115  {MNOTE_PENTAX2_TAG_LENS_INFO, "LensInfo", N_("Lens Info"), ""},
116  {MNOTE_PENTAX2_TAG_FLASH_INFO, "FlashInfo", N_("Flash Info"), ""},
117  {MNOTE_PENTAX2_TAG_CAMERA_INFO, "CameraInfo", N_("Camera Info"), ""},
118  {MNOTE_PENTAX2_TAG_BATTERY_INFO, "BatteryInfo", N_("Battery Info"), ""},
119  {MNOTE_PENTAX2_TAG_HOMETOWN_CITY_CODE, "HometownCityCode", N_("Hometown City Code"), ""},
120  {MNOTE_PENTAX2_TAG_DESTINATION_CITY_CODE, "DestinationCityCode", N_("Destination City Code"), ""},
121 
122  {MNOTE_CASIO2_TAG_PREVIEW_START, "CasioPreviewStart", N_("Preview Start"), ""},
123  {MNOTE_CASIO2_TAG_WHITE_BALANCE_BIAS, "WhiteBalanceBias", N_("White Balance Bias"), ""},
124  {MNOTE_CASIO2_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"), ""},
125  {MNOTE_CASIO2_TAG_OBJECT_DISTANCE, "ObjectDistance", N_("Object Distance"), N_("Distance of photographed object in millimeters.")},
126  {MNOTE_CASIO2_TAG_FLASH_DISTANCE, "FlashDistance", N_("Flash Distance"), ""},
127  {MNOTE_CASIO2_TAG_RECORD_MODE, "RecordMode", N_("Record Mode"), ""},
128  {MNOTE_CASIO2_TAG_SELF_TIMER, "SelfTimer", N_("Self-timer"), ""},
129  {MNOTE_CASIO2_TAG_QUALITY, "CasioQuality", N_("Quality Level"), ""},
130  {MNOTE_CASIO2_TAG_FOCUS_MODE, "CasioFocusMode", N_("Focus Mode"), ""},
131  {MNOTE_CASIO2_TAG_TIME_ZONE, "TimeZone", N_("Time Zone"), ""},
132  {MNOTE_CASIO2_TAG_BESTSHOT_MODE, "BestshotMode", N_("Bestshot Mode"), ""},
133  {MNOTE_CASIO2_TAG_CCS_ISO_SENSITIVITY, "CCSISOSensitivity", N_("CCS ISO Sensitivity"), ""},
134  {MNOTE_CASIO2_TAG_COLOR_MODE, "ColorMode", N_("Color Mode"), ""},
135  {MNOTE_CASIO2_TAG_ENHANCEMENT, "Enhancement", N_("Enhancement"), ""},
136  {MNOTE_CASIO2_TAG_FINER, "Finer", N_("Finer"), ""},
137 #endif
138  {0, NULL, NULL, NULL}
139 };
140 
141 const char *
143 {
144  unsigned int i;
145 
146  for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
147  if (table[i].tag == t) return (table[i].name);
148  return NULL;
149 }
150 
151 const char *
153 {
154  unsigned int i;
155 
156  (void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
157  for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
158  if (table[i].tag == t) return (_(table[i].title));
159  return NULL;
160 }
161 
162 const char *
164 {
165  unsigned int i;
166 
167  for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
168  if (table[i].tag == t) {
169  if (!table[i].description || !*table[i].description)
170  return "";
171  (void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
172  return _(table[i].description);
173  }
174  return NULL;
175 }
#define _(String)
Definition: i18n.h:48
#define N_(String)
Definition: i18n.h:49
#define bindtextdomain(Domain, Directory)
Definition: i18n.h:46
MnotePentaxTag tag
const char * mnote_pentax_tag_get_description(MnotePentaxTag t)
const char * mnote_pentax_tag_get_title(MnotePentaxTag t)
const char * description
const char * title
const char * name
static const struct @20 table[]
const char * mnote_pentax_tag_get_name(MnotePentaxTag t)
enum _MnotePentaxTag MnotePentaxTag
@ MNOTE_PENTAX2_TAG_NOISE_REDUCTION
@ MNOTE_CASIO2_TAG_FLASH_DISTANCE
@ MNOTE_PENTAX2_TAG_FLASH_MODE
@ MNOTE_PENTAX2_TAG_WHITE_BALANCE_MODE
@ MNOTE_PENTAX2_TAG_FLASH_INFO
@ MNOTE_PENTAX_TAG_UNKNOWN_24
@ MNOTE_PENTAX_TAG_UNKNOWN_06
@ MNOTE_PENTAX2_TAG_IMAGE_TONE
@ MNOTE_PENTAX2_TAG_PICTURE_MODE2
@ MNOTE_PENTAX2_TAG_CONTRAST
@ MNOTE_PENTAX2_TAG_SHARPNESS
@ MNOTE_PENTAX2_TAG_QUALITY
@ MNOTE_PENTAX2_TAG_IMAGE_AREA_OFFSET
@ MNOTE_PENTAX2_TAG_FLASH_EXPOSURE_COMP
@ MNOTE_PENTAX2_TAG_PREVIEW_LENGTH
@ MNOTE_CASIO2_TAG_FOCUS_MODE
@ MNOTE_CASIO2_TAG_WHITE_BALANCE_BIAS
@ MNOTE_PENTAX_TAG_MODE
@ MNOTE_PENTAX2_TAG_FRAME_NUMBER
@ MNOTE_PENTAX_TAG_UNKNOWN_17
@ MNOTE_PENTAX2_TAG_IMAGE_PROCESSING
@ MNOTE_PENTAX2_TAG_CAMERA_INFO
@ MNOTE_PENTAX2_TAG_LENS_INFO
@ MNOTE_PENTAX_TAG_SHARPNESS
@ MNOTE_PENTAX_TAG_UNKNOWN_08
@ MNOTE_PENTAX2_TAG_AUTO_AFPOINT
@ MNOTE_PENTAX_TAG_TZ_DST
@ MNOTE_PENTAX_TAG_CONTRAST
@ MNOTE_PENTAX_TAG_QUALITY
@ MNOTE_PENTAX2_TAG_BLACK_POINT
@ MNOTE_PENTAX2_TAG_EXPOSURE_TIME
@ MNOTE_PENTAX2_TAG_DESTINATION_CITY_CODE
@ MNOTE_PENTAX_TAG_UNKNOWN_09
@ MNOTE_PENTAX2_TAG_PREVIEW_SIZE
@ MNOTE_PENTAX2_TAG_METERING_MODE
@ MNOTE_PENTAX2_TAG_IMAGE_SIZE
@ MNOTE_PENTAX2_TAG_EXPOSURE_COMPENSATION
@ MNOTE_PENTAX2_TAG_ISO
@ MNOTE_PENTAX2_TAG_FNUMBER
@ MNOTE_PENTAX2_TAG_BATTERY_INFO
@ MNOTE_CASIO2_TAG_CCS_ISO_SENSITIVITY
@ MNOTE_PENTAX2_TAG_TIME
@ MNOTE_PENTAX_TAG_SATURATION
@ MNOTE_PENTAX2_TAG_DESTINATION_CITY
@ MNOTE_PENTAX2_TAG_LENS_TYPE
@ MNOTE_PENTAX2_TAG_PREVIEW_START
@ MNOTE_PENTAX2_TAG_WHITE_POINT
@ MNOTE_PENTAX2_TAG_CAMERA_TEMPERATURE
@ MNOTE_PENTAX2_TAG_RAW_IMAGE_SIZE
@ MNOTE_PENTAX2_TAG_FOCAL_LENGTH
@ MNOTE_PENTAX_TAG_UNKNOWN_15
@ MNOTE_PENTAX_TAG_FOCUS
@ MNOTE_PENTAX2_TAG_SATURATION
@ MNOTE_PENTAX2_TAG_AFPOINT_SELECTED
@ MNOTE_PENTAX_TAG_UNKNOWN_21
@ MNOTE_PENTAX2_TAG_AE_INFO
@ MNOTE_PENTAX_TAG_UNKNOWN_14
@ MNOTE_PENTAX_TAG_FLASH
@ MNOTE_PENTAX2_TAG_RED_BALANCE
@ MNOTE_CASIO2_TAG_FINER
@ MNOTE_PENTAX2_TAG_DATE
@ MNOTE_CASIO2_TAG_OBJECT_DISTANCE
@ MNOTE_PENTAX_TAG_UNKNOWN_05
@ MNOTE_PENTAX2_TAG_FOCUS_MODE
@ MNOTE_CASIO2_TAG_COLOR_MODE
@ MNOTE_PENTAX_TAG_COLOR
@ MNOTE_CASIO2_TAG_BESTSHOT_MODE
@ MNOTE_PENTAX2_TAG_DIGITAL_ZOOM
@ MNOTE_PENTAX2_TAG_DRIVE_MODE
@ MNOTE_PENTAX2_TAG_HOMETOWN_DST
@ MNOTE_PENTAX2_TAG_HOMETOWN_CITY_CODE
@ MNOTE_PENTAX2_TAG_HOMETOWN_CITY
@ MNOTE_PENTAX2_TAG_AUTO_BRACKETING
@ MNOTE_CASIO2_TAG_WHITE_BALANCE
@ MNOTE_PENTAX_TAG_ISO_SPEED
@ MNOTE_CASIO2_TAG_TIME_ZONE
@ MNOTE_PENTAX2_TAG_PICTURE_MODE
@ MNOTE_PENTAX_TAG_ZOOM
@ MNOTE_PENTAX_TAG_UNKNOWN_16
@ MNOTE_PENTAX2_TAG_DESTINATION_DST
@ MNOTE_PENTAX_TAG_WHITE_BALANCE
@ MNOTE_PENTAX2_TAG_COLOR_SPACE
@ MNOTE_PENTAX2_TAG_BLUE_BALANCE
@ MNOTE_PENTAX2_TAG_MODEL_ID
@ MNOTE_PENTAX_TAG_UNKNOWN_19
@ MNOTE_PENTAX2_TAG_WHITE_BALANCE
@ MNOTE_PENTAX2_TAG_MODE
@ MNOTE_PENTAX2_TAG_SHAKE_REDUCTION_INFO
@ MNOTE_PENTAX_TAG_PRINTIM
@ MNOTE_CASIO2_TAG_QUALITY
@ MNOTE_PENTAX2_TAG_FOCUS_POSITION
@ MNOTE_CASIO2_TAG_ENHANCEMENT
@ MNOTE_PENTAX2_TAG_WORLDTIME_LOCATION
@ MNOTE_PENTAX_TAG_UNKNOWN_18
@ MNOTE_CASIO2_TAG_PREVIEW_START
@ MNOTE_PENTAX_TAG_TZ_CITY
@ MNOTE_PENTAX_TAG_UNKNOWN_25
@ MNOTE_CASIO2_TAG_SELF_TIMER
@ MNOTE_PENTAX2_TAG_AFPOINTS_USED
@ MNOTE_CASIO2_TAG_RECORD_MODE

libexif Generated by doxygen