From: Dan F. <dfa...@us...> - 2008-11-22 07:09:00
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29808/libexif Modified Files: exif-content.h exif-data.h exif-entry.c exif-entry.h exif-format.h exif-loader.h exif-log.h exif-mem.h exif-mnote-data.h exif-system.h exif-tag.h exif-utils.h exif.h Log Message: Added Doxygen comments for the main API entry points and data structures Index: exif-content.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-content.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -d -r1.14 -r1.15 --- exif-content.h 17 Feb 2008 18:31:55 -0000 1.14 +++ exif-content.h 22 Nov 2008 07:08:56 -0000 1.15 @@ -1,5 +1,7 @@ -/* exif-content.h - * +/*! \file exif-content.h + * \brief Handling EXIF IFDs + */ +/* * Copyright (c) 2001 Lutz Mueller <lu...@us...> * * This library is free software; you can redistribute it and/or @@ -25,6 +27,7 @@ extern "C" { #endif /* __cplusplus */ +/*! Holds all EXIF tags in a single IFD */ typedef struct _ExifContent ExifContent; typedef struct _ExifContentPrivate ExifContentPrivate; @@ -52,23 +55,67 @@ void exif_content_ref (ExifC void exif_content_unref (ExifContent *content); void exif_content_free (ExifContent *content); -void exif_content_add_entry (ExifContent *, ExifEntry *); -void exif_content_remove_entry (ExifContent *, ExifEntry *); -ExifEntry *exif_content_get_entry (ExifContent *, ExifTag); +/*! Add an EXIF tag to an IFD. + * If this tag already exists in the IFD, this function does nothing. + * \param[out] c IFD + * \param[in] entry EXIF entry to add + */ +void exif_content_add_entry (ExifContent *c, ExifEntry *entry); + +/*! Remove an EXIF tag from an IFD. + * If this tag does not exist in the IFD, this function does nothing. + * \param[out] c IFD + * \param[in] e EXIF entry to remove + */ +void exif_content_remove_entry (ExifContent *c, ExifEntry *e); + +/*! Return the #ExifEntry in this IFD corresponding to the given tag. + * \param[in] content EXIF content for an IFD + * \param[in] tag EXIF tag to return + * \return #ExifEntry of the tag, or NULL on error + */ +ExifEntry *exif_content_get_entry (ExifContent *content, ExifTag tag); void exif_content_fix (ExifContent *); typedef void (* ExifContentForeachEntryFunc) (ExifEntry *, void *user_data); + +/*! Executes function on each EXIF tag in turn. + * \param[in] content IFD over which to iterate + * \param[in] func function to call for each entry + * \param[in] user_data data to pass into func on each call + */ void exif_content_foreach_entry (ExifContent *content, ExifContentForeachEntryFunc func, void *user_data); -/* For your convenience */ -ExifIfd exif_content_get_ifd (ExifContent *); +/*! Returns the IFD number in which the given #ExifContent is found. + * \param[in] c an #ExifContent* + * \return IFD number, or EXIF_IFD_COUNT on error + */ +ExifIfd exif_content_get_ifd (ExifContent *c); + +/*! Returns a textual representation of the EXIF data for a tag. + * \param[in] c #ExifContent for an IFD + * \param[in] t #ExifTag to return + * \param[out] v buffer in which to store value + * \param[in] m length of the buffer v + * \return v pointer, or NULL on error + */ #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) +/*! Dump contents of the IFD to stdout. + * This is intended for diagnostic purposes only. + * \param[in] content IFD data + * \param[in] indent how many levels deep to indent the data + */ void exif_content_dump (ExifContent *content, unsigned int indent); + +/*! Set the log message object for this IFD. + * \param[in] content IFD + * \param[in] log #ExifLog + */ void exif_content_log (ExifContent *content, ExifLog *log); #ifdef __cplusplus Index: exif-utils.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-utils.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -p -d -r1.18 -r1.19 --- exif-utils.h 17 Feb 2008 18:31:56 -0000 1.18 +++ exif-utils.h 22 Nov 2008 07:08:56 -0000 1.19 @@ -1,5 +1,7 @@ -/* exif-utils.h - * +/*! \file exif-utils.h + * \brief EXIF data manipulation functions and types + */ +/* * Copyright (c) 2001 Lutz Mueller <lu...@us...> * * This library is free software; you can redistribute it and/or @@ -40,13 +42,13 @@ typedef uint16_t ExifShort; /* 2 typedef int16_t ExifSShort; /* 2 bytes */ typedef uint32_t ExifLong; /* 4 bytes */ -/** EXIF Unsigned Rational */ +/*! EXIF Unsigned Rational */ typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational; typedef char ExifUndefined; /* 1 byte */ typedef int32_t ExifSLong; /* 4 bytes */ -/** EXIF Signed Rational. */ +/*! EXIF Signed Rational. */ typedef struct {ExifSLong numerator; ExifSLong denominator;} ExifSRational; @@ -57,16 +59,51 @@ ExifSLong exif_get_slong (const ExifRational exif_get_rational (const unsigned char *b, ExifByteOrder order); ExifSRational exif_get_srational (const unsigned char *b, ExifByteOrder order); +/*! Store an ExifShort value into memory in EXIF format + * \param[out] b buffer in which to write raw value + * \param[in] order byte order to use + * \param[in] value data value to store + */ void exif_set_short (unsigned char *b, ExifByteOrder order, ExifShort value); + +/*! Store an ExifSShort value into memory in EXIF format + * \param[out] b buffer in which to write raw value + * \param[in] order byte order to use + * \param[in] value data value to store + */ void exif_set_sshort (unsigned char *b, ExifByteOrder order, ExifSShort value); + +/*! Store an ExifLong value into memory in EXIF format + * \param[out] b buffer in which to write raw value + * \param[in] order byte order to use + * \param[in] value data value to store + */ void exif_set_long (unsigned char *b, ExifByteOrder order, ExifLong value); + +/*! Store an ExifSLong value into memory in EXIF format + * \param[out] b buffer in which to write raw value + * \param[in] order byte order to use + * \param[in] value data value to store + */ void exif_set_slong (unsigned char *b, ExifByteOrder order, ExifSLong value); + +/*! Store an ExifRational value into memory in EXIF format + * \param[out] b buffer in which to write raw value + * \param[in] order byte order to use + * \param[in] value data value to store + */ void exif_set_rational (unsigned char *b, ExifByteOrder order, ExifRational value); + +/*! Store an ExifSRational value into memory in EXIF format + * \param[out] b buffer in which to write raw value + * \param[in] order byte order to use + * \param[in] value data value to store + */ void exif_set_srational (unsigned char *b, ExifByteOrder order, ExifSRational value); Index: exif-tag.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -p -d -r1.17 -r1.18 --- exif-tag.h 17 Feb 2008 18:31:56 -0000 1.17 +++ exif-tag.h 22 Nov 2008 07:08:56 -0000 1.18 @@ -1,5 +1,7 @@ -/* exif-tag.h - * +/*! \file exif-tag.h + * \brief Handling EXIF tags + */ +/* * Copyright (c) 2001 Lutz Mueller <lu...@us...> * * This library is free software; you can redistribute it and/or @@ -28,6 +30,7 @@ extern "C" { #include <libexif/exif-ifd.h> #include <libexif/exif-data-type.h> +/*! EXIF tags */ typedef enum { EXIF_TAG_INTEROPERABILITY_INDEX = 0x0001, EXIF_TAG_INTEROPERABILITY_VERSION = 0x0002, @@ -186,10 +189,36 @@ typedef enum { EXIF_SUPPORT_LEVEL_OPTIONAL } ExifSupportLevel; -ExifTag exif_tag_from_name (const char *); -const char *exif_tag_get_name_in_ifd (ExifTag, ExifIfd); -const char *exif_tag_get_title_in_ifd (ExifTag, ExifIfd); -const char *exif_tag_get_description_in_ifd (ExifTag, ExifIfd); +/*! Returns the tag ID given its unique textual name. + * \param[in] name tag name + * \return tag ID + */ +ExifTag exif_tag_from_name (const char *name); + +/*! Returns textual name of the given tag when found in the given IFD. The + * name is a short, unique, non-localized text string containing only + * US-ASCII alphanumeric characters. + * \param[in] tag EXIF tag + * \param[in] ifd IFD + * \return textual name of the tag + */ +const char *exif_tag_get_name_in_ifd (ExifTag tag, ExifIfd ifd); + +/*! Returns textual title of the given tag when found in the given IFD. + * \param[in] tag EXIF tag + * \param[in] ifd IFD + * \return textual title of the tag + */ +const char *exif_tag_get_title_in_ifd (ExifTag tag, ExifIfd ifd); + +/*! Returns verbose textual description of the given tag when found in the + * given IFD. + * \param[in] tag EXIF tag + * \param[in] ifd IFD + * \return textual description of the tag + */ +const char *exif_tag_get_description_in_ifd (ExifTag tag, ExifIfd ifd); + ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag, ExifIfd, ExifDataType); Index: exif-mnote-data.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-mnote-data.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -d -r1.5 -r1.6 --- exif-mnote-data.h 17 Feb 2008 18:31:56 -0000 1.5 +++ exif-mnote-data.h 22 Nov 2008 07:08:56 -0000 1.6 @@ -1,5 +1,7 @@ -/* exif-mnote-data.h - * +/*! \file exif-mnote-data.h + * \brief Handling EXIF MakerNote tags + */ +/* * Copyright (c) 2003 Lutz Mueller <lu...@us...> * * This library is free software; you can redistribute it and/or @@ -27,6 +29,7 @@ extern "C" { #include <libexif/exif-log.h> +/*! Data found in the MakerNote tag */ typedef struct _ExifMnoteData ExifMnoteData; void exif_mnote_data_ref (ExifMnoteData *); @@ -36,14 +39,56 @@ void exif_mnote_data_load (ExifMnoteData unsigned int); void exif_mnote_data_save (ExifMnoteData *, unsigned char **, unsigned int *); -unsigned int exif_mnote_data_count (ExifMnoteData *); -unsigned int exif_mnote_data_get_id (ExifMnoteData *, unsigned int); -const char *exif_mnote_data_get_name (ExifMnoteData *, unsigned int); -const char *exif_mnote_data_get_title (ExifMnoteData *, unsigned int); -const char *exif_mnote_data_get_description (ExifMnoteData *, unsigned int); +/*! Return the number of tags in the MakerNote. + * \param[in] d MakerNote data + * \return number of tags, or 0 if no MakerNote or the type is not supported + */ +unsigned int exif_mnote_data_count (ExifMnoteData *d); -/* Returns NULL or val */ -char *exif_mnote_data_get_value (ExifMnoteData *, unsigned int, char *val, unsigned int maxlen); +/*! Return the MakerNote tag number for the tag at the specified index within + * the MakerNote. + * \param[in] d MakerNote data + * \param[in] n index of the entry within the MakerNote data + * \return MakerNote tag number + */ +unsigned int exif_mnote_data_get_id (ExifMnoteData *d, unsigned int n); + +/*! Returns textual name of the given MakerNote tag. The name is a short, + * unique (within this type of MakerNote), non-localized text string + * containing only US-ASCII alphanumeric characters. + * \param[in] d MakerNote data + * \param[in] n tag number within the namespace of this type of MakerNote + * \return textual name of the tag + */ +const char *exif_mnote_data_get_name (ExifMnoteData *d, unsigned int n); + +/*! Returns textual title of the given MakerNote tag. + * \param[in] d MakerNote data + * \param[in] n tag number within the namespace of this type of MakerNote + * \return textual name of the tag + */ +const char *exif_mnote_data_get_title (ExifMnoteData *d, unsigned int n); + +/*! Returns verbose textual description of the given MakerNote tag. + * \param[in] d MakerNote data + * \param[in] n tag number within the namespace of this type of MakerNote + * \return textual description of the tag + */ +const char *exif_mnote_data_get_description (ExifMnoteData *d, unsigned int n); + +/*! Return a textual representation of the value of the MakerNote entry. + * + * CAUTION: The character set of the returned string may be in + * the encoding of the current locale or the native encoding + * of the camera. + * + * \param[in] d MakerNote data + * \param[in] n tag number within the namespace of this type of MakerNote + * \param[out] val buffer in which to store value + * \param[in] maxlen length of the buffer val + * \return val pointer, or NULL on error + */ +char *exif_mnote_data_get_value (ExifMnoteData *d, unsigned int n, char *val, unsigned int maxlen); void exif_mnote_data_log (ExifMnoteData *, ExifLog *); Index: exif-mem.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-mem.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -d -r1.6 -r1.7 --- exif-mem.h 17 Feb 2008 18:31:56 -0000 1.6 +++ exif-mem.h 22 Nov 2008 07:08:56 -0000 1.7 @@ -2,7 +2,6 @@ * \brief Define the ExifMem data type and the associated functions. * ExifMem defines the memory management functions used by the ExifLoader. */ - /* exif-mem.h * * Copyright (c) 2003 Lutz Mueller <lu...@us...> Index: exif-system.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-system.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- exif-system.h 14 Aug 2007 19:57:42 -0000 1.2 +++ exif-system.h 22 Nov 2008 07:08:56 -0000 1.3 @@ -1,6 +1,7 @@ -/** \file exif-system.h +/*! \file exif-system.h * \brief System specific definitions, not for installation! - * + */ +/* * Copyright (C) 2007 Hans Ulrich Niedermann <gp...@n-...> * * This library is free software; you can redistribute it and/or Index: exif-loader.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-loader.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -p -d -r1.7 -r1.8 --- exif-loader.h 17 Feb 2008 18:31:56 -0000 1.7 +++ exif-loader.h 22 Nov 2008 07:08:56 -0000 1.8 @@ -31,38 +31,42 @@ extern "C" { #endif /* __cplusplus */ +/*! Data used by the loader interface */ typedef struct _ExifLoader ExifLoader; -/*! Allocate a new ExifLoader - * \returns the allocated ExifLoader +/*! Allocate a new #ExifLoader + * \return allocated ExifLoader */ ExifLoader *exif_loader_new (void); -/*! Allocate a new ExifLoader using an ExifMem + +/*! Allocate a new #ExifLoader using an #ExifMem * \param[in] mem the ExifMem - * \returns the allocated ExifLoader + * \return allocated ExifLoader */ ExifLoader *exif_loader_new_mem (ExifMem *mem); -/*! Increase the refcount of the ExifLoader + +/*! Increase the refcount of the #ExifLoader * \param[in] loader the ExifLoader to increase the refcount of. */ void exif_loader_ref (ExifLoader *loader); -/*! Decrease the refcount of the ExifLoader - * \param[in] loader the ExifLoader to decrease the refcount of. - * If the refcount reaches 0, the ExifLoader is freeed. + +/*! Decrease the refcount of the #ExifLoader + * \param[in] loader ExifLoader to decrease the refcount of. + * If the refcount reaches 0, the ExifLoader is freed. */ void exif_loader_unref (ExifLoader *loader); -/*! Write a file to the ExifLoader - * \param[in] loader the loader - * \param[in] fname the path to the file to read +/*! Write a file into the #ExifLoader from the filesystem. + * \param[in] loader loader + * \param[in] fname path to the file to read */ void exif_loader_write_file (ExifLoader *loader, const char *fname); -/*! Write a buffer to the ExifLoader - * \param[in] loader the loader to write too - * \param[in] buf the buffer to read from - * \param[in] sz the size of the buffer - * \returns 1 while EXIF data is read (or while there is still hope that there will be EXIF data later on), 0 otherwise. +/*! Write a buffer into the ExifLoader from a memory block. + * \param[in] loader loader to write to + * \param[in] buf buffer to read from + * \param[in] sz size of the buffer + * \return 1 while EXIF data is read (or while there is still hope that there will be EXIF data later on), 0 otherwise. */ unsigned char exif_loader_write (ExifLoader *loader, unsigned char *buf, unsigned int sz); @@ -70,9 +74,10 @@ unsigned char exif_loader_write (ExifLoa * \param[in] loader the loader */ void exif_loader_reset (ExifLoader *loader); + /*! Get an ExifData out of an ExifLoader * \param[in] loader the loader - * \returns and allocated ExifData + * \return allocated ExifData */ ExifData *exif_loader_get_data (ExifLoader *loader); Index: exif.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -p -d -r1.8 -r1.9 --- exif.h 19 Nov 2008 08:14:44 -0000 1.8 +++ exif.h 22 Nov 2008 07:08:56 -0000 1.9 @@ -11,18 +11,39 @@ * * \section using_libexif Using libexif * - * ##include <libexif/exif-data.h> + * \#include <libexif/exif-data.h> * * libexif provides a libexif.pc file for use with pkgconfig on the * libexif installation. If you are using libtool to build your * package, you can also integrate make use of libexif-uninstalled.pc. * + * \section data_structures Primary Data Structures + * + * #ExifLoader + * State maintained by the loader interface while importing EXIF data + * from an external file or memory + * + * #ExifData + * The entirety of EXIF data found in an image + * + * #ExifContent + * All EXIF tags in a single IFD + * + * #ExifEntry + * Data found in a single EXIF tag + * + * #ExifMnoteData + * All data found in the MakerNote tag + * + * #ExifLog + * State maintained by the logging interface + * * \section string_conventions String Conventions * * Strings of 8 bit characters ("char*"). When libexif is compiled with * NLS, character set and encoding are as set in the current locale, * except for strings that come directly from the data in EXIF - * tags which are returned in raw form. + * tags which are currently returned in raw form. * * \section memory_management Memory Management Patterns * Index: exif-entry.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -p -d -r1.16 -r1.17 --- exif-entry.h 17 Feb 2008 18:31:55 -0000 1.16 +++ exif-entry.h 22 Nov 2008 07:08:56 -0000 1.17 @@ -1,6 +1,7 @@ /*! \file exif-entry.h * \brief Handling EXIF entries - * + */ +/* * Copyright (c) 2001 Lutz Mueller <lu...@us...> * * This library is free software; you can redistribute it and/or @@ -26,6 +27,7 @@ extern "C" { #endif /* __cplusplus */ +/*! Data found in one EXIF tag */ typedef struct _ExifEntry ExifEntry; typedef struct _ExifEntryPrivate ExifEntryPrivate; @@ -55,36 +57,61 @@ ExifEntry *exif_entry_new (void); ExifEntry *exif_entry_new_mem (ExifMem *); -/*! Increase reference counter for #ExifEntry* */ +/*! Increase reference counter for #ExifEntry* + * \param[in] entry #ExifEntry + */ void exif_entry_ref (ExifEntry *entry); -/*! Decrease reference counter for #ExifEntry* */ +/*! Decrease reference counter for #ExifEntry* + * \param[in] entry #ExifEntry + */ void exif_entry_unref (ExifEntry *entry); /*! Actually free the #ExifEntry* * * \deprecated Should not be called directly. Use exif_entry_ref() and * exif_entry_unref() instead. + * + * \param[in] entry EXIF entry */ void exif_entry_free (ExifEntry *entry); -void exif_entry_initialize (ExifEntry *entry, ExifTag tag); +/*! Initialize an empty #ExifEntry with default data for the given tag. + * If the entry is already initialized, this function does nothing. + * \param[out] e entry to initialize + * \param[in] tag tag number to initialize as + */ +void exif_entry_initialize (ExifEntry *e, ExifTag tag); + void exif_entry_fix (ExifEntry *entry); /* For your convenience */ -/*! Return the value of the EXIF entry +/*! Return a textual representation of the value of the EXIF entry. * - * CAUTION: The character set of the returned string is not defined. - * It may be UTF-8, latin1, the native encoding of the - * computer, or the native encoding of the camera. + * CAUTION: The character set of the returned string may be in + * the encoding of the current locale or the native encoding + * of the camera. + * + * \param[in] entry EXIF entry + * \param[out] val buffer in which to store value + * \param[in] maxlen length of the buffer val + * \return val pointer */ const char *exif_entry_get_value (ExifEntry *entry, char *val, unsigned int maxlen); -/*! Dump text representation of #ExifEntry to stdout */ +/*! Dump text representation of #ExifEntry to stdout. + * This is intended for diagnostic purposes only. + * \param[in] entry EXIF tag data + * \param[in] indent how many levels deep to indent the data + */ void exif_entry_dump (ExifEntry *entry, unsigned int indent); +/*! Returns the IFD number of the given #ExifEntry + * \param[in] e an #ExifEntry* + * \return IFD number, or EXIF_IFD_COUNT on error + */ #define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT) #ifdef __cplusplus Index: exif-log.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-log.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -p -d -r1.9 -r1.10 --- exif-log.h 17 Feb 2008 18:31:56 -0000 1.9 +++ exif-log.h 22 Nov 2008 07:08:56 -0000 1.10 @@ -1,6 +1,7 @@ /*! \file exif-log.h - * \brief log message infrastructure - * + * \brief Log message infrastructure + */ +/* * Copyright (c) 2004 Lutz Mueller <lu...@us...> * * This library is free software; you can redistribute it and/or @@ -29,12 +30,23 @@ extern "C" { #include <libexif/exif-mem.h> #include <stdarg.h> +/*! State maintained by the logging interface */ typedef struct _ExifLog ExifLog; +/*! Create a new logging instance. + * \return new instance of #ExifLog + * \see exif_log_free + */ ExifLog *exif_log_new (void); ExifLog *exif_log_new_mem (ExifMem *); void exif_log_ref (ExifLog *log); void exif_log_unref (ExifLog *log); + +/*! Deletes instance of #ExifLog. + * \param[in] log #ExifLog + * \return new instance of #ExifLog + * \see exif_log_new + */ void exif_log_free (ExifLog *log); typedef enum { @@ -43,15 +55,28 @@ typedef enum { EXIF_LOG_CODE_NO_MEMORY, EXIF_LOG_CODE_CORRUPT_DATA } ExifLogCode; -const char *exif_log_code_get_title (ExifLogCode); /* Title for dialog */ -const char *exif_log_code_get_message (ExifLogCode); /* Message for dialog */ -/** Log callback function prototype. +/*! Return a textual description of the given class of error log. + * \param[in] code logging message class + * \return textual description of the log class + */ +const char *exif_log_code_get_title (ExifLogCode code); + +/*! Return a verbose description of the given class of error log. + * \param[in] code logging message class + * \return verbose description of the log class + */ +const char *exif_log_code_get_message (ExifLogCode code); + +/*! Log callback function prototype. */ typedef void (* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args, void *data); -/** Register log callback function. +/*! Register log callback function. + * \param[in] log #ExifLog + * \param[in] func callback function to set + * \param[in] data data to pass into callback function */ void exif_log_set_func (ExifLog *log, ExifLogFunc func, void *data); Index: exif-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -p -d -r1.120 -r1.121 --- exif-entry.c 18 Nov 2008 10:15:50 -0000 1.120 +++ exif-entry.c 22 Nov 2008 07:08:56 -0000 1.121 @@ -1124,7 +1124,7 @@ exif_entry_get_value (ExifEntry *e, char } -/** +/*! * \bug Log and report failed exif_mem_malloc() calls. */ void Index: exif-data.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -p -d -r1.16 -r1.17 --- exif-data.h 6 Nov 2008 07:31:28 -0000 1.16 +++ exif-data.h 22 Nov 2008 07:08:56 -0000 1.17 @@ -1,6 +1,7 @@ /*! \file exif-data.h * \brief Defines the ExifData type and the associated functions. - * + */ +/* * \author Lutz Mueller <lu...@us...> * \date 2001-2005 * @@ -33,6 +34,7 @@ extern "C" { #include <libexif/exif-log.h> #include <libexif/exif-tag.h> +/*! Represents the entire EXIF data found in an image */ typedef struct _ExifData ExifData; typedef struct _ExifDataPrivate ExifDataPrivate; @@ -50,13 +52,19 @@ struct _ExifData ExifDataPrivate *priv; }; +/*! Allocate a new #ExifData. + * \return allocated #ExifData + */ ExifData *exif_data_new (void); + ExifData *exif_data_new_mem (ExifMem *); -/*! \brief load exif data from file +/*! Load EXIF data from file * \param[in] path filename including path + * \return allocated #ExifData, or NULL on error */ ExifData *exif_data_new_from_file (const char *path); + ExifData *exif_data_new_from_data (const unsigned char *data, unsigned int size); @@ -69,13 +77,29 @@ void exif_data_ref (ExifData *dat void exif_data_unref (ExifData *data); void exif_data_free (ExifData *data); +/*! Return the byte order in use by this EXIF structure. + * \param[in] data EXIF data + * \return byte order + */ ExifByteOrder exif_data_get_byte_order (ExifData *data); + void exif_data_set_byte_order (ExifData *data, ExifByteOrder order); -ExifMnoteData *exif_data_get_mnote_data (ExifData *); +/*! Return the MakerNote data out of the EXIF data. + * \param[in] d EXIF data + * \return MakerNote data, or NULL if not found + */ +ExifMnoteData *exif_data_get_mnote_data (ExifData *d); + void exif_data_fix (ExifData *); typedef void (* ExifDataForeachContentFunc) (ExifContent *, void *user_data); + +/*! Executes function on each IFD in turn. + * \param[in] data EXIF data over which to iterate + * \param[in] func function to call for each entry + * \param[in] data data to pass into func on each call + */ void exif_data_foreach_content (ExifData *data, ExifDataForeachContentFunc func, void *user_data); @@ -94,11 +118,23 @@ void exif_data_unset_option void exif_data_set_data_type (ExifData *, ExifDataType); ExifDataType exif_data_get_data_type (ExifData *); -/* For debugging purposes and error reporting */ +/*! Dump all EXIF data to stdout. + * This is intended for diagnostic purposes only. + * \param[in] data EXIF data + */ void exif_data_dump (ExifData *data); + +/*! Set the log message object for all IFDs. + * \param[in] data EXIF data + * \param[in] log #ExifLog + */ void exif_data_log (ExifData *data, ExifLog *log); -/** convenience macro. */ +/*! Return an #ExifEntry for the given tag if found in any IFD. + * \param[in] d #ExifData + * \param[in] t #ExifTag + * \return entry if found, else NULL if not found + */ #define exif_data_get_entry(d,t) \ (exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ? \ exif_content_get_entry(d->ifd[EXIF_IFD_0],t) : \ Index: exif-format.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-format.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -p -d -r1.7 -r1.8 --- exif-format.h 17 Feb 2008 18:31:55 -0000 1.7 +++ exif-format.h 22 Nov 2008 07:08:56 -0000 1.8 @@ -1,4 +1,7 @@ -/* exif-format.h +/*! \file exif-format.h + * \brief Handling native EXIF data types + */ +/* * * Copyright (c) 2001 Lutz Mueller <lu...@us...> * @@ -25,6 +28,7 @@ extern "C" { #endif /* __cplusplus */ +/*! EXIF tag data formats */ typedef enum { EXIF_FORMAT_BYTE = 1, EXIF_FORMAT_ASCII = 2, @@ -40,7 +44,16 @@ typedef enum { EXIF_FORMAT_DOUBLE = 12 } ExifFormat; +/*! Return a textual representation of the given EXIF data type. + * \param[in] format EXIF data format + * \return localized textual name + */ const char *exif_format_get_name (ExifFormat format); + +/*! Return the raw size of the given EXIF data type. + * \param[in] format EXIF data format + * \return size in bytes + */ unsigned char exif_format_get_size (ExifFormat format); #ifdef __cplusplus |