From f54549d01a64875ee367150ec9793539f000c0b3 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 21 Nov 2008 23:08:56 -0800 Subject: [PATCH] Added Doxygen comments for the main API entry points and data structures --- ChangeLog | 5 ++++ libexif/exif-content.h | 61 +++++++++++++++++++++++++++++++++++++++------ libexif/exif-data.h | 46 ++++++++++++++++++++++++++++++---- libexif/exif-entry.c | 2 +- libexif/exif-entry.h | 45 ++++++++++++++++++++++++++------- libexif/exif-format.h | 15 ++++++++++- libexif/exif-loader.h | 39 ++++++++++++++++------------- libexif/exif-log.h | 37 +++++++++++++++++++++++----- libexif/exif-mem.h | 1 - libexif/exif-mnote-data.h | 63 ++++++++++++++++++++++++++++++++++++++++------- libexif/exif-system.h | 5 ++-- libexif/exif-tag.h | 41 +++++++++++++++++++++++++----- libexif/exif-utils.h | 45 ++++++++++++++++++++++++++++++--- libexif/exif.h | 25 +++++++++++++++++-- 14 files changed, 360 insertions(+), 70 deletions(-) diff --git a/ChangeLog b/ChangeLog index b350800..4789d30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-22 Dan Fandrich + + * Added Doxygen comments for the main API entry points and data + structures + 2008-11-18 Dan Fandrich * libexif/exif-entry.c & configure.ac: use localtime_r when available diff --git a/libexif/exif-content.h b/libexif/exif-content.h index ade2e01..7f26bfa 100644 --- a/libexif/exif-content.h +++ b/libexif/exif-content.h @@ -1,5 +1,7 @@ -/* exif-content.h - * +/*! \file exif-content.h + * \brief Handling EXIF IFDs + */ +/* * Copyright (c) 2001 Lutz Mueller * * 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 (ExifContent *content); 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 diff --git a/libexif/exif-data.h b/libexif/exif-data.h index 3b99412..15fe05f 100644 --- a/libexif/exif-data.h +++ b/libexif/exif-data.h @@ -1,6 +1,7 @@ /*! \file exif-data.h * \brief Defines the ExifData type and the associated functions. - * + */ +/* * \author Lutz Mueller * \date 2001-2005 * @@ -33,6 +34,7 @@ extern "C" { #include #include +/*! 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 *data); 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 (ExifData *, ExifDataOption); 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) : \ diff --git a/libexif/exif-entry.c b/libexif/exif-entry.c index 4a1fd1a..a025ee2 100644 --- a/libexif/exif-entry.c +++ b/libexif/exif-entry.c @@ -1124,7 +1124,7 @@ exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen) } -/** +/*! * \bug Log and report failed exif_mem_malloc() calls. */ void diff --git a/libexif/exif-entry.h b/libexif/exif-entry.h index 23731fe..f25be04 100644 --- a/libexif/exif-entry.h +++ b/libexif/exif-entry.h @@ -1,6 +1,7 @@ /*! \file exif-entry.h * \brief Handling EXIF entries - * + */ +/* * Copyright (c) 2001 Lutz Mueller * * 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 may be in + * the encoding of the current locale or the native encoding + * of the camera. * - * 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. + * \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 diff --git a/libexif/exif-format.h b/libexif/exif-format.h index 272c865..ba1a5a1 100644 --- a/libexif/exif-format.h +++ b/libexif/exif-format.h @@ -1,4 +1,7 @@ -/* exif-format.h +/*! \file exif-format.h + * \brief Handling native EXIF data types + */ +/* * * Copyright (c) 2001 Lutz Mueller * @@ -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 diff --git a/libexif/exif-loader.h b/libexif/exif-loader.h index 697e019..5d31470 100644 --- a/libexif/exif-loader.h +++ b/libexif/exif-loader.h @@ -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 (ExifLoader *loader, unsigned char *buf, unsigne * \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); diff --git a/libexif/exif-log.h b/libexif/exif-log.h index 41f4bcf..ea3d64e 100644 --- a/libexif/exif-log.h +++ b/libexif/exif-log.h @@ -1,6 +1,7 @@ /*! \file exif-log.h - * \brief log message infrastructure - * + * \brief Log message infrastructure + */ +/* * Copyright (c) 2004 Lutz Mueller * * This library is free software; you can redistribute it and/or @@ -29,12 +30,23 @@ extern "C" { #include #include +/*! 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); diff --git a/libexif/exif-mem.h b/libexif/exif-mem.h index 454e034..8f58a87 100644 --- a/libexif/exif-mem.h +++ b/libexif/exif-mem.h @@ -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 diff --git a/libexif/exif-mnote-data.h b/libexif/exif-mnote-data.h index 7c68393..bc56331 100644 --- a/libexif/exif-mnote-data.h +++ b/libexif/exif-mnote-data.h @@ -1,5 +1,7 @@ -/* exif-mnote-data.h - * +/*! \file exif-mnote-data.h + * \brief Handling EXIF MakerNote tags + */ +/* * Copyright (c) 2003 Lutz Mueller * * This library is free software; you can redistribute it and/or @@ -27,6 +29,7 @@ extern "C" { #include +/*! 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 *, const unsigned char *, 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); + +/*! 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); -/* Returns NULL or val */ -char *exif_mnote_data_get_value (ExifMnoteData *, unsigned int, char *val, unsigned int maxlen); +/*! 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 *); diff --git a/libexif/exif-system.h b/libexif/exif-system.h index 082db60..acad825 100644 --- a/libexif/exif-system.h +++ b/libexif/exif-system.h @@ -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 * * This library is free software; you can redistribute it and/or diff --git a/libexif/exif-tag.h b/libexif/exif-tag.h index 8b43405..cea44f4 100644 --- a/libexif/exif-tag.h +++ b/libexif/exif-tag.h @@ -1,5 +1,7 @@ -/* exif-tag.h - * +/*! \file exif-tag.h + * \brief Handling EXIF tags + */ +/* * Copyright (c) 2001 Lutz Mueller * * This library is free software; you can redistribute it and/or @@ -28,6 +30,7 @@ extern "C" { #include #include +/*! 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); diff --git a/libexif/exif-utils.h b/libexif/exif-utils.h index 85b650a..3e5e15c 100644 --- a/libexif/exif-utils.h +++ b/libexif/exif-utils.h @@ -1,5 +1,7 @@ -/* exif-utils.h - * +/*! \file exif-utils.h + * \brief EXIF data manipulation functions and types + */ +/* * Copyright (c) 2001 Lutz Mueller * * This library is free software; you can redistribute it and/or @@ -40,13 +42,13 @@ typedef uint16_t ExifShort; /* 2 bytes */ 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 unsigned char *b, ExifByteOrder order); 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); diff --git a/libexif/exif.h b/libexif/exif.h index 9f490ae..68bb3ef 100644 --- a/libexif/exif.h +++ b/libexif/exif.h @@ -11,18 +11,39 @@ * * \section using_libexif Using libexif * - * ##include + * \#include * * 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 * -- 2.7.4