exif-content.h
Go to the documentation of this file.
/*
* Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/
#ifndef __EXIF_CONTENT_H__
#define __EXIF_CONTENT_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _ExifContent ExifContent;
typedef struct _ExifContentPrivate ExifContentPrivate;
#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>
struct _ExifContent
{
ExifEntry **entries;
unsigned int count;
ExifData *parent;
ExifContentPrivate *priv;
};
/* Lifecycle */
ExifContent *exif_content_new (void);
ExifContent *exif_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);
void exif_content_remove_entry (ExifContent *c, ExifEntry *e);
ExifEntry *exif_content_get_entry (ExifContent *content, ExifTag tag);
void exif_content_fix (ExifContent *c);
typedef void (* ExifContentForeachEntryFunc) (ExifEntry *, void *user_data);
void exif_content_foreach_entry (ExifContent *content,
ExifContentForeachEntryFunc func,
void *user_data);
ExifIfd exif_content_get_ifd (ExifContent *c);
#define exif_content_get_value(c,t,v,m) \
(exif_content_get_entry (c,t) ? \
exif_entry_get_value (exif_content_get_entry (c,t),v,m) : NULL)
void exif_content_dump (ExifContent *content, unsigned int indent);
void exif_content_log (ExifContent *content, ExifLog *log);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __EXIF_CONTENT_H__ */
_ExifEntry
Data found in one EXIF tag.
Definition: exif-entry.h:43
exif_content_foreach_entry
void exif_content_foreach_entry(ExifContent *content, ExifContentForeachEntryFunc func, void *user_data)
Executes function on each EXIF tag in this IFD in turn.
Definition: exif-content.c:210
_ExifEntry::tag
ExifTag tag
EXIF tag for this entry.
Definition: exif-entry.h:45
exif_content_remove_entry
void exif_content_remove_entry(ExifContent *c, ExifEntry *e)
Remove an EXIF tag from an IFD.
Definition: exif-content.c:157
exif_entry_ref
void exif_entry_ref(ExifEntry *entry)
Increase reference counter for ExifEntry.
Definition: exif-entry.c:137
exif-system.h
System specific definitions, not for installation!
exif_mem_new_default
ExifMem * exif_mem_new_default(void)
Create a new ExifMem with default values for your convenience.
Definition: exif-mem.c:95
exif_content_add_entry
void exif_content_add_entry(ExifContent *c, ExifEntry *entry)
Add an EXIF tag to an IFD.
Definition: exif-content.c:133
ExifTag
ExifTag
EXIF tags.
Definition: exif-tag.h:34
ExifLog
struct _ExifLog ExifLog
State maintained by the logging interface.
Definition: exif-log.h:34
_ExifContent
Definition: exif-content.h:40
exif_content_get_entry
ExifEntry * exif_content_get_entry(ExifContent *content, ExifTag tag)
Return the ExifEntry in this IFD corresponding to the given tag.
Definition: exif-content.c:196
exif-entry.h
Handling EXIF entries.
exif_tag_get_name
const char * exif_tag_get_name(ExifTag tag)
Definition: exif-tag.c:1061
exif_tag_table_count
unsigned int exif_tag_table_count(void)
Return the number of entries in the EXIF tag table, including the terminating NULL entry.
Definition: exif-tag.c:881
EXIF_SUPPORT_LEVEL_MANDATORY
This tag is mandatory in the given IFD.
Definition: exif-tag.h:196
exif_tag_get_name_in_ifd
const char * exif_tag_get_name_in_ifd(ExifTag tag, ExifIfd ifd)
Return a textual name of the given tag when found in the given IFD.
Definition: exif-tag.c:946
exif_mem_unref
void exif_mem_unref(ExifMem *)
Unrefcount an ExifMem.
Definition: exif-mem.c:61
_ExifEntry::parent
ExifContent * parent
ExifContent containing this entry.
Definition: exif-entry.h:65
exif_content_fix
void exif_content_fix(ExifContent *c)
Fix the IFD to bring it into specification.
Definition: exif-content.c:278
exif-content.h
Handling EXIF IFDs.
exif_content_dump
void exif_content_dump(ExifContent *content, unsigned int indent)
Dump contents of the IFD to stdout.
Definition: exif-content.c:114
exif-log.h
Log message infrastructure.
exif_entry_unref
void exif_entry_unref(ExifEntry *entry)
Decrease reference counter for ExifEntry.
Definition: exif-entry.c:145
exif_entry_fix
void exif_entry_fix(ExifEntry *entry)
Fix the type or format of the given EXIF entry to bring it into spec.
Definition: exif-entry.c:196
EXIF_SUPPORT_LEVEL_NOT_RECORDED
This tag is not allowed in the given IFD.
Definition: exif-tag.h:193
exif_entry_initialize
void exif_entry_initialize(ExifEntry *e, ExifTag tag)
Initialize an empty ExifEntry with default data in the correct format for the given tag.
Definition: exif-entry.c:1408
exif-tag.h
Handling EXIF tags.
_ExifContent::parent
ExifData * parent
Data containing this content.
Definition: exif-content.h:46
exif_entry_new
ExifEntry * exif_entry_new(void)
Reserve memory for and initialize a new ExifEntry.
Definition: exif-entry.c:109
exif_tag_get_support_level_in_ifd
ExifSupportLevel exif_tag_get_support_level_in_ifd(ExifTag tag, ExifIfd ifd, ExifDataType t)
Return whether the given tag is mandatory or not in the given IFD and data type according to the EXIF...
Definition: exif-tag.c:1170
exif_data_get_data_type
ExifDataType exif_data_get_data_type(ExifData *d)
Return the data type for the given ExifData.
Definition: exif-data.c:1316
exif_content_get_ifd
ExifIfd exif_content_get_ifd(ExifContent *c)
Return the IFD number in which the given ExifContent is found.
Definition: exif-content.c:234
exif_entry_get_ifd
#define exif_entry_get_ifd(e)
Return the IFD number of the given ExifEntry.
Definition: exif-entry.h:179
ExifMem
struct _ExifMem ExifMem
ExifMem define a memory allocator.
Definition: exif-mem.h:57
exif-mem.h
Define the ExifMem data type and the associated functions. ExifMem defines the memory management func...
exif_content_log
void exif_content_log(ExifContent *content, ExifLog *log)
Set the log message object for this IFD.
Definition: exif-content.c:223
exif-data.h
Defines the ExifData type and the associated functions.
exif_entry_dump
void exif_entry_dump(ExifEntry *entry, unsigned int indent)
Dump text representation of ExifEntry to stdout.
Definition: exif-entry.c:592
ExifLong
uint32_t ExifLong
EXIF Unsigned Long data type.
Definition: exif-utils.h:54
_ExifData
Represents the entire EXIF data found in an image.
Definition: exif-data.h:46
exif_mem_ref
void exif_mem_ref(ExifMem *)
Refcount an ExifMem.
Definition: exif-mem.c:54