mnote-pentax-tag.c

Go to the documentation of this file.
00001 /* mnote-pentax-tag.c:
00002  *
00003  * Copyright © 2002 Lutz Müller <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., 59 Temple Place - Suite 330,
00018  * Boston, MA 02111-1307, 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 struct {
00029         MnotePentaxTag tag;
00030         const char *name;
00031         const char *title;
00032         const char *description;
00033 } table[] = {
00034         {MNOTE_PENTAX_TAG_MODE, "Mode", N_("Capture Mode"), NULL},
00035         {MNOTE_PENTAX_TAG_QUALITY, "Quality", N_("Quality Level"), NULL},
00036         {MNOTE_PENTAX_TAG_FOCUS, "Focus", N_("Focus Mode"), NULL},
00037         {MNOTE_PENTAX_TAG_FLASH, "Flash", N_("Flash Mode"), NULL},
00038         {MNOTE_PENTAX_TAG_UNKNOWN_05, NULL, NULL, NULL},
00039         {MNOTE_PENTAX_TAG_UNKNOWN_06, NULL, NULL, NULL},
00040         {MNOTE_PENTAX_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"), NULL},
00041         {MNOTE_PENTAX_TAG_UNKNOWN_08, NULL, NULL, NULL},
00042         {MNOTE_PENTAX_TAG_UNKNOWN_09, NULL, NULL, NULL},
00043         {MNOTE_PENTAX_TAG_ZOOM, "Zoom", N_("Zoom"), NULL},
00044         {MNOTE_PENTAX_TAG_SHARPNESS, "Sharpness", N_("Sharpness"), NULL},
00045         {MNOTE_PENTAX_TAG_CONTRAST, "Contrast", N_("Contrast"), NULL},
00046         {MNOTE_PENTAX_TAG_SATURATION, "Saturation", N_("Saturation"), NULL},
00047         {MNOTE_PENTAX_TAG_UNKNOWN_14, NULL, NULL, NULL},
00048         {MNOTE_PENTAX_TAG_UNKNOWN_15, NULL, NULL, NULL},
00049         {MNOTE_PENTAX_TAG_UNKNOWN_16, NULL, NULL, NULL},
00050         {MNOTE_PENTAX_TAG_UNKNOWN_17, NULL, NULL, NULL},
00051         {MNOTE_PENTAX_TAG_UNKNOWN_18, NULL, NULL, NULL},
00052         {MNOTE_PENTAX_TAG_UNKNOWN_19, NULL, NULL, NULL},
00053         {MNOTE_PENTAX_TAG_ISO_SPEED, "ISOSpeed", N_("ISOSpeed"), NULL},
00054         {MNOTE_PENTAX_TAG_UNKNOWN_21, NULL, NULL, NULL},
00055         {MNOTE_PENTAX_TAG_COLOR, "Color", N_("Color"), NULL},
00056         {MNOTE_PENTAX_TAG_UNKNOWN_24, NULL, NULL, NULL},
00057         {MNOTE_PENTAX_TAG_UNKNOWN_25, NULL, NULL, NULL},
00058         {MNOTE_PENTAX_TAG_PRINTIM, "PrintIM", N_("PrintIM Settings"), NULL},
00059         {MNOTE_PENTAX_TAG_TZ_CITY, "TimeZone", N_("TimeZone"), NULL},
00060         {MNOTE_PENTAX_TAG_TZ_DST, "DaylightSavings", N_("DaylightSavings"), NULL},
00061         {0, NULL, NULL, NULL}
00062 };
00063 
00064 const char *
00065 mnote_pentax_tag_get_name (MnotePentaxTag t)
00066 {
00067         unsigned int i;
00068 
00069         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00070                 if (table[i].tag == t) return (table[i].name);
00071         return NULL;
00072 }
00073 
00074 const char *
00075 mnote_pentax_tag_get_title (MnotePentaxTag t)
00076 {
00077         unsigned int i;
00078 
00079         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00080         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00081                 if (table[i].tag == t) return (_(table[i].title));
00082         return NULL;
00083 }
00084 
00085 const char *
00086 mnote_pentax_tag_get_description (MnotePentaxTag t)
00087 {
00088         unsigned int i;
00089 
00090         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00091         for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00092                 if (table[i].tag == t) return (_(table[i].description));
00093         return NULL;
00094 }

Generated on Tue Dec 19 14:33:54 2006 for EXIF library (libexif) Internals by  doxygen 1.5.1