EXIF library (libexif) API  0.6.25
exif-entry.h
Go to the documentation of this file.
1 
4 /*
5  * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301 USA.
21  *
22  * SPDX-License-Identifier: LGPL-2.0-or-later
23  */
24 
25 #ifndef LIBEXIF_EXIF_ENTRY_H
26 #define LIBEXIF_EXIF_ENTRY_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
37 typedef struct _ExifEntry ExifEntry;
38 typedef struct _ExifEntryPrivate ExifEntryPrivate;
39 
40 #include <libexif/exif-content.h>
41 #include <libexif/exif-format.h>
42 #include <libexif/exif-mem.h>
43 
45 struct _ExifEntry {
48 
51 
54  unsigned long components;
55 
59  unsigned char *data;
60 
63  unsigned int size;
64 
68 
70  ExifEntryPrivate *priv;
71 };
72 
73 /* Lifecycle */
74 
83 
93 
100 void exif_entry_ref (ExifEntry *entry);
101 
107 void exif_entry_unref (ExifEntry *entry);
108 
116 void exif_entry_free (ExifEntry *entry);
117 
128 
142 void exif_entry_fix (ExifEntry *entry);
143 
144 
145 /* For your convenience */
146 
166 const char *exif_entry_get_value (ExifEntry *entry, char *val,
167  unsigned int maxlen);
168 
175 void exif_entry_dump (ExifEntry *entry, unsigned int indent);
176 
182 #define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
183 
184 #ifdef __cplusplus
185 }
186 #endif /* __cplusplus */
187 
188 #endif /* !defined(LIBEXIF_EXIF_ENTRY_H) */
ExifEntryPrivate * priv
Internal data to be used by libexif itself.
Definition: exif-entry.h:70
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:854
Definition: exif-content.h:42
ExifTag
EXIF tags.
Definition: exif-tag.h:36
ExifContent * parent
ExifContent containing this entry.
Definition: exif-entry.h:67
void exif_entry_ref(ExifEntry *entry)
Increase reference counter for ExifEntry.
Definition: exif-entry.c:141
Data found in one EXIF tag.
Definition: exif-entry.h:45
struct _ExifMem ExifMem
ExifMem define a memory allocator.
Definition: exif-mem.h:59
void exif_entry_free(ExifEntry *entry)
Actually free the ExifEntry.
Definition: exif-entry.c:159
ExifFormat
EXIF tag data formats.
Definition: exif-format.h:34
ExifEntry * exif_entry_new_mem(ExifMem *)
Reserve memory for and initialize new ExifEntry using the specified memory allocator.
Definition: exif-entry.c:124
ExifTag tag
EXIF tag for this entry.
Definition: exif-entry.h:47
Handling native EXIF data types.
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:207
void exif_entry_unref(ExifEntry *entry)
Decrease reference counter for ExifEntry.
Definition: exif-entry.c:149
ExifEntry * exif_entry_new(void)
Reserve memory for and initialize a new ExifEntry.
Definition: exif-entry.c:113
unsigned char * data
Pointer to the raw EXIF data for this entry.
Definition: exif-entry.h:59
Define the ExifMem data type and the associated functions.
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:1468
unsigned long components
Number of elements in the array, if this is an array entry.
Definition: exif-entry.h:54
Handling EXIF IFDs.
void exif_entry_dump(ExifEntry *entry, unsigned int indent)
Dump text representation of ExifEntry to stdout.
Definition: exif-entry.c:600
ExifFormat format
Type of data in this entry.
Definition: exif-entry.h:50
unsigned int size
Number of bytes in the buffer at data.
Definition: exif-entry.h:63