EXIF library (libexif) API  0.6.25
exif-loader.h
Go to the documentation of this file.
1 
4 /*
5  * Copyright (c) 2003 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_LOADER_H
26 #define LIBEXIF_EXIF_LOADER_H
27 
28 #include <libexif/exif-data.h>
29 #include <libexif/exif-log.h>
30 #include <libexif/exif-mem.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35 
37 typedef struct _ExifLoader ExifLoader;
38 
44 
51 
56 void exif_loader_ref (ExifLoader *loader);
57 
63 void exif_loader_unref (ExifLoader *loader);
64 
71 void exif_loader_write_file (ExifLoader *loader, const char *fname);
72 
82 unsigned char exif_loader_write (ExifLoader *loader, unsigned char *buf, unsigned int sz);
83 
89 void exif_loader_reset (ExifLoader *loader);
90 
106 
117 void exif_loader_get_buf (ExifLoader *loader, const unsigned char **buf,
118  unsigned int *buf_size);
119 
124 void exif_loader_log (ExifLoader *loader, ExifLog *log);
125 
126 #ifdef __cplusplus
127 }
128 #endif /* __cplusplus */
129 
130 #endif /* !defined(LIBEXIF_EXIF_LOADER_H) */
void exif_loader_get_buf(ExifLoader *loader, const unsigned char **buf, unsigned int *buf_size)
Return the raw data read by the loader.
Definition: exif-loader.c:447
ExifData * exif_loader_get_data(ExifLoader *loader)
Create an ExifData from the data in the loader.
Definition: exif-loader.c:431
struct _ExifMem ExifMem
ExifMem define a memory allocator.
Definition: exif-mem.h:59
struct _ExifLoader ExifLoader
Data used by the loader interface.
Definition: exif-loader.h:37
void exif_loader_reset(ExifLoader *loader)
Free any data previously loaded and reset the ExifLoader to its newly-initialized state...
Definition: exif-loader.c:418
Log message infrastructure.
void exif_loader_ref(ExifLoader *loader)
Increase the refcount of the ExifLoader.
Definition: exif-loader.c:387
ExifLoader * exif_loader_new(void)
Allocate a new ExifLoader.
Definition: exif-loader.c:357
void exif_loader_write_file(ExifLoader *loader, const char *fname)
Load a file into the given ExifLoader from the filesystem.
Definition: exif-loader.c:121
Define the ExifMem data type and the associated functions.
void exif_loader_unref(ExifLoader *loader)
Decrease the refcount of the ExifLoader.
Definition: exif-loader.c:409
void exif_loader_log(ExifLoader *loader, ExifLog *log)
Set the log message object used by this ExifLoader.
Definition: exif-loader.c:470
Defines the ExifData type and the associated functions.
unsigned char exif_loader_write(ExifLoader *loader, unsigned char *buf, unsigned int sz)
Load a buffer into the ExifLoader from a memory buffer.
Definition: exif-loader.c:167
Represents the entire EXIF data found in an image.
Definition: exif-data.h:47
ExifLoader * exif_loader_new_mem(ExifMem *mem)
Allocate a new ExifLoader using the specified memory allocator.
Definition: exif-loader.c:368
struct _ExifLog ExifLog
State maintained by the logging interface.
Definition: exif-log.h:36