From: Dan F. <dfa...@us...> - 2008-11-27 06:54:59
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8532 Modified Files: exif-content.h exif-data.h exif-entry.h exif-format.h exif-ifd.h exif-loader.h exif-log.h exif-mem.h exif-mnote-data.h exif-tag.c exif-tag.h exif-utils.h exif.h Log Message: Improved Doxygen documentation. Index: exif-tag.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -p -d -r1.42 -r1.43 --- exif-tag.c 8 Oct 2008 05:23:37 -0000 1.42 +++ exif-tag.c 27 Nov 2008 06:54:45 -0000 1.43 @@ -692,8 +692,14 @@ static const struct { }; /* For now, do not use these functions. */ + +/*! \internal */ ExifTag exif_tag_table_get_tag (unsigned int n); + +/*! \internal */ const char *exif_tag_table_get_name (unsigned int n); + +/*! \internal */ unsigned int exif_tag_table_count (void); ExifTag Index: exif-content.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-content.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -p -d -r1.16 -r1.17 --- exif-content.h 25 Nov 2008 09:30:38 -0000 1.16 +++ exif-content.h 27 Nov 2008 06:54:45 -0000 1.17 @@ -57,6 +57,7 @@ void exif_content_free (ExifC /*! 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 */ @@ -64,22 +65,25 @@ void exif_content_add_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); -/*! Fix the IFD to bring it into specification. Call exif_entry_fix on +/*! Fix the IFD to bring it into specification. Call #exif_entry_fix on * each entry in this IFD to fix existing entries, create any new entries * that are mandatory in this IFD but do not yet exist, and remove any * entries that are not allowed in this IFD. + * * \param[in,out] c EXIF content for an IFD */ void exif_content_fix (ExifContent *c); @@ -87,6 +91,7 @@ void exif_content_fix ( typedef void (* ExifContentForeachEntryFunc) (ExifEntry *, void *user_data); /*! Executes function on each EXIF tag in turn. + * * \param[in,out] 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 @@ -96,17 +101,19 @@ void exif_content_foreach_entry void *user_data); /*! Return the IFD number in which the given #ExifContent is found. + * * \param[in] c an #ExifContent* - * \return IFD number, or EXIF_IFD_COUNT on error + * \return IFD number, or #EXIF_IFD_COUNT on error */ ExifIfd exif_content_get_ifd (ExifContent *c); /*! Return 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 char* buffer in which to store value * \param[in] m unsigned int length of the buffer v - * \return v pointer, or NULL on error + * \return the v pointer, or NULL on error */ #define exif_content_get_value(c,t,v,m) \ (exif_content_get_entry (c,t) ? \ @@ -114,12 +121,14 @@ ExifIfd exif_content_get_ifd (ExifConten /*! 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* */ Index: exif-utils.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-utils.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -p -d -r1.20 -r1.21 --- exif-utils.h 25 Nov 2008 09:30:38 -0000 1.20 +++ exif-utils.h 27 Nov 2008 06:54:45 -0000 1.21 @@ -35,31 +35,86 @@ extern "C" { /* If these definitions don't work for you, please let us fix the * macro generating _stdint.h */ +/*! EXIF Unsigned Byte data type */ typedef unsigned char ExifByte; /* 1 byte */ + +/*! EXIF Signed Byte data type */ typedef signed char ExifSByte; /* 1 byte */ + +/*! EXIF Text String data type */ typedef char * ExifAscii; + +/*! EXIF Unsigned Short data type */ typedef uint16_t ExifShort; /* 2 bytes */ + +/*! EXIF Signed Short data type */ typedef int16_t ExifSShort; /* 2 bytes */ + +/*! EXIF Unsigned Long data type */ typedef uint32_t ExifLong; /* 4 bytes */ + +/*! EXIF Signed Long data type */ +typedef int32_t ExifSLong; /* 4 bytes */ -/*! EXIF Unsigned Rational */ +/*! EXIF Unsigned Rational data type */ typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational; typedef char ExifUndefined; /* 1 byte */ -typedef int32_t ExifSLong; /* 4 bytes */ -/*! EXIF Signed Rational. */ +/*! EXIF Signed Rational data type */ typedef struct {ExifSLong numerator; ExifSLong denominator;} ExifSRational; +/*! Retrieve an #ExifShort value from memory. + * + * \param[in] b pointer to raw EXIF value in memory + * \param[in] order byte order of raw value + * \return value + */ ExifShort exif_get_short (const unsigned char *b, ExifByteOrder order); + +/*! Retrieve an #ExifSShort value from memory. + * + * \param[in] b pointer to raw EXIF value in memory + * \param[in] order byte order of raw value + * \return value + */ ExifSShort exif_get_sshort (const unsigned char *b, ExifByteOrder order); + +/*! Retrieve an #ExifLong value from memory. + * + * \param[in] b pointer to raw EXIF value in memory + * \param[in] order byte order of raw value + * \return value + */ ExifLong exif_get_long (const unsigned char *b, ExifByteOrder order); + +/*! Retrieve an #ExifSLong value from memory. + * + * \param[in] b pointer to raw EXIF value in memory + * \param[in] order byte order of raw value + * \return value + */ ExifSLong exif_get_slong (const unsigned char *b, ExifByteOrder order); + +/*! Retrieve an #ExifRational value from memory. + * + * \param[in] b pointer to raw EXIF value in memory + * \param[in] order byte order of raw value + * \return value + */ ExifRational exif_get_rational (const unsigned char *b, ExifByteOrder order); + +/*! Retrieve an #ExifSRational value from memory. + * + * \param[in] b pointer to raw EXIF value in memory + * \param[in] order byte order of raw value + * \return value + */ ExifSRational exif_get_srational (const unsigned char *b, ExifByteOrder order); -/*! Store an ExifShort value into memory in EXIF format +/*! 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 @@ -67,7 +122,8 @@ ExifSRational exif_get_srational (const void exif_set_short (unsigned char *b, ExifByteOrder order, ExifShort value); -/*! Store an ExifSShort value into memory in EXIF format +/*! 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 @@ -75,7 +131,8 @@ void exif_set_short (unsigned char * void exif_set_sshort (unsigned char *b, ExifByteOrder order, ExifSShort value); -/*! Store an ExifLong value into memory in EXIF format +/*! 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 @@ -83,7 +140,8 @@ void exif_set_sshort (unsigned char * void exif_set_long (unsigned char *b, ExifByteOrder order, ExifLong value); -/*! Store an ExifSLong value into memory in EXIF format +/*! 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 @@ -91,7 +149,8 @@ void exif_set_long (unsigned char * void exif_set_slong (unsigned char *b, ExifByteOrder order, ExifSLong value); -/*! Store an ExifRational value into memory in EXIF format +/*! 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 @@ -99,7 +158,8 @@ void exif_set_slong (unsigned char * void exif_set_rational (unsigned char *b, ExifByteOrder order, ExifRational value); -/*! Store an ExifSRational value into memory in EXIF format +/*! 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 @@ -107,9 +167,12 @@ void exif_set_rational (unsigned char * void exif_set_srational (unsigned char *b, ExifByteOrder order, ExifSRational value); +/*! \internal */ void exif_convert_utf16_to_utf8 (char *out, const unsigned short *in, int maxlen); /* Please do not use this function outside of the library. */ + +/*! \internal */ void exif_array_set_byte_order (ExifFormat, unsigned char *, unsigned int, ExifByteOrder o_orig, ExifByteOrder o_new); @@ -121,7 +184,7 @@ void exif_array_set_byte_order (ExifForm /* For compatibility with older versions */ -/*! \deprecated Use EXIF_TAG_SUB_SEC_TIME instead */ +/*! \deprecated Use EXIF_TAG_SUB_SEC_TIME instead. */ #define EXIF_TAG_SUBSEC_TIME EXIF_TAG_SUB_SEC_TIME #ifdef __cplusplus Index: exif-tag.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -p -d -r1.19 -r1.20 --- exif-tag.h 25 Nov 2008 09:30:38 -0000 1.19 +++ exif-tag.h 27 Nov 2008 06:54:45 -0000 1.20 @@ -184,13 +184,21 @@ typedef enum { /*! What level of support a tag enjoys in the EXIF standard */ typedef enum { + /*! The meaning of this tag is unknown */ EXIF_SUPPORT_LEVEL_UNKNOWN = 0, + + /*! This tag is not found in the given IFD */ EXIF_SUPPORT_LEVEL_NOT_RECORDED, + + /*! This tag is mandatory in the given IFD */ EXIF_SUPPORT_LEVEL_MANDATORY, + + /*! This tag is optional in the given IFD */ EXIF_SUPPORT_LEVEL_OPTIONAL } ExifSupportLevel; /*! Return the tag ID given its unique textual name. + * * \param[in] name tag name * \return tag ID */ @@ -199,6 +207,7 @@ ExifTag exif_tag_from_name /*! Return a 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 @@ -206,6 +215,7 @@ ExifTag exif_tag_from_name const char *exif_tag_get_name_in_ifd (ExifTag tag, ExifIfd ifd); /*! Return a 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 @@ -214,6 +224,7 @@ const char *exif_tag_get_title_in_i /*! Return a 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 @@ -222,6 +233,7 @@ const char *exif_tag_get_descriptio /*! Return whether the given tag is mandatory or not in the given IFD and * data type according to the EXIF specification. + * * \param[in] tag EXIF tag * \param[in] ifd IFD * \param[in] t data type @@ -231,18 +243,18 @@ ExifSupportLevel exif_tag_get_support_le /* Don't use these functions. They are here for compatibility only. */ -/*! \deprecated Use exif_tag_get_name_in_ifd instead */ +/*! \deprecated Use #exif_tag_get_name_in_ifd instead */ const char *exif_tag_get_name (ExifTag tag); -/*! \deprecated Use exif_tag_get_title_in_ifd instead */ +/*! \deprecated Use #exif_tag_get_title_in_ifd instead */ const char *exif_tag_get_title (ExifTag tag); -/*! \deprecated Use exif_tag_get_description_in_ifd instead */ +/*! \deprecated Use #exif_tag_get_description_in_ifd instead */ const char *exif_tag_get_description (ExifTag tag); /* Don't use these definitions. They are here for compatibility only. */ -/*! \deprecated Use EXIF_TAG_PRINT_IMAGE_MATCHING instead */ +/*! \deprecated Use EXIF_TAG_PRINT_IMAGE_MATCHING instead. */ #define EXIF_TAG_UNKNOWN_C4A5 EXIF_TAG_PRINT_IMAGE_MATCHING #ifdef __cplusplus Index: exif-mnote-data.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-mnote-data.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -p -d -r1.7 -r1.8 --- exif-mnote-data.h 25 Nov 2008 09:30:38 -0000 1.7 +++ exif-mnote-data.h 27 Nov 2008 06:54:45 -0000 1.8 @@ -35,11 +35,29 @@ typedef struct _ExifMnoteData ExifMnoteD void exif_mnote_data_ref (ExifMnoteData *); void exif_mnote_data_unref (ExifMnoteData *); -void exif_mnote_data_load (ExifMnoteData *, const unsigned char *, - unsigned int); -void exif_mnote_data_save (ExifMnoteData *, unsigned char **, unsigned int *); +/*! Load the MakerNote data from a memory buffer. + * + * \param[in] d MakerNote data + * \param[in] buf pointer to raw MakerNote tag data + * \param[in] buf_siz number of bytes of data at buf + */ +void exif_mnote_data_load (ExifMnoteData *d, const unsigned char *buf, + unsigned int buf_siz); + +/*! + * Save the raw MakerNote data into a memory buffer. The buffer is + * allocated by this function and must subsequently be freed by the + * caller. + * + * \param[in,out] d extract the data from this structure + * \param[out] buf pointer to buffer pointer containing MakerNote data on return + * \param[out] buf_siz pointer to the size of the buffer + */ +void exif_mnote_data_save (ExifMnoteData *d, unsigned char **buf, + unsigned int *buf_siz); /*! 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 */ @@ -47,6 +65,7 @@ unsigned int exif_mnote_data_count /*! 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 @@ -56,6 +75,7 @@ unsigned int exif_mnote_data_get_id /*! 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 @@ -63,6 +83,7 @@ unsigned int exif_mnote_data_get_id 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 @@ -70,6 +91,7 @@ const char *exif_mnote_data_get_name 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 Index: exif-mem.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-mem.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -p -d -r1.7 -r1.8 --- exif-mem.h 22 Nov 2008 07:08:56 -0000 1.7 +++ exif-mem.h 27 Nov 2008 06:54:45 -0000 1.8 @@ -32,20 +32,24 @@ extern "C" { #endif /* __cplusplus */ /*! Should work like calloc() + * * \param[in] s the size of the block to allocate. - * \returns the allocated memory and initialized. + * \return the allocated memory and initialized. */ typedef void * (* ExifMemAllocFunc) (ExifLong s); /*! Should work like realloc() + * * \param[in] p the pointer to reallocate * \param[in] s the size of the reallocated block - * \returns allocated memory + * \return allocated memory */ typedef void * (* ExifMemReallocFunc) (void *p, ExifLong s); + /*! Free method for ExifMem + * * \param[in] p the pointer to free - * \returns the freed pointer + * \return the freed pointer */ typedef void (* ExifMemFreeFunc) (void *p); @@ -53,6 +57,7 @@ typedef void (* ExifMemFreeFunc) (v typedef struct _ExifMem ExifMem; /*! Create a new ExifMem + * * \param[in] a the allocator function * \param[in] r the reallocator function * \param[in] f the free function @@ -62,7 +67,8 @@ ExifMem *exif_mem_new (ExifMemAllocFun /*! Refcount an ExifMem */ void exif_mem_ref (ExifMem *); -/*! Unrefcount an ExifMem + +/*! Unrefcount an ExifMem. * If the refcount reaches 0, the ExifMem is freed */ void exif_mem_unref (ExifMem *); @@ -72,7 +78,8 @@ void *exif_mem_realloc (ExifMem *m, void void exif_mem_free (ExifMem *m, void *p); /*! The default ExifMem for your convenience - * \returns return the default ExifMem + * + * \return return the default ExifMem */ ExifMem *exif_mem_new_default (void); Index: exif-loader.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-loader.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -p -d -r1.9 -r1.10 --- exif-loader.h 25 Nov 2008 09:30:38 -0000 1.9 +++ exif-loader.h 27 Nov 2008 06:54:45 -0000 1.10 @@ -35,34 +35,40 @@ extern "C" { typedef struct _ExifLoader ExifLoader; /*! Allocate a new #ExifLoader + * * \return allocated ExifLoader */ ExifLoader *exif_loader_new (void); /*! Allocate a new #ExifLoader using an #ExifMem + * * \param[in] mem the ExifMem * \return allocated ExifLoader */ ExifLoader *exif_loader_new_mem (ExifMem *mem); /*! 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 ExifLoader for which to decrease the refcount - * If the refcount reaches 0, the ExifLoader is freed. +/*! Decrease the refcount of the #ExifLoader. + * If the refcount reaches 0, the loader is freed. + * + * \param[in] loader ExifLoader for which to decrease the refcount */ void exif_loader_unref (ExifLoader *loader); /*! Load a file into the given #ExifLoader from the filesystem. + * * \param[in] loader loader to write to * \param[in] fname path to the file to read */ void exif_loader_write_file (ExifLoader *loader, const char *fname); /*! Load a buffer into the #ExifLoader from a memory buffer. + * * \param[in] loader loader to write to * \param[in] buf buffer to read from * \param[in] sz size of the buffer @@ -72,11 +78,13 @@ void exif_loader_write_file (Exif unsigned char exif_loader_write (ExifLoader *loader, unsigned char *buf, unsigned int sz); /*! Reset the ExifLoader to its newly-initialized state + * * \param[in] loader the loader */ void exif_loader_reset (ExifLoader *loader); /*! Create an ExifData from an ExifLoader + * * \param[in] loader the loader * \return allocated ExifData */ Index: exif.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -p -d -r1.10 -r1.11 --- exif.h 25 Nov 2008 09:30:38 -0000 1.10 +++ exif.h 27 Nov 2008 06:54:45 -0000 1.11 @@ -66,7 +66,7 @@ * The programmer must ensure that each object allocated by libexif is only * used in a single thread at once. For example, an ExifData* allocated * in one thread can't be used in a second thread if there is any chance - * that the first thread could use it at the same time. Two threads + * that the first thread could use it at the same time. Multiple threads * can use libexif without issues if they never share handles. * */ Index: exif-entry.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -p -d -r1.18 -r1.19 --- exif-entry.h 25 Nov 2008 09:30:38 -0000 1.18 +++ exif-entry.h 27 Nov 2008 06:54:45 -0000 1.19 @@ -52,25 +52,30 @@ struct _ExifEntry { /* Lifecycle */ -/*! Reserve memory for and initialize new #ExifEntry* */ +/*! Reserve memory for and initialize new #ExifEntry. + * \return new allocated #ExifEntry + */ 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. + * When the reference count drops to zero, free the entry. + * * \param[in] entry #ExifEntry */ void exif_entry_unref (ExifEntry *entry); -/*! Actually free the #ExifEntry* +/*! Actually free the #ExifEntry. * - * \deprecated Should not be called directly. Use exif_entry_ref() and - * exif_entry_unref() instead. + * \deprecated Should not be called directly. Use #exif_entry_ref and + * #exif_entry_unref instead. * * \param[in] entry EXIF entry */ @@ -79,6 +84,7 @@ void exif_entry_free (ExifEntry /*! Initialize an empty #ExifEntry with default data in the correct format * 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 */ @@ -86,6 +92,7 @@ void exif_entry_initialize (ExifE /*! When necessary and possible, fix the type or format of the given * EXIF entry when it is of the wrong type or in an invalid format. + * * \param[in,out] entry EXIF entry */ void exif_entry_fix (ExifEntry *entry); @@ -108,14 +115,16 @@ const char *exif_entry_get_value (ExifEn /*! 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 + * \return #ExifIfd, or #EXIF_IFD_COUNT on error */ #define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT) Index: exif-data.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -p -d -r1.18 -r1.19 --- exif-data.h 25 Nov 2008 09:30:38 -0000 1.18 +++ exif-data.h 27 Nov 2008 06:54:45 -0000 1.19 @@ -52,24 +52,35 @@ struct _ExifData ExifDataPrivate *priv; }; -/*! Allocate a new #ExifData. - * \return allocated #ExifData +/*! Allocate a new, empty #ExifData. + * + * \return allocated #ExifData, or NULL on error */ ExifData *exif_data_new (void); ExifData *exif_data_new_mem (ExifMem *); -/*! Load EXIF data from a JPEG file. - * \param[in] path filename including path - * \return allocated #ExifData, or NULL on error +/*! Allocate a new #ExifData and load EXIF data from a JPEG file. + * Uses an #ExifLoader internally to do the loading. + * + * \param[in] path filename including path + * \return allocated #ExifData, or NULL on error */ ExifData *exif_data_new_from_file (const char *path); +/*! Allocate a new #ExifData and load EXIF data from a memory buffer. + * + * \param[in] data pointer to raw JPEG or EXIF data + * \param[in] size number of bytes of data at data + * \return allocated #ExifData, or NULL on error + */ ExifData *exif_data_new_from_data (const unsigned char *data, unsigned int size); /*! Load the #ExifData structure from the raw JPEG or EXIF data in the given - * memory buffer. + * memory buffer. If the EXIF data contains a recognized MakerNote, it is + * loaded and stored as well for later retrieval by #exif_data_get_mnote_data. + * * \param[in,out] data EXIF data * \param[in] d pointer to raw JPEG or EXIF data * \param[in] size number of bytes of data at d @@ -80,6 +91,7 @@ void exif_data_load_data (ExifData /*! Store raw EXIF data representing the #ExifData structure into a memory * buffer. The buffer is allocated by this function and must subsequently be * freed by the caller. + * * \param[in] data EXIF data * \param[out] d pointer to buffer pointer containing raw EXIF data on return * \param[out] ds pointer to variable to hold the number of bytes of @@ -93,6 +105,7 @@ void exif_data_unref (ExifData *dat void exif_data_free (ExifData *data); /*! Return the byte order in use by this EXIF structure. + * * \param[in] data EXIF data * \return byte order */ @@ -101,21 +114,25 @@ ExifByteOrder exif_data_get_byte_order /*! Set the byte order to use for this EXIF data. If any tags already exist * (including MakerNote tags) they are are converted to the specified byte * order. + * * \param[in,out] data EXIF data * \param[in] order byte order */ void exif_data_set_byte_order (ExifData *data, ExifByteOrder order); -/*! Return the MakerNote data out of the EXIF data. +/*! Return the MakerNote data out of the EXIF data. Only certain + * MakerNote formats that are recognized by libexif are supported. + * * \param[in] d EXIF data - * \return MakerNote data, or NULL if not found + * \return MakerNote data, or NULL if not found or not supported */ ExifMnoteData *exif_data_get_mnote_data (ExifData *d); -/*! Fix the EXIF data to bring it into specification. Call exif_content_fix +/*! Fix the EXIF data to bring it into specification. Call #exif_content_fix * on each IFD to fix existing entries, create any new entries that are * mandatory but do not yet exist, and remove any entries that are not * allowed. + * * \param[in,out] d EXIF data */ void exif_data_fix (ExifData *d); @@ -123,6 +140,7 @@ void exif_data_fix (ExifData * typedef void (* ExifDataForeachContentFunc) (ExifContent *, void *user_data); /*! Execute a 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] user_data data to pass into func on each call @@ -143,58 +161,67 @@ typedef enum { EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE = 1 << 2 } ExifDataOption; -/*! Returns short textual description of the given #ExifDataOption. +/*! Return a short textual description of the given #ExifDataOption. + * * \param[in] o option * \return localized textual description of the option */ const char *exif_data_option_get_name (ExifDataOption o); -/*! Returns verbose textual description of the given #ExifDataOption. +/*! Return a verbose textual description of the given #ExifDataOption. + * * \param[in] o option * \return verbose localized textual description of the option */ const char *exif_data_option_get_description (ExifDataOption o); /*! Set the given option on the given #ExifData. + * * \param[in] d EXIF data * \param[in] o option */ void exif_data_set_option (ExifData *d, ExifDataOption o); /*! Clear the given option on the given #ExifData. + * * \param[in] d EXIF data * \param[in] o option */ void exif_data_unset_option (ExifData *d, ExifDataOption o); /*! Set the data type for the given #ExifData. + * * \param[in] d EXIF data * \param[in] dt data type */ 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_COUNT on error */ ExifDataType exif_data_get_data_type (ExifData *d); /*! 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); /*! 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 + * \return #ExifEntry* if found, else NULL if not found */ #define exif_data_get_entry(d,t) \ (exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ? \ Index: exif-log.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-log.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -p -d -r1.10 -r1.11 --- exif-log.h 22 Nov 2008 07:08:56 -0000 1.10 +++ exif-log.h 27 Nov 2008 06:54:45 -0000 1.11 @@ -34,18 +34,20 @@ extern "C" { typedef struct _ExifLog ExifLog; /*! Create a new logging instance. - * \return new instance of #ExifLog * \see exif_log_free + * + * \return new instance of #ExifLog */ 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. +/*! Delete instance of #ExifLog. + * \see exif_log_new + * * \param[in] log #ExifLog * \return new instance of #ExifLog - * \see exif_log_new */ void exif_log_free (ExifLog *log); @@ -57,12 +59,14 @@ typedef enum { } ExifLogCode; /*! 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 */ @@ -74,6 +78,7 @@ typedef void (* ExifLogFunc) (ExifLog *l const char *format, va_list args, void *data); /*! Register log callback function. + * * \param[in] log #ExifLog * \param[in] func callback function to set * \param[in] data data to pass into callback function Index: exif-ifd.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-ifd.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -d -r1.4 -r1.5 --- exif-ifd.h 17 Feb 2008 18:31:55 -0000 1.4 +++ exif-ifd.h 27 Nov 2008 06:54:45 -0000 1.5 @@ -21,6 +21,7 @@ #ifndef __EXIF_IFD_H__ #define __EXIF_IFD_H__ +/*! Possible EXIF Image File Directories */ typedef enum { EXIF_IFD_0 = 0, /*!< */ EXIF_IFD_1, /*!< */ @@ -30,6 +31,13 @@ typedef enum { EXIF_IFD_COUNT /*!< Not a real value, just (max_value + 1). */ } ExifIfd; +/*! Return a textual name of the given IFD. The name is a short, unique, + * non-localized text string containing only US-ASCII alphanumeric + * characters. + * + * \param[in] ifd IFD + * \return textual name of the IFD + */ const char *exif_ifd_get_name (ExifIfd ifd); #endif /* __EXIF_IFD_H__ */ Index: exif-format.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-format.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -p -d -r1.8 -r1.9 --- exif-format.h 22 Nov 2008 07:08:56 -0000 1.8 +++ exif-format.h 27 Nov 2008 06:54:45 -0000 1.9 @@ -45,12 +45,14 @@ typedef enum { } 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 */ |