2005-04-27 Lutz Mueller <lutz@users.sourceforge.net>
+ * libexif/exif-entry.h
+ * libexif/exif-content.h: New convenience functions/macros.
+
+2005-04-27 Lutz Mueller <lutz@users.sourceforge.net>
+
* configure.ac: AGE = 1
* libexif/exif-entry.c (exif_entry_fix): Add a break to avoid unnecessary
checks.
content->priv->log = log;
exif_log_ref (log);
}
+
+ExifIfd
+exif_content_get_ifd (ExifContent *c)
+{
+ if (!c || !c->parent) return EXIF_IFD_COUNT;
+
+ return
+ ((c)->parent->ifd[EXIF_IFD_0] == (c)) ? EXIF_IFD_0 :
+ ((c)->parent->ifd[EXIF_IFD_1] == (c)) ? EXIF_IFD_1 :
+ ((c)->parent->ifd[EXIF_IFD_EXIF] == (c)) ? EXIF_IFD_EXIF :
+ ((c)->parent->ifd[EXIF_IFD_GPS] == (c)) ? EXIF_IFD_GPS :
+ ((c)->parent->ifd[EXIF_IFD_INTEROPERABILITY] == (c)) ? EXIF_IFD_INTEROPERABILITY :
+ EXIF_IFD_COUNT;
+}
void *user_data);
/* For your convenience */
+ExifIfd exif_content_get_ifd (ExifContent *);
#define exif_content_get_value(c,t,v,m) \
(exif_content_get_entry (c,t) ? \
exif_entry_get_value (exif_content_get_entry (c,t),v,m) : NULL)
void exif_entry_dump (ExifEntry *entry, unsigned int indent);
+#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
+
#ifdef __cplusplus
}
#endif /* __cplusplus */