mnote-pentax-tag.c

Go to the documentation of this file.
00001 /* mnote-pentax-tag.c:
00002  *
00003  * Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful, 
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details. 
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the
00017  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA  02110-1301  USA.
00019  */
00020 
00021 #include <config.h>
00022 #include "mnote-pentax-tag.h"
00023 
00024 #include <stdlib.h>
00025 
00026 #include <libexif/i18n.h>
00027 
00028 static const struct {
00029         MnotePentaxTag tag;
00030         const char *name;
00031         const char *title;
00032         const char *description;
00033 } table[] = {
00034 #ifndef NO_VERBOSE_TAG_STRINGS
00035         {MNOTE_PENTAX_TAG_MODE, "Mode", N_("Capture Mode"), ""},
00036         {MNOTE_PENTAX_TAG_QUALITY, "Quality", N_("Quality Level"), ""},
00037         {MNOTE_PENTAX_TAG_FOCUS, "Focus", N_("Focus Mode"), ""},
00038         {MNOTE_PENTAX_TAG_FLASH, "Flash", N_("Flash Mode"), ""},
00039         {MNOTE_PENTAX_TAG_UNKNOWN_05, NULL, NULL, NULL},
00040         {MNOTE_PENTAX_TAG_UNKNOWN_06, NULL, NULL, NULL},
00041         {MNOTE_PENTAX_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"), ""},
00042         {MNOTE_PENTAX_TAG_UNKNOWN_08, NULL, NULL, NULL},
00043         {MNOTE_PENTAX_TAG_UNKNOWN_09, NULL, NULL, NULL},
00044         {MNOTE_PENTAX_TAG_ZOOM, "Zoom", N_("Zoom"), NULL},
00045         {MNOTE_PENTAX_TAG_SHARPNESS, "Sharpness", N_("Sharpness"), ""},
00046         {MNOTE_PENTAX_TAG_CONTRAST, "Contrast", N_("Contrast"), ""},
00047         {MNOTE_PENTAX_TAG_SATURATION, "Saturation", N_("Saturation"), ""},
00048         {MNOTE_PENTAX_TAG_UNKNOWN_14, NULL, NULL, NULL},
00049         {MNOTE_PENTAX_TAG_UNKNOWN_15, NULL, NULL, NULL},
00050         {MNOTE_PENTAX_TAG_UNKNOWN_16, NULL, NULL, NULL},
00051         {MNOTE_PENTAX_TAG_UNKNOWN_17, NULL, NULL, NULL},
00052         {MNOTE_PENTAX_TAG_UNKNOWN_18, NULL, NULL, NULL},
00053         {MNOTE_PENTAX_TAG_UNKNOWN_19, NULL, NULL, NULL},
00054         {MNOTE_PENTAX_TAG_ISO_SPEED, "ISOSpeed", N_("ISO Speed"), ""},
00055         {MNOTE_PENTAX_TAG_UNKNOWN_21, NULL, NULL, NULL},
00056         {MNOTE_PENTAX_TAG_COLOR, "Color", N_("Colors"), ""},
00057         {MNOTE_PENTAX_TAG_UNKNOWN_24, NULL, NULL, NULL},
00058         {MNOTE_PENTAX_TAG_UNKNOWN_25, NULL, NULL, NULL},
00059         {MNOTE_PENTAX_TAG_PRINTIM, "PrintIM", N_("PrintIM Settings"), ""},
00060         {MNOTE_PENTAX_TAG_TZ_CITY, "TimeZone", N_("Time Zone"), ""},
00061         {MNOTE_PENTAX_TAG_TZ_DST, "DaylightSavings", N_("Daylight Savings"), ""},
00062 
00063         {MNOTE_PENTAX2_TAG_MODE, "Mode", N_("Capture Mode"), ""},
00064         {MNOTE_PENTAX2_TAG_PREVIEW_SIZE, "PentaxPreviewSize", N_("Preview Size"), ""},
00065         {MNOTE_PENTAX2_TAG_PREVIEW_LENGTH, "PentaxPreviewLength", N_("Preview Length"), ""},
00066         {MNOTE_PENTAX2_TAG_PREVIEW_START, "PentaxPreviewStart", N_("Preview Start"), ""},
00067         {MNOTE_PENTAX2_TAG_MODEL_ID, "ModelID", N_("Model Identification"), ""},
00068         {MNOTE_PENTAX2_TAG_DATE, "Date", N_("Date"), ""},
00069         {MNOTE_PENTAX2_TAG_TIME, "Time", N_("Time"), ""},
00070         {MNOTE_PENTAX2_TAG_QUALITY, "Quality", N_("Quality Level"), ""},
00071         {MNOTE_PENTAX2_TAG_IMAGE_SIZE, "ImageSize", N_("Image Size"), ""},
00072         {MNOTE_PENTAX2_TAG_PICTURE_MODE, "PictureMode", N_("Picture Mode"), ""},
00073         {MNOTE_PENTAX2_TAG_FLASH_MODE, "FlashMode", N_("Flash Mode"), ""},
00074         {MNOTE_PENTAX2_TAG_FOCUS_MODE, "FocusMode", N_("Focus Mode"), ""},
00075         {MNOTE_PENTAX2_TAG_AFPOINT_SELECTED, "AFPointSelected", N_("AF Point Selected"), ""},
00076         {MNOTE_PENTAX2_TAG_AUTO_AFPOINT, "AutoAFPoint", N_("Auto AF Point"), ""},
00077         {MNOTE_PENTAX2_TAG_FOCUS_POSITION, "FocusPosition", N_("Focus Position"), ""},
00078         {MNOTE_PENTAX2_TAG_EXPOSURE_TIME, "ExposureTime", N_("Exposure Time"), ""},
00079         {MNOTE_PENTAX2_TAG_FNUMBER, "FNumber", N_("F-Number"), ""},
00080         {MNOTE_PENTAX2_TAG_ISO, "ISO", N_("ISO Number"), ""},
00081         {MNOTE_PENTAX2_TAG_EXPOSURE_COMPENSATION, "ExposureCompensation", N_("Exposure Compensation"), ""},
00082         {MNOTE_PENTAX2_TAG_METERING_MODE, "MeteringMode", N_("Metering Mode"), ""},
00083         {MNOTE_PENTAX2_TAG_AUTO_BRACKETING, "AutoBracketing", N_("Auto Bracketing"), ""},
00084         {MNOTE_PENTAX2_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"), ""},
00085         {MNOTE_PENTAX2_TAG_WHITE_BALANCE_MODE, "WhiteBalanceMode", N_("White Balance Mode"), ""},
00086         {MNOTE_PENTAX2_TAG_BLUE_BALANCE, "BlueBalance", N_("Blue Balance"), ""},
00087         {MNOTE_PENTAX2_TAG_RED_BALANCE, "RedBalance", N_("Red Balance"), ""},
00088         {MNOTE_PENTAX2_TAG_FOCAL_LENGTH, "FocalLength", N_("Focal Length"), ""},
00089         {MNOTE_PENTAX2_TAG_DIGITAL_ZOOM, "DigitalZoom", N_("Digital Zoom"), ""},
00090         {MNOTE_PENTAX2_TAG_SATURATION, "Saturation", N_("Saturation"), ""},
00091         {MNOTE_PENTAX2_TAG_CONTRAST, "Contrast", N_("Contrast"), ""},
00092         {MNOTE_PENTAX2_TAG_SHARPNESS, "Sharpness", N_("Sharpness"), ""},
00093         {MNOTE_PENTAX2_TAG_WORLDTIME_LOCATION, "WorldTimeLocation", N_("World Time Location"), ""},
00094         {MNOTE_PENTAX2_TAG_HOMETOWN_CITY, "HometownCity", N_("Hometown City"), ""},
00095         {MNOTE_PENTAX2_TAG_DESTINATION_CITY, "DestinationCity", N_("Destination City"), ""},
00096         {MNOTE_PENTAX2_TAG_HOMETOWN_DST, "HometownDST,", N_("Hometown DST"), N_("Home Daylight Savings Time")},
00097         {MNOTE_PENTAX2_TAG_DESTINATION_DST, "DestinationDST", N_("Destination DST"), N_("Destination Daylight Savings Time")},
00098         {MNOTE_PENTAX2_TAG_FRAME_NUMBER, "FrameNumber", N_("Frame Number"), ""},
00099         {MNOTE_PENTAX2_TAG_IMAGE_PROCESSING, "ImageProcessing", N_("Image Processing"), ""},
00100         {MNOTE_PENTAX2_TAG_PICTURE_MODE2, "PictureMode2", N_("Picture Mode (2)"), ""},
00101         {MNOTE_PENTAX2_TAG_DRIVE_MODE, "DriveMode", N_("Drive Mode"), ""},
00102         {MNOTE_PENTAX2_TAG_COLOR_SPACE, "ColorSpace", N_("Color Space"), ""},
00103         {MNOTE_PENTAX2_TAG_IMAGE_AREA_OFFSET, "ImageAreaOffset", N_("Image Area Offset"), ""},
00104         {MNOTE_PENTAX2_TAG_RAW_IMAGE_SIZE, "RawImageSize", N_("Raw Image Size"), ""},
00105         {MNOTE_PENTAX2_TAG_AFPOINTS_USED, "AfPointsUsed,", N_("Autofocus Points Used"), ""},
00106         {MNOTE_PENTAX2_TAG_LENS_TYPE, "LensType", N_("Lens Type"), ""},
00107         {MNOTE_PENTAX2_TAG_CAMERA_TEMPERATURE, "CameraTemperature", N_("Camera Temperature"), ""},
00108         {MNOTE_PENTAX2_TAG_NOISE_REDUCTION, "NoiseReduction", N_("Noise Reduction"), ""},
00109         {MNOTE_PENTAX2_TAG_FLASH_EXPOSURE_COMP, "FlashExposureComp", N_("Flash Exposure Compensation"), ""},
00110         {MNOTE_PENTAX2_TAG_IMAGE_TONE, "ImageTone", N_("Image Tone"), ""},
00111         {MNOTE_PENTAX2_TAG_SHAKE_REDUCTION_INFO, "ShakeReductionInfo,", N_("Shake Reduction Info"), ""},
00112         {MNOTE_PENTAX2_TAG_BLACK_POINT, "BlackPoint", N_("Black Point"), ""},
00113         {MNOTE_PENTAX2_TAG_WHITE_POINT, "WhitePoint", N_("White Point"), ""},
00114         {MNOTE_PENTAX2_TAG_AE_INFO, "AEInfo", N_("AE Info"), ""},
00115         {MNOTE_PENTAX2_TAG_LENS_INFO, "LensInfo", N_("Lens Info"), ""},
00116         {MNOTE_PENTAX2_TAG_FLASH_INFO, "FlashInfo", N_("Flash Info"), ""},
00117         {MNOTE_PENTAX2_TAG_CAMERA_INFO, "CameraInfo", N_("Camera Info"), ""},
00118         {MNOTE_PENTAX2_TAG_BATTERY_INFO, "BatteryInfo", N_("Battery Info"), ""},
00119         {MNOTE_PENTAX2_TAG_HOMETOWN_CITY_CODE, "HometownCityCode", N_("Hometown City Code"), ""},
00120         {MNOTE_PENTAX2_TAG_DESTINATION_CITY_CODE, "DestinationCityCode", N_("Destination City Code"), ""},
00121 
00122         {MNOTE_CASIO2_TAG_PREVIEW_START, "CasioPreviewStart", N_("Preview Start"), ""},
00123         {MNOTE_CASIO2_TAG_WHITE_BALANCE_BIAS, "WhiteBalanceBias", N_("White Balance Bias"), ""},
00124         {MNOTE_CASIO2_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"), ""},
00125         {MNOTE_CASIO2_TAG_OBJECT_DISTANCE, "ObjectDistance", N_("Object Distance"), N_("Distance of photographed object in millimeters.")},
00126         {MNOTE_CASIO2_TAG_FLASH_DISTANCE, "FlashDistance", N_("Flash Distance"), ""},
00127         {MNOTE_CASIO2_TAG_RECORD_MODE, "RecordMode", N_("Record Mode"), ""},
00128         {MNOTE_CASIO2_TAG_SELF_TIMER, "SelfTimer", N_("Self-timer"), ""},
00129         {MNOTE_CASIO2_TAG_QUALITY, "CasioQuality", N_("Quality Level"), ""},
00130         {MNOTE_CASIO2_TAG_FOCUS_MODE, "CasioFocusMode", N_("Focus Mode"), ""},
00131         {MNOTE_CASIO2_TAG_TIME_ZONE, "TimeZone", N_("Time Zone"), ""},
00132         {MNOTE_CASIO2_TAG_BESTSHOT_MODE, "BestshotMode", N_("Bestshot Mode"), ""},
00133         {MNOTE_CASIO2_TAG_CCS_ISO_SENSITIVITY, "CCSISOSensitivity", N_("CCS ISO Sensitivity"), ""},
00134         {MNOTE_CASIO2_TAG_COLOR_MODE, "ColorMode", N_("Color Mode"), ""},
00135         {MNOTE_CASIO2_TAG_ENHANCEMENT, "Enhancement", N_("Enhancement"), ""},
00136         {MNOTE_CASIO2_TAG_FINER, "Finer", N_("Finer"), ""},
00137 #endif
00138         {0, NULL, NULL, NULL}
00139 };
00140 
00141 const char *
00142 mnote_pentax_tag_get_name (MnotePentaxTag t)
00143 {
00144         unsigned int i;
00145 
00146         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00147                 if (table[i].tag == t) return (table[i].name);
00148         return NULL;
00149 }
00150 
00151 const char *
00152 mnote_pentax_tag_get_title (MnotePentaxTag t)
00153 {
00154         unsigned int i;
00155 
00156         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00157         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00158                 if (table[i].tag == t) return (_(table[i].title));
00159         return NULL;
00160 }
00161 
00162 const char *
00163 mnote_pentax_tag_get_description (MnotePentaxTag t)
00164 {
00165         unsigned int i;
00166 
00167         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00168                 if (table[i].tag == t) {
00169                         if (!table[i].description || !*table[i].description)
00170                                 return "";
00171                         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00172                         return _(table[i].description);
00173                 }
00174         return NULL;
00175 }

SourceForge.net Logo Generated by doxygen