Add GPSHPositioningError tag defined in exif version 2.3.1 (#7)
[platform/upstream/libexif.git] / libexif / exif-tag.c
index 60f8331..4dbcf5b 100644 (file)
@@ -36,7 +36,9 @@
 #define ESL_NNMM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY }
 #define ESL_NNNM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY }
 #define ESL_NNNO { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_OPTIONAL }
+#define ESL_UUUU { EXIF_SUPPORT_LEVEL_UNKNOWN, EXIF_SUPPORT_LEVEL_UNKNOWN, EXIF_SUPPORT_LEVEL_UNKNOWN, EXIF_SUPPORT_LEVEL_UNKNOWN }
 #define ESL_GPS { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN }
+#define ESL_UNKNOWN { ESL_UUUU, ESL_UUUU, ESL_UUUU, ESL_UUUU, ESL_UUUU }
 
 /*!
  * Table giving information about each EXIF tag.
@@ -105,7 +107,7 @@ static const struct TagEntry {
            "reference is sea level and the altitude is above sea level, 0 "
            "is given. If the altitude is below sea level, a value of 1 is given "
            "and the altitude is indicated as an absolute value in the "
-           "GSPAltitude tag. The reference unit is meters. Note that this tag "
+           "GPSAltitude tag. The reference unit is meters. Note that this tag "
            "is BYTE type, unlike other reference tags."), ESL_GPS},
        {EXIF_TAG_GPS_ALTITUDE, "GPSAltitude", N_("Altitude"),
         N_("Indicates the altitude based on the reference in GPSAltitudeRef. "
@@ -215,10 +217,14 @@ static const struct TagEntry {
        {EXIF_TAG_GPS_DIFFERENTIAL, "GPSDifferential", N_("GPS Differential Correction"),
          N_("Indicates whether differential correction is applied to the "
             "GPS receiver."), ESL_GPS},
+       {EXIF_TAG_GPS_H_POSITIONING_ERROR, "GPSHPositioningError", N_("GPS Horizontal Positioning Error"),
+         N_("Indicates the horizontal positioning errors in meters. This is "
+            "expressed as one RATIONAL value."), ESL_GPS},
        /* Not in EXIF 2.2 */
        {EXIF_TAG_NEW_SUBFILE_TYPE, "NewSubfileType",
         N_("New Subfile Type"), N_("A general indication of the kind of data "
-           "contained in this subfile.")},
+           "contained in this subfile."),
+        ESL_UNKNOWN},
        {EXIF_TAG_IMAGE_WIDTH, "ImageWidth", N_("Image Width"),
         N_("The number of columns of image data, equal to the number of "
            "pixels per row. In JPEG compressed data a JPEG marker is "
@@ -246,9 +252,10 @@ static const struct TagEntry {
            "marker is used instead of this tag."),
         { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_FILL_ORDER, "FillOrder", N_("Fill Order"), ""},
+       {EXIF_TAG_FILL_ORDER, "FillOrder", N_("Fill Order"), "", ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_DOCUMENT_NAME, "DocumentName", N_("Document Name"), ""},
+       {EXIF_TAG_DOCUMENT_NAME, "DocumentName", N_("Document Name"), "",
+        ESL_UNKNOWN},
        {EXIF_TAG_IMAGE_DESCRIPTION, "ImageDescription",
         N_("Image Description"),
         N_("A character string giving the title of the image. It may be "
@@ -357,11 +364,12 @@ static const struct TagEntry {
         { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
        {EXIF_TAG_SUB_IFDS, "SubIFDs", "SubIFD Offsets", N_("Defined by Adobe Corporation "
-           "to enable TIFF Trees within a TIFF file.")},
+           "to enable TIFF Trees within a TIFF file."), ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_TRANSFER_RANGE, "TransferRange", N_("Transfer Range"), ""},
+       {EXIF_TAG_TRANSFER_RANGE, "TransferRange", N_("Transfer Range"), "",
+        ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_JPEG_PROC, "JPEGProc", "JPEGProc", ""},
+       {EXIF_TAG_JPEG_PROC, "JPEGProc", "JPEGProc", "", ESL_UNKNOWN},
        {EXIF_TAG_JPEG_INTERCHANGE_FORMAT, "JPEGInterchangeFormat",
         N_("JPEG Interchange Format"),
         N_("The offset to the start byte (SOI) of JPEG compressed "
@@ -420,27 +428,29 @@ static const struct TagEntry {
            "Interoperability these conditions."),
         { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_XML_PACKET, "XMLPacket", N_("XML Packet"), N_("XMP Metadata")},
+       {EXIF_TAG_XML_PACKET, "XMLPacket", N_("XML Packet"), N_("XMP Metadata"),
+        ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
        {EXIF_TAG_RELATED_IMAGE_FILE_FORMAT, "RelatedImageFileFormat",
-        "RelatedImageFileFormat", ""},
+        "RelatedImageFileFormat", "", ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
        {EXIF_TAG_RELATED_IMAGE_WIDTH, "RelatedImageWidth",
-        "RelatedImageWidth", ""},
+        "RelatedImageWidth", "", ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
        {EXIF_TAG_RELATED_IMAGE_LENGTH, "RelatedImageLength",
-        "RelatedImageLength", ""},
+        "RelatedImageLength", "", ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
        {EXIF_TAG_CFA_REPEAT_PATTERN_DIM, "CFARepeatPatternDim",
-        "CFARepeatPatternDim", ""},
+        "CFARepeatPatternDim", "", ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
        {EXIF_TAG_CFA_PATTERN, "CFAPattern",
         N_("CFA Pattern"),
         N_("Indicates the color filter array (CFA) geometric pattern of the "
            "image sensor when a one-chip color area sensor is used. "
-           "It does not apply to all sensing methods.")},
+           "It does not apply to all sensing methods."), ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_BATTERY_LEVEL, "BatteryLevel", N_("Battery Level"), ""},
+       {EXIF_TAG_BATTERY_LEVEL, "BatteryLevel", N_("Battery Level"), "",
+        ESL_UNKNOWN},
        {EXIF_TAG_COPYRIGHT, "Copyright", N_("Copyright"),
         N_("Copyright information. In this standard the tag is used to "
            "indicate both the photographer and editor copyrights. It is "
@@ -470,9 +480,10 @@ static const struct TagEntry {
         N_("The F number."),
         { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_IPTC_NAA, "IPTC/NAA", "IPTC/NAA", ""},
+       {EXIF_TAG_IPTC_NAA, "IPTC/NAA", "IPTC/NAA", "", ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_IMAGE_RESOURCES, "ImageResources", N_("Image Resources Block"), ""},
+       {EXIF_TAG_IMAGE_RESOURCES, "ImageResources", N_("Image Resources Block"), "",
+        ESL_UNKNOWN},
        {EXIF_TAG_EXIF_IFD_POINTER, "ExifIfdPointer", "ExifIFDPointer",
         N_("A pointer to the Exif IFD. Interoperability, Exif IFD has the "
            "same structure as that of the IFD specified in TIFF. "
@@ -481,7 +492,7 @@ static const struct TagEntry {
         { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
        {EXIF_TAG_INTER_COLOR_PROFILE, "InterColorProfile",
-        "InterColorProfile", ""},
+        "InterColorProfile", "", ESL_UNKNOWN},
        {EXIF_TAG_EXPOSURE_PROGRAM, "ExposureProgram", N_("Exposure Program"),
         N_("The class of the program used by the camera to set exposure "
            "when the picture is taken."),
@@ -511,7 +522,8 @@ static const struct TagEntry {
         { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
        {EXIF_TAG_TIME_ZONE_OFFSET, "TimeZoneOffset", N_("Time Zone Offset"),
-        N_("Encodes time zone of camera clock relative to GMT.")},
+        N_("Encodes time zone of camera clock relative to GMT."),
+        ESL_UNKNOWN},
        {EXIF_TAG_EXIF_VERSION, "ExifVersion", N_("Exif Version"),
         N_("The version of this standard supported. Nonexistence of this "
            "field is taken to mean nonconformance to the standard."),
@@ -587,7 +599,8 @@ static const struct TagEntry {
            "in the overall scene."),
         { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
-       {EXIF_TAG_TIFF_EP_STANDARD_ID, "TIFF/EPStandardID", N_("TIFF/EP Standard ID"), ""},
+       {EXIF_TAG_TIFF_EP_STANDARD_ID, "TIFF/EPStandardID", N_("TIFF/EP Standard ID"), "",
+        ESL_UNKNOWN},
        {EXIF_TAG_MAKER_NOTE, "MakerNote", N_("Maker Note"),
         N_("A tag for manufacturers of Exif writers to record any desired "
            "information. The contents are up to the manufacturer."),
@@ -855,10 +868,12 @@ static const struct TagEntry {
         { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
        /* Not in EXIF 2.2 */
        {EXIF_TAG_GAMMA, "Gamma", N_("Gamma"),
-        N_("Indicates the value of coefficient gamma.")},
+        N_("Indicates the value of coefficient gamma."),
+        ESL_UNKNOWN},
        /* Not in EXIF 2.2 */
        {EXIF_TAG_PRINT_IMAGE_MATCHING, "PrintImageMatching", N_("PRINT Image Matching"),
-        N_("Related to Epson's PRINT Image Matching technology")},
+        N_("Related to Epson's PRINT Image Matching technology"),
+        ESL_UNKNOWN},
        /* Not in EXIF 2.2 (from the Microsoft HD Photo specification) */
        {EXIF_TAG_PADDING, "Padding", N_("Padding"),
         N_("This tag reserves space that can be reclaimed later when "
@@ -868,7 +883,7 @@ static const struct TagEntry {
             "metadata tags."),
         { ESL_OOOO, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
 #endif
-       {0, NULL, NULL, NULL}
+       {0, NULL, NULL, NULL, ESL_UNKNOWN}
 };
 
 /* For now, do not use these functions. */
@@ -877,7 +892,7 @@ static const struct TagEntry {
  * Return the number of entries in the EXIF tag table, including the
  * terminating NULL entry.
  */
-inline unsigned int
+unsigned int
 exif_tag_table_count (void)
 {
        return sizeof (ExifTagTable) / sizeof (ExifTagTable[0]);
@@ -983,13 +998,6 @@ exif_tag_get_title_in_ifd (ExifTag tag, ExifIfd ifd)
                } else
                        return NULL; /* Recorded tag not found in the table */
        }
-       /* FIXME: This belongs to somewhere else. */
-       /* libexif should use the default system locale.
-        * If an application specifically requires UTF-8, then we
-        * must give the application a way to tell libexif that.
-        * 
-        * bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-        */
        bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
        return _(ExifTagTable[i].title);
 }