Added EXIF_DATA_TYPE_UNKNOWN as a backwards-compatible
authorDan Fandrich <dan@coneharvesters.com>
Wed, 30 Sep 2009 06:56:16 +0000 (23:56 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 30 Sep 2009 06:56:16 +0000 (23:56 -0700)
replacement for most uses of EXIF_DATA_TYPE_COUNT since that's
a clearer name for how it's being used.

ChangeLog
libexif/exif-data-type.h
libexif/exif-data.c
libexif/exif-data.h
libexif/exif-tag.c
libexif/exif-tag.h

index 27d8ef7..05d9027 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-29  Dan Fandrich <dan@coneharvesters.com>
+
+       * Added EXIF_DATA_TYPE_UNKNOWN as a backwards-compatible
+         replacement for most uses of EXIF_DATA_TYPE_COUNT since that's
+         a clearer name for how it's being used.
+
 2009-09-26  Dan Fandrich <dan@coneharvesters.com>
 
        * libexif/exif-data.c: Added more error log messages and improved
index 271a2f2..6e17cc2 100644 (file)
 extern "C" {
 #endif /* __cplusplus */
 
+/*! Represents the type of image data to which the EXIF data applies.
+ * The EXIF tags have different constraints depending on the type of
+ * image data.
+ */
 typedef enum {
        EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY = 0,
        EXIF_DATA_TYPE_UNCOMPRESSED_PLANAR,
        EXIF_DATA_TYPE_UNCOMPRESSED_YCC,
        EXIF_DATA_TYPE_COMPRESSED,
-       EXIF_DATA_TYPE_COUNT
+       EXIF_DATA_TYPE_COUNT,
+
+       EXIF_DATA_TYPE_UNKNOWN = EXIF_DATA_TYPE_COUNT
 } ExifDataType;
 
 #ifdef __cplusplus
index 572bf8a..b7fae7a 100644 (file)
@@ -1293,5 +1293,5 @@ exif_data_set_data_type (ExifData *d, ExifDataType dt)
 ExifDataType
 exif_data_get_data_type (ExifData *d)
 {
-       return (d && d->priv) ? d->priv->data_type : EXIF_DATA_TYPE_COUNT;
+       return (d && d->priv) ? d->priv->data_type : EXIF_DATA_TYPE_UNKNOWN;
 }
index 1832651..24b0184 100644 (file)
@@ -58,7 +58,9 @@ struct _ExifData
 };
 
 /*! Allocate a new #ExifData. The #ExifData contains an empty
- * #ExifContent for each IFD and the default set of options.
+ * #ExifContent for each IFD and the default set of options,
+ * which has #EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS
+ * and #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION set.
  *
  * \return allocated #ExifData, or NULL on error
  */
@@ -66,7 +68,8 @@ ExifData *exif_data_new           (void);
 
 /*! Allocate a new #ExifData using the given memory allocator.
  * The #ExifData contains an empty #ExifContent for each IFD and the default
- * set of options.
+ * set of options, which has #EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS and
+ * #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION set.
  *
  * \return allocated #ExifData, or NULL on error
  */
@@ -215,7 +218,7 @@ void         exif_data_set_data_type (ExifData *d, ExifDataType dt);
 /*! Return the data type for the given #ExifData.
  *
  * \param[in] d EXIF data
- * \return data type, or #EXIF_DATA_TYPE_COUNT on error
+ * \return data type, or #EXIF_DATA_TYPE_UNKNOWN on error
  */
 ExifDataType exif_data_get_data_type (ExifData *d);
 
index 400c86f..d73c350 100644 (file)
@@ -1006,7 +1006,7 @@ exif_tag_from_name (const char *name)
  *
  * \param[in] tag EXIF tag
  * \param[in] ifd a valid IFD (not EXIF_IFD_COUNT)
- * \param[in] t a valid data type (not EXIF_DATA_TYPE_COUNT)
+ * \param[in] t a valid data type (not EXIF_DATA_TYPE_UNKNOWN)
  * \return the level of support for this tag
  */
 static inline ExifSupportLevel
index cd71f64..5dcf933 100644 (file)
@@ -236,13 +236,13 @@ const char      *exif_tag_get_description_in_ifd   (ExifTag tag, ExifIfd ifd);
 /*! Return whether the given tag is mandatory or not in the given IFD and
  * data type according to the EXIF specification. If the IFD given is
  * EXIF_IFD_COUNT, the result is EXIF_SUPPORT_LEVEL_UNKNOWN. If the data
- * type is EXIF_DATA_TYPE_COUNT, the result is
+ * type is EXIF_DATA_TYPE_UNKNOWN, the result is
  * EXIF_SUPPORT_LEVEL_UNKNOWN unless the support level is the same for
  * all data types.
  *
  * \param[in] tag EXIF tag
  * \param[in] ifd IFD or EXIF_IFD_COUNT
- * \param[in] t data type or EXIF_DATA_TYPE_COUNT
+ * \param[in] t data type or EXIF_DATA_TYPE_UNKNOWN
  * \return the level of support for this tag
  */
 ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd,