EXIF library (libexif) API  0.6.25
exif-content.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_CONTENT_H
26 #define LIBEXIF_EXIF_CONTENT_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
33 typedef struct _ExifContent ExifContent;
34 typedef struct _ExifContentPrivate ExifContentPrivate;
35 
36 #include <libexif/exif-tag.h>
37 #include <libexif/exif-entry.h>
38 #include <libexif/exif-data.h>
39 #include <libexif/exif-log.h>
40 #include <libexif/exif-mem.h>
41 
43 {
44  ExifEntry **entries;
45  unsigned int count;
46 
49 
50  ExifContentPrivate *priv;
51 };
52 
53 /* Lifecycle */
54 
62 
71 
78 void exif_content_ref (ExifContent *content);
79 
85 void exif_content_unref (ExifContent *content);
86 
94 void exif_content_free (ExifContent *content);
95 
104 
112 
122 
130 void exif_content_fix (ExifContent *c);
131 
132 typedef void (* ExifContentForeachEntryFunc) (ExifEntry *, void *user_data);
133 
142  ExifContentForeachEntryFunc func,
143  void *user_data);
144 
150 ExifIfd exif_content_get_ifd (ExifContent *c);
151 
160 #define exif_content_get_value(c,t,v,m) \
161  (exif_content_get_entry (c,t) ? \
162  exif_entry_get_value (exif_content_get_entry (c,t),v,m) : NULL)
163 
170 void exif_content_dump (ExifContent *content, unsigned int indent);
171 
177 void exif_content_log (ExifContent *content, ExifLog *log);
178 
179 #ifdef __cplusplus
180 }
181 #endif /* __cplusplus */
182 
183 #endif /* !defined(LIBEXIF_EXIF_CONTENT_H) */
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:218
void exif_content_free(ExifContent *content)
Actually free the ExifContent.
Definition: exif-content.c:101
Definition: exif-content.h:42
ExifIfd exif_content_get_ifd(ExifContent *c)
Return the IFD number in which the given ExifContent is found.
Definition: exif-content.c:242
void exif_content_ref(ExifContent *content)
Increase reference counter for ExifContent.
Definition: exif-content.c:81
ExifTag
EXIF tags.
Definition: exif-tag.h:36
void exif_content_unref(ExifContent *content)
Decrease reference counter for ExifContent.
Definition: exif-content.c:90
ExifEntry * exif_content_get_entry(ExifContent *content, ExifTag tag)
Return the ExifEntry in this IFD corresponding to the given tag.
Definition: exif-content.c:204
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_content_dump(ExifContent *content, unsigned int indent)
Dump contents of the IFD to stdout.
Definition: exif-content.c:122
Log message infrastructure.
void exif_content_add_entry(ExifContent *c, ExifEntry *entry)
Add an EXIF tag to an IFD.
Definition: exif-content.c:141
ExifContent * exif_content_new(void)
Reserve memory for and initialize a new ExifContent.
Definition: exif-content.c:45
Handling EXIF tags.
void exif_content_remove_entry(ExifContent *c, ExifEntry *e)
Remove an EXIF tag from an IFD.
Definition: exif-content.c:165
void exif_content_fix(ExifContent *c)
Fix the IFD to bring it into specification.
Definition: exif-content.c:286
ExifData * parent
Data containing this content.
Definition: exif-content.h:48
void exif_content_log(ExifContent *content, ExifLog *log)
Set the log message object for this IFD.
Definition: exif-content.c:231
Handling EXIF entries.
Define the ExifMem data type and the associated functions.
Defines the ExifData type and the associated functions.
Represents the entire EXIF data found in an image.
Definition: exif-data.h:47
ExifContent * exif_content_new_mem(ExifMem *)
Reserve memory for and initialize new ExifContent using the specified memory allocator.
Definition: exif-content.c:56
struct _ExifLog ExifLog
State maintained by the logging interface.
Definition: exif-log.h:36