exif-entry.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_ENTRY_H__
#define __EXIF_ENTRY_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _ExifEntry ExifEntry;
typedef struct _ExifEntryPrivate ExifEntryPrivate;
#include <libexif/exif-content.h>
#include <libexif/exif-format.h>
#include <libexif/exif-mem.h>
struct _ExifEntry {
ExifTag tag;
ExifFormat format;
unsigned long components;
unsigned char *data;
unsigned int size;
ExifContent *parent;
ExifEntryPrivate *priv;
};
/* Lifecycle */
ExifEntry *exif_entry_new (void);
ExifEntry *exif_entry_new_mem (ExifMem *);
void exif_entry_ref (ExifEntry *entry);
void exif_entry_unref (ExifEntry *entry);
void exif_entry_free (ExifEntry *entry);
void exif_entry_initialize (ExifEntry *e, ExifTag tag);
void exif_entry_fix (ExifEntry *entry);
/* For your convenience */
const char *exif_entry_get_value (ExifEntry *entry, char *val,
unsigned int maxlen);
void exif_entry_dump (ExifEntry *entry, unsigned int indent);
#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __EXIF_ENTRY_H__ */
_ExifEntry::priv
ExifEntryPrivate * priv
Internal data to be used by libexif itself.
Definition: exif-entry.h:68
exif_entry_get_value
const char * exif_entry_get_value(ExifEntry *entry, char *val, unsigned int maxlen)
Return a localized textual representation of the value of the EXIF entry.
Definition: exif-entry.c:830
_ExifContent
Definition: exif-content.h:40
ExifTag
ExifTag
EXIF tags.
Definition: exif-tag.h:34
_ExifEntry::parent
ExifContent * parent
ExifContent containing this entry.
Definition: exif-entry.h:65
exif_entry_ref
void exif_entry_ref(ExifEntry *entry)
Increase reference counter for ExifEntry.
Definition: exif-entry.c:137
_ExifEntry
Data found in one EXIF tag.
Definition: exif-entry.h:43
ExifMem
struct _ExifMem ExifMem
ExifMem define a memory allocator.
Definition: exif-mem.h:57
exif_entry_free
void exif_entry_free(ExifEntry *entry)
Actually free the ExifEntry.
Definition: exif-entry.c:155
ExifFormat
ExifFormat
EXIF tag data formats.
Definition: exif-format.h:32
exif_entry_new_mem
ExifEntry * exif_entry_new_mem(ExifMem *)
Reserve memory for and initialize new ExifEntry using the specified memory allocator.
Definition: exif-entry.c:120
_ExifEntry::tag
ExifTag tag
EXIF tag for this entry.
Definition: exif-entry.h:45
exif-format.h
Handling native EXIF data types.
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_entry_unref
void exif_entry_unref(ExifEntry *entry)
Decrease reference counter for ExifEntry.
Definition: exif-entry.c:145
exif_entry_new
ExifEntry * exif_entry_new(void)
Reserve memory for and initialize a new ExifEntry.
Definition: exif-entry.c:109
_ExifEntry::data
unsigned char * data
Pointer to the raw EXIF data for this entry.
Definition: exif-entry.h:57
exif-mem.h
Define the ExifMem data type and the associated functions.
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
_ExifEntry::components
unsigned long components
Number of elements in the array, if this is an array entry.
Definition: exif-entry.h:52
exif-content.h
Handling EXIF IFDs.
exif_entry_dump
void exif_entry_dump(ExifEntry *entry, unsigned int indent)
Dump text representation of ExifEntry to stdout.
Definition: exif-entry.c:592
_ExifEntry::format
ExifFormat format
Type of data in this entry.
Definition: exif-entry.h:48
_ExifEntry::size
unsigned int size
Number of bytes in the buffer at data.
Definition: exif-entry.h:61