exif-content.h File Reference

#include <libexif/exif-tag.h>
#include <libexif/exif-entry.h>
#include <libexif/exif-data.h>
#include <libexif/exif-log.h>
#include <libexif/exif-mem.h>

Go to the source code of this file.

Data Structures

struct  _ExifContent

Defines

#define exif_content_get_value(c, t, v, m)
 Return a textual representation of the EXIF data for a tag.

Typedefs

typedef struct
_ExifContent 
ExifContent
 Holds all EXIF tags in a single IFD.
typedef struct
_ExifContentPrivate 
ExifContentPrivate
typedef void(* ExifContentForeachEntryFunc )(ExifEntry *, void *user_data)

Functions

ExifContentexif_content_new (void)
ExifContentexif_content_new_mem (ExifMem *)
void exif_content_ref (ExifContent *content)
void exif_content_unref (ExifContent *content)
void exif_content_free (ExifContent *content)
void exif_content_add_entry (ExifContent *c, ExifEntry *entry)
 Add an EXIF tag to an IFD.
void exif_content_remove_entry (ExifContent *c, ExifEntry *e)
 Remove an EXIF tag from an IFD.
ExifEntryexif_content_get_entry (ExifContent *content, ExifTag tag)
 Return the ExifEntry in this IFD corresponding to the given tag.
void exif_content_fix (ExifContent *c)
 Fix the IFD to bring it into specification.
void exif_content_foreach_entry (ExifContent *content, ExifContentForeachEntryFunc func, void *user_data)
 Executes function on each EXIF tag in this IFD in turn.
ExifIfd exif_content_get_ifd (ExifContent *c)
 Return the IFD number in which the given ExifContent is found.
void exif_content_dump (ExifContent *content, unsigned int indent)
 Dump contents of the IFD to stdout.
void exif_content_log (ExifContent *content, ExifLog *log)
 Set the log message object for this IFD.


Detailed Description

Handling EXIF IFDs

Definition in file exif-content.h.


Define Documentation

#define exif_content_get_value ( c,
t,
v,
 ) 

Value:

Return a textual representation of the EXIF data for a tag.

Parameters:
[in] c ExifContent* for an IFD
[in] t ExifTag to return
[out] v char* buffer in which to store value
[in] m unsigned int length of the buffer v
Returns:
the v pointer, or NULL on error

Definition at line 122 of file exif-content.h.


Typedef Documentation

typedef struct _ExifContent ExifContent

Holds all EXIF tags in a single IFD.

Definition at line 31 of file exif-content.h.

typedef void(* ExifContentForeachEntryFunc)(ExifEntry *, void *user_data)

Definition at line 94 of file exif-content.h.

typedef struct _ExifContentPrivate ExifContentPrivate

Definition at line 32 of file exif-content.h.


Function Documentation

void exif_content_add_entry ( ExifContent c,
ExifEntry entry 
)

Add an EXIF tag to an IFD.

If this tag already exists in the IFD, this function does nothing.

Precondition:
The "tag" member of the entry must be set on entry.
Parameters:
[out] c IFD
[in] entry EXIF entry to add

Definition at line 133 of file exif-content.c.

References _ExifContent::count, _ExifContent::entries, exif_content_get_entry(), exif_entry_ref(), exif_log(), EXIF_LOG_CODE_DEBUG, exif_mem_realloc(), exif_tag_get_name(), _ExifContentPrivate::log, _ExifContentPrivate::mem, _ExifEntry::parent, _ExifContent::priv, and _ExifEntry::tag.

void exif_content_dump ( ExifContent content,
unsigned int  indent 
)

Dump contents of the IFD to stdout.

This is intended for diagnostic purposes only.

Parameters:
[in] content IFD data
[in] indent how many levels deep to indent the data

Definition at line 114 of file exif-content.c.

References _ExifContent::count, _ExifContent::entries, and exif_entry_dump().

void exif_content_fix ( ExifContent c  ) 

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.

Parameters:
[in,out] c EXIF content for an IFD

Definition at line 278 of file exif-content.c.

References _ExifContent::count, exif_content_add_entry(), exif_content_foreach_entry(), exif_content_get_entry(), exif_content_get_ifd(), exif_data_get_data_type(), exif_entry_initialize(), exif_entry_new(), exif_entry_unref(), exif_ifd_get_name(), exif_log(), EXIF_LOG_CODE_DEBUG, EXIF_SUPPORT_LEVEL_MANDATORY, exif_tag_get_name_in_ifd(), exif_tag_get_support_level_in_ifd(), exif_tag_table_count(), exif_tag_table_get_tag(), fix_func(), ifd, _ExifContentPrivate::log, _ExifContent::parent, _ExifContent::priv, and remove_not_recorded().

void exif_content_foreach_entry ( ExifContent content,
ExifContentForeachEntryFunc  func,
void *  user_data 
)

Executes function on each EXIF tag in this IFD in turn.

The tags will not necessarily be visited in numerical order.

Parameters:
[in,out] content IFD over which to iterate
[in] func function to call for each entry
[in] user_data data to pass into func on each call

Definition at line 210 of file exif-content.c.

References _ExifContent::count, and _ExifContent::entries.

void exif_content_free ( ExifContent content  ) 

Definition at line 93 of file exif-content.c.

References _ExifContent::count, _ExifContent::entries, exif_entry_unref(), exif_log_unref(), exif_mem_free(), exif_mem_unref(), _ExifContentPrivate::log, _ExifContentPrivate::mem, and _ExifContent::priv.

ExifEntry* exif_content_get_entry ( ExifContent content,
ExifTag  tag 
)

Return the ExifEntry in this IFD corresponding to the given tag.

This is a pointer into a member of the ExifContent array and must NOT be freed or unrefed by the caller.

Parameters:
[in] content EXIF content for an IFD
[in] tag EXIF tag to return
Returns:
ExifEntry of the tag, or NULL on error

Definition at line 196 of file exif-content.c.

References _ExifContent::count, _ExifContent::entries, and _ExifEntry::tag.

ExifIfd exif_content_get_ifd ( ExifContent c  ) 

Return the IFD number in which the given ExifContent is found.

Parameters:
[in] c an ExifContent*
Returns:
IFD number, or EXIF_IFD_COUNT on error

Definition at line 234 of file exif-content.c.

References EXIF_IFD_0, EXIF_IFD_1, EXIF_IFD_COUNT, EXIF_IFD_EXIF, EXIF_IFD_GPS, EXIF_IFD_INTEROPERABILITY, and _ExifContent::parent.

void exif_content_log ( ExifContent content,
ExifLog log 
)

Set the log message object for this IFD.

Parameters:
[in] content IFD
[in] log ExifLog*

Definition at line 223 of file exif-content.c.

References exif_log_ref(), exif_log_unref(), _ExifContentPrivate::log, and _ExifContent::priv.

ExifContent* exif_content_new ( void   ) 

Definition at line 43 of file exif-content.c.

References exif_content_new_mem(), exif_mem_new_default(), and exif_mem_unref().

ExifContent* exif_content_new_mem ( ExifMem  ) 

Definition at line 54 of file exif-content.c.

References exif_mem_alloc(), exif_mem_free(), exif_mem_ref(), _ExifContentPrivate::mem, _ExifContent::priv, and _ExifContentPrivate::ref_count.

void exif_content_ref ( ExifContent content  ) 

Definition at line 79 of file exif-content.c.

References _ExifContent::priv, and _ExifContentPrivate::ref_count.

void exif_content_remove_entry ( ExifContent c,
ExifEntry e 
)

Remove an EXIF tag from an IFD.

If this tag does not exist in the IFD, this function does nothing.

Parameters:
[out] c IFD
[in] e EXIF entry to remove

Definition at line 157 of file exif-content.c.

References _ExifContent::count, _ExifContent::entries, exif_entry_unref(), exif_mem_free(), exif_mem_realloc(), _ExifContentPrivate::mem, _ExifEntry::parent, and _ExifContent::priv.

void exif_content_unref ( ExifContent content  ) 

Definition at line 85 of file exif-content.c.

References exif_content_free(), _ExifContent::priv, and _ExifContentPrivate::ref_count.


SourceForge.net Logo Generated by doxygen